/**
 * Header Widget Stylesheet
 *
 * @package NationalRajasthan
 */

/* ==========================================================================
   1. Shared Layout Wrapper
   ========================================================================== */
.nr-header {
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #ececec;
    position: relative;
    z-index: 99;
    box-sizing: border-box;
    box-shadow: none;
}

.nr-header__container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

/* ==========================================================================
   2. Components
   ========================================================================== */

/* Logo */
.nr-header__logo {
    display: inline-flex;
    align-items: center;
}

.nr-header__logo a {
    display: block;
    text-decoration: none;
    min-height: 55px; /* Prevent collapsed sticky spacer during image load */
}

.nr-header__logo img {
    display: block;
    max-height: 55px;
    width: auto;
    transition: transform 0.3s ease;
}

.nr-header__logo img:hover {
    transform: scale(1.02);
}

.nr-header__logo-text {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
    color: #1a1a1a;
    text-transform: uppercase;
}

/* Search (Circular Outline style) */
.nr-header__search {
    display: inline-flex;
    align-items: center;
}

.nr-search-toggle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background-color: #ffffff;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nr-search-toggle:hover {
    color: #c8102e; /* Brand red accent color */
    background-color: rgba(200, 16, 46, 0.03);
}

.nr-search-toggle svg {
    width: 24px;
    height: 24px;
    display: block;
}

/* Mobile Toggle */
.nr-header__mobile-toggle {
    display: none;
}

.nr-mobile-menu-toggle {
    width: 44px;
    height: 44px;
    border: none;
    background: transparent;
    color: #1a1a1a;
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.2s ease;
}

.nr-mobile-menu-toggle:hover {
    color: #ffffff;
    background-color: #c8102e;
}

/* Advertisement (Classic only) */
.nr-header__ad {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nr-header__ad a {
    display: block;
    border-radius: 4px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.nr-header__ad img {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ==========================================================================
   3. Layout Variations
   ========================================================================== */

/* --- A. Classic Layout --- */
.nr-header--classic .nr-header__container {
    height: 80px;
    justify-content: space-between;
    gap: 30px;
}

.nr-header--classic .nr-header__logo {
    flex: 0 0 auto;
}

.nr-header--classic .nr-header__ad {
    flex: 1 1 auto;
}

.nr-header--classic .nr-header__search {
    flex: 0 0 auto;
}


/* --- B. Minimal Layout --- */
.nr-header--minimal {
    border-bottom: 1px solid #ececec;
}

.nr-header--minimal .nr-header__container {
    height: 80px;
    justify-content: space-between;
    gap: 20px;
}

.nr-header--minimal .nr-header__left-meta {
    flex: 1 1 33.333%;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #555555;
    font-weight: 500;
}

.nr-header--minimal .nr-header__meta-item {
    display: inline-flex;
    align-items: center;
}

.nr-header--minimal .nr-header__meta-divider {
    color: #dddddd;
    margin: 0 2px;
}

.nr-header--minimal .nr-header__weather-icon {
    width: 24px;
    height: 24px;
    margin-right: 4px;
}

.nr-header--minimal .nr-header__weather-temp {
    font-weight: 700;
    color: #1a1a1a;
    margin-right: 4px;
}

.nr-header--minimal .nr-header__weather-city {
    color: #666666;
}

.nr-header--minimal .nr-header__logo-wrapper {
    flex: 1 1 33.333%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nr-header--minimal .nr-header__logo img {
    max-height: 55px;
}

.nr-header--minimal .nr-header__search {
    flex: 1 1 33.333%;
    display: flex;
    justify-content: flex-end;
}


/* --- C. Modern Layout --- */
.nr-header--modern {
    border-bottom: 1px solid #ececec;
}

.nr-header--modern .nr-header__container {
    height: 90px;
    justify-content: space-between;
    align-items: center;
}

.nr-header--modern .nr-header__logo-wrapper {
    flex: 0 0 auto;
}

.nr-header--modern .nr-header__logo img {
    max-height: 55px;
}

/* Stack styling */
.nr-header__right-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    margin-left: auto;
    margin-right: 30px;
}

.nr-header__right-row {
    display: flex;
    align-items: center;
    gap: 20px;
}

/* Buttons */
.nr-header__btn {
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 4px;
    border: 1px solid #e1e1e1;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-sizing: border-box;
}

.nr-header__btn--epaper {
    background-color: #ffffff;
    color: #1a1a1a;
}

.nr-header__btn--epaper:hover {
    border-color: #c8102e;
    color: #c8102e;
    background-color: rgba(200, 16, 46, 0.03);
}

.nr-header__btn--livetv {
    background-color: #ffffff;
    color: #1a1a1a;
}

.nr-header__btn--livetv:hover {
    border-color: #c8102e;
    color: #c8102e;
    background-color: rgba(200, 16, 46, 0.03);
}

.nr-btn__live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #c8102e;
    display: inline-block;
    animation: nrPulse 1.5s infinite;
}

@keyframes nrPulse {
    0% {
        transform: scale(0.9);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.5;
    }
    100% {
        transform: scale(0.9);
        opacity: 1;
    }
}

/* Socials */
.nr-header__socials {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nr-header__socials a {
    color: #555555;
    font-size: 14px;
    transition: color 0.2s ease;
    text-decoration: none;
}

.nr-header__socials a:hover {
    color: #c8102e;
}

/* Meta */
.nr-header__right-row--meta {
    font-size: 12px;
    color: #666666;
    font-weight: 500;
}

.nr-header--modern .nr-header__meta-item {
    display: inline-flex;
    align-items: center;
}

.nr-header--modern .nr-header__meta-divider {
    color: #dddddd;
    margin: 0 4px;
}

.nr-header--modern .nr-header__weather-icon {
    width: 22px;
    height: 22px;
    margin-right: 4px;
}

.nr-header--modern .nr-header__weather-temp {
    font-weight: 700;
    color: #1a1a1a;
    margin-right: 4px;
}

.nr-header--modern .nr-header__weather-city {
    color: #666666;
}

/* Mobile Meta (Hidden on Desktop) */
.nr-header__mobile-meta {
    display: none;
}

/* ==========================================================================
   4. Responsive Adjustments
   ========================================================================== */

/* Tablet & Mobile Styles */
@media (max-width: 991px) {
    .nr-header__logo a {
        min-height: 50px; /* Prevent collapsed sticky spacer during image load */
    }

    .nr-header__logo img {
        max-height: 55px;
    }

    /* Classic layout wraps on mobile/tablet */
    .nr-header--classic .nr-header__container {
        height: auto;
        padding: 15px 20px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 15px;
    }

    .nr-header--classic .nr-header__mobile-toggle {
        display: flex;
        align-items: center;
        order: 1;
    }

    .nr-header--classic .nr-header__logo {
        order: 2;
        text-align: center;
    }

    .nr-header--classic .nr-header__search {
        order: 3;
        width: auto;
        display: flex;
        justify-content: flex-end;
    }

    .nr-header--classic .nr-header__ad {
        width: 100%;
        order: 4;
    }

    /* Minimal layout mobile responsiveness */
    .nr-header--minimal .nr-header__left-meta {
        display: none;
    }

    .nr-header--minimal .nr-header__mobile-toggle {
        display: flex;
        flex: 1 1 33.333%;
        justify-content: flex-start;
        align-items: center;
    }

    .nr-header--minimal .nr-header__logo-wrapper {
        flex: 1 1 33.333%;
        justify-content: center;
    }

    .nr-header--minimal .nr-header__search {
        flex: 1 1 33.333%;
        justify-content: flex-end;
    }

    .nr-header--minimal .nr-header__logo img {
        max-height: 50px;
    }

    /* Modern layout mobile responsiveness */
    .nr-header--modern .nr-header__right-stack {
        display: none; /* Hide stack area on mobile/tablet */
    }

    .nr-header--modern .nr-header__mobile-toggle {
        display: flex;
        flex: 1 1 33.333%;
        justify-content: flex-start;
        align-items: center;
    }

    .nr-header--modern .nr-header__logo-wrapper {
        flex: 1 1 33.333%;
        justify-content: center;
        display: flex;
    }

    .nr-header--modern .nr-header__search {
        flex: 1 1 33.333%;
        justify-content: flex-end;
        display: flex;
    }

    .nr-header--modern .nr-header__logo img {
        max-height: 50px;
    }

    .nr-header--modern .nr-header__container {
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 12px 15px;
    }

    /* Mobile Meta row 2 */
    .nr-header__mobile-meta {
        display: flex;
        width: 100%;
        justify-content: center;
        align-items: center;
        gap: 6px;
        border-top: 1px solid #f0f0f0;
        padding-top: 8px;
        margin-top: 8px;
        font-size: 11px;
        color: #666666;
        font-weight: 500;
    }

    .nr-header__mobile-meta .nr-header__meta-divider {
        color: #cccccc;
    }
}

@media (max-width: 768px) {
    .nr-header__container {
        padding: 0 15px;
    }

    .nr-header__logo-text {
        font-size: 22px;
    }
}
