/* ============================================
   CEIM — Centro de Educación Integral Moody
   Design System & Styles
   ============================================ */

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --ceim-primary: #2563EB;
    --ceim-primary-dark: #1D4ED8;
    --ceim-primary-light: #60A5FA;
    --ceim-primary-glow: rgba(37, 99, 235, 0.4);
    --ceim-bg-dark: #0A1628;
    --ceim-bg-card: rgba(255, 255, 255, 0.05);
    --ceim-text: #F1F5F9;
    --ceim-text-muted: #94A3B8;
    --ceim-border: rgba(255, 255, 255, 0.1);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Outfit', 'Inter', sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--ceim-bg-dark);
    color: var(--ceim-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

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

/* --- Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- Header --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.5rem 0;
    background: transparent;
    transition: background 0.3s;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: baseline;
    gap: 0;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: white;
}

.logo-dot {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 900;
    color: var(--ceim-primary);
}

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

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--ceim-text-muted);
    transition: color 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-link:hover {
    color: white;
}

.nav-link--subtle {
    opacity: 0.6;
    font-size: 0.75rem;
}

.nav-link--subtle:hover {
    opacity: 1;
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8rem 1.5rem 4rem;
    overflow: hidden;
}

.hero-bg-glow {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 800px;
    height: 800px;
    background: var(--ceim-primary);
    opacity: 0.12;
    border-radius: 50%;
    filter: blur(180px);
    pointer-events: none;
    animation: pulse 4s ease-in-out infinite alternate;
}

.hero-bg-glow--secondary {
    top: auto;
    bottom: -15%;
    right: auto;
    left: -10%;
    width: 600px;
    height: 600px;
    opacity: 0.08;
    animation-delay: 2s;
}

@keyframes pulse {
    0% {
        opacity: 0.08;
        transform: scale(1);
    }

    100% {
        opacity: 0.15;
        transform: scale(1.05);
    }
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    color: var(--ceim-primary-light);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 2rem;
    backdrop-filter: blur(12px);
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ceim-primary);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 12px var(--ceim-primary);
    }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3.5rem, 8vw, 7rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 0.9;
    margin-bottom: 1.5rem;
    color: white;
}

.hero-title--accent {
    background: linear-gradient(to right, var(--ceim-primary), var(--ceim-primary-light), var(--ceim-primary));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient 4s linear infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--ceim-text-muted);
    max-width: 540px;
    margin: 0 auto 2.5rem;
    font-weight: 400;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.btn--primary {
    background: var(--ceim-primary);
    color: white;
    box-shadow: 0 0 30px var(--ceim-primary-glow);
}

.btn--primary:hover {
    background: var(--ceim-primary-dark);
    transform: scale(1.05);
}

.btn--ghost {
    background: rgba(255, 255, 255, 0.05);
    color: white;
    border: 1px solid var(--ceim-border);
    backdrop-filter: blur(8px);
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

.btn--lg {
    padding: 1.25rem 3rem;
    font-size: 1.125rem;
}

/* --- Sections --- */
.section {
    padding: 6rem 0;
}

.section--dark {
    background: rgba(0, 0, 0, 0.3);
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-tag {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--ceim-primary-light);
    margin-bottom: 1rem;
}

.section-tag--light {
    color: var(--ceim-primary-light);
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    color: white;
    margin-bottom: 1rem;
}

.section-title--light {
    color: white;
}

.accent-dot {
    color: var(--ceim-primary);
}

.section-desc {
    font-size: 1.125rem;
    color: var(--ceim-text-muted);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

/* --- Features Grid --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--ceim-bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--ceim-border);
    padding: 2.5rem 2rem;
    border-radius: 1.5rem;
    transition: all 0.3s;
}

.feature-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(37, 99, 235, 0.3);
    transform: translateY(-4px);
}

.feature-icon {
    width: 3.5rem;
    height: 3.5rem;
    background: linear-gradient(135deg, var(--ceim-primary), var(--ceim-primary-dark));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
    transition: transform 0.3s;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: white;
}

.feature-card p {
    color: var(--ceim-text-muted);
    line-height: 1.6;
}

/* --- Programs --- */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.program-card {
    background: var(--ceim-bg-card);
    backdrop-filter: blur(16px);
    border: 1px solid var(--ceim-border);
    padding: 2.5rem 2rem;
    border-radius: 1.5rem;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
}

.program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--ceim-primary), var(--ceim-primary-light));
    opacity: 0;
    transition: opacity 0.3s;
}

.program-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(37, 99, 235, 0.3);
    transform: translateY(-4px);
}

.program-card:hover::before {
    opacity: 1;
}

.program-level {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ceim-primary-light);
    margin-bottom: 0.75rem;
    display: block;
}

.program-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    color: white;
}

.program-card p {
    color: var(--ceim-text-muted);
    line-height: 1.6;
}

/* --- Contact --- */
.contact-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--ceim-border);
    padding: 3rem 0;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-desc {
    width: 100%;
    font-size: 0.875rem;
    color: var(--ceim-text-muted);
    margin-top: 0.25rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--ceim-text-muted);
    transition: color 0.2s;
}

.footer-links a:hover {
    color: white;
}

.footer-copy {
    font-size: 0.75rem;
    color: var(--ceim-text-muted);
    opacity: 0.6;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav {
        display: none;
        /* TODO: Add mobile hamburger menu */
    }

    .hero {
        padding-top: 6rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .features-grid,
    .programs-grid {
        grid-template-columns: 1fr;
    }

    .contact-actions {
        flex-direction: column;
        align-items: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
}