/* Header News Widget Styles */
.header-news-widget * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.header-news-widget body {
    font-family: 'Georgia', serif;
    background-color: #f8f9fa;
}

/* Breaking News Bar */
.header-news-widget .breaking-news {
    background: transparent;
    /* Fondo transparente para que no ocupe todo el ancho */
    padding: 0;
    position: relative;
    width: 100%;
    max-width: 1190px !important;
    /* Restricción aplicada al contenedor padre */
    margin: 0 auto 10px auto;
    /* Centrado y margen inferior */
}

.header-news-widget .breaking-container {
    background: linear-gradient(90deg, #ff4444, #cc0000);
    display: flex;
    align-items: center;
    /* Cambiado de stretch a center para evitar problemas de altura */
    height: 40px;
    width: 100%;
    /* Ocupa el 100% del padre restringido */
    margin: 0;
    padding: 0;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    z-index: 1;
    /* Nuevo contexto de apilamiento */
}

.header-news-widget .breaking-label-wrapper {
    background: #b30000;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 100%;
    z-index: 20;
    /* Mayor z-index */
    position: relative;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.3);
}

.header-news-widget .breaking-label {
    font-weight: bold;
    font-size: 12px;
    text-transform: uppercase;
    white-space: nowrap;
}

.header-news-widget .breaking-text-wrapper {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    background: transparent;
    z-index: 1;
    /* Debajo del label */
    margin-left: -5px;
    /* Pequeño solapamiento para asegurar que no haya huecos */
    padding-left: 5px;
}

.header-news-widget .breaking-text {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: scroll-left 25s linear infinite;
    will-change: transform;
}

.header-news-widget .breaking-text span {
    display: inline-block;
    padding-right: 50px;
    /* Espacio al final */
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* Top Bar */
.header-news-widget .top-bar {
    background: #2c3e50;
    color: white;
    padding: 8px 0;
    font-size: 13px;
}

.header-news-widget .top-bar-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.header-news-widget .date-weather {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-news-widget .weather {
    display: flex;
    align-items: center;
    gap: 5px;
}

.header-news-widget .social-top {
    display: flex;
    gap: 15px;
    align-items: center;
}

.header-news-widget .social-top a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.header-news-widget .social-top a:hover {
    color: #3498db;
}

.header-news-widget .app-links {
    display: flex;
    gap: 10px;
    margin: 0 15px;
    padding: 0 15px;
    border-left: 1px solid rgba(255, 255, 255, 0.3);
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.header-news-widget .app-link {
    display: inline-flex;
    /* evita que el texto haga salto de línea */
    align-items: center;
    gap: 5px;
    color: white !important;
    text-decoration: none;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
    /* mantiene App Store / Google Play en una línea */
}

.header-news-widget .app-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    color: white !important;
}

.header-news-widget .app-link i {
    font-size: 14px;
}

.header-news-widget .lang-selector {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
}

/* Header */
.header-news-widget .header {
    background: white;
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-news-widget .header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
}

.header-news-widget .logo-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.header-news-widget .logo {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
    letter-spacing: -1px;
    line-height: 1;
    /* evita espacio extra por línea base */
    display: inline-flex;
    /* alinea imagen/texto en línea */
    align-items: center;
    /* centra verticalmente el logo */
}

/* Logo image (rectangular) */
.header-news-widget .logo-img {
    display: block;
    max-height: 56px;
    /* altura sugerida para logos rectangulares */
    height: 56px;
    width: auto;
    object-fit: contain;
}

.header-news-widget .tagline {
    font-size: 12px;
    color: #7f8c8d;
    font-style: italic;
    margin-top: 5px;
}

/* Logo image (rectangular y compacto) */
.header-news-widget .logo-img {
    display: block;
    max-height: 40px;
    /* reduce la altura para que no aumente el header */
    height: auto;
    /* mantiene proporción */
    width: auto;
    object-fit: contain;
    /* mantiene el contenido visible sin recortes */
}

.header-news-widget .header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-news-widget .search-container {
    position: relative;
}

.header-news-widget .search-box {
    padding: 10px 40px 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    width: 250px;
    font-size: 14px;
    transition: all 0.3s;
}

.header-news-widget .search-box:focus {
    outline: none;
    border-color: #c0392b;
    box-shadow: 0 0 5px rgba(192, 57, 43, 0.3);
}

.header-news-widget .search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
}

.header-news-widget .subscribe-btn {
    background: #c0392b;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.header-news-widget .subscribe-btn:hover {
    background: #a93226;
}

.header-news-widget .dark-mode-toggle {
    background: none;
    border: 2px solid #bdc3c7;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.header-news-widget .dark-mode-toggle:hover {
    border-color: #c0392b;
    color: #c0392b;
}

/* Navigation */
.header-news-widget .navigation {
    background: linear-gradient(135deg, #c0392b, #a93226);
    position: relative;
}

.header-news-widget .nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.header-news-widget .menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 15px 0;
    margin-right: 20px;
}

.header-news-widget .nav-menu {
    display: flex;
    list-style: none;
    flex: 1;
}

.header-news-widget .nav-item {
    position: relative;
}

.header-news-widget .nav-link {
    display: block;
    color: white;
    text-decoration: none;
    padding: 15px 20px;
    font-weight: 500;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    position: relative;
}

.header-news-widget .nav-link:hover,
.header-news-widget .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.header-news-widget .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: white;
}

/* Responsive */
@media (max-width: 768px) {
    .header-news-widget .top-bar-content {
        flex-direction: column;
        gap: 10px;
    }

    .header-news-widget .app-links {
        margin: 0 10px;
        padding: 0 10px;
    }

    .header-news-widget .app-link {
        font-size: 11px;
        padding: 3px 6px;
    }

    .header-news-widget .header-content {
        flex-direction: column;
        gap: 20px;
    }

    .header-news-widget .search-box {
        width: 200px;
    }

    .header-news-widget .menu-toggle {
        display: block;
    }

    .header-news-widget .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #c0392b;
        flex-direction: column;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .header-news-widget .nav-menu.active {
        display: flex;
    }

    .header-news-widget .nav-link {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

/* Dark Mode */
.header-news-widget.dark-mode {
    background: #1a1a1a;
    color: #e0e0e0;
}

.header-news-widget.dark-mode .header {
    background: #2d2d2d;
    color: #e0e0e0;
}

.header-news-widget.dark-mode .logo {
    color: #e0e0e0;
}

.header-news-widget.dark-mode .search-box {
    background: #3a3a3a;
    border-color: #555;
    color: #e0e0e0;
}

/* Global Dark Mode (site-wide) */
body.dark-mode {
    background: #121212;
    color: #e0e0e0;
}

body.dark-mode a {
    color: #8ab4f8;
}

body.dark-mode a:hover {
    color: #a6c8ff;
}

body.dark-mode input,
body.dark-mode textarea,
body.dark-mode select {
    background: #1e1e1e;
    color: #e0e0e0;
    border-color: #555;
}

/* Elementor containers keep inherited color in dark mode */
body.dark-mode .elementor-widget,
body.dark-mode .elementor-section,
body.dark-mode .elementor-container {
    color: inherit;
}

/* Header toggle visuals in global dark mode */
body.dark-mode .header-news-widget .dark-mode-toggle {
    border-color: #eeeeee;
    color: #ffeb3b;
}

body.dark-mode .header-news-widget .dark-mode-toggle i.fa-sun {
    color: #ffeb3b;
}