/*
Theme Name:  Hostinger Affiliate Theme Child
Theme URI:   https://creatufigura.com
Description: Tema hijo de Hostinger Affiliate Theme
Author:      creatufigura
Author URI:  https://creatufigura.com
Template:    hostinger-affiliate-theme
Version:     4.0
*/

/* ===========================
   IMPORTAR TEMA PADRE
   =========================== */
@import url('../hostinger-affiliate-theme/style.css');

/* ===========================
   VARIABLES
   =========================== */
:root {
    --primary-color: #80FF00;
    --primary-dark:  #6BDB00;
    --purple-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --transition-fast: 0.3s ease;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
}

/* ===========================
   CONFIGURACIÓN GLOBAL
   =========================== */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

@media screen and (max-width: 768px) {
    html, body {
        overflow-x: hidden;
    }
}

/* ===========================
   HEADER — NEGRO CON LOGO ENLAZADO
   NO tocar pointer-events ni el <a> del logo
   =========================== */
.site-header {
    background: #000000 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 9999 !important;
    width: 100% !important;
}

/* El enlace del logo debe ser siempre clickable */
.site-branding a,
.custom-logo-link,
.site-logo a {
    display: inline-block !important;
    pointer-events: auto !important;
    cursor: pointer !important;
    text-decoration: none !important;
}

/* Logo visible en todas las resoluciones */
.custom-logo,
.site-branding img,
.site-logo img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-width: 180px !important;
    height: auto !important;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.custom-logo-link:hover .custom-logo,
.site-logo a:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(128, 255, 0, 0.4));
}

/* Menú — color blanco */
.site-header nav a,
.site-navigation a {
    color: #ffffff !important;
    font-weight: 600 !important;
    transition: color 0.3s ease !important;
}

.site-header nav a:hover,
.site-header nav a:focus,
.site-header nav .current-menu-item > a {
    color: #ffd700 !important;
}

/* Submenús */
.site-header nav ul ul {
    background: #000000 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
}

.site-header nav ul ul a {
    color: #ffffff !important;
}

.site-header nav ul ul a:hover {
    color: #ffd700 !important;
}

/* Menú móvil — asegurar visibilidad */
.nav-toggle,
.mobile-nav-toggle,
.menu-toggle {
    display: block !important;
    color: #ffffff !important;
    background: transparent !important;
    border: 1px solid #ffffff !important;
    cursor: pointer !important;
    z-index: 10000 !important;
}

/* ===========================
   ANCHO DE CONTENIDO
   Respetar el slider del Personalizador del tema padre
   que controla .container
   =========================== */
.no-sidebar .entry-content {
    flex-basis: auto !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* ===========================
   SCROLL TO TOP
   =========================== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #000;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(128, 255, 0, 0.4);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(100px);
    transition:
        opacity     var(--transition-fast),
        visibility  var(--transition-fast),
        transform   var(--transition-fast),
        box-shadow  var(--transition-fast);
}
.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.scroll-to-top:hover {
    box-shadow: 0 6px 25px rgba(128, 255, 0, 0.6);
    transform: translateY(-5px);
}
.scroll-to-top::before {
    content: '↑';
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* ===========================
   TABLA DE CONTENIDOS
   =========================== */
.tabla-contenidos {
    background: var(--purple-gradient);
    padding: 25px;
    border-radius: 12px;
    margin: 30px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.tabla-contenidos h2 {
    color: white;
    margin-top: 0;
    font-size: 1.3em;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 10px;
}
.tabla-contenidos ul {
    color: white;
    line-height: 2;
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}
.tabla-contenidos a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}
.tabla-contenidos a:hover {
    text-decoration: underline;
}

/* ===========================
   BLOCKQUOTES
   =========================== */
blockquote {
    border-left: 4px solid #667eea;
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: #555;
    font-size: 1.1em;
}

/* ===========================
   TABLAS
   =========================== */
.entry-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
}
.entry-content table th {
    background: var(--purple-gradient);
    color: white;
    padding: 15px;
    text-align: left;
    font-weight: 600;
}
.entry-content table td {
    padding: 15px;
    border-bottom: 1px solid #e5e7eb;
}
.entry-content table tr:nth-child(even) {
    background-color: #f9fafb;
}

/* ===========================
   ESPACIADO DE BLOQUES
   =========================== */
.entry-content h2 {
    margin-top:    var(--spacing-lg);
    margin-bottom: var(--spacing-md);
}
.entry-content h3 {
    margin-top:    2rem;
    margin-bottom: var(--spacing-sm);
}

/* ===========================
   TÍTULOS DE SECCIÓN
   =========================== */
h2.wp-block-heading {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 40px;
    margin-top: 60px;
}
h2.wp-block-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #80FF00 0%, transparent 100%);
    border-radius: 2px;
}

/* ===========================
   BOTONES
   =========================== */
.wp-block-buttons {
    margin-top:    var(--spacing-lg) !important;
    margin-bottom: var(--spacing-lg) !important;
}

.wp-block-buttons .wp-block-button__link {
    background: linear-gradient(135deg, #000 0%, #1a1a1a 100%) !important;
    color: #80FF00 !important;
    padding: 15px 35px !important;
    border: 2px solid #80FF00 !important;
    border-radius: 30px !important;
    font-weight: 600 !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: hidden !important;
}
.wp-block-buttons .wp-block-button__link:hover {
    color: #000 !important;
    background: linear-gradient(135deg, #80FF00 0%, #6BDB00 100%) !important;
    transform: scale(1.05) !important;
    box-shadow: 0 8px 20px rgba(128, 255, 0, 0.4) !important;
}

/* ===========================
   TARJETAS DE ARTÍCULOS
   =========================== */
.entry-item {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.entry-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(128, 255, 0, 0.2);
    border-color: #80FF00;
}

/* Imagen */
.entry-item .entry-header {
    overflow: hidden;
    flex-shrink: 0;
}
.entry-item .entry-header img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.4s ease;
}
.entry-item:hover .entry-header img {
    transform: scale(1.08);
}

/* Título H3 */
.entry-item .entry-header h3,
.entry-item h3.entry-title {
    font-size: 1.05rem;
    line-height: 1.5;
    margin: 0;
    padding: 12px 15px;
    color: #1a1a1a;
    font-weight: 600;
    display: -webkit-box !important;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}
.entry-item:hover h3.entry-title {
    color: #80FF00;
}
.entry-item .entry-header a {
    text-decoration: none;
}

/* Categoría */
.entry-item .entry-category .entry-category-info {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 500;
    text-transform: uppercase;
    margin: 0;
}

/* Meta */
.entry-item .entry-meta {
    margin-top: auto;
    padding: 12px 15px 15px;
    border-top: 1px solid #f0f0f0;
}



/* ===========================
   HERO
   =========================== */
.wp-block-cover {
    min-height: 70vh;
    position: relative;
}
.wp-block-cover h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    text-shadow: 2px 4px 8px rgba(0,0,0,0.8);
    line-height: 1.2;
}
.wp-block-cover .wp-block-button__link {
    background: linear-gradient(135deg, #80FF00 0%, #6BDB00 100%) !important;
    color: #000 !important;
    font-weight: 700 !important;
    padding: 18px 40px !important;
    border-radius: 50px !important;
    box-shadow: 0 8px 20px rgba(128, 255, 0, 0.4) !important;
}

/* ===========================
   IMÁGENES
   =========================== */
.entry-content img,
.wp-block-image img {
    max-width: 100%;
    height: auto;
}

/* ===========================
   BLOQUES FULL-WIDTH
   =========================== */
.alignfull {
    max-width: 100vw;
    width: 100%;
    margin-left:  calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* ===========================
   UTILIDADES
   =========================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===========================
   RESPONSIVE — TABLETS (max 1024px)
   =========================== */
@media screen and (max-width: 1024px) {
    .flex.flex-fluid.columns-4 {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* ===========================
   RESPONSIVE — TABLETS (max 768px)
   =========================== */
@media screen and (max-width: 768px) {
    :root {
        --spacing-sm: 0.75rem;
        --spacing-md: 1rem;
        --spacing-lg: 2rem;
        --spacing-xl: 2.5rem;
    }

    .scroll-to-top {
        bottom: 20px;
        left:   20px;
        width:  45px;
        height: 45px;
        font-size: 20px;
    }

    .flex.flex-fluid.columns-2,
    .flex.flex-fluid.columns-4 {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    .entry-content table {
        font-size: 0.9em;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .tabla-contenidos {
        padding: 20px;
        margin:  20px 0;
    }

    .entry-content h2,
    h2.wp-block-heading {
        font-size:     1.5rem !important;
        margin-top:    2rem !important;
        margin-bottom: 1.5rem !important;
    }
    .entry-content h3,
    h3.wp-block-heading {
        font-size:  1.25rem !important;
        margin-top: 1.5rem !important;
    }

    /* Logo en móvil */
    .custom-logo,
    .site-branding img {
        max-width: 140px !important;
    }

    /* Tarjetas */
    .entry-item .entry-header img {
        height: 180px;
    }

    /* Hero */
    .wp-block-cover {
        min-height: 50vh;
    }
}

/* ===========================
   RESPONSIVE — MÓVILES (max 480px)
   =========================== */
@media screen and (max-width: 480px) {
    :root {
        --spacing-sm: 0.5rem;
        --spacing-md: 0.75rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
    }

    .scroll-to-top {
        bottom: 15px;
        left:   15px;
        width:  40px;
        height: 40px;
        font-size: 18px;
    }

    .flex.flex-fluid.columns-2,
    .flex.flex-fluid.columns-4 {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .entry-item .entry-header img {
        height: 220px;
    }

    .entry-content h2,
    h2.wp-block-heading {
        font-size:  1.35rem !important;
        margin-top: 1.5rem !important;
    }
    .entry-content h3,
    h3.wp-block-heading {
        font-size: 1.15rem !important;
    }

    .tabla-contenidos {
        padding: 15px;
    }

    .wp-block-cover {
        min-height: 40vh;
    }
    .wp-block-cover h1,
    .wp-block-cover h2 {
        font-size: 1.5rem !important;
    }

    blockquote {
        font-size:         0.95em;
        padding-left:      12px;
        border-left-width: 3px;
    }
}