/*
Theme Name: The Newspaper Child
Template: the-newspaper
Description: Child theme personalizado de The Newspaper para adaptar plantilla HTML
Version: 1.0
*/

/* No usamos @import, los estilos se cargan desde functions.php */

/* === ESTILOS PERSONALIZADOS DEL HEADER === */

/* Ocultar header original de The Newspaper */
#header {
    display: none !important;
}

/* Header personalizado La Patria - Base */
.cabecera-lapatria {
    position: fixed;
    padding: 2px 20px;
    top: 0px;
    width: 100%;
    background: white;
    z-index: 1001;
    transition: all 0.3s ease;
    /* box-shadow: 0 2px 10px rgba(0,0,0,0.1); */
    justify-content: center;
    border-bottom: 1px  #b4c0e9 solid;
    left: auto;
    transform: none;
}

.cabecera-content {
    max-width: 1400px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    padding: 0 20px;
}

/* Responsive breakpoints específicos */

/* Pantallas muy grandes (más de 1440px) - ancho fijo 1440px */
@media screen and (min-width: 1441px) {
    .cabecera-lapatria {
        width: 1400px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    
    .cabecera-content {
        max-width: 1400px !important;
        padding: 0 20px !important;
    }

    #middle {
        margin-top: 70px;
    }

}

/* Pantallas medianas-grandes (1041px a 1440px) - ancho fijo 1040px */
@media screen and (min-width: 1041px) and (max-width: 1440px) {
    .cabecera-lapatria {
        width: 1040px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    
    .cabecera-content {
        max-width: 980px !important;
        padding: 0 20px !important;
    }

    #middle {
        margin-top: 70px;
    }
}

/* Pantallas medianas (769px a 1040px) - responsive 100% */
@media screen and (min-width: 769px) and (max-width: 1040px) {
    .cabecera-lapatria {
        width: 100% !important;
        left: 0 !important;
        transform: none !important;
        padding: 4px 20px !important;
    }
    
    .cabecera-content {
        max-width: 100% !important;
        padding: 0 !important;
    }

    #middle {
        margin-top: 100px;
    }
}


/* Logo principal con mejor calidad */
.cabecera-lapatria img,
.cabecera-lapatria .custom-logo-link img {
    width: 100%;
    max-width: 450px;
    height: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    justify-content: center;
    
    /* Mejorar calidad de renderizado */
    image-rendering: high-quality;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
    
    /* Para navegadores que soportan estas propiedades */
    image-rendering: -webkit-optimize-contrast;
    -ms-interpolation-mode: bicubic;
}

/* Cuando el header se contrae */
.cabecera-lapatria.sticky img,
.cabecera-lapatria.sticky .custom-logo-link img {
    height: auto;
    max-width: 250px;
    
    /* Mantener la mejor calidad posible en tamaño reducido */
    image-rendering: auto;
    filter: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Contenedor del logo */
.cabecera-lapatria .custom-logo-link {
    display: block;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.cabecera-lapatria.sticky .custom-logo-link {
    height: 40px;
}

.btn-cabecera {
    background: #fff;
    color: #121f49;
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 35px;
    transition: all 0.2s ease;
}

.btn-cabecera:hover {
    background: #1d9bf0;
    transform: scale(1.05);
}




/* Ajustes para tema Newspaper */
.newsauth-header-widget {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.td-header-wrap .newsauth-widget {
    padding: 10px 0;
}

/* Ocultar en móvil si es necesario */
@media (max-width: 767px) {
    .newsauth-widget-stat:not(:first-child) {
        display: none;
    }
}





/* Menú Hamburguesa Desplegable */
.hamburger-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 320px;
    height: 100vh;
    background: #2c2c2c;
    z-index: 2000;
    transition: left 0.3s ease;
    overflow-y: auto;
}

.hamburger-menu.open {
    left: 0;
}

.hamburger-nav-list a[href="#"]:not(:empty) {
    height: 3px;
    background: #1d9bf0;
    padding: 0;
    margin: 0;
    overflow: hidden;
    text-indent: -9999px;
}

#hamburger-navigation {
    padding-left: 1px;
}
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

.menu-cabecera-principal {
    padding: 5px;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-close {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
}

.menu-content {
    padding: 0;
}

.hamburger-nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hamburger-nav-list li {
    margin: 0;
    padding: 0;
}

.hamburger-nav-list li:before {
    display: none;
}

/* Estructura para items con submenu */
.hamburger-nav-list .menu-item-wrapper {
    display: flex;
    align-items: center;
    border-bottom: 1px solid #444;
    transition: all 0.2s ease;
}

.hamburger-nav-list .menu-item-wrapper:hover {
    background: #3e4345;
}

/* Enlaces del menú */
.hamburger-nav-list .menu-item-link,
.hamburger-nav-list a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #ccc;
    text-decoration: none;
    transition: all 0.2s ease;
    flex: 1;
}

.hamburger-nav-list .menu-item-wrapper .menu-item-link {
    border-bottom: none;
    padding-right: 5px;
}

.hamburger-nav-list a:hover,
.hamburger-nav-list .menu-item-link:hover {
    color: white;
}

/* Items sin submenu */
.hamburger-nav-list li:not(.menu-item-has-children) a {
    border-bottom: 1px solid #444;
}

.hamburger-nav-list li:not(.menu-item-has-children) a:hover {
    background: #3e4345;
    color: white;
}

/* Botón toggle desplegable */
.menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
    margin-right: 8px;
    flex-shrink: 0;
}

.menu-toggle:hover {
    color: #1d9bf0;
    background: rgba(29, 155, 240, 0.1);
    border-radius: 4px;
}

.menu-toggle.expanded {
    transform: rotate(90deg);
    color: #1d9bf0;
}

/* Submenu styles */
.hamburger-nav-list .sub-menu {
    background: #252525;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0;
    list-style: none;
}

.hamburger-nav-list .sub-menu.expanded {
    max-height: 500px;
    padding: 5px 0;
}

.hamburger-nav-list .sub-menu li {
    margin: 0;
}

.hamburger-nav-list .sub-menu a {
    font-size: 14px;
    color: #999;
    padding: 8px 20px 8px 40px;
    border-bottom: 1px solid #333;
}

.hamburger-nav-list .sub-menu a:hover {
    background: #2a2a2a;
    color: white;
    padding-left: 45px;
}

.hamburger-nav-list .sub-menu li:last-child a {
    border-bottom: none;
}

/* Animación suave para el submenu */
.hamburger-nav-list .menu-item-has-children {
    overflow: hidden;
}










/* Modal de Búsqueda */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0,0,0,0.8);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-modal.open {
    opacity: 1;
    visibility: visible;
}

.search-box {
    background: white;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
}

.search-input {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    border: 2px solid #ddd;
    border-radius: 8px;
    outline: none;
}

.search-input:focus {
    border-color: #1d9bf0;
}

/* Variables CSS para colores (basado en tu script) */
:root {
    --color1: #ff6b6b;
    --color2: #4ecdc4;
    --color3: #45b7d1;
    --color4: #96ceb4;
    --color5: #feca57;
    --color6: #ff9ff3;
    --color7: #54a0ff;
    --color8: #5f27cd;
    --color9: #00d2d3;
    --color10: #ff9f43;
    --color11: #10ac84;
    --color12: #ee5a24;
    --color13: #0984e3;
    --color14: #a29bfe;
    --color15: #fd79a8;
    --color16: #e17055;
    --color17: #81ecec;
    --color18: #fab1a0;
    --color19: #00b894;
    --color20: #6c5ce7;
}

/* Responsive */
@media (max-width: 1320px) {
    .cabecera-lapatria {
        padding: 4px 20px;
    }
    
    .cabecera-content {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .cabecera-lapatria {
        padding: 4px 10px;
    }
    
    .cabecera-lapatria img,
    .cabecera-lapatria .custom-logo-link img {
        max-width: 380px;
        height: 75px;
    }
    
    .cabecera-lapatria.sticky img,
    .cabecera-lapatria.sticky .custom-logo-link img {
        height: 35px;
        max-width: 180px;
    }
    
    .cabecera-lapatria .custom-logo-link {
        height: 70px;
    }
    
    .cabecera-lapatria.sticky .custom-logo-link {
        height: 40px;
    }
    
    .btn-cabecera {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }

    #middle {
        margin-top: 50px;
    }

    #slide_top {
        display: none !important;
    }

}

@media (max-width: 540px) {
    #middle {
        margin-top: 80px;
    }
}

@media (max-width: 480px) {
    .cabecera-content {
        padding: 0 5px;
    }
    
    .cabecera-lapatria img,
    .cabecera-lapatria .custom-logo-link img {
        max-width: 250px;
        height: 60px;
    }
    
    .cabecera-lapatria.sticky img,
    .cabecera-lapatria.sticky .custom-logo-link img {
        height: 35px;
        max-width: 150px;
    }
    
    .btn-cabecera {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    #middle {
        margin-top: 48px;
    }
    
    #slide_top {
        display: none !important;
    }
}


/* ************  Estilos de la plantilla original, modificados por child ***************** */

#slide_top {
    width: 30px !important;
    height: 45px !important;
    bottom: 5px !important;
    right: 5px !important;
    padding: 0 !important;
}












/*  *********** Para los TABS ************  */
@media (max-width: 480px) {
    .cabecera-content {
        padding: 0 5px;
    }
    
    .cabecera-lapatria img,
    .cabecera-lapatria .custom-logo-link img {
        max-width: 250px;
        height: 60px;
    }
    
    .cabecera-lapatria.sticky img,
    .cabecera-lapatria.sticky .custom-logo-link img {
        height: 35px;
        max-width: 150px;
    }
    
    .btn-cabecera {
        width: 30px;
        height: 30px;
        font-size: 18px;
    }

    #middle {
        margin-top: 48px;
    }
}

/* === IMPORTAR ESTILOS DE TABS === */
/* Los estilos de tabs se cargan desde assets/css/tabs.css */

/* === AJUSTES ESPECÍFICOS DE INTEGRACIÓN === */
/* Asegurar que el contenido del post no interfiera con el header */
.single-post #middle {
    margin-top: 70px;
}

/* Ajustes para el contenedor principal en posts individuales */
.single-post .middle_inner {
    padding-top: 20px;
}

/* Override para ocultar elementos innecesarios del tema padre en posts individuales */
.single-post .cmsmasters_post_cont_info,
.single-post .cmsmasters_post_footer,
.single-post .cmsmasters_post_nav {
    display: none;
}

/* Ajustar ancho máximo para el contenido de tabs */
.single-post .content_wrap {
    max-width: 1200px;
    margin: 0 auto;
}