/* ===== PALETA DE COLORES LITHOS (CARBON-ROJO) ===== */
:root {
    /* ROJOS */
    --red-900: #7D1714;
    --red-800: #A31E1A;
    --red-700: #D22720;
    --red-600: #E6453C;
    --red-500: #EE6A62;
    --red-400: #F3928C;
    --red-300: #F7B7B3;
    --red-200: #FBD9D6;
    --red-100: #FFF2F1;

    /* CARBON / NEUTROS OSCUROS */
    --blue-900: #28323C;
    --blue-800: #34404C;
    --blue-700: #46525F;
    --blue-600: #5B6977;
    --blue-500: #697787;
    --blue-400: #8F9AAA;
    --blue-300: #B5BECA;
    --blue-200: #DBE1E8;
    --blue-100: #F3F6F8;

    /* GRADIENTES PRINCIPALES */
    --gradient-primary: linear-gradient(135deg, #d22720 0%, #f05f4f 100%);
    --gradient-hover: linear-gradient(135deg, #e6453c 0%, #be201b 100%);
    --gradient-accent: linear-gradient(90deg, #d22720 0%, #28323c 52%, #d22720 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(210, 39, 32, 0.06), rgba(30, 37, 45, 0.04) 55%, rgba(255, 255, 255, 0.9));

    /* TEXTOS */
    --text-primary: #24303A;
    --text-secondary: #485562;
    --text-muted: #6F7C88;
    --text-light: #FFFFFF;
    --text-white: #FFFFFF;

    /* FONDOS */
    --bg-body: #F8FAFB;
    --bg-card: #FFFFFF;
    --bg-soft: #F3F6F8;
    --bg-dark: var(--blue-900);

    /* BORDES */
    --border-light: #E6EBEF;
    --border-medium: #CDD5DD;
    --border-dark: var(--blue-600);

    /* SOMBRAS */
    --shadow-sm: 0 2px 8px rgba(30, 37, 45, 0.05);
    --shadow-md: 0 12px 30px -18px rgba(30, 37, 45, 0.18);
    --shadow-lg: 0 18px 45px -22px rgba(30, 37, 45, 0.22);
    --shadow-xl: 0 28px 60px -28px rgba(30, 37, 45, 0.28);
    --shadow-red: 0 12px 28px -18px rgba(210, 39, 32, 0.32);
    --shadow-blue: 0 12px 28px -18px rgba(30, 37, 45, 0.2);
    --shadow-mixed: 0 20px 40px -28px rgba(30, 37, 45, 0.22), 0 18px 34px -24px rgba(210, 39, 32, 0.18);

    /* RADIOS */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;
    
    /* TIPOGRAFÍA */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    /* TRANSICIONES */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    line-height: 1.6;
    background:
        radial-gradient(circle at top left, rgba(210, 39, 32, 0.06), transparent 26%),
        radial-gradient(circle at top right, rgba(30, 37, 45, 0.05), transparent 24%),
        var(--bg-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== UTILIDADES ===== */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ===== ANIMACIONES Y TRANSICIONES ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.8s ease-out;
}

.animate-pulse:hover {
    animation: pulse 0.6s ease-in-out;
}

/* ===== HERO SECTION MEJORADO ===== */
.hero {
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 3s infinite;
}

.hero-badge {
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.hero-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255,255,255,0.2);
}

.hero h1 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

/* ===== CARDS MEJORADOS ===== */
.card {
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.6s;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.value-card {
    transition: var(--transition);
    position: relative;
}

.value-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: var(--shadow-mixed);
}

.value-card:hover div[style*="background"] {
    transform: scale(1.1) rotate(5deg);
}

/* ===== NEWS CARDS ===== */
.news-card {
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.news-card img {
    transition: var(--transition);
}

.news-card:hover img {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.read-more {
    position: relative;
    transition: var(--transition);
}

.read-more::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--red-600);
    transition: width 0.3s ease;
}

.read-more:hover::after {
    width: 100%;
}

/* ===== BUTTONS MEJORADOS ===== */
.btn {
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    border: 2px solid transparent;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    color: white;
    border-color: rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

/* ===== NAVIGATION MEJORADA ===== */
.nav-link {
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover {
    color: var(--red-600);
}

/* ===== MEMBER CARDS ===== */
.member-card {
    transition: var(--transition);
    position: relative;
}

.member-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-xl);
}

.member-card img {
    transition: var(--transition);
}

.member-card:hover img {
    transform: scale(1.05);
    border-color: var(--red-600) !important;
}

.member-card:hover h3 {
    color: var(--red-600);
}

/* ===== MEMBER MODAL ===== */
.member-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: rgba(10, 31, 68, 0.72);
    backdrop-filter: blur(8px);
    z-index: 1000;
}

.member-modal.is-open {
    display: flex;
}

.member-modal__dialog {
    width: min(720px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(245,248,252,0.98));
    border: 1px solid rgba(255,255,255,0.7);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
}

.member-modal__close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 999px;
    background: var(--bg-soft);
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.75rem;
    line-height: 1;
    transition: var(--transition);
}

.member-modal__close:hover {
    background: var(--red-100);
    color: var(--red-700);
    transform: rotate(90deg);
}

.member-modal__header {
    text-align: center;
    margin-bottom: 2rem;
}

.member-modal__image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 4px solid var(--red-600);
    box-shadow: var(--shadow-red);
}

.member-modal__title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--blue-900);
    margin-bottom: 0.5rem;
}

.member-modal__role {
    color: var(--red-600);
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 0.35rem;
}

.member-modal__specialty {
    color: var(--text-muted);
}

.member-modal__body {
    margin-bottom: 2rem;
}

.member-modal__subtitle {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--blue-900);
    margin-bottom: 1rem;
}

.member-modal__text {
    color: var(--text-secondary);
    line-height: 1.8;
}

.member-modal__footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0,0,0,0.1);
    border-top: 4px solid var(--red-600);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== SCROLL TO TOP BUTTON ===== */
.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

/* ===== RESPONSIVE MEJORADO ===== */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
        padding: 0 15px;
    }
    
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
        padding: 0 12px;
    }
    
    .hero {
        padding: 80px 0;
    }
    
    .hero h1 {
        font-size: 2.2rem;
        line-height: 1.3;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .card:hover,
    .value-card:hover,
    .news-card:hover {
        transform: translateY(-3px);
    }
    
    .member-card:hover {
        transform: translateY(-5px);
    }
    
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
}

@media (max-width: 576px) {
    .container {
        max-width: 100%;
        padding: 0 10px;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 1.8rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .section-subtitle {
        font-size: 0.85rem;
        letter-spacing: 1px;
    }
    
    .card,
    .value-card,
    .news-card,
    .member-card {
        padding: 1rem;
    }
    
    .member-card img {
        width: 120px;
        height: 120px;
    }
    
    .member-card h3 {
        font-size: 1.1rem;
    }
    
    .member-card p {
        font-size: 0.8rem;
    }
    
    .scroll-top {
        width: 45px;
        height: 45px;
        bottom: 1rem;
        right: 1rem;
        font-size: 1rem;
    }
    
    /* Mejoras para touch devices */
    .btn,
    .nav-link,
    .member-card {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .nav-link {
        padding: 0.8rem 1rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero-badge {
        font-size: 0.75rem;
        padding: 0.4rem 1rem;
    }
    
    .stats-highlight .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stats-highlight span {
        font-size: 2.5rem !important;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
}

/* ===== MEJORAS DE ACCESIBILIDAD ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero::before {
        animation: none;
    }
}

/* ===== FORM CONTROLS ===== */
input,
select,
textarea {
    background: #ffffff;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
    box-shadow: inset 0 1px 2px rgba(40, 50, 60, 0.03);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(210, 39, 32, 0.45);
    box-shadow: 0 0 0 4px rgba(210, 39, 32, 0.12);
}

/* ===== OPTIMIZACIONES DE RENDIMIENTO ===== */
@media (hover: hover) {
    .card:hover,
    .value-card:hover,
    .news-card:hover,
    .member-card:hover {
        will-change: transform;
    }
}

/* ===== ESTILOS PARA PÁGINAS LEGALES ===== */
.main-content {
    flex: 1;
    padding: 80px 0 60px;
}

.page-header {
    text-align: center;
    margin-bottom: 60px;
}

.page-header h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--blue-900);
    margin-bottom: 16px;
    font-weight: 700;
}

.page-header p {
    color: var(--text-muted);
    font-size: 1rem;
}

.terms-content,
.privacy-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 40px;
    border: 1px solid var(--border-light);
}

.terms-section,
.privacy-section {
    margin-bottom: 40px;
}

.terms-section:last-child,
.privacy-section:last-child {
    margin-bottom: 0;
}

.terms-section h2,
.privacy-section h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--blue-900);
    margin-bottom: 20px;
    font-weight: 600;
    border-bottom: 2px solid var(--red-500);
    padding-bottom: 8px;
}

.terms-section h3,
.privacy-section h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--blue-700);
    margin: 24px 0 16px;
    font-weight: 600;
}

.terms-section p,
.privacy-section p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 16px;
}

.terms-section ul,
.privacy-section ul {
    margin: 20px 0;
    padding-left: 30px;
}

.terms-section li,
.privacy-section li {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
    list-style-type: none;
    position: relative;
}

.terms-section li::before,
.privacy-section li::before {
    content: "•";
    color: var(--red-500);
    font-weight: bold;
    position: absolute;
    left: -20px;
}

.terms-section a,
.privacy-section a {
    color: var(--red-600);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.terms-section a:hover,
.privacy-section a:hover {
    color: var(--red-700);
    text-decoration: underline;
}

/* Responsive para páginas legales */
@media (max-width: 768px) {
    .page-header h1 {
        font-size: 2rem;
    }
    
    .terms-content,
    .privacy-content {
        padding: 30px 20px;
        margin: 0 10px;
    }
    
    .terms-section h2,
    .privacy-section h2 {
        font-size: 1.3rem;
    }
    
    .terms-section h3,
    .privacy-section h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 60px 0 40px;
    }
    
    .page-header {
        margin-bottom: 40px;
    }
    
    .terms-content,
    .privacy-content {
        padding: 25px 15px;
    }
    
    .terms-section,
    .privacy-section {
        margin-bottom: 30px;
    }
    
    .terms-section h2,
    .privacy-section h2 {
        font-size: 1.2rem;
    }
}

/* ===== MEJORAS PARA IMPRESION ===== */
@media print {
    .header,
    .footer,
    .scroll-top,
    .hamburger,
    .hero-actions {
        display: none !important;
    }
    
    .hero {
        background: none !important;
        color: black !important;
        padding: 2rem 0 !important;
    }
    
    .card,
    .value-card,
    .news-card,
    .member-card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    display: block;
    font-size: 1rem;
    color: var(--red-600);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
    text-align: center;
    font-weight: 700;
    background: rgba(210, 39, 32, 0.08);
    border: 1px solid rgba(210, 39, 32, 0.12);
    border-radius: var(--radius-full);
    padding: 0.45rem 1rem;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* ===== HEADER PERSISTENTE ===== */
.header {
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: visible;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.2rem;
    transition: var(--transition);
}

.logo:hover {
    color: var(--red-600);
    transform: translateY(-1px);
}

.logo-img {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover {
    color: var(--red-600);
    background: rgba(210, 39, 32, 0.06);
}

.nav-link.active {
    color: var(--red-600);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    position: relative;
    z-index: 101;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--blue-700);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ===== GRID SYSTEM ===== */
.grid-1 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; }

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    padding-bottom: 5px;
}

.nav-link:hover {
    color: var(--red-600);
}

.nav-link.active {
    color: var(--red-600);
    font-weight: 700;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-accent);
    border-radius: var(--radius-full);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { width: 0; opacity: 0; }
    to { width: 100%; opacity: 1; }
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--blue-700);
    margin: 3px 0;
    transition: var(--transition);
    border-radius: var(--radius-full);
}

/* ===== APP CONTENT ===== */
.app-content {
    flex: 1;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== LOADING SPINNER ===== */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 400px;
    font-size: 1.2rem;
    color: var(--red-600);
}

.loading-spinner::after {
    content: '';
    width: 40px;
    height: 40px;
    margin-left: 10px;
    border: 4px solid var(--border-light);
    border-top-color: var(--red-600);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== BOTONES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 12px 32px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-mixed);
}

.btn-primary:hover {
    background: var(--gradient-hover);
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 20px 38px -18px rgba(210, 39, 32, 0.38);
}

.btn-secondary {
    background: rgba(210, 39, 32, 0.05);
    border: 2px solid var(--red-600);
    color: var(--red-600);
}

.btn-secondary:hover {
    background: var(--red-600);
    color: white;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.96);
    color: var(--blue-900);
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 48px;
    font-size: 1.2rem;
}

/* ===== CARDS ===== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    border: 1px solid rgba(30, 37, 45, 0.05);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
}

.card:hover {
    transform: translateY(-7px);
    box-shadow: var(--shadow-mixed);
}

.card-content {
    padding: 2rem;
}

/* ===== GRIDS ===== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

/* ===== FOOTER PERSISTENTE ===== */
.footer {
    background:
        radial-gradient(circle at top right, rgba(255, 255, 255, 0.08), transparent 22%),
        linear-gradient(180deg, #34404c 0%, #28323c 100%);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-logo {
    height: 60px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1);
}

.footer h4 {
    font-family: var(--font-heading);
    margin-bottom: 1rem;
    color: var(--red-400);
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--red-400);
    padding-left: 5px;
}

.social-link {
    display: inline-flex;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
    font-size: 1.2rem;
    text-decoration: none;
    color: white;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--red-600);
    transform: translateY(-3px) rotate(360deg);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem 1rem;
        box-shadow: var(--shadow-xl);
        text-align: center;
        border-top: 3px solid var(--red-600);
        z-index: 99;
    }
    
    .nav-menu.active {
        display: flex;
        animation: slideDown 0.3s ease;
    }
    
    .nav-menu li {
        margin: 0.5rem 0;
    }
    
    .nav-menu .nav-link {
        padding: 1rem;
        border-radius: var(--radius-md);
        transition: var(--transition);
        display: block;
    }
    
    .nav-menu .nav-link:hover {
        background: var(--bg-soft);
        color: var(--red-600);
        transform: none;
    }
    
    @keyframes slideDown {
        from { 
            opacity: 0; 
            transform: translateY(-20px);
        }
        to { 
            opacity: 1; 
            transform: translateY(0);
        }
    }
    
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer ul li {
        justify-content: center;
    }
    
    .footer-social {
        justify-content: center;
        display: flex;
    }
}

@media (max-width: 480px) {
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .hero-actions {
        flex-direction: column;
    }
}

/* ===== UI POLISH OVERRIDES ===== */
.header {
    background: rgba(248, 250, 251, 0.82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 16px 32px -28px rgba(30, 37, 45, 0.38);
    border-bottom: 1px solid rgba(255, 255, 255, 0.72);
    transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--shadow-md);
    border-bottom-color: var(--border-light);
}

.navbar {
    min-height: 78px;
    gap: 1rem;
}

.nav-menu {
    gap: 0.5rem;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-full);
}

.nav-link::after {
    bottom: 6px;
    height: 3px;
}

.nav-link:hover {
    background: rgba(210, 39, 32, 0.08);
}

.nav-link.active {
    color: var(--red-700);
    background: rgba(210, 39, 32, 0.12);
}

.app-content {
    min-height: calc(100vh - 220px);
    transition: opacity 0.28s ease, transform 0.28s ease;
}

.app-content.is-transitioning {
    opacity: 0;
    transform: translateY(10px);
}

.loading-spinner {
    min-height: 42vh;
    gap: 0.75rem;
}

.member-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    height: 100%;
}

.member-card > div:last-child {
    margin-top: auto;
}

.directory-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 1.25rem auto 0;
    max-width: 800px;
}

.directory-results {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.directory-results strong {
    color: var(--blue-900);
}

.directory-clear {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-medium);
}

.directory-clear:hover {
    color: var(--red-700);
    border-color: rgba(210, 39, 32, 0.35);
    background: rgba(255, 255, 255, 0.8);
}

@media (max-width: 768px) {
    body.menu-open {
        overflow: hidden;
    }

    .nav-menu {
        position: fixed;
        top: 79px;
        left: 0;
        right: 0;
        height: calc(100vh - 79px);
        padding: 1rem;
        gap: 0.5rem;
        text-align: left;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        pointer-events: none;
        display: flex;
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .nav-menu li {
        margin: 0;
        width: 100%;
    }

    .nav-menu .nav-link {
        width: 100%;
        justify-content: flex-start;
        padding: 1rem 1.1rem;
        background: rgba(255, 255, 255, 0.78);
        border: 1px solid var(--border-light);
        box-shadow: var(--shadow-sm);
    }

    .directory-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .directory-results,
    .directory-clear {
        width: 100%;
        justify-content: center;
    }
}

.dashboard-shell {
    display: grid;
    grid-template-columns: 320px minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.dashboard-sidebar,
.dashboard-panel {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.dashboard-sidebar {
    position: sticky;
    top: 100px;
    padding: 1.5rem;
    display: grid;
    gap: 1.25rem;
}

.dashboard-brand__kicker,
.dashboard-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--red-700);
}

.dashboard-brand__title,
.dashboard-panel__title,
.dashboard-list-panel__title {
    font-family: var(--font-heading);
    color: var(--blue-900);
}

.dashboard-brand__title {
    font-size: 1.7rem;
    margin: 0.35rem 0 0.65rem;
}

.dashboard-brand__text,
.dashboard-panel__summary,
.dashboard-account__card p,
.dashboard-record-card p,
.dashboard-empty-state,
.dashboard-form__hint {
    color: var(--text-muted);
}

.dashboard-stats {
    display: grid;
    gap: 0.9rem;
}

.dashboard-stat-card {
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(145deg, rgba(210, 39, 32, 0.09), rgba(36, 48, 58, 0.04));
    border: 1px solid rgba(210, 39, 32, 0.08);
}

.dashboard-stat-card__label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.dashboard-stat-card__value {
    display: block;
    margin-top: 0.2rem;
    font-size: 2rem;
    font-family: var(--font-heading);
    color: var(--blue-900);
}

.dashboard-account__empty,
.dashboard-account__card {
    padding: 1rem;
    border-radius: var(--radius-lg);
    background: var(--bg-soft);
    border: 1px solid var(--border-light);
}

.dashboard-account__role,
.dashboard-record-card__status {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.dashboard-account__role {
    margin-bottom: 0.7rem;
    background: rgba(210, 39, 32, 0.12);
    color: var(--red-700);
}

.dashboard-main {
    display: grid;
    gap: 1rem;
}

.dashboard-panel {
    padding: 1.5rem;
}

.dashboard-panel__header,
.dashboard-list-panel__header,
.dashboard-form__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.dashboard-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.dashboard-tab {
    border: 1px solid var(--border-light);
    background: white;
    color: var(--text-secondary);
    padding: 0.8rem 1rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.dashboard-tab:hover,
.dashboard-tab.is-active {
    color: var(--red-700);
    border-color: rgba(210, 39, 32, 0.2);
    background: rgba(210, 39, 32, 0.08);
}

.dashboard-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 1.25rem;
}

.dashboard-editor,
.dashboard-list-panel {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.dashboard-form {
    display: grid;
    gap: 1rem;
}

.dashboard-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-field {
    display: grid;
    gap: 0.45rem;
}

.dashboard-field--full {
    grid-column: 1 / -1;
}

.dashboard-field span {
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.92rem;
}

.dashboard-field input,
.dashboard-field select,
.dashboard-field textarea {
    width: 100%;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: white;
    padding: 0.9rem 1rem;
    font: inherit;
    color: var(--text-primary);
}

.dashboard-field textarea {
    min-height: 150px;
    resize: vertical;
}

.dashboard-image-field {
    display: grid;
    gap: 0.75rem;
}

.dashboard-image-field__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.dashboard-image-field__actions input[type="file"] {
    flex: 1;
    min-width: 220px;
}

.dashboard-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.dashboard-record-list {
    display: grid;
    gap: 0.85rem;
}

.dashboard-record-card {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(243,246,248,0.88));
}

.dashboard-record-card h4 {
    color: var(--blue-900);
    font-family: var(--font-heading);
    margin: 0.4rem 0;
}

.dashboard-record-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.dashboard-record-card__actions {
    display: flex;
    justify-content: flex-end;
}

.status-draft {
    background: rgba(91, 105, 119, 0.12);
    color: var(--blue-700);
}

.status-review {
    background: rgba(230, 69, 60, 0.12);
    color: var(--red-700);
}

.status-published {
    background: rgba(39, 174, 96, 0.14);
    color: #1f7a44;
}

.status-archived {
    background: rgba(111, 124, 136, 0.12);
    color: var(--text-muted);
}

.dashboard-alert {
    padding: 1rem 1.1rem;
    border-radius: var(--radius-lg);
    border: 1px solid transparent;
    margin-bottom: 1rem;
}

.dashboard-alert--success {
    background: #e6f6ec;
    border-color: #b8e2c6;
    color: #1f7a44;
}

.dashboard-alert--error {
    background: #fdebec;
    border-color: #f6c6c9;
    color: #9f231f;
}

.dashboard-alert--warning {
    background: #fff7e4;
    border-color: #f1ddb0;
    color: #8a6510;
}

.dashboard-empty-state {
    padding: 1rem;
    background: var(--bg-soft);
    border: 1px dashed var(--border-medium);
    border-radius: var(--radius-lg);
    text-align: center;
}

@media (max-width: 1100px) {
    .dashboard-shell {
        grid-template-columns: 1fr;
    }

    .dashboard-sidebar {
        position: static;
    }

    .dashboard-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .dashboard-field-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-panel__header,
    .dashboard-list-panel__header,
    .dashboard-form__header {
        flex-direction: column;
    }
}
