/* =========================================
   VARIABLES Y RESET
   ========================================= */
:root {
    /* Colores - Paleta suave inspirada en el PDF */
    --color-primary: #C9A88E;
    --color-secondary: #D4A5A5;
    --color-accent: #8B9E8C;
    --color-dark: #5A4A42;
    --color-light: #F5F1ED;
    --color-white: #FFFFFF;
    --color-text: #333333;
    --color-text-light: #666666;

    /* Tipografía */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;

    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    /* Transiciones */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Forzar que el contenido nunca se corte */
.content-block *:not(img):not(video):not(canvas),
.tip-card *:not(img):not(video):not(canvas),
.alert-box *:not(img):not(video):not(canvas),
.warning-box *:not(img):not(video):not(canvas),
.info-box *:not(img):not(video):not(canvas),
.cause-category *:not(img):not(video):not(canvas),
.timeline-card *:not(img):not(video):not(canvas),
.comparison-card *:not(img):not(video):not(canvas) {
    overflow: visible !important;
}

/* Las imágenes siempre con overflow hidden para evitar warnings */
img, video, canvas {
    overflow: hidden !important;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Optimización de fuentes */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    /* Evitar zoom con doble tap en móvil */
    touch-action: manipulation;
}

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background-color: var(--color-light);
    line-height: 1.6;
    overflow-x: hidden;
    /* Optimización de renderizado */
    -webkit-tap-highlight-color: transparent;
}

/* Optimización de GPU - Desactivado para evitar cortes de contenido */
.parallax-section {
    /* Parallax desactivado */
}

.index-card,
.stat-card,
.tip-card {
    /* Optimizaciones removidas para evitar cortes */
}

/* =========================================
   NAVEGACIÓN
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.navbar.scrolled {
    padding: var(--spacing-xs) 0;
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
}

.logo a {
    cursor: pointer;
    transition: var(--transition);
}

.logo a:hover h2 {
    color: var(--color-accent);
}

.logo h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--color-dark);
    font-weight: 600;
    transition: var(--transition);
}

.logo span {
    color: var(--color-secondary);
    font-style: italic;
}

.search-container {
    display: flex;
    gap: var(--spacing-xs);
    position: relative;
    flex: 0 1 400px;
}

#searchInput {
    flex: 1;
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--color-primary);
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--color-white);
}

#searchInput:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 4px 15px rgba(139, 158, 140, 0.2);
}

#searchBtn {
    padding: 0.75rem 1.5rem;
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

#searchBtn:hover {
    background: var(--color-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.search-results {
    position: absolute;
    top: calc(100% + 1rem);
    left: 0;
    right: 0;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
}

.search-results.hidden {
    display: none;
}

/* Resaltado de búsqueda en texto */
.search-highlight {
    background-color: #FFE066;
    padding: 2px 4px;
    border-radius: 3px;
    animation: highlightPulse 1s ease-in-out 3;
}

@keyframes highlightPulse {
    0%, 100% { background-color: #FFE066; }
    50% { background-color: #FFC107; }
}

.search-result-item {
    padding: var(--spacing-sm) var(--spacing-md);
    border-bottom: 1px solid var(--color-light);
    cursor: pointer;
    transition: var(--transition);
}

.search-result-item:hover {
    background: var(--color-light);
}

.search-result-item h4 {
    color: var(--color-dark);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.search-result-item p {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* Language Selector */
.language-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 2px solid var(--color-primary);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-dark);
}

.lang-btn .flag {
    font-size: 1.2rem;
}

.lang-btn:hover {
    background: var(--color-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(201, 168, 142, 0.3);
}

.lang-btn.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

.lang-btn.active:hover {
    background: var(--color-dark);
    border-color: var(--color-dark);
}

/* Sticky Index Horizontal */
.sticky-index {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-md);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.index-horizontal {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.index-item {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.5rem;
    background: var(--color-light);
    border-radius: 12px;
    transition: var(--transition);
    position: relative;
    cursor: pointer;
    border: 2px solid transparent;
}

.index-item:hover {
    background: var(--color-accent);
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 5px 20px rgba(139, 158, 140, 0.3);
    border-color: var(--color-accent);
}

.index-item:active {
    transform: translateY(-2px) scale(1.05);
}

.index-item.active {
    background: var(--color-accent);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 15px rgba(139, 158, 140, 0.3);
    border-color: var(--color-accent);
}

/* Tooltip para índice */
.index-item::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    background: var(--color-dark);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    font-family: var(--font-body);
    z-index: 1000;
}

.index-item:hover::after {
    opacity: 1;
    transform: translateX(-50%) scale(1);
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-light) 0%, #E8DED2 100%);
    position: relative;
    padding: var(--spacing-xl) var(--spacing-md);
    padding-top: 160px; /* Espacio para el navbar fijo */
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(201, 168, 142, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 20s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(212, 165, 165, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 15s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    50% {
        transform: translate(50px, 30px) scale(1.1);
    }
}

.hero-content {
    text-align: center;
    max-width: 900px;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--color-dark);
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
    line-height: 1.2;
}

.hero-subtitle {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    color: var(--color-secondary);
    margin-bottom: var(--spacing-md);
    font-style: italic;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--color-accent);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 5px 20px rgba(139, 158, 140, 0.3);
}

.cta-button:hover {
    background: var(--color-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(139, 158, 140, 0.4);
}

.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--color-text-light);
    font-size: 0.9rem;
    z-index: 1;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

.arrow-down {
    width: 30px;
    height: 30px;
    border-left: 2px solid var(--color-text-light);
    border-bottom: 2px solid var(--color-text-light);
    transform: rotate(-45deg);
}

/* =========================================
   CONTENEDOR GENERAL
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* =========================================
   SECCIONES
   ========================================= */
section {
    padding: var(--spacing-xl) 0;
    position: relative;
    overflow: visible;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--color-dark);
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

/* =========================================
   ÍNDICE VISUAL
   ========================================= */
.index-section {
    background: var(--color-white);
}

.index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.index-card {
    background: var(--color-light);
    padding: var(--spacing-md);
    border-radius: 20px;
    text-decoration: none;
    color: var(--color-text);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
}

.index-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    transform: scaleX(0);
    transition: var(--transition);
}

.index-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--color-primary);
}

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

.card-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-xs);
}

.index-card h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--color-dark);
    margin-bottom: var(--spacing-xs);
}

.index-card p {
    color: var(--color-text-light);
    flex: 1;
    line-height: 1.5;
}

.card-arrow {
    font-size: 1.5rem;
    color: var(--color-accent);
    align-self: flex-end;
    transition: var(--transition);
}

.index-card:hover .card-arrow {
    transform: translateX(5px);
}

/* =========================================
   MÓDULOS
   ========================================= */
.module-section {
    background: linear-gradient(135deg, var(--color-white) 0%, var(--color-light) 100%);
    position: relative;
    overflow: visible !important;
    transform: none !important;
}

.module-section:nth-child(even) {
    background: linear-gradient(135deg, var(--color-light) 0%, var(--color-white) 100%);
}

.module-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.module-number {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--color-primary);
    color: white;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
}

.module-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    color: var(--color-dark);
    margin-bottom: var(--spacing-sm);
}

.content-block {
    margin-bottom: var(--spacing-md);
    overflow: visible;
}

.content-block h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--color-dark);
    margin-bottom: var(--spacing-md);
}

.content-block h4 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--color-dark);
    margin: var(--spacing-md) 0 var(--spacing-sm) 0;
}

.content-block h5 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-dark);
    margin: var(--spacing-sm) 0;
}

.content-block p {
    margin-bottom: var(--spacing-sm);
    line-height: 1.8;
}

.intro-text {
    font-size: 1.2rem;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

/* Listas */
.styled-list,
.content-block ul {
    list-style: none;
    margin: var(--spacing-md) 0;
    overflow: visible;
}

.styled-list li,
.content-block ul li {
    padding-left: 2rem;
    margin-bottom: var(--spacing-sm);
    position: relative;
    line-height: 1.8;
    overflow: visible;
}

.styled-list li::before,
.content-block ul li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--color-accent);
    font-weight: bold;
}

.numbered-list {
    counter-reset: item;
    list-style: none;
    margin: var(--spacing-md) 0;
}

.numbered-list li {
    counter-increment: item;
    padding-left: 3rem;
    margin-bottom: var(--spacing-md);
    position: relative;
    line-height: 1.8;
}

.numbered-list li::before {
    content: counter(item);
    position: absolute;
    left: 0;
    top: 0;
    background: var(--color-accent);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* =========================================
   CAJAS Y TARJETAS
   ========================================= */
.bio-card,
.highlight-box,
.info-box,
.warning-box,
.alert-box,
.celebration-box,
.quote-box {
    padding: var(--spacing-md);
    border-radius: 15px;
    margin: var(--spacing-md) 0;
    overflow: visible;
}

.bio-card {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
}

.bio-card .bio-content {
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
}

.bio-card .author-photo {
    width: 180px !important;
    height: 180px !important;
    min-width: 180px !important;
    min-height: 180px !important;
    max-width: 180px !important;
    max-height: 180px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
    object-position: center !important;
    border: 5px solid rgba(255, 255, 255, 0.5) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    flex-shrink: 0 !important;
    display: block !important;
    overflow: hidden !important;
    clip-path: circle(50%) !important;
}

.bio-card .bio-text {
    flex: 1;
}

.bio-card h4 {
    color: white;
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
}

.highlight-box {
    background: linear-gradient(135deg, #FFF8F0 0%, #FFE8D6 100%);
    border-left: 5px solid var(--color-accent);
}

.info-box {
    background: linear-gradient(135deg, #E8F4F8 0%, #D1E7ED 100%);
    border-left: 5px solid #4A90A4;
}

.warning-box {
    background: linear-gradient(135deg, #FFF4E6 0%, #FFE4CC 100%);
    border-left: 5px solid #E67E22;
}

.alert-box {
    background: linear-gradient(135deg, #FFE8E8 0%, #FFD1D1 100%);
    border-left: 5px solid #E74C3C;
}

.celebration-box {
    background: linear-gradient(135deg, #F0E6FF 0%, #E0D1FF 100%);
    border-left: 5px solid #9B59B6;
    text-align: center;
}

.quote-box {
    background: var(--color-light);
    border-left: 5px solid var(--color-primary);
    font-style: italic;
    text-align: center;
}

.quote {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--color-dark);
    line-height: 1.6;
}

/* Estadísticas */
.stat-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.stat-card {
    background: white;
    padding: var(--spacing-md);
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    color: var(--color-text);
    font-size: 1rem;
    margin-bottom: var(--spacing-xs);
    line-height: 1.4;
}

.stat-source {
    color: var(--color-text-light);
    font-size: 0.85rem;
    font-style: italic;
}

/* Causas */
.causes-section {
    margin: var(--spacing-lg) 0;
    overflow: visible;
}

.cause-category {
    background: white;
    padding: var(--spacing-md);
    border-radius: 15px;
    margin-bottom: var(--spacing-md);
    border-left: 4px solid var(--color-accent);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    overflow: visible;
    min-height: fit-content;
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.tip-card {
    background: white;
    padding: var(--spacing-md);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    overflow: visible;
    display: flex;
    flex-direction: column;
}

.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.tip-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.tip-card h4 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-sm);
}

/* Timeline */
.timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.timeline-card {
    background: white;
    padding: var(--spacing-md);
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.timeline-card.highlighted {
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
    color: white;
}

.timeline-card.highlighted h4,
.timeline-card.highlighted .timeline-number,
.timeline-card.highlighted p {
    color: white;
}

.timeline-card h4 {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
}

.timeline-number {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--color-accent);
    font-weight: 700;
    margin: var(--spacing-sm) 0;
}

/* Process Steps */
.process-steps {
    margin: var(--spacing-lg) 0;
}

.step {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--color-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    font-family: var(--font-heading);
}

.step-content {
    flex: 1;
    background: white;
    padding: var(--spacing-md);
    border-radius: 15px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
}

/* Comparison */
.comparison-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.comparison-card {
    background: white;
    padding: var(--spacing-md);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

/* FIV Types */
.fiv-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.type-card {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: white;
    padding: var(--spacing-md);
    border-radius: 15px;
}

.type-card h4 {
    color: white;
    margin-bottom: var(--spacing-sm);
}

/* Phase Accordion */
.phase-accordion {
    margin: var(--spacing-md) 0;
}

.phase {
    background: white;
    padding: var(--spacing-md);
    border-radius: 15px;
    margin-bottom: var(--spacing-sm);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.phase:hover {
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

.phase h5 {
    color: var(--color-accent);
    margin-bottom: var(--spacing-sm);
}

/* Success Rates */
.success-rates {
    margin: var(--spacing-lg) 0;
    background: white;
    padding: var(--spacing-md);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.age-success-grid {
    margin: var(--spacing-md) 0;
}

.age-group {
    margin-bottom: var(--spacing-md);
}

.age-label {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--color-dark);
}

.success-bar {
    background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: var(--spacing-sm);
    color: white;
    font-weight: 600;
    transition: var(--transition-slow);
}

.note {
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-style: italic;
    margin-top: var(--spacing-md);
}

/* Research Highlight */
.research-highlight {
    background: linear-gradient(135deg, #E8F4F8 0%, #D1E7ED 100%);
    padding: var(--spacing-md);
    border-radius: 15px;
    border-left: 5px solid #4A90A4;
    margin: var(--spacing-md) 0;
}

.source {
    font-size: 0.85rem;
    color: var(--color-text-light);
    font-style: italic;
    margin-top: var(--spacing-sm);
}

/* Donation Options */
.donation-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.option-card {
    background: white;
    padding: var(--spacing-md);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.option-card h4 {
    color: var(--color-accent);
    margin-bottom: var(--spacing-sm);
}

/* Pregnancy Phases */
.pregnancy-phases {
    margin: var(--spacing-lg) 0;
}

.week-card {
    background: white;
    padding: var(--spacing-md);
    border-radius: 15px;
    margin-bottom: var(--spacing-md);
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--color-secondary);
}

.week-card h5 {
    color: var(--color-secondary);
    margin-bottom: var(--spacing-sm);
}

/* =========================================
   GLOSARIO
   ========================================= */
.glossary-search {
    margin-bottom: var(--spacing-md);
}

.glossary-search input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--color-primary);
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 1rem;
}

.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.term-card {
    background: white;
    padding: var(--spacing-md);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.term-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.term-card h4 {
    color: var(--color-accent);
    margin-bottom: var(--spacing-sm);
}

/* =========================================
   COMUNIDAD
   ========================================= */
.community-section {
    max-width: 900px;
    margin: 0 auto;
}

.support-box {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    padding: var(--spacing-md);
    border-radius: 15px;
    border-left: 5px solid #4CAF50;
    margin: var(--spacing-md) 0;
}

/* WhatsApp Box */
.whatsapp-box {
    animation: fadeInUp 0.6s ease-out;
}

.whatsapp-box h5 {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.whatsapp-box a {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.whatsapp-box a:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.whatsapp-box a:active {
    transform: translateY(-1px) scale(1.02);
}

.final-message {
    background: linear-gradient(135deg, var(--color-light) 0%, white 100%);
    padding: var(--spacing-lg);
    border-radius: 20px;
    margin-top: var(--spacing-lg);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.signature {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-top: var(--spacing-md);
    font-style: italic;
}

/* =========================================
   BOTÓN VOLVER ARRIBA
   ========================================= */
.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: var(--color-accent);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: var(--color-dark);
    transform: translateY(-5px);
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
}

.scroll-to-top:active {
    transform: translateY(-2px);
}

.scroll-to-top svg {
    width: 24px;
    height: 24px;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    background: var(--color-dark);
    color: white;
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h4 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
}

.source-list {
    list-style: none;
}

.source-list li {
    padding-left: 0;
    margin-bottom: var(--spacing-xs);
    font-size: 0.9rem;
}

.source-list li::before {
    content: '✓';
    margin-right: var(--spacing-xs);
    color: var(--color-accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
}

/* =========================================
   RESPONSIVE
   ========================================= */

/* Tablets */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.8rem;
    }

    .index-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Móviles grandes */
@media (max-width: 768px) {
    :root {
        --spacing-xs: 0.4rem;
        --spacing-sm: 0.75rem;
        --spacing-md: 1.5rem;
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    /* Navegación móvil */
    .navbar {
        padding: var(--spacing-xs) 0;
    }

    .nav-container {
        flex-wrap: wrap;
        gap: var(--spacing-xs);
        padding: 0 var(--spacing-sm);
    }

    .logo {
        flex: 1 1 100%;
        order: 1;
    }

    .logo h2 {
        font-size: 0.95rem;
        text-align: center;
        line-height: 1.3;
    }

    .search-container {
        flex: 1 1 calc(100% - 120px);
        order: 2;
    }

    #searchInput {
        font-size: 16px; /* 16px evita zoom automático en iOS */
        padding: 0.6rem 1rem;
    }

    #searchBtn {
        padding: 0.6rem 1rem;
    }

    .language-selector {
        flex: 0 0 auto;
        order: 3;
        gap: 0.3rem;
    }

    .lang-btn {
        padding: 0.5rem 0.7rem;
        font-size: 0.85rem;
        min-width: 50px;
    }

    .lang-text {
        display: none;
    }

    .lang-btn .flag {
        font-size: 1.3rem;
    }

    /* Índice sticky móvil */
    .sticky-index {
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .index-horizontal {
        gap: 0.3rem;
        padding: 0.2rem 0;
    }

    .index-item {
        width: 36px;
        height: 36px;
        font-size: 1.2rem;
    }

    .index-item::after {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        bottom: calc(100% + 5px);
    }

    /* Hero móvil */
    .hero {
        min-height: 85vh;
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .hero-description {
        font-size: 1rem;
        margin-bottom: var(--spacing-md);
    }

    .cta-button {
        padding: 0.85rem 2rem;
        font-size: 1rem;
    }

    .scroll-indicator {
        bottom: 1.5rem;
        font-size: 0.85rem;
    }

    /* Botón volver arriba */
    .scroll-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }

    /* Grids móvil */
    .index-grid,
    .tips-grid,
    .timeline-grid,
    .comparison-section,
    .fiv-types,
    .donation-options,
    .glossary-grid,
    .stat-card-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }

    /* Secciones móvil */
    section {
        padding: var(--spacing-lg) 0;
    }

    .section-title {
        font-size: 2rem;
        margin-bottom: var(--spacing-md);
    }

    .module-title {
        font-size: 1.8rem;
    }

    .module-number {
        padding: 0.4rem 1.2rem;
        font-size: 0.85rem;
    }

    /* Tarjetas móvil */
    .index-card {
        padding: var(--spacing-sm);
    }

    .card-icon {
        font-size: 2.5rem;
    }

    .index-card h3 {
        font-size: 1.1rem;
    }

    .index-card p {
        font-size: 0.9rem;
    }

    /* Contenido móvil */
    .content-block h3 {
        font-size: 1.5rem;
    }

    .content-block h4 {
        font-size: 1.2rem;
    }

    .content-block p,
    .content-block ul li {
        font-size: 0.95rem;
    }

    /* Steps móvil */
    .step {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1.3rem;
    }

    .step-content {
        padding: var(--spacing-sm);
    }

    /* Stats móvil */
    .stat-number {
        font-size: 2.5rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    /* Tips móvil */
    .tip-card {
        padding: var(--spacing-sm);
    }

    .tip-icon {
        font-size: 2rem;
    }

    .tip-card h4 {
        font-size: 1.1rem;
    }

    .tip-card p {
        font-size: 0.9rem;
    }

    /* Timeline móvil */
    .timeline-number {
        font-size: 2.5rem;
    }

    .timeline-card h4 {
        font-size: 1rem;
    }

    /* Glosario móvil */
    .term-card h4 {
        font-size: 1.1rem;
    }

    .term-card p {
        font-size: 0.9rem;
    }

    /* Footer móvil */
    .footer {
        padding: var(--spacing-md) 0;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

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

    /* Cajas móvil */
    .bio-card,
    .highlight-box,
    .info-box,
    .warning-box,
    .alert-box,
    .celebration-box {
        padding: var(--spacing-sm);
        margin: var(--spacing-sm) 0;
    }

    /* Foto de autor en móvil */
    .bio-card .bio-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .bio-card .author-photo {
        width: 140px !important;
        height: 140px !important;
        min-width: 140px !important;
        min-height: 140px !important;
        max-width: 140px !important;
        max-height: 140px !important;
        margin-bottom: var(--spacing-sm) !important;
        overflow: hidden !important;
        clip-path: circle(50%) !important;
    }

    /* Success bars móvil */
    .success-bar {
        height: 35px;
        font-size: 0.9rem;
    }

    /* Buscador results móvil */
    .search-results {
        left: 0;
        right: 0;
        border-radius: 0 0 12px 12px;
    }

    .search-result-item {
        padding: var(--spacing-sm);
    }

    .search-result-item h4 {
        font-size: 0.95rem;
    }

    .search-result-item p {
        font-size: 0.85rem;
    }
}

/* Móviles pequeños */
@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .logo h2 {
        font-size: 0.85rem;
    }

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .index-horizontal {
        gap: 0.25rem;
    }

    .index-item {
        width: 32px;
        height: 32px;
        font-size: 1.1rem;
    }

    .module-number {
        font-size: 0.75rem;
        padding: 0.3rem 1rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .module-title {
        font-size: 1.5rem;
    }

    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 0.75rem;
        right: 0.75rem;
    }

    .cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}

/* =========================================
   MEJORAS TOUCH PARA MÓVIL
   ========================================= */
@media (hover: none) and (pointer: coarse) {
    /* Aumentar áreas táctiles */
    .index-item,
    .lang-btn,
    #searchBtn,
    .scroll-to-top,
    .cta-button,
    a {
        min-height: 44px; /* Tamaño mínimo recomendado por Apple */
    }

    /* Mejorar feedback táctil */
    .index-item:active,
    .lang-btn:active,
    #searchBtn:active,
    .scroll-to-top:active,
    .cta-button:active {
        opacity: 0.7;
        transform: scale(0.95);
    }

    /* Remover hover effects en touch */
    .index-card:hover,
    .tip-card:hover,
    .stat-card:hover {
        transform: none;
    }

    /* Mejor espaciado para dedos */
    .index-horizontal {
        gap: 0.5rem;
    }

    .language-selector {
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }

    .module-number {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }
}