/* === CÓDIGO FINAL Y COMPLETO para educarentiemposdeia.com === */

/* === CONFIGURACIÓN GENERAL Y VARIABLES === */
:root {
    --primary-font: 'Manrope', sans-serif;
    --bg-color: #FFFFFF;
    --text-dark: #2d3748;
    --text-muted: #718096;
    --accent-blue: #3b82f6;
    --accent-blue-hover: #2563eb;
    --border-color: #e2e8f0;
    --light-gray-bg: #f7fafc;
    --footer-bg: #1a202c;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
}

/* === RESET MODERNO Y ESTILOS BASE === */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--primary-font);
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === CONTENEDORES PRINCIPALES (REGLA CRÍTICA RESTAURADA) === */
.main-container, .header-wrapper {
    max-width: 780px;
    margin: 0 auto; /* <-- ESTA LÍNEA CENTRA TODA LA PÁGINA */
    padding: 0 20px;
}

/* === TIPOGRAFÍA === */
h2, h3, h4 {
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
}
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; margin: 0 0 40px 0; }
h4 { font-size: 1.25rem; margin: 0 0 10px 0; }

/* === ANIMACIONES === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animated-section {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}
.learning-section { animation-delay: 0.2s; }
.book-display { animation-delay: 0.1s; }
.offer-section { animation-delay: 0.3s; }
.faq-section { animation-delay: 0.4s; }
.confirmation-form { animation-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
    .animated-section, .hero-title, .hero-subtitle {
        animation: none;
        opacity: 1;
    }
}

/* === SECCIÓN 1: ENCABEZADO === */
.header-wrapper {
    background-color: var(--light-gray-bg);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 80px;
}
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    max-width: 780px;
    margin: 0 auto;
}
.logo {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-dark);
}
.nav-button {
    background-color: var(--accent-blue);
    color: white;
    padding: 10px 20px;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}
.nav-button:hover, .nav-button:focus-visible {
    background-color: var(--accent-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.3);
    outline: none;
}
.hero-section {
    padding: 60px 0 0 0;
    text-align: center;
}
.hero-title {
    font-size: clamp(2.5rem, 5vw + 1rem, 3.25rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
    color: var(--text-dark);
    animation: fadeInUp 1s ease-out;
}
.hero-title .highlight-ia { color: var(--accent-blue); }
.hero-subtitle {
    font-size: 1.2rem;
    font-weight: 400;
    margin: 15px auto 0;
    color: var(--text-muted);
    max-width: 520px;
    animation: fadeInUp 1s ease-out 0.2s;
}

section {
    margin-top: 80px;
}

.intro-text { text-align: center; }
.intro-text p { font-size: 1.125rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }

/* === IMAGEN DEL LIBRO (SOLUCIÓN DEFINITIVA) === */
.book-display {
    text-align: center;
    margin-top: 40px;
}
.book-display img {
    display: block;
    margin: 0 auto;
    max-width: 600px;
    width: 90%;
    border-radius: var(--border-radius-md);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

/* === LISTA DE APRENDIZAJE === */
.learning-section ul.checklist { list-style: none; padding: 0; max-width: 500px; margin: 0 auto; }
.learning-section li { font-size: 1.125rem; margin-bottom: 15px; padding-left: 10px; }

/* === SECCIÓN DE OFERTA CON DOS OPCIONES === */
.offer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 20px;
}
.offer-box {
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: var(--border-radius-md);
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.offer-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
.offer-box.primary {
    border-color: var(--accent-blue);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}
.offer-box.primary:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.25);
}
.price-container {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 15px;
}
.old-price { font-size: 1.5rem; color: var(--text-muted); text-decoration: line-through; }
.current-price { font-size: 2.5rem; font-weight: 800; color: var(--accent-blue); }
.offer-description { color: var(--text-muted); font-size: 0.9rem; flex-grow: 1; margin-bottom: 20px; }

.cta-button {
    display: inline-block;
    background-color: var(--accent-blue);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    padding: 15px 30px;
    border-radius: var(--border-radius-sm);
    transition: background-color 0.2s ease, transform 0.2s ease;
    border: 2px solid transparent;
}
.cta-button:hover, .cta-button:focus-visible {
    background-color: var(--accent-blue-hover);
    transform: translateY(-2px);
    outline: none;
}
.cta-button.secondary {
    background-color: var(--bg-color);
    color: var(--accent-blue);
    border: 2px solid var(--border-color);
}
.cta-button.secondary:hover, .cta-button.secondary:focus-visible {
    background-color: var(--light-gray-bg);
    border-color: var(--accent-blue);
    color: var(--accent-blue-hover);
}
.guarantee-box { margin-top: 40px; text-align: center; background-color: var(--light-gray-bg); padding: 15px; border-radius: var(--border-radius-sm); font-weight: 700; }

/* === PREGUNTAS FRECUENTES (FAQ) === */
.faq-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    margin-bottom: 10px;
}
.faq-item summary {
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
    padding: 15px 20px;
    position: relative;
}
.faq-item summary::after {
    content: '▼';
    font-size: 0.8rem;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}
details[open] > summary::after {
    transform: translateY(-50%) rotate(180deg);
}
.faq-item p {
    margin: 0 20px 15px 20px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    padding-top: 15px;
}

/* === FORMULARIO DE CONFIRMACIÓN === */
.confirmation-form { background-color: var(--light-gray-bg); padding: 40px; border-radius: var(--border-radius-md); text-align: center; }
.confirmation-form .step { color: var(--text-muted); font-weight: 700; }
.confirmation-form hr { border: none; }
.confirmation-form label { display: block; text-align: left; font-weight: 700; margin: 20px 0 8px 0; }
.confirmation-form input {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.confirmation-form input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}
.form-submit-button {
    display: block;
    width: 100%;
    background-color: var(--text-dark);
    color: white;
    border: none;
    font-size: 1.125rem;
    font-weight: 700;
    padding: 18px;
    border-radius: var(--border-radius-sm);
    margin-top: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.form-submit-button:hover, .form-submit-button:focus-visible {
    background-color: #000;
    transform: translateY(-2px);
    outline: none;
}

/* === FOOTER === */
.footer { background-color: var(--footer-bg); color: rgba(255,255,255,0.5); text-align: center; padding: 40px 20px; margin-top: 60px;}

/* === DISEÑO RESPONSIVO (MÓVILES) === */
@media (max-width: 768px) {
    body { font-size: 16px; }
    .hero-subtitle { font-size: 1.1rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }
    .offer-grid { grid-template-columns: 1fr; }
    .logo { font-size: 1rem; }
    .nav-button { font-size: 0.8rem; padding: 8px 14px; }
    .price-container { gap: 8px; }
    .old-price { font-size: 1.2rem; }
    .current-price { font-size: 2.2rem; }
    .offer-box { padding: 25px; }
    .confirmation-form { padding: 30px 20px; }
}

/* === EFECTO DE ZOOM SOLO PARA ESCRITORIO === */
@media (min-width: 769px) {
    .offer-box.primary {
        transform: scale(1.05);
    }
}
/* === SECCIÓN: SOBRE EL AUTOR === */
.author-section {
    text-align: center;
    max-width: 600px; /* Ancho más reducido para la bio */
    margin: 80px auto 0 auto; /* Centrado y con margen superior */
}

.author-section details {
    /* Eliminamos el borde y fondo de la caja, ya que el botón lo tiene */
    /* border: 1px solid var(--border-color); */
    border-radius: var(--border-radius-sm);
    /* background-color: var(--light-gray-bg); */
}

.author-toggle {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
    cursor: pointer;
    padding: 15px 20px;
    list-style: none; /* Oculta el marcador por defecto */
    position: relative;
    transition: background-color 0.2s ease;
}

.author-toggle:hover {
    background-color: #e9eef3;
}

.author-toggle {
    font-size: 1.2rem; /* Un poco más pequeño para que entre bien */
    font-weight: 700;
    color: white; /* Color de texto blanco para contraste */
    background-color: var(--accent-blue); /* Fondo azul */
    cursor: pointer;
    padding: 15px 25px; /* Más padding para que sea más grande */
    list-style: none;
    position: relative;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: var(--border-radius-sm); /* Bordes redondeados */
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.3); /* Sombra */
    display: flex; /* Para centrar el texto verticalmente si el icono cambia */
    align-items: center;
    justify-content: center; /* Centrar el texto */
    margin: 0 auto; /* Asegurar centrado en el contenedor */
    width: fit-content; /* El ancho se ajusta al contenido */
    max-width: 90%; /* Evita que sea demasiado ancho en móviles */
}

.author-toggle:hover {
    background-color: var(--accent-blue-hover); /* Fondo más oscuro al pasar el ratón */
    transform: translateY(-2px); /* Efecto de "levantar" */
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4); /* Sombra más pronunciada */
}

details[open] > .author-toggle::after {
    transform: translateY(-50%) rotate(180deg); /* Rota la flecha al abrir */
}

.author-bio {
    padding: 0 25px 25px 25px;
    text-align: left;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
    margin-top: 10px;
}

.author-bio p {
    margin: 0 0 1em 0;
}

.author-bio p:last-child {
    margin-bottom: 0;
}
/* === AJUSTE OPCIONAL PARA LA BIO DEL AUTOR === */
details[open] .author-bio {
    background-color: var(--light-gray-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    padding: 25px;
    margin-top: 20px; /* Crea espacio entre el botón y la caja de texto */
    text-align: left;
}
.guarantee-box {
  /* ...tus otros estilos... */
  background: rgba(247, 250, 252, 0.7); /* Color de fondo semi-transparente */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); /* Para compatibilidad con Safari */
  border: 1px solid rgba(255, 255, 255, 0.2);
}
/* 1. Hacemos que el contenedor sea una referencia para sus hijos */
.offer-grid {
  container-type: inline-size;
}

/* 2. Ahora, el hijo reacciona al tamaño del padre */
@container (max-width: 350px) {
  .offer-box {
    padding: 20px; /* Hacemos el padding más pequeño en espacios reducidos */
  }
  .current-price {
    font-size: 2rem; /* Achicamos el precio si la caja es muy angosta */
  }
}