/* =========================================
   VARIABLES & RESET
   ========================================= */
:root {
    /* Colors */
    --primary: #0F2046; /* Deep Blue */
    --primary-light: #1E3A8A; 
    --secondary: #0EA5E9; /* Light Blue */
    --accent: #10B981; /* Soft Green */
    --accent-orange: #F97316;
    
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    
    --text-dark: #0F172A;
    --text-muted: #475569;
    --text-light: #F1F5F9;

    /* Typography */
    --font-sans: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Spacing & Layout */
    --container-width: 1200px;
    --section-padding: 5rem 1.5rem;
    
    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-card: 0 20px 40px -10px rgba(15, 32, 70, 0.12);
    --transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    --radius: 16px;
}

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

html {
    scroll-behavior: smooth;
}

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

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

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

ul {
    list-style: none;
}

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

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

.section {
    padding: var(--section-padding);
}

.bg-light {
    background-color: var(--bg-light);
}

.text-center {
    text-align: center;
}

.mb-0 { margin-bottom: 0 !important; }
.mb-5 { margin-bottom: 3rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

/* =========================================
   TYPOGRAPHY & UTILITIES
   ========================================= */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-sm {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--secondary);
    color: white;
    box-shadow: 0 4px 14px rgba(14, 165, 233, 0.4);
}

.btn-primary:hover {
    background-color: #0284C7;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(14, 165, 233, 0.5);
    color: white;
}

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

.btn-secondary:hover {
    background-color: var(--bg-light);
    transform: translateY(-2px);
    color: var(--primary);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

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

.btn-block {
    width: 100%;
}

/* =========================================
   HEADER & NAV
   ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
    background: rgba(255, 255, 255, 0.85);
    padding: 0.2rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: var(--transition);
}

.header.scrolled .nav-container {
    height: 70px;
}

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

.logo-img {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary);
    line-height: 1;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-weight: 600;
}

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

.nav-link {
    font-weight: 500;
    color: var(--text-dark);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

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

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.75rem;
    color: var(--primary);
    cursor: pointer;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px; /* Offset for header */
    background-image: url("fotos/WhatsApp%20Image%202026-03-09%20at%2018.45.31.jpeg");
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(15, 32, 70, 0.95) 0%, rgba(30, 58, 138, 0.8) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    color: white;
    max-width: 800px;
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: white;
    margin-bottom: 1.5rem;
    letter-spacing: -1px;
}

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

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

/* =========================================
   ABOUT SECTION
   ========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.image-wrapper {
    position: relative;
    border-radius: var(--radius);
}

.image-wrapper img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    object-fit: cover;
    height: 500px;
    width: 100%;
}

.experience-badge {
    position: absolute;
    bottom: -20px;
    left: -20px;
    background: var(--primary);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-lg);
}

.experience-badge .number {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    color: var(--secondary);
    line-height: 1;
}

.experience-badge .text {
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    line-height: 1.2;
}

/* =========================================
   MISSION, VISION, VALUES
   ========================================= */
.mvv-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.05);
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.card:hover::before {
    transform: scaleX(1);
}

.card:hover {
    box-shadow: var(--shadow-card);
    z-index: 1;
}

.mvv-card {
    text-align: center;
}

.icon-box {
    width: 70px;
    height: 70px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary);
    font-size: 2rem;
    transition: var(--transition);
}

.card:hover .icon-box {
    background: var(--primary);
    color: white;
}

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

/* =========================================
   SERVICES (QUÉ HACEMOS)
   ========================================= */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

.service-card {
    display: flex;
    flex-direction: column;
}

.service-icon {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

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

/* =========================================
   PROGRAMS & COURSES (ACCORDION)
   ========================================= */
.accordion-container {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    background: white;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.accordion-header {
    width: 100%;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--primary);
    transition: var(--transition);
}

.accordion-header:hover {
    background-color: #F8FAFC;
}

.accordion-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.accordion-title i {
    color: var(--secondary);
    font-size: 1.5rem;
}

.accordion-icon {
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-body {
    padding: 0 1.5rem 1.5rem;
}

.course-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
}

.course-list li {
    position: relative;
    padding-left: 1.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.course-list li::before {
    content: '•';
    color: var(--accent);
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

/* =========================================
   SOCIAL IMPACT
   ========================================= */
.impact-section {
    position: relative;
    background-image: url("fotos/WhatsApp%20Image%202026-03-09%20at%2018.42.20.jpeg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: white;
    padding: 8rem 1.5rem;
}

.impact-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 32, 70, 0.85);
}

.impact-section .container {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.impact-number {
    font-size: clamp(4rem, 8vw, 6rem);
    color: var(--accent);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.impact-title {
    font-size: 2rem;
    color: white;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.impact-text {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
}

/* =========================================
   TRANSPARENCY & AUTHORITIES
   ========================================= */
.institutional-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 4rem;
    align-items: start;
}

.icon-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.icon-header i {
    font-size: 2.5rem;
    color: var(--secondary);
}

.legal-info {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    border-left: 4px solid var(--secondary);
    box-shadow: var(--shadow-sm);
}

.legal-info h4 {
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.2rem;
}

.legal-list li {
    margin-bottom: 0.5rem;
}

.authorities-card {
    background: var(--primary);
    color: white;
    border: none;
}

.authorities-card h3 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1rem;
}

.authorities-list li {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.authorities-list li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.authorities-list .role {
    font-size: 0.85rem;
    color: var(--secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.authorities-list .name {
    font-size: 1.1rem;
    font-weight: 500;
}

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

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contact-item h4 {
    margin-bottom: 0.25rem;
}

.contact-item a {
    color: var(--secondary);
    font-weight: 500;
}

.contact-form-container {
    background: white;
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
}

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

.form-row {
    display: flex;
    gap: 1.5rem;
}

.form-row .half {
    width: 50%;
}

label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

input, select, textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-dark);
    transition: var(--transition);
    background: #F8FAFC;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--secondary);
    background: white;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    background: var(--primary);
    color: white;
    padding: 3rem 1.5rem;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.footer-logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Makes the logo white for the dark footer */
}

.footer-logo div {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.footer-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1;
}

.footer-subtitle {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 1px;
    text-transform: uppercase;
}

.footer-copy {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* =========================================
   WHATSAPP BUTTON
   ========================================= */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #1EBE5D;
}

/* =========================================
   ANIMATIONS (Custom Effects)
   ========================================= */
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.pulse-anim {
    animation: pulseGlow 2s infinite;
}

.hover-lift {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
}

.hover-link {
    position: relative;
    display: inline-block;
}
.hover-link::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}
.hover-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* =========================================
   RESPONSIVE DESIGN
   ========================================= */
@media (max-width: 992px) {
    .about-grid, .institutional-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .experience-badge {
        left: 20px;
        bottom: 20px;
    }

    .mvv-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        flex-direction: column;
        padding: 2rem;
        transition: 0.3s ease;
        box-shadow: var(--shadow-md);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu ul {
        flex-direction: column;
        gap: 1.5rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .hero {
        text-align: center;
    }

    .hero-buttons {
        justify-content: center;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .half {
        width: 100%;
    }
}
