/* Layout Container */
.layout-container {
    display: flex;
    min-height: 100vh;
}

/* Side Navigation */
.side-nav {
    width: 280px;
    background: var(--dark-color);
    color: var(--light-color);
    padding: 2rem 1rem;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    transition: all var(--transition-speed);
    box-shadow: var(--shadow-lg);
}

/* Navigation Brand */
.nav-brand {
    padding: 1rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-title {
    color: var(--light-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

/* Navigation Menu */
.nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-menu .nav-item {
    margin-bottom: 0.5rem;
}

.nav-menu .nav-link {
    display: flex;
    align-items: center;
    padding: 1rem;
    color: var(--light-color);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all var(--transition-speed);
}

.nav-menu .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.nav-menu .nav-link.active {
    background: var(--primary-color);
}

/* Navigation Icons */
.nav-icon {
    margin-right: 1rem;
    font-size: 1.2rem;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 2rem;
    background: var(--light-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    .side-nav {
        width: 80px;
        padding: 1rem 0.5rem;
    }
    
    .nav-brand {
        padding: 0.5rem;
    }
    
    .nav-title {
        display: none;
    }
    
    .nav-menu .nav-link span:not(.nav-icon) {
        display: none;
    }
    
    .main-content {
        margin-left: 80px;
    }
    
    .nav-icon {
        margin-right: 0;
        font-size: 1.5rem;
    }
}

/* Navigation Styles */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
    background: #ffffff;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.navbar-brand i {
    font-size: 1.75rem;
}

/* Navigation Links */
.navbar-nav{
    gap: 1rem;
}
.navbar-nav .nav-link {
    position: relative;
    color: var(--secondary-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
    font-weight: 600;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color);
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover::before {
    width: calc(100% - 1.25rem);
}

@media (max-width: 991.98px) {
    .navbar-nav .nav-link::before {
        display: none;
    }

    .navbar-nav .nav-link {
        color: rgba(255, 255, 255, 0.8) !important;
    }

    .navbar-nav .nav-link:hover {
        color: #ffffff !important;
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Mega Menu Styles */
.has-megamenu {
    position: static;
}

.has-megamenu > .nav-link {
    position: relative;
    padding-right: 1.75rem !important;
    display: flex;
    align-items: center;
}

.has-megamenu > .nav-link::after {
    content: "\f107";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
    font-size: 0.9rem;
    opacity: 0.8;
}

.has-megamenu > .nav-link:hover::after {
    opacity: 1;
    transform: translateY(-50%) rotate(180deg);
}

.has-megamenu > .nav-link[aria-expanded="true"]::after {
    transform: translateY(-50%) rotate(180deg);
    opacity: 1;
}

.megamenu {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    margin-top: 1rem;
    border: none;
    border-radius: var(--radius-md);
    border-bottom: 3px solid var(--primary-color);
    background: #ffffff;
    padding: 2rem;
    padding-top: 2rem;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
}
.megamenu.small{
    left: 60%;
    width: 30%;
}

@media (min-width: 992px) {
    .has-megamenu {
        padding-bottom: 2rem;
        margin-bottom: -2rem;
    }
    .has-megamenu:hover .megamenu {
        display: block;
    }
}

.mega-menu-section {
    padding: 0.75rem 0;
}

.mega-menu-section h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.mega-menu-section h5 i {
    font-size: 1.2rem;
}

.mega-menu-section ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.mega-menu-section ul li a {
    position: relative;
    display: inline-block;
    text-decoration: none;
    padding-bottom: 2px;
    color: var(--secondary-color);
    transition: all 0.3s ease;
    width: fit-content;
    font-size: 16px;
}

.mega-menu-section ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}
.mega-menu-section ul li a:hover{
    color: var(--primary-color);
    transform: translateX(5px);
}
.mega-menu-section ul li a:hover::after {
    width: 100%;
}

.mega-menu-section ul li {
    margin-bottom: 1.5rem;
}

.mega-menu-section ul li:last-child {
    margin-bottom: 0;
}

.mega-menu-section ul li p {
    margin-top: 0.25rem;
    margin-bottom: 0;
}

.promo-card {
    background: var(--primary-color);
    padding: 2rem;
    border-radius: var(--radius-md);
    color: #ffffff;
    text-align: center;
}

.promo-card h5 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.promo-card p {
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

/* Mobile Menu Button */
.navbar-toggler {
    padding: 0;
    width: 30px;
    height: 30px;
    position: relative;
    border: none;
    background: transparent;
}

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

.navbar-toggler-icon {
    position: relative;
    display: inline-block;
    width: 24px;
    height: 2px;
    background: var(--secondary-color);
    transition: all 0.3s ease;
    margin-top: 10px;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 24px;
    height: 2px;
    background: var(--secondary-color);
    transition: all 0.3s ease;
}

.navbar-toggler-icon::before {
    top: -8px;
}

.navbar-toggler-icon::after {
    bottom: -8px;
}

/* Menu Open State */
[aria-expanded="true"] .navbar-toggler-icon {
    background: transparent !important;
}

[aria-expanded="true"] .navbar-toggler-icon::before {
    top: 0;
    transform: rotate(45deg);
}

[aria-expanded="true"] .navbar-toggler-icon::after {
    bottom: 0;
    transform: rotate(-45deg);
}

/* Navbar Overlay */
.navbar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.navbar-overlay.show {
    display: block;
    opacity: 1;
}

/* Mobile Navigation */
@media (max-width: 991.98px) {
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: -320px;
        width: 320px;
        height: 100vh;
        background: #1a1a1a;
        padding: 2rem 1rem;
        transition: all 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }

    .navbar-collapse.show {
        left: 0;
        box-shadow: var(--shadow-lg);
    }

    .navbar-nav {
        height: 100%;
        margin: 0;
        padding: 1rem 0;
    }

    .navbar-nav .nav-item {
        width: 100%;
        margin: 0;
        padding: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar-nav .nav-item:last-child {
        border-bottom: none;
    }

    .has-megamenu {
        position: relative;
    }

    .has-megamenu > .nav-link {
        padding: 1rem !important;
        padding-right: 2.5rem !important;
        color: #ffffff !important;
    }

    .has-megamenu > .nav-link::after {
        right: 1rem;
        color: rgba(255, 255, 255, 0.7);
        font-size: 1rem;
    }

    .has-megamenu > .nav-link:hover::after {
        transform: translateY(-50%);
    }

    .has-megamenu > .nav-link[aria-expanded="true"]::after {
        transform: translateY(-50%) rotate(180deg);
        color: #ffffff;
    }

    .megamenu {
        position: static;
        left: 0;
        transform: none;
        width: 100%;
        margin: 0;
        padding: 0;
        background: transparent;
        border: none;
        box-shadow: none;
        display: none;
    }
    .megamenu.small{
        left: 0;
        width: 100%;
    }
    .mega-menu-section {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .mega-menu-section:last-child {
        border-bottom: none;
    }

    .mega-menu-section h5 {
        color: #ffffff;
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
        padding-left: 1rem;
    }

    .mega-menu-section ul li a {
        position: relative;
        color: #ffffff;
        font-size: 0.9rem;
        width: fit-content;
        text-decoration: none;
    }
    .mega-menu-section ul li p {
        color: #ededed;
    }
    .megamenu .row{
        --bs-gutter-y: 0rem;
    }

    .mega-menu-section ul li a:hover {
        color: #ffffff;
        background: rgba(255, 255, 255, 0.1);
        transform: none;
    }

    .promo-card {
        background: rgba(255, 255, 255, 0.1);
        margin: 1rem;
        padding: 1.5rem;
        border-radius: var(--radius-sm);
        text-align: left;
    }

    .promo-card h5 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .promo-card p {
        color: rgba(255, 255, 255, 0.7);
        margin-bottom: 1rem;
        font-size: 0.9rem;
    }
}
