/* Importamos la fuente Inter para ese look "Tech" moderno */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

@view-transition {
  navigation: auto;
}

/* Opcional: Hacerla muy rápida y profesional (tipo Apple/Stripe) */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.2s; /* Muy rápido, solo para suavizar el golpe */
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

:root {
    /* --- COLOR TOKENS --- */
    --color-bg: #ffffff;
    --color-bg-alt: #F8FAFC;
    --color-text-main: #334155;
    --color-text-heading: #0F172A;
    --color-text-muted: #475569;
    --color-brand: #0B5FFF;
    --color-brand-hover: #0047CC;
    --color-border: #E2E8F0;
    
    /* --- TYPOGRAPHY (Fluid Scale) --- */
    /* Mobile: 36px -> Desktop: 47px */
    --font-size-h1: clamp(2.25rem, 5vw + 1rem, 2.9rem);
    /* Mobile: 28px -> Desktop: 32px */
    --font-size-h2: clamp(1.75rem, 3vw + 1rem, 2rem);
    /* Mobile: 24px -> Desktop: 29px */
    --font-size-h3: clamp(1.5rem, 2vw + 1rem, 1.8rem);
    /* Mobile: 18px -> Desktop: 20px */
    --font-size-subtitle: clamp(1.125rem, 2vw, 1.25rem);
    --font-size-body: 1.0625rem;
    
    /* --- SPACING (Fluid Rhythm) --- */
    /* Mobile: 40px -> Desktop: 80px */
    --section-spacing: clamp(2.5rem, 8vh, 5rem);
    --container-padding: clamp(1.5rem, 5vw, 2rem);
    --content-gap: clamp(1.5rem, 4vw, 2.5rem);
    
    /* --- LAYOUT WIDTHS --- */
    --width-container: 850px;
    --width-narrow: 700px;
    
    /* --- TIMELINE TOKENS --- */
    --tl-dot-size: 16px;
    --tl-line-width: 2px;
    --tl-color-primary: var(--color-brand);
    --tl-color-line: var(--color-border);
    --tl-gap-visual-text: 24px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--color-text-main);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

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

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

/* Header Premium */
.main-header {
    padding: 16px 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--color-border);
}

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

.logo-wrapper {
    display: flex;
    align-items: center;
}

.logo-svg {
    height: 38px;
    width: auto;
    max-width: 100%;
    display: block;
}

.logo-wrapper a:focus-visible {
    outline: 3px solid #0B5FFF;
    outline-offset: 3px;
    border-radius: 4px;
}

.nav-cta {
    background: #0F172A;
    color: #ffffff;
    padding: clamp(8px, 1vw, 10px) clamp(14px, 1.5vw, 18px);
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.nav-cta:hover {
    background: #334155;
    transform: translateY(-1px);
}

.nav-cta:focus-visible {
    outline: 3px solid #0B5FFF;
    outline-offset: 3px;
}

/* Hero Section */
.hero {
    padding-block: var(--section-spacing);
    text-align: center;
    background: var(--color-bg);
}

.h1 {
    font-size: var(--font-size-h1);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--content-gap);
    color: var(--color-text-heading);
    letter-spacing: -0.02em;
}

.h1 .highlight {
    color: var(--color-brand);
}

.subtitle {
    font-size: var(--font-size-subtitle);
    line-height: 1.6;
    margin-bottom: var(--content-gap);
    color: var(--color-text-muted);
    max-width: 65ch;
    margin-left: auto;
    margin-right: auto;
}

.subtitle strong {
    color: #0F172A;
    font-weight: 600;
}

.cta-button {
    display: inline-block;
    background: #0B5FFF;
    color: white;
    padding: clamp(14px, 1.5vw, 16px) clamp(24px, 3vw, 32px);
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid #0047CC;
    transition: all 0.2s;
}

.cta-button:hover {
    background: #0047CC;
    border-color: #003399;
}

.cta-button:focus-visible {
    outline: 3px solid #0B5FFF;
    outline-offset: 3px;
}

.hero-image-wrapper {
    /* Mobile: 32px gap -> Desktop: 60px gap */
    margin-top: clamp(2rem, 6vh, 3.75rem); 
    /* Remove padding to let image fill the container width */
    padding: 0; 
    background: transparent;
    border: none;
    box-shadow: none;
    text-align: center;
    width: 100%;
}

.hero-img {
    width: 100%;
    max-width: 1100px;
    height: auto;
    display: block;
    margin: 0 auto;
    box-shadow: none;
    border: none;
    background: transparent;
}

/* Problem Section */
.problem-section {
    background: var(--color-bg);
    padding-block: var(--section-spacing);
    border-top: 1px solid var(--color-border);
}

.h2 {
    font-size: var(--font-size-h2);
    font-weight: 700;
    margin-bottom: var(--content-gap);
    line-height: 1.25;
    color: var(--color-text-heading);
    letter-spacing: -0.02em;
}

.problem-text {
    font-size: var(--font-size-body);
    line-height: 1.75;
    margin-bottom: 32px;
    color: #334155;
}

.problem-text strong {
    font-weight: 600;
    color: #0F172A;
}

.problem-highlight {
    font-size: var(--font-size-subtitle);
    font-weight: 500;
    margin-top: 50px;
    color: #0F172A;
    line-height: 1.5;
    padding-left: 24px;
    border-left: 3px solid #0B5FFF;
}

/* Solution Section */
.solution-section {
    background: var(--color-bg-alt);
    padding-block: var(--section-spacing);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.h3 {
    font-size: var(--font-size-h3);
    font-weight: 700;
    margin-bottom: var(--content-gap);
    color: var(--color-text-heading);
    letter-spacing: -0.02em;
    line-height: 1.3;
}

.solution-intro {
    font-size: var(--font-size-subtitle);
    line-height: 1.6;
    margin-bottom: 60px;
    color: #334155;
}

.solution-section .container-narrow {
    position: relative;
}

/* Plan Section */
.plan-title {
    font-size: var(--font-size-h3);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    margin-bottom: 32px;
    color: #0F172A;
}

/* --- TIMELINE COMPONENT (Refactored) --- */
.timeline-wrapper {
    display: flex;
    flex-direction: column;
    margin-left: 0;
}

.timeline-item {
    display: grid;
    grid-template-columns: var(--tl-dot-size) 1fr;
    gap: var(--tl-gap-visual-text);
    padding-bottom: 32px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

/* Visual Rail Column */
.timeline-visual {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.timeline-marker {
    width: var(--tl-dot-size);
    height: var(--tl-dot-size);
    border-radius: 50%;
    background: white;
    border: 4px solid var(--tl-color-primary);
    flex-shrink: 0;
    margin-top: 6px;
    z-index: 2;
}

.timeline-connector {
    width: var(--tl-line-width);
    background-color: var(--tl-color-line);
    flex-grow: 1;
    margin-top: 4px;
    margin-bottom: -6px;
}

.timeline-item:last-child .timeline-connector {
    display: none;
}

/* Content Column */
.timeline-content .step-title {
    font-size: 18px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 12px;
    color: #0F172A;
}

.timeline-content .step-description {
    font-size: 17px;
    line-height: 1.6;
    color: #475569;
    margin-bottom: 0;
}

.composite-solution-image {
    max-width: 700px; /* Reduced to align perfectly with .container-narrow text */
    margin: 40px auto 0 auto; /* KEPT ORIGINAL MARGIN */
    padding: 0; /* Remove internal padding since the box is gone */
    
    /* Make the container invisible */
    background: transparent; 
    border: none;
    box-shadow: none;
    border-radius: 0;
    
    overflow: visible; /* Allow image shadows to show */
    display: block;
}

.composite-solution-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Contrast Section */
.contrast-section {
    padding-block: var(--section-spacing);
    background: var(--color-bg);
}

.contrast-intro {
    font-size: var(--font-size-h2);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    text-align: center;
    margin-bottom: 60px;
    color: #0F172A;
}

.scenarios-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    max-width: 900px;
    margin: 0 auto;
}

.card-scenario {
    border-radius: 8px;
    padding: 40px;
    transition: transform 0.3s ease;
    height: 100%;
}

/* Tarjeta "Mala" - Visualmente apagada para acentuar el problema */
.card-fail {
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    opacity: 0.85;
    transition: all 0.3s ease;
}

.card-fail:hover {
    opacity: 1;
    background: #F1F5F9;
    border-color: #94A3B8;
}

/* Tarjeta "Buena" - Estilo Elevado (Elevated) */
.card-success {
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    position: relative;
    transform: scale(1.02);
    z-index: 10;
    transition: all 0.3s ease;
}

.card-success:hover {
    transform: scale(1.04) translateY(-4px);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
    border-color: #CBD5E1;
}

.card-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.scenario-title {
    font-size: var(--font-size-h3);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: #0F172A;
}

.card-fail .scenario-title {
    color: #64748B; /* Título gris para denotar "pasado" */
}

.scenario-list {
    list-style: none;
    padding: 0;
}

.scenario-point {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    align-items: flex-start;
}

.scenario-point:last-child {
    margin-bottom: 0;
}

/* Iconografía */
.icon-fail {
    width: 24px;
    height: 24px;
    color: #94A3B8; /* Gris tirando a alerta suave */
    flex-shrink: 0;
    margin-top: 2px;
}

.icon-success-wrapper {
    width: 28px;
    height: 28px;
    background: #F1F5F9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
    border: 1px solid #E2E8F0;
}

.icon-success {
    width: 16px;
    height: 16px;
    color: #0B5FFF;
}

/* Textos */
.point-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #0F172A;
    margin-bottom: 4px;
}

.point-desc {
    font-size: 0.9375rem;
    color: #475569; /* Mejorado contraste de #64748B a #475569 */
    line-height: 1.5;
}

/* Responsive */
@media (max-width: 768px) {
    .scenarios-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .card-success {
        transform: none; /* En móvil quitamos el efecto escala */
    }
}

/* Final CTA */
.final-cta {
    background: var(--color-text-heading);
    color: white;
    padding-block: var(--section-spacing);
    text-align: center;
}

.final-cta-text {
    font-size: var(--font-size-h2);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin-bottom: 24px;
    color: #ffffff;
}

.final-cta-subtext {
    font-size: var(--font-size-subtitle);
    margin-bottom: 40px;
    color: #CBD5E1;
    line-height: 1.5;
}

.final-cta .cta-button {
    background: white;
    color: #0F172A;
    font-size: 18px;
    padding: clamp(16px, 1.5vw, 18px) clamp(32px, 4vw, 42px);
    border: 1px solid #E2E8F0;
}

.final-cta .cta-button:hover {
    background: #F1F5F9;
    color: #0B5FFF;
    border-color: #CBD5E1;
}

.final-cta .cta-button:focus-visible {
    outline: 3px solid #0B5FFF;
    outline-offset: 3px;
}

.dashboard-closeup-wrapper {
    max-width: 500px;
    margin: 0 auto 50px auto;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 24px;
    padding-top: 20px;
}

.footer-legal-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.footer-legal-links a {
    color: #64748B;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-legal-links a:hover {
    color: #0B5FFF;
}

/* Footer */
footer {
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid #E2E8F0;
    color: #475569; /* Mejorado contraste de #64748B a #475569 */
    font-size: 0.875rem;
    background: #F8FAFC;
}

/* Responsive */
@media (max-width: 768px) {
    .scenarios-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .card-success {
        transform: none;
    }
    
    /* Timeline responsive */
    .timeline-item {
        gap: 16px;
        padding-bottom: 24px;
    }
    
    .timeline-marker {
        box-shadow: none;
    }
    
    .timeline-connector {
        margin-bottom: -4px;
    }

    .composite-solution-image {
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* ============================================
   CONTACT PAGE STYLES
   ============================================ */
.contact-section {
    padding-block: var(--section-spacing);
    background: var(--color-bg);
    min-height: 80vh;
}
.contact-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
    text-align: center;
}

/* Contact Grid (3 columns) */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}
.contact-card {
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.2s ease;
}
.contact-card:hover {
    border-color: var(--color-brand);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}
.contact-icon {
    color: var(--color-brand);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.card-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.card-link, .card-text {
    font-size: 1.125rem;
    font-weight: 500;
    color: var(--color-text-heading);
    text-decoration: none;
    line-height: 1.4;
}
.card-link:hover {
    color: var(--color-brand);
}

/* Decision Block */
.decision-block {
    background: var(--color-bg-alt);
    border-radius: 16px;
    padding: 48px 32px;
    border: 1px solid var(--color-border);
    margin-bottom: 40px;
}
.decision-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--color-text-heading);
    padding: clamp(14px, 1.5vw, 16px) clamp(24px, 3vw, 32px);
    font-size: 17px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    transition: all 0.2s;
}
.btn-secondary:hover {
    border-color: var(--color-text-heading);
    background: #FFFFFF;
}

/* Authority Note */
.authority-note {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0.8;
}

/* ============================================
   ABOUT PAGE STYLES (Sobre AulaPrep)
   ============================================ */
.about-section {
    padding-block: clamp(2rem, 5vh, 4rem);
}

.bg-alt {
    background-color: var(--color-bg-alt);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.about-text-block {
    font-size: 1.125rem;
    color: var(--color-text-main);
    line-height: 1.8;
}

.about-text-block p {
    margin-bottom: 24px;
}

/* Philosophy Grid */
.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
    margin-top: 40px;
}

.philosophy-card {
    background: #FFFFFF;
    padding: 32px 24px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.philosophy-card:hover {
    border-color: var(--color-brand);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
}

.ph-icon {
    color: var(--color-brand);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.philosophy-card h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-text-heading);
    margin-bottom: 12px;
}

.philosophy-card p {
    font-size: 0.95rem;
    color: var(--color-text-muted);
    line-height: 1.6;
}

/* Founder Card */
.founder-card {
    display: flex;
    gap: 40px;
    align-items: center;
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 40px;
}

.founder-visual {
    flex-shrink: 0;
    width: 180px;
    height: 180px;
}

.founder-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    /* Grayscale filter for extra sobriety (optional) */
    filter: grayscale(100%);
    transition: filter 0.3s;
}

.founder-img:hover {
    filter: grayscale(0%);
}

.founder-content {
    flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
    .founder-card {
        flex-direction: column;
        text-align: center;
        padding: 32px 24px;
    }
    .founder-visual {
        width: 120px;
        height: 120px;
    }
}

/* ============================================
   LEGAL PAGES (Aviso Legal, Privacidad, etc.)
   ============================================ */
.legal-section {
    padding-block: var(--section-spacing);
    background-color: var(--color-bg);
    min-height: 70vh;
}
.legal-container {
    max-width: 800px;
    margin: 0 auto;
}
.legal-container h1 {
    font-size: var(--font-size-h2);
    font-weight: 800;
    color: var(--color-text-heading);
    margin-bottom: 40px;
    letter-spacing: -0.02em;
}
.legal-container h2 {
    font-size: var(--font-size-h3);
    font-weight: 700;
    color: var(--color-text-heading);
    margin-top: 48px;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}
.legal-container p,
.legal-container ul {
    font-size: var(--font-size-body);
    color: var(--color-text-main);
    margin-bottom: 16px;
    line-height: 1.7;
}
.legal-container ul {
    padding-left: 24px;
    margin-bottom: 24px;
}
.legal-container li {
    margin-bottom: 8px;
}
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-brand);
    text-decoration: none;
    font-weight: 600;
    margin-bottom: 40px;
    transition: color 0.2s;
}
.back-link:hover {
    color: var(--color-brand-hover);
}

/* Active state for footer links */
.footer-legal-links a.current-page {
    color: var(--color-brand);
    font-weight: 700;
    opacity: 1;
}

/* ============================================
   INNER PAGES STANDARDIZATION
   ============================================ */
:root {
    --font-size-page-title: clamp(2rem, 4vw + 1rem, 2.5rem);
}

.page-header {
    padding-top: clamp(2rem, 5vh, 4rem);
    padding-bottom: 0;
    background: var(--color-bg);
    text-align: center;
}

.page-title {
    font-size: var(--font-size-page-title) !important;
    font-weight: 800;
    line-height: 1.2;
    color: var(--color-text-heading);
    letter-spacing: -0.02em;
    margin-bottom: 24px;
}

/* Subtle technical divider */
.page-header::after {
    content: "";
    display: block;
    width: 60px;
    height: 2px;
    background: var(--color-brand);
    margin: 0 auto;
    opacity: 0.3;
}

/* Connect header with next section */
.page-header + section, 
.page-header + main,
.page-header + .legal-section {
    padding-top: 40px !important;
}

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