/*
 Theme Name:   True News Child
 Theme URI:    https://www.themeinwp.com/theme/true-news/
 Description:  True News Child Theme for custom front-end adjustments.
 Author:       True News Child
 Author URI:   https://www.themeinwp.com/
 Template:     true-news
 Version:      1.0.0
 Text Domain:  true-news-child
*/

/* ==========================================================================
   CUSTOM CSS MOVING FROM PARENT TO CHILD
   ========================================================================== */

/* Sleek Branded Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff0036;
}

/* Search Overlay Customization */
.popup-search .search-form input[type=submit],
.popup-search .search-form .search-submit {
    background: #000000 !important;
    border: 1px solid #ffffff !important;
    border-radius: 6px !important;
    color: #ffffff !important;
}

.popup-search .search-form label .search-field {
    border-radius: 6px !important;
    border: 1px solid #cccccc !important;
}

/* Prevent Browser Default Blue on Visited Links */
a:visited,
a:visited * {
    color: inherit;
}

/* 4. NEWS TICKER (Marquee) REDESIGN */

/* Hide Default Theme Labels */
.site-header .header-marquee .title-label {
    display: none !important;
}

/* Ticker Header & Section */
.header-marquee {
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

.marquee-bar {
    padding: 5px 0;
}

.twp-marquee-list {
    margin: 0 !important;
}

/* Ticker Block Styling */
.marquee-bar .marquee-title {
    font-size: 14pt !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 5px 25px 10px 25px !important;
    border-left: 2px solid #f5f5f5;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

.marquee-bar .marquee-title:hover {
    background-color: transparent !important;
}

.marquee-bar .marquee-title:hover .ticker-content-title {
    text-decoration: underline !important;
}

.marquee-category {
    font-weight: 600 !important;
    color: #ff122e !important;
    text-transform: lowercase !important;
    font-size: .9em !important;
    margin-bottom: 2px !important;
    display: block !important;
    line-height: 1.4;
}

.marquee-category::first-letter {
    text-transform: uppercase !important;
}

.ticker-content-title {
    color: #1a1a1a !important;
    font-weight: 400 !important;
    line-height: 1.25;
    max-width: 225px;
    display: block;
    white-space: normal !important;
    font-size: .75em !important;
}

/* First ticker item doesn't need a border */
.slick-track .twp-marquee-list:first-child .marquee-title {
    border-left: none !important;
}

/* 5. MISCELLANEOUS */

/* Fade Animation for Ad Inserter */
.ai-rotate-option {
    animation: ai-fade-in 1.5s ease-in-out !important;
}

@keyframes ai-fade-in {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* Back to Top Button Hover */
.scroll-up:hover {
    background: #ff0036 !important;
    color: #ffffff !important;
}

.scroll-up:hover i {
    color: #ffffff !important;
}

/* 6. CUSTOM FOOTER DESIGN */

#colophon.site-footer {
    background-color: #2c353d !important;
    /* Dark bluish grey closer to design */
    color: #ffffff !important;
    padding: 20px 0 40px !important;
    font-family: 'Roboto', sans-serif;
    display: block;
    /* Removed !important to avoid breaking infinite scroll scripts */
    visibility: visible;
}

/* Optional Button Styling for "Cargar más noticias" on Category Pages */
.twp-loading-button {
    display: inline-block;
    background-color: #ff0036;
    color: #ffffff !important;
    border-radius: 4px;
    padding: 12px 25px;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
    margin: 30px auto;
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.twp-loading-button:hover {
    background-color: #d1002b;
    color: #ffffff !important;
}

.twp-ajax-post-load {
    text-align: center;
    width: 100%;
}

.twp-loging-status.twp-ajax-loading {
    margin: 20px auto;
}

/* Hide Jetpack Infinite Scroll spinner */
#infinite-handle,
.infinite-loader,
.infinite-scroll-error {
    display: none !important;
}


#colophon.site-footer a {
    color: #ffffff !important;
    text-decoration: none !important;
    transition: all 0.3s ease;
}

#colophon.site-footer a:hover {
    color: #ff0036 !important;
}

.custom-footer-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-social-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-social-section .social-title {
    font-family: 'Oswald', sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 16px;
    letter-spacing: 1px;
    margin-bottom: 25px;
    color: #ffffff;
}

.footer-social-icons {
    display: flex;
    gap: 40px;
    align-items: center;
}

.social-item {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.social-item img {
    width: 55px !important;
    height: 55px !important;
    flex-shrink: 0;
}

.footer-vertical-separator {
    width: 1px;
    height: 80px;
    background-color: rgba(255, 255, 255, 0.4);
    /* Matched caliber */
    margin: 0 60px;
}

.footer-nav-section ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 30px !important;
}

.footer-nav-section li {
    font-size: 15px !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    margin: 0 !important;
}

/* Dots before navigation items */
.footer-nav-section li:before {
    content: "•";
    margin-right: 15px;
    font-size: 16px;
    color: #ffffff;
    line-height: 1;
}

.footer-hr-custom {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.4);
    /* Matched caliber */
    margin: 0 auto 30px;
    width: 100%;
}

.footer-copyright-custom {
    text-align: center;
    font-size: 13px;
    opacity: 0.8;
    font-weight: 400;
    letter-spacing: 0.3px;
}


/* 7. MOBILE STICKY HEADER FIX */
@media screen and (max-width: 991px) {

    /* Force the red navbar to be fixed even on mobile */
    .header-navigation.header-affixnav {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 999 !important;
        background: rgba(255, 0, 54, 1) !important;
        /* Brand Red solid */
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2) !important;
    }

    /* Admin bar compatibility for mobile */
    .admin-bar .header-navigation.header-affixnav {
        top: 32px !important;
    }

    /* Prevent content from starting under the fixed header */
    .twp-site-content {
        margin-top: 60px !important;
        /* Approximate height of mobile navbar */
    }

    /* Adjust ticker to be visible correctly below fixed header */
    .header-marquee {
        position: relative;
        z-index: 998;
    }
}

@media screen and (max-width: 782px) {
    .admin-bar .header-navigation.header-affixnav {
        top: 46px !important;
    }
}

@media screen and (max-width: 600px) {
    .admin-bar .header-navigation.header-affixnav {
        top: 0 !important;
    }
}

@media screen and (max-width: 991px) {
    .custom-footer-main {
        flex-direction: column;
    }

    .footer-vertical-separator {
        width: 100%;
        max-width: 460px;
        /* Matching the approximate width of the 3 social items + gaps */
        height: 1px;
        margin: 25px 0;
    }

    .footer-social-icons {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }
}