/*
 * Navigation Styles
 * 
 * @package Jamuna TV
 * @since 1.0.0
 */

/* ======================
   Responsive Header & Navigation
   ====================== */

/* Base Header Styles */
.site-header {
    background: linear-gradient(135deg, #d10000 0%, #ff0000 100%);
    padding: 0;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

.container {
    max-width: 100%;
    padding: 0 15px;
    margin: 0 auto;
    width: 100%;
}

/* Header Content */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    position: relative;
    flex-wrap: wrap;
    gap: 15px;
}

/* Logo/Brand */
.navbar-brand {
    padding: 5px 0;
    margin: 0;
    z-index: 1001;
    flex-shrink: 0;
}

.navbar-brand img {
    height: 60px;
    width: auto;
    max-width: 180px;
    transition: all 0.3s ease;
}

/* Navigation Menu */
#site-navigation {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
    margin: 0 15px;
    max-width: 100%;
}

.primary-menu {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

/* Navigation Links */
.nav-item {
    margin: 2px 0;
}

.nav-link {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.6rem 0.8rem !important;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
    text-decoration: none;
}

/* Header Right Section */
.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* Live TV Button */
.live-tv-btn {
    position: relative;
}

.live-tv-link {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 6px 12px;
    border-radius: 30px;
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    white-space: nowrap;
}

/* Social Icons */
.social-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-icon {
    color: #ffffff;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    text-decoration: none;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
    margin-left: 10px;
}

.menu-icon,
.menu-toggle .menu-icon::before,
.menu-toggle .menu-icon::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    background: #fff;
    left: 50%;
    transform: translateX(-50%);
    transition: all 0.3s ease;
}

.menu-icon {
    top: 50%;
    transform: translate(-50%, -50%);
}

.menu-toggle .menu-icon::before {
    top: -8px;
}

.menu-toggle .menu-icon::after {
    bottom: -8px;
}

.menu-toggle[aria-expanded="true"] .menu-icon {
    background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-icon::before {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded="true"] .menu-icon::after {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Responsive Adjustments */
@media (max-width: 1199.98px) {
    .navbar-brand img {
        height: 55px;
        max-width: 160px;
    }
    
    .nav-link {
        padding: 0.5rem 0.6rem !important;
        font-size: 0.85rem;
    }
    
    .live-tv-link {
        padding: 5px 10px;
        font-size: 0.8rem;
    }
    
    .social-icon {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 991.98px) {
    .menu-toggle {
        display: block;
    }
    
    #site-navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #d10000;
        flex-direction: column;
        justify-content: flex-start;
        padding: 80px 20px 40px;
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 1000;
        margin: 0;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    #site-navigation.toggled {
        right: 0;
    }
    
    .primary-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-link {
        padding: 12px 0 !important;
        display: block;
        text-align: right;
    }
    
    .header-right {
        margin-left: auto;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand img {
        height: 50px;
        max-width: 140px;
    }
    
    .live-tv-link .live-text {
        display: none;
    }
    
    .live-tv-link {
        padding: 6px 10px;
    }
    
    .social-icon {
        width: 30px;
        height: 30px;
        font-size: 0.8rem;
    }
    
    .header-content {
        padding: 8px 0;
    }
}

/* Sticky Header */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    animation: slideDown 0.5s;
    background: rgba(209, 0, 0, 0.98);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* ======================
   Enhanced Header & Navigation
   ====================== */

/* Base Header Styles */
.site-header {
    background: linear-gradient(135deg, #d10000 0%, #ff0000 100%);
    padding: 0;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 3px solid rgba(255, 255, 255, 0.1);
}

/* Header Content Container */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    position: relative;
}

/* Logo/Brand Styles */
.navbar-brand {
    padding: 5px 0;
    margin: 0;
    z-index: 1001;
    transition: all 0.3s ease;
}

.navbar-brand img {
    height: 65px;
    width: auto;
    max-width: 220px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Navigation Menu */
#site-navigation {
    flex-grow: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
}

.primary-menu {
    display: flex;
    margin: 0;
    padding: 0;
    list-style: none;
    align-items: center;
}

/* Navigation Links */
.nav-link {
    color: #ffffff !important;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.8rem 1.2rem !important;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    line-height: 1.4;
}

/* Hover & Active States */
.nav-link:hover,
.nav-link:focus,
.current-menu-item > .nav-link {
    color: #ffffff !important;
    opacity: 1 !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: #ffffff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 3px 3px 0 0;
}

.nav-link:hover::after,
.current-menu-item > .nav-link::after {
    width: 60%;
}

/* Header Right Section */
.header-right {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

/* Live TV Button */
.live-tv-btn {
    position: relative;
    margin-right: 15px;
}

.live-tv-link {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 15px;
    border-radius: 30px;
    color: #ffffff !important;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.live-tv-link:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.live-pulse {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #ff0000;
    border-radius: 50%;
    margin-right: 8px;
    position: relative;
    animation: pulse 1.5s infinite;
    box-shadow: 0 0 0 rgba(255, 0, 0, 0.7);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Social Icons */
.social-icons {
    display: flex;
    align-items: center;
}

.social-icon {
    color: #ffffff !important;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    position: relative;
    cursor: pointer;
    z-index: 1001;
    margin-left: 15px;
}

.menu-icon,
.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 3px;
    background: #ffffff;
    left: 5px;
    transition: all 0.3s ease;
}

.menu-icon {
    top: 50%;
    transform: translateY(-50%);
}

.menu-icon::before {
    top: -8px;
}

.menu-icon::after {
    bottom: -8px;
}

.menu-toggle[aria-expanded="true"] .menu-icon {
    background: transparent;
}

.menu-toggle[aria-expanded="true"] .menu-icon::before {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded="true"] .menu-icon::after {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Responsive Styles */
@media (max-width: 1199.98px) {
    .nav-link {
        padding: 0.7rem 1rem !important;
        font-size: 0.9rem;
    }
    
    .navbar-brand img {
        height: 60px;
        max-width: 200px;
    }
}

@media (max-width: 991.98px) {
    .menu-toggle {
        display: block;
    }
    
    #site-navigation {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background: #d10000;
        flex-direction: column;
        justify-content: flex-start;
        padding: 80px 20px 40px;
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 1000;
    }
    
    #site-navigation.toggled {
        right: 0;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    }
    
    .primary-menu {
        flex-direction: column;
        width: 100%;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .nav-link {
        padding: 15px 0 !important;
        display: block;
    }
    
    .nav-link::after {
        display: none;
    }
    
    .header-right {
        margin-left: auto;
    }
    
    .live-tv-link .live-text {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .navbar-brand img {
        height: 50px;
        max-width: 160px;
    }
    
    .live-tv-link {
        padding: 6px 10px;
        font-size: 0;
    }
    
    .live-tv-link i {
        margin: 0;
    }
    
    .social-icon {
        width: 32px;
        height: 32px;
        margin-left: 8px;
    }
}

/* Sticky Header */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    animation: slideDown 0.5s;
    background: rgba(209, 0, 0, 0.98);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: #ffffff;
    z-index: 1000;
    transition: width 0.1s ease;
}

/* Dark Overlay when mobile menu is open */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.menu-overlay.visible {
    opacity: 1;
    visibility: visible;
}

#site-navigation .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #007bff;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

#site-navigation .navbar-nav .nav-link:hover::after,
#site-navigation .navbar-nav .nav-link:focus::after {
    width: 80%;
}

/* Dropdown Menu */
.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 0.25rem;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    min-width: 220px;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    color: #333;
    transition: all 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #f8f9fa;
    color: #007bff;
}

/* Mobile Menu Toggle */
.navbar-toggler {
    border: none;
    padding: 0.5rem;
    font-size: 1.25rem;
    line-height: 1;
    background-color: transparent;
    border-radius: 0.25rem;
}

.navbar-toggler:focus {
    outline: none;
    box-shadow: none;
}

/* Active State */
.navbar-nav .current-menu-item > .nav-link,
.navbar-nav .current-menu-parent > .nav-link {
    color: #007bff;
    font-weight: 600;
}

.navbar-nav .current-menu-item > .nav-link::after,
.navbar-nav .current-menu-parent > .nav-link::after {
    width: 80%;
}

/* Dropdown Submenu */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -0.5rem;
    margin-left: 0.1rem;
}

/* Responsive Styles */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: #fff;
        padding: 1rem;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        margin-top: 0.5rem;
        border-radius: 0.25rem;
    }
    
    .dropdown-menu {
        margin-left: 1rem;
        box-shadow: none;
        border-left: 2px solid #f0f0f0;
    }
    
    .dropdown-submenu .dropdown-menu {
        left: 1rem;
        margin-top: 0;
    }
    
    #site-navigation .navbar-nav .nav-link {
        padding: 0.5rem 0;
    }
    
    #site-navigation .navbar-nav .nav-link::after {
        display: none;
    }
}

/* Sticky Header */
.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    animation: slideDown 0.5s ease-out;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Admin Bar Adjustment */
.admin-bar .sticky-header {
    top: 32px;
}

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

/* Dark Mode Support */
[data-theme="dark"] #site-navigation,
[data-theme="dark"] .navbar-collapse {
    background-color: #2d3748;
}

[data-theme="dark"] #site-navigation .navbar-nav .nav-link {
    color: #e2e8f0;
}

[data-theme="dark"] #site-navigation .navbar-nav .nav-link:hover,
[data-theme="dark"] #site-navigation .navbar-nav .nav-link:focus {
    color: #63b3ed;
}

[data-theme="dark"] .dropdown-menu {
    background-color: #2d3748;
    border: 1px solid #4a5568;
}

[data-theme="dark"] .dropdown-item {
    color: #e2e8f0;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
    background-color: #4a5568;
    color: #fff;
}

[data-theme="dark"] .navbar-toggler {
    color: #e2e8f0;
}

[data-theme="dark"] .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28226, 232, 240, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
