/* =========================================================================
   VARIABLES & DESIGN SYSTEM
   ========================================================================= */
:root {
    /* Colors (as requested) */
    --color-navy: #1B3A5C;
    --color-teal: #0D7377;
    --color-blue-mid: #2E75B6;
    --color-text: #4A4A4A;
    --color-bg-light: #F2F6FA;
    --color-white: #FFFFFF;
    
    /* Additional Tones (derived for depth) */
    --color-navy-dark: #002444;
    --color-teal-light: #5cafb3;
    --color-outline: #c3c6cf;
    --color-bg-surface: #fbf9f8;
    
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Source Sans Pro', sans-serif;

    /* Spacing & Utilities */
    --section-pad-y: 6rem;
    --container-width: 1200px;
    --border-radius: 0.25rem;
    --border-radius-lg: 0.5rem;
    --transition-fast: 0.3s ease;
    --transition-smooth: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
    font-size: 14.4px; /* 10% reduction */
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-white);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-navy);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: var(--section-pad-y) 0;
}

.bg-navy { background-color: var(--color-navy); color: var(--color-white); }
.bg-light { background-color: var(--color-bg-light); }
.text-white { color: var(--color-white) !important; }

/* =========================================================================
   BUTTONS & LINKS
   ========================================================================= */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--color-navy-dark);
}

.btn-secondary {
    background-color: var(--color-teal);
    color: var(--color-white);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.btn-secondary:hover {
    background-color: #0b6163;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

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

.btn-outline:hover {
    background-color: rgba(255,255,255,0.1);
}

.btn-large {
    padding: 1rem 2rem;
}

.btn-card {
    background-color: rgba(13, 115, 119, 0.1);
    color: var(--color-teal);
    font-size: 0.75rem;
    width: 100%;
    margin-top: 1.5rem;
}

.btn-card:hover {
    background-color: var(--color-teal);
    color: var(--color-white);
}

.btn-text {
    color: var(--color-teal);
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-text:hover {
    color: var(--color-navy);
}

/* =========================================================================
   NAVBAR
   ========================================================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition-smooth);
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 0.5rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-img {
    height: 40px;
    width: auto;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--color-navy);
    letter-spacing: -0.5px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-text);
    text-transform: uppercase;
}

.nav-link:hover {
    color: var(--color-blue-mid);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--color-navy);
    transition: var(--transition-fast);
}

/* =========================================================================
   HERO SECTION
   ========================================================================= */
.hero {
    position: relative;
    padding: 10rem 0 8rem 0;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(27, 58, 92, 0.95), rgba(27, 58, 92, 0.8), transparent);
}

.hero-content {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.5rem;
    color: var(--color-white);
    margin-bottom: 1.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-text p {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 2.5rem;
    font-weight: 300;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.glass-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 0.5rem;
    border-radius: var(--border-radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hero-side-img {
    border-radius: var(--border-radius);
}

/* =========================================================================
   SERVICIOS SECTION
   ========================================================================= */
.section-header {
    margin-bottom: 4rem;
    max-width: 600px;
}

.section-header.center {
    margin: 0 auto 4rem;
    text-align: center;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.separator-teal {
    height: 6px;
    width: 80px;
    background-color: var(--color-teal);
    margin-bottom: 1.5rem;
}

.section-header.center .separator-teal {
    margin: 0 auto 1.5rem;
}

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

.service-card {
    background-color: var(--color-bg-light);
    padding: 2.5rem 2rem;
    border-left: 4px solid var(--color-teal);
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition-smooth);
}

.service-card:nth-child(even) {
    border-left-color: var(--color-navy);
}
.service-card:nth-child(even) .btn-card {
    background-color: rgba(27, 58, 92, 0.1);
    color: var(--color-navy);
}
.service-card:nth-child(even) .btn-card:hover {
    background-color: var(--color-navy);
    color: var(--color-white);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.service-icon {
    font-size: 48px;
    color: var(--color-teal);
    margin-bottom: 1.5rem;
    display: block;
}

.service-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.service-card ul {
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.service-card ul li {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.25rem;
}

.service-card ul li::before {
    content: "•";
    color: var(--color-teal);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.service-card:nth-child(even) ul li::before {
    color: var(--color-navy);
}

.service-card p {
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.italic-text {
    font-style: italic;
    color: #718096;
}

/* =========================================================================
   TRAYECTORIA (COUNTERS)
   ========================================================================= */
.counters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    text-align: center;
}

.counter-item {
    position: relative;
}

.counter-number {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 900;
    color: var(--color-bg-light);
    display: inline-block;
    line-height: 1;
}

.counter-plus {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 900;
    color: var(--color-teal);
    vertical-align: top;
    line-height: 1;
}

.counter-label {
    font-family: var(--font-heading);
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-blue-mid);
    margin-top: 0.5rem;
}

/* =========================================================================
   BIBLIOTECA SECTION
   ========================================================================= */
.biblioteca-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
}

.biblioteca-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

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

.resource-card {
    background-color: var(--color-white);
    padding: 2rem;
    display: flex;
    gap: 1.5rem;
    border-left: 2px solid var(--color-outline);
    transition: var(--transition-fast);
}

.resource-card:hover {
    border-left-color: var(--color-teal);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.resource-icon-box {
    background-color: rgba(239, 68, 68, 0.1);
    padding: 1rem;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-icon {
    font-size: 32px;
    color: #ef4444;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.resource-content h4 {
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.resource-content p {
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

/* =========================================================================
   CONTACTO SECTION
   ========================================================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.intro-text {
    font-size: 1.125rem;
    margin-bottom: 3rem;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.info-item i {
    font-size: 1.5rem;
    font-style: normal;
}

.info-item h5 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.info-item p {
    font-size: 0.875rem;
}

.seminario-box {
    background-color: var(--color-bg-light);
    padding: 1rem;
    border-radius: var(--border-radius-lg);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    border: 1px solid rgba(0,0,0,0.05);
}

.seminario-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

.tag {
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--color-text);
    display: block;
    margin-bottom: 0.25rem;
}

.seminario-content h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.date-text {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-teal);
}

.contact-form-container {
    background-color: var(--color-white);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.contact-form label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-navy);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    background-color: var(--color-bg-light);
    border: none;
    border-bottom: 2px solid var(--color-teal);
    padding: 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: var(--transition-fast);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-bottom-color: var(--color-navy);
}

.btn-submit {
    width: 100%;
    padding: 1.25rem;
    position: relative;
    overflow: hidden;
}

.btn-submit::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(13, 115, 119, 0.2);
    transform: translateY(100%);
    transition: var(--transition-smooth);
}

.btn-submit:hover::after {
    transform: translateY(0);
}

.form-footer {
    text-align: center;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 1.5rem;
    color: var(--color-text);
}

/* =========================================================================
   FOOTER
   ========================================================================= */
.footer {
    background-color: #0b1c2c;
    color: #94a3b8;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 4rem;
}

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

.footer-logo {
    height: 64px;
    margin-bottom: 1.5rem;
}

.footer-brand p {
    font-size: 0.875rem;
    max-width: 350px;
    margin-bottom: 2rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: var(--color-teal);
    font-size: 1.25rem;
}

.footer-links h6 {
    color: var(--color-teal);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
}

.footer-links ul li {
    margin-bottom: 0.75rem;
}

.footer-links ul li a {
    font-size: 0.875rem;
    color: #cbd5e1;
}

.footer-links ul li a:hover {
    color: var(--color-white);
    text-decoration: underline;
    text-decoration-color: var(--color-teal);
    text-underline-offset: 4px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 2rem 0;
}

.footer-bottom-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.iso-badge {
    background-color: rgba(13, 115, 119, 0.2);
    color: var(--color-teal);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* =========================================================================
   ANIMATIONS
   ========================================================================= */
.fade-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.fade-on-scroll.is-visible {
    opacity: 1;
}

.slide-up-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-up-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

[class*="stagger-"] {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

[class*="stagger-"].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }


/* =========================================================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================================================= */
@media (max-width: 1024px) {
    .hero-text h1 { font-size: 3rem; }
    .hero-content { gap: 2rem; }
    .services-grid { grid-template-columns: repeat(2, 1fr); }
    .counters-grid { grid-template-columns: repeat(2, 1fr); gap: 3rem; }
    .contact-grid { gap: 2rem; }
}

@media (max-width: 768px) {
    .section { padding: 4rem 0; }
    
    /* Navbar Mobile */
    .mobile-menu-toggle { display: flex; }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-white);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
        transform: translateY(-150%);
        opacity: 0;
        transition: var(--transition-smooth);
        z-index: -1;
    }
    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
    }

    /* Hero */
    .hero { padding: 8rem 0 4rem 0; }
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-bg {
        background: var(--color-navy); /* fallback */
    }
    .hero-overlay {
        background: linear-gradient(to bottom, rgba(27, 58, 92, 0.9), rgba(27, 58, 92, 0.95));
    }
    .hero-text p { margin: 0 auto 2.5rem; }
    .hero-buttons { justify-content: center; flex-direction: column; }
    .hero-image-box { display: none; }

    /* Grids */
    .services-grid { grid-template-columns: 1fr; }
    .resources-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; gap: 3rem; }
    .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    
    .form-row { grid-template-columns: 1fr; gap: 0; }
    .footer-bottom-flex { flex-direction: column; gap: 1rem; text-align: center; }
    .biblioteca-header { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
}

@media (max-width: 480px) {
    .hero-text h1 { font-size: 2.5rem; }
    .counters-grid { grid-template-columns: 1fr; }
    .contact-form-container { padding: 2rem 1.5rem; }
    .btn-large { width: 100%; }
}
