/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* ===================================================
   PRODUCTOS RELACIONADOS - ESTILO PERSONALIZADO
   ================================================== */

/* ==== CONTENEDOR PRINCIPAL ==== */
.related.products {
    margin-top: 50px;
    margin-inline: auto;
    width: var(--theme-container-width);
    max-width: var(--theme-block-max-width);
}

/* Título de la sección */
.related.products .ct-module-title {
    font-family: var(--theme-font-family);
    font-size: clamp(30px, 1.875rem + ((1vw - 3.2px) * 1.563), 50px);
    font-weight: 600;
    color: var(--theme-headings-color);
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* ==== GRID DE PRODUCTOS ==== */
.related.products ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Responsive */
@media (max-width: 999px) {
    .related.products ul.products {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .related.products ul.products {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 500px) {
    .related.products ul.products {
        grid-template-columns: 1fr;
    }
}

/* ==== TARJETA DE PRODUCTO ==== */
.related.products .product {
    position: relative;
    background: var(--theme-palette-color-8);
    border-radius: var(--theme-button-border-radius);
    overflow: hidden;
    transition: var(--theme-transition);
}

/* ==== FIGURA/IMAGEN ==== */
.related.products .product figure {
    position: relative;
    margin: 0;
    overflow: hidden;
    border-radius: var(--theme-button-border-radius);
}

.related.products .product .ct-media-container {
    display: block;
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.related.products .product .ct-media-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.455, 0.03, 0.515, 0.955);
}

/* Efecto hover zoom */
.related.products .product .ct-media-container:hover img {
    transform: scale(1.08);
}

/* ==== BOTONES SOBRE LA IMAGEN ==== */
.related.products .ct-woo-card-extra {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 10;
}

.related.products .product:hover .ct-woo-card-extra {
    opacity: 1;
    visibility: visible;
}

/* Botones circulares */
.related.products .ct-woo-card-extra .add_to_cart_button,
.related.products .ct-woo-card-extra .ct-wishlist-button-archive {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: var(--theme-palette-color-8);
    border-radius: 50%;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.related.products .ct-woo-card-extra .add_to_cart_button:hover,
.related.products .ct-woo-card-extra .ct-wishlist-button-archive:hover {
    background: var(--theme-palette-color-1);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(181, 93, 56, 0.3);
}

.related.products .ct-woo-card-extra .add_to_cart_button svg,
.related.products .ct-woo-card-extra .ct-wishlist-button-archive svg {
    width: 18px;
    height: 18px;
    fill: var(--theme-palette-color-4);
    transition: fill 0.3s ease;
}

.related.products .ct-woo-card-extra .add_to_cart_button:hover svg,
.related.products .ct-woo-card-extra .ct-wishlist-button-archive:hover svg {
    fill: var(--theme-palette-color-8);
}

/* Tooltip */
.related.products .ct-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--theme-palette-color-4);
    color: var(--theme-palette-color-8);
    padding: 6px 12px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.related.products .ct-woo-card-extra .add_to_cart_button:hover .ct-tooltip,
.related.products .ct-woo-card-extra .ct-wishlist-button-archive:hover .ct-tooltip {
    opacity: 1;
    visibility: visible;
}

/* ==== CATEGORÍA ==== */
.related.products .entry-meta {
    list-style: none;
    padding: 0;
    margin: 15px 0 8px;
}

.related.products .meta-categories a {
    display: inline-block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: var(--theme-palette-color-1);
    text-decoration: none;
    transition: color 0.3s ease;
}

.related.products .meta-categories a:hover {
    color: var(--theme-palette-color-2);
}

/* ==== TÍTULO DEL PRODUCTO ==== */
.related.products .woocommerce-loop-product__title {
    font-size: 18px;
    font-weight: 600;
    color: var(--theme-headings-color);
    margin: 8px 0 10px;
    line-height: 1.4;
}

.related.products .woocommerce-loop-product__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related.products .woocommerce-loop-product__title a:hover {
    color: var(--theme-palette-color-1);
}

/* ==== PRECIO ==== */
.related.products .price {
    font-size: 20px;
    font-weight: 700;
    color: var(--theme-palette-color-4);
    margin-top: 10px;
}

.related.products .price .woocommerce-Price-currencySymbol {
    font-size: 0.9em;
}

/* ==== BADGES ==== */
.related.products .ct-woo-badges {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.related.products .ct-woo-badges .ct-badge {
    background: var(--theme-palette-color-1);
    color: var(--theme-palette-color-8);
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==== WISHLIST ACTIVO ==== */
.related.products .ct-wishlist-button-archive[data-button-state="active"] .ct-heart-fill {
    fill: var(--theme-palette-color-1);
}

/* ==== OVERLAY OSCURO EN HOVER ==== */
.related.products .product figure::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 5;
    pointer-events: none;
}

.related.products .product:hover figure::before {
    opacity: 1;
}

/* ==== OCULTAR EN MÓVIL ==== */
@media (max-width: 768px) {
    .related.products.ct-hidden-sm,
    .related.products.ct-hidden-md {
        display: none;
    }
}

/* ==== LOADER ANIMACIÓN ==== */
.related.products .ct-button-loader {
    display: none;
}

.related.products .ct-woo-card-extra .loading .ct-button-loader {
    display: inline-block;
}

.related.products .ct-woo-card-extra .loading .ct-icon-container > svg:first-child {
    display: none;
}

/* ===== FIN DE ESTILOS PERSONALIZADOS ===== */


/* ===================================================
   EFECTOS SIMPLES PARA PRODUCT COLLECTION
   Solo esquinas redondeadas y zoom en hover
   ================================================== */

/* Esquinas redondeadas en las imágenes */
.wc-block-components-product-image {
    border-radius: 10px !important;
    overflow: hidden !important;
}

.wc-block-components-product-image img {
    border-radius: 10px !important;
    transition: transform 0.4s ease !important;
}

/* Efecto zoom cuando pasas el mouse */
.wc-block-product:hover .wc-block-components-product-image img {
    transform: scale(1.08) !important;
}

/* ===== FIN ===== */


/* Hacer fullscreen el slide del header */
.hero-fullscreen { 
  min-height: 100vh;             /* ocupa el alto del viewport */
  padding: 0 !important;         /* el padding grande está impidiendo el fullscreen */
}

/* Opcional: mejor comportamiento móvil */
@supports (height: 100dvh){
  .hero-fullscreen { min-height: 100dvh; }
}

/* Si el header es fijo de 80px y debe “tocar” el borde inferior */
.has-fixed-header .hero-fullscreen { min-height: calc(100vh - 80px); }


/* ===== FUENTES TIMELINE ===== */

/* IntegralCF Regular */
@font-face {
    font-family: 'IntegralCF';
    src: url('/wp-content/uploads/2025/10/IntegralCF-Regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* IntegralCF Medium - Para títulos medianos */
@font-face {
    font-family: 'IntegralCF';
    src: url('/wp-content/uploads/2025/10/IntegralCF-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

/* IntegralCF Bold - Para títulos grandes */
@font-face {
    font-family: 'IntegralCF';
    src: url('/wp-content/uploads/2025/10/IntegralCF-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ===== ESTILOS GENERALES ===== */

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    background: #f5f5f5;
    color: #333;
    overflow-x: hidden;
}

.wrapper {
    display: flex;
    max-width: 1920px;
    margin: 0 auto;
}

/* ===== MENU LATERAL ===== */
.timeline-menu {
    width: 260px;          /* CAMBIO: width fijo en vez de flex: 0 0 25% */
    background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
    padding: 30px 20px;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
    box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    overflow-y: auto;
    z-index: 100;
}

.logo {
    text-align: center;
    margin-bottom: 20px;
}

.logo img {
    width: 150px;
    height: auto;
}

.menu-inner h1 {
    font-size: 2.5rem;
    font-family: 'IntegralCF', sans-serif;
    font-weight: 700;
    color: #fff;
    margin: 0 0 15px;
    line-height: 0.9;
    letter-spacing: -1px;
}

.menu-inner p {
    font-family: "Roboto", sans-serif;
    font-optical-sizing: auto;
    font-weight: 700;
    color: #ccc;
    font-size: 0.9rem;
    margin-bottom: 30px;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.timeline-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.timeline-menu ul li {
    margin: 0;
    padding: 0;
}

.timeline-menu ul li a {
    text-decoration: none;
    font-size: 0.9rem;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-weight: 600;
    color: #ccc;
    position: relative;
    display: block;
    transition: all 0.3s ease;
    padding: 8px 15px;
    border-left: 3px solid transparent;
}

.timeline-menu ul li a:hover {
    color: #E5C16F;
    border-left-color: #E5C16F;
    padding-left: 20px;
}

.timeline-menu ul li a.active {
    color: #E5C16F;
    border-left-color: #B55D38;
}

/* ===== TIMELINE ===== */
.timeline-content {
    margin-left: 260px;      /* CAMBIO: 260px en vez de 25% */
    flex: 1;                  /* CAMBIO: flex: 1 en vez de flex: 0 0 75% */
    position: relative;
    padding: 0 5%;
    box-sizing: border-box;
    min-height: 100vh;
    z-index: 1;
    background: #f5f5f5;
}

/* LOGO INICIAL */
.timeline-header {
    text-align: center;
    padding: 60px 0 40px;
    position: relative;
    z-index: 2;
    background: #f5f5f5;
    width: 100%;
}

.timeline-header .timeline-logo {
    width: 250px;
    height: auto;
    margin-bottom: 20px;
}

.timeline-header h1 {
    font-size: 2.5rem;
    font-family: 'IntegralCF', sans-serif;
    font-weight: 700;
    color: #B55D38;
    margin: 0 0 20px;
}

/* CÍRCULO INICIAL */
.timeline-start-circle {
    width: 24px;
    height: 24px;
    background: #E5C16F;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 0 15px rgba(229, 193, 111, 0.5);
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

/* LÍNEA CENTRAL */
.timeline-items::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 4px;
    height: calc(100% - 100px);
    background: linear-gradient(to bottom, #E5C16F, #B55D38);
    transform: translateX(-50%);
    border-radius: 2px;
    z-index: 1;
}

.timeline-items {
    position: relative;
    z-index: 2;
    padding-top: 40px;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 200px);
}

/* CONTENEDOR CON GRID PARA POSICIONAMIENTO */
.tl-item {
    position: relative;
    width: 100%;
    margin: 150px 0;
    display: grid;
    grid-template-columns: 1fr 80px 1fr;
    grid-auto-rows: minmax(100px, auto);
    gap: 30px;
    min-height: 350px;
    align-items: start;
    grid-auto-flow: dense;
}

/* PUNTO BASE */
.tl-item::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

/* COLORES DE PUNTOS - Versión más robusta */
.tl-item:nth-of-type(1)::before { background: #E5C16F !important; }
.tl-item:nth-of-type(2)::before { background: #E1B366 !important; }
.tl-item:nth-of-type(3)::before { background: #DDA55D !important; }
.tl-item:nth-of-type(4)::before { background: #D99754 !important; }
.tl-item:nth-of-type(5)::before { background: #D5894B !important; }
.tl-item:nth-of-type(6)::before { background: #D17B42 !important; }
.tl-item:nth-of-type(7)::before { background: #CD6D39 !important; }
.tl-item:nth-of-type(8)::before { background: #CA6235 !important; }
.tl-item:nth-of-type(9)::before { background: #C65A32 !important; }
.tl-item:nth-of-type(10)::before { background: #C2522F !important; }
.tl-item:nth-of-type(11)::before { background: #BE4A2C !important; }
.tl-item:nth-of-type(12)::before { background: #BA4229 !important; }
.tl-item:nth-of-type(13)::before { background: #B63A26 !important; }
.tl-item:nth-of-type(14)::before { background: #B55D38 !important; }

/* ===== POSICIONAMIENTO TEXTO/IMÁGENES ===== */

/* FECHA+TEXTO LADO IZQUIERDO - Mantener padding para texto */
.pos-left-top:not(.img-item) {
    grid-column: 1;
    grid-row: auto;
    align-self: start;
    justify-self: end;
    text-align: right;
    padding-right: 30px;
    position: relative;
    z-index: 10;
}

/* FECHA+TEXTO LADO DERECHO - Mantener padding para texto */
.pos-right-top:not(.img-item) {
    grid-column: 3;
    grid-row: auto;
    align-self: start;
    justify-self: start;
    text-align: left;
    padding-left: 30px;
    position: relative;
    z-index: 10;
}

/* IMAGEN LADO DERECHO */
.pos-right-middle,
.pos-right-top.img-item,
.pos-right-bottom {
    grid-column: 3;
    grid-row: auto;
    align-self: start;
    justify-self: start;
    padding-left: 0;
    margin-left: 30px;
    position: relative;
    z-index: 5;
    margin-top: 0;
}

/* IMAGEN ABAJO DEL TEXTO LADO IZQUIERDO */
.pos-left-bottom {
    grid-column: 1;
    grid-row: auto;
    align-self: start;
    justify-self: end;
    padding-right: 30px;
    position: relative;
    z-index: 5;
}

/* IMAGEN ABAJO LADO DERECHO */
.pos-right-bottom {
    grid-column: 3;
    grid-row: auto;
    align-self: start;
    justify-self: start;
    padding-left: 30px;
    position: relative;
    z-index: 5;
    margin-top: 0;
    display: inline-block;
    width: auto;
}

/* Ajuste específico para contenedores de imagen lado derecho */
.pos-right-middle.img-item,
.pos-right-top.img-item,
.pos-right-bottom.img-item {
    width: auto !important;
    max-width: fit-content;
}

/* IMAGEN LADO IZQUIERDO */
.pos-left-top.img-item,
.pos-left-bottom {
    grid-column: 1;
    grid-row: auto;
    text-align: right;
    justify-self: end;
    padding-right: 0;
    margin-right: 30px;
    z-index: 5;
}

/* FECHA */
.year {
    font-size: 3.5rem;
    font-family: 'IntegralCF', sans-serif;
    font-weight: 700;
    color: #E5C16F;
    margin-bottom: 15px;
    line-height: 0.9;
    display: block;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 10;
}

/* CUADRO DE TEXTO */
.tl-content {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid #e0e0e0;
    padding: 25px;
    transition: all 0.3s ease;
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 10;
}

.tl-content:hover {
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
    transform: translateY(-5px);
    z-index: 15;
}

.tl-content h2 {
    font-size: 1.5rem;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    color: #B55D38;
    margin: 0 0 15px;
}

.tl-content p {
    font-size: 0.95rem;
    font-family: "Plus Jakarta Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    line-height: 1.6;
    color: #555;
    margin: 0;
}

/* ===== TAMAÑOS DE IMÁGENES ===== */

/* IMÁGENES BASE */
.img-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    background: transparent;
    padding: 0;
    margin: 0;
    display: inline-block;
    width: auto;
    z-index: 5;
    line-height: 0;
    font-size: 0;
}

.img-item img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    transition: transform 0.3s ease;
    margin: 0;
    padding: 0;
    border-radius: 12px;
    vertical-align: bottom;
}

.img-item:hover {
    border-color: #E5C16F;
    transform: scale(1.03);
    box-shadow: 0 8px 30px rgba(229, 193, 111, 0.3);
    z-index: 20;
}

.img-item:hover img {
    transform: scale(1.05);
}

/* TAMAÑOS - CUADRADAS */
.small-cuadrada {
    max-width: 200px;
}
.small-cuadrada img {
    max-width: 200px;
}

.medium-cuadrada {
    max-width: 280px;
}
.medium-cuadrada img {
    max-width: 280px;
}

.large-cuadrada {
    max-width: 360px;
}
.large-cuadrada img {
    max-width: 360px;
}

/* TAMAÑOS - HORIZONTALES */
.small-horizontal {
    max-width: 280px;
}
.small-horizontal img {
    max-width: 280px;
}

.medium-horizontal {
    max-width: 360px;
}
.medium-horizontal img {
    max-width: 360px;
}

.large-horizontal {
    max-width: 480px;
}
.large-horizontal img {
    max-width: 480px;
}

/* TAMAÑOS - VERTICALES */
.small-vertical {
    max-width: 200px;
}
.small-vertical img {
    max-width: 200px;
}

.medium-vertical {
    max-width: 240px;
}
.medium-vertical img {
    max-width: 240px;
}

.large-vertical {
    max-width: 280px;
}
.large-vertical img {
    max-width: 280px;
}

/* IMAGEN ÚNICA */
.single {
    max-width: 500px;
}
.single img {
    max-width: 500px;
}

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

/* Tablets y pantallas medianas (1200px - 900px) */
@media (max-width: 1200px) {
    .timeline-menu {
        width: 220px;
    }
    
    .timeline-content {
        margin-left: 220px;
        padding: 0 4%;
    }
    
    .tl-item {
        grid-template-columns: 1fr 60px 1fr;
        margin: 120px 0;
        gap: 20px;
    }
    
    .year {
        font-size: 3rem;
    }
    
    .tl-content {
        max-width: 320px;
        padding: 20px;
    }
    
    .tl-content h2 {
        font-size: 1.3rem;
    }
    
    .tl-content p {
        font-size: 0.9rem;
    }
    
    /* Reducir tamaños de imágenes proporcionalmente */
    .large-horizontal {
        max-width: 400px;
    }
    .large-horizontal img {
        max-width: 400px;
    }
    
    .medium-horizontal {
        max-width: 320px;
    }
    .medium-horizontal img {
        max-width: 320px;
    }
    
    .large-vertical {
        max-width: 240px;
    }
    .large-vertical img {
        max-width: 240px;
    }
    
    .medium-vertical {
        max-width: 200px;
    }
    .medium-vertical img {
        max-width: 200px;
    }
    
    .large-cuadrada {
        max-width: 300px;
    }
    .large-cuadrada img {
        max-width: 300px;
    }
    
    .medium-cuadrada {
        max-width: 240px;
    }
    .medium-cuadrada img {
        max-width: 240px;
    }
    
    .single {
        max-width: 420px;
    }
    .single img {
        max-width: 420px;
    }
}

/* Tablets pequeñas y móvil horizontal (900px - 768px) */
@media (max-width: 900px) {
    .timeline-menu {
        width: 200px;
        padding: 20px 12px;
    }
    
    .timeline-content {
        margin-left: 200px;
        padding: 0 3%;
    }
    
    .menu-inner h1 {
        font-size: 1.8rem;
    }
    
    .menu-inner p {
        font-size: 0.75rem;
        margin-bottom: 20px;
    }
    
    .timeline-menu ul li a {
        font-size: 0.85rem;
        padding: 6px 12px;
    }
    
    .tl-item {
        grid-template-columns: 1fr 50px 1fr;
        margin: 100px 0;
        gap: 15px;
    }
    
    .year {
        font-size: 2.5rem;
    }
    
    .tl-content {
        max-width: 280px;
        padding: 18px;
    }
    
    .pos-left-top:not(.img-item),
    .pos-right-top:not(.img-item) {
        padding-right: 15px;
        padding-left: 15px;
    }
    
    .pos-right-middle,
    .pos-right-top.img-item,
    .pos-right-bottom {
        margin-left: 15px;
    }
    
    .pos-left-top.img-item,
    .pos-left-bottom {
        margin-right: 15px;
    }
    
    /* Reducir más las imágenes */
    .large-horizontal {
        max-width: 320px;
    }
    .large-horizontal img {
        max-width: 320px;
    }
    
    .medium-horizontal {
        max-width: 260px;
    }
    .medium-horizontal img {
        max-width: 260px;
    }
    
    .single {
        max-width: 340px;
    }
    .single img {
        max-width: 340px;
    }
}

/* Móvil (768px y menos) */
@media (max-width: 768px) {
    .wrapper {
        flex-direction: column;
    }

    /* Menu que se hace sticky al scroll */
    .timeline-menu {
        position: sticky;
        top: 0;
        width: 100%;
        height: auto;
        padding: 15px 20px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.2);
        z-index: 1000;
    }

    /* Ocultar logo y textos cuando hace scroll */
    .timeline-menu.scrolled .logo,
    .timeline-menu.scrolled .menu-inner h1,
    .timeline-menu.scrolled .menu-inner p {
        display: none;
    }

    /* Fechas en grid cuando hace scroll */
    .timeline-menu.scrolled nav ul {
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        gap: 5px;
        margin: 0;
    }

    .timeline-menu.scrolled nav ul li a {
        padding: 4px 2px;
        font-size: 0.55rem;
        text-align: center;
        white-space: nowrap;
    }

    .timeline-menu ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .timeline-menu ul li a {
        border-left: none;
        border-bottom: 3px solid transparent;
        padding: 8px 12px;
        font-size: 0.9rem;
    }

    .timeline-menu ul li a:hover,
    .timeline-menu ul li a.active {
        padding-left: 12px;
        border-left: none;
        border-bottom-color: #E5C16F;
    }

    /* Timeline centrado */
    .timeline-content {
        margin-left: 0;
        width: 100%;
        padding: 0 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Línea CENTRADA */
    .timeline-content::before {
        left: 50%;
        transform: translateX(-50%);
        top: 220px;
        width: 4px;
    }

    .timeline-header {
        padding: 40px 0 30px;
        position: relative;
        width: 100%;
    }

    .timeline-header h1 {
        font-size: 2rem;
    }

    .timeline-header .timeline-logo {
        width: 180px;
    }

    /* CÍRCULO INICIAL - Centrado */
    .timeline-start-circle {
        position: absolute;
        left: 50%;
        bottom: -12px;
        margin: 0;
        transform: translateX(-50%);
        width: 24px;
        height: 24px;
    }

    /* Items centrados */
    .timeline-items {
        padding: 0;
        width: 100%;
        max-width: 500px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .tl-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 80px 0;
        min-height: auto;
        gap: 0;
        position: relative;
        width: 100%;
        max-width: 100%;
    }

    /* CÍRCULO CENTRADO en la línea */
    .tl-item::before {
        left: 50%;
        top: -40px;
        transform: translateX(-50%);
        width: 18px;
        height: 18px;
        border: 4px solid #fff;
        position: absolute;
        z-index: 10;
    }

    /* FECHA - Debajo del círculo */
    .year {
        font-size: 2.2rem;
        text-align: center;
        margin-bottom: 20px;
        margin-top: 10px;
        line-height: 1;
        width: 100%;
        padding-left: 0;
        position: relative;
        z-index: 5;
        /* Stroke blanco para separar de la línea */
        -webkit-text-stroke: 6px white;
        text-stroke: 6px white;
        paint-order: stroke fill;
    }

    /* Todo centrado */
    .pos-left-top,
    .pos-right-top,
    .pos-left-bottom,
    .pos-right-bottom,
    .pos-right-middle {
        grid-column: unset;
        grid-row: unset;
        justify-self: center;
        text-align: center;
        padding: 0;
        margin: 0 0 20px 0;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .tl-content {
        max-width: 100%;
        text-align: left;
        width: 100%;
    }

    /* Imágenes centradas y 100% ancho */
    .img-item {
        margin: 0 auto 20px auto;
        max-width: 100%;
        width: 100%;
        display: block;
    }

    .large-horizontal,
    .medium-horizontal,
    .small-horizontal,
    .single,
    .large-vertical,
    .medium-vertical,
    .small-vertical,
    .large-cuadrada,
    .medium-cuadrada,
    .small-cuadrada {
        max-width: 100%;
        width: 100%;
    }

    .large-horizontal img,
    .medium-horizontal img,
    .small-horizontal img,
    .single img,
    .large-vertical img,
    .medium-vertical img,
    .small-vertical img,
    .large-cuadrada img,
    .medium-cuadrada img,
    .small-cuadrada img {
        max-width: 100%;
        width: 100%;
    }
}

/* Móvil pequeño (480px y menos) */
@media (max-width: 480px) {
    .timeline-menu {
        padding: 15px;
    }
    
    .logo img {
        width: 150px;
    }
    
    .menu-inner h1 {
        font-size: 1.6rem;
    }
    
    .menu-inner p {
        font-size: 0.8rem;
    }
    
    .timeline-content {
        padding: 0 15px;
    }
    
    .timeline-header h1 {
        font-size: 1.7rem;
    }
    
    .timeline-header .timeline-logo {
        width: 150px;
    }
    
    .year {
        font-size: 1.9rem;
    }
    
    .tl-content {
        padding: 15px;
    }
    
    .tl-content h2 {
        font-size: 1.15rem;
    }
    
    .tl-content p {
        font-size: 0.85rem;
    }
}

/* Fix para evitar desbordamiento horizontal */
* {
    box-sizing: border-box;
}

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

/* ===== BOTÓN BACK TO TOP ===== */
.back-to-top-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 100px 0 80px;
    position: relative;
    z-index: 10;
}

.back-to-top-btn {
    display: inline-block;
    padding: 18px 45px;
    background: linear-gradient(135deg, #B55D38 0%, #8B4513 100%);
    color: #ffffff;
    font-family: 'Roboto', sans-serif;
    font-size: 1.1rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 50px;
    box-shadow: 0 8px 25px rgba(181, 93, 56, 0.4);
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.back-to-top-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.back-to-top-btn:hover {
    background: linear-gradient(135deg, #C86D48 0%, #A05020 100%);
    box-shadow: 0 12px 35px rgba(181, 93, 56, 0.6);
    transform: translateY(-3px);
}

.back-to-top-btn:hover::before {
    width: 300px;
    height: 300px;
}

.back-to-top-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(181, 93, 56, 0.5);
}

/* Responsive para móvil */
@media (max-width: 768px) {
    .back-to-top-container {
        margin: 60px 0;
    }
    
    .back-to-top-btn {
        padding: 15px 35px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .back-to-top-btn {
        padding: 12px 30px;
        font-size: 0.95rem;
    }
}

/* ===== FONDO GRIS SOLO PARA PÁGINA TIMELINE ===== */
body:has(.timeline-menu) {
    background: #f5f5f5 !important;
}

body:has(.timeline-menu) #main {
    background: #f5f5f5 !important;
}

body:has(.timeline-menu) .entry-content {
    background: #f5f5f5 !important;
}

body:has(.timeline-menu) .ct-container {
    background: #f5f5f5 !important;
}

/* --- SOLUCIÓN ÚNICA: TARJETAS GENÉTICAS --- */
.over_genetics {
    position: relative !important;
    min-height: 320px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Esto estira los 3 botones al tamaño de la imagen */
.gspb_button-id-gsbp-1cacad2 a, 
.gspb_button-id-gsbp-ccdd1a1 a, 
.gspb_button-id-gsbp-7549127 a,
.boton_escudo a {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 999 !important;
    background: transparent !important;
}

.over_genetics img {
    object-fit: cover !important;
    width: 100% !important;
    height: 100% !important;
}