/* 
   Navigation Styles - Desktop & Mobile
   Danborough Group of Colleges
   Author: GitHub Copilot
   Date: July 24, 2025
*/

/* ====================================
   DESKTOP NAVIGATION STYLES
   ==================================== */

/* Hero Navigation */
.hero-nav {
    position: relative;
    z-index: 1000;
    padding: 20px 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 20px;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-nav:hover .nav-container {
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

/* Navigation Lists */
.hero-nav-left,
.hero-nav-right {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
}

.hero-nav-left {
    flex: 1;
    justify-content: flex-end;
    margin-right: 40px;
}

.hero-nav-right {
    flex: 1;
    justify-content: flex-start;
    margin-left: 40px;
}

.hero-nav-left li,
.hero-nav-right li {
    margin: 0 20px;
    position: relative;
}

/* Navigation Links */
.hero-nav-link {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    padding: 8px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hero-nav-link:hover,
.hero-nav-link.active {
    color: var(--secondary-color);
    transform: translateY(-2px);
}

.hero-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--secondary-color);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.hero-nav-link:hover::after,
.hero-nav-link.active::after {
    width: 100%;
}

/* Logo in Center */
.hero-logo {
    flex-shrink: 0;
    position: relative;
}

.hero-logo::before,
.hero-logo::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.2);
    width: 1px;
    height: 50px;
    top: 50%;
    transform: translateY(-50%);
}

.hero-logo::before {
    left: -40px;
}

.hero-logo::after {
    right: -40px;
}

.hero-logo img {
    height: 180px;
    width: auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
}

.hero-logo img:hover {
    transform: scale(1.05) translateY(-5px);
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.3));
}

/* Dropdown Styles */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute !important; /* Force override */
    display: block !important; /* Force override */
    top: calc(100% + 10px); /* Reduced distance from nav item */
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    min-width: 260px;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease; /* Simpler, faster transition */
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(0, 0, 0, 0.08);
    z-index: 1050 !important; /* Higher z-index to ensure visibility */
    overflow: hidden;
    font-family: 'Poppins', sans-serif;
}

.dropdown-menu::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-color); /* Simplified to a solid color */
}

.dropdown-menu-header {
    padding: 12px 15px 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 3px;
    position: relative;
    background: #f8f9fa;
}

.dropdown-menu-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0;
    padding: 0;
}

.dropdown-menu-content {
    padding: 8px 6px;
}

.dropdown-menu-footer {
    padding: 8px 15px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-menu-footer a {
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 500;
    display: block;
    padding: 8px;
    transition: all 0.2s ease;
    border-radius: 4px;
}

.dropdown-menu-footer a:hover {
    color: var(--accent-color);
    background-color: #f0f5f1;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateX(-50%);
    display: block !important;
    z-index: 2000 !important;
}

.dropdown-menu li {
    margin: 4px 8px;
    padding: 0;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    color: var(--text-color);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease; /* Simplified transition */
    position: relative;
    letter-spacing: 0.3px;
    border-radius: 4px;
    overflow: hidden;
}

.dropdown-menu a:hover {
    background-color: #f5f9f6; /* Lighter, more subtle background */
    color: var(--primary-color);
}

.dropdown-menu a i {
    margin-right: 8px;
    color: var(--primary-color);
    opacity: 0.9; /* Always visible but slightly subdued */
    transition: transform 0.2s ease;
}

.dropdown-menu a:hover i {
    transform: scale(1.1);
}

.dropdown-menu-footer a i {
    margin-left: 5px;
    font-size: 10px;
    transition: transform 0.2s ease; /* Simplified transition */
}

.dropdown-menu-footer a:hover i {
    transform: translateX(3px);
}

/* Chevron Animation */
.nav-dropdown .fa-chevron-down {
    transition: transform 0.2s ease; /* Simplified transition */
    font-size: 10px;
    margin-left: 2px;
    color: var(--secondary-color);
    opacity: 0.85;
}

.nav-dropdown:hover .fa-chevron-down {
    transform: rotate(180deg);
    opacity: 1;
}

/* ====================================
   MOBILE NAVIGATION STYLES
   ==================================== */

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1002;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    padding: 0;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-menu-toggle:hover {
    background: var(--primary-color);
    transform: scale(1.05) rotate(90deg);
    box-shadow: 0 8px 25px rgba(30, 136, 41, 0.3);
}

.mobile-menu-toggle i {
    font-size: 18px;
}

/* Mobile Navigation Menu */
.mobile-nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 320px;
    height: 100vh;
    background: white;
    z-index: 1001;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    opacity: 0;
    transform: translateX(30px);
    border-radius: 20px 0 0 20px;
}

.mobile-nav-menu.active {
    right: 0;
    opacity: 1;
    transform: translateX(0);
}

/* Mobile Navigation Header */
.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 25px 20px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    border-radius: 0 0 20px 0;
    position: relative;
    overflow: hidden;
}

.mobile-nav-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/p.png') no-repeat center right;
    background-size: contain;
    opacity: 0.07;
    filter: brightness(2);
}

.mobile-logo {
    height: 50px;
    width: auto;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.mobile-close-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(90deg);
}

/* Mobile Navigation List */
.mobile-nav-list {
    list-style: none;
    margin: 0;
    padding: 15px 0;
}

.mobile-nav-list li {
    margin: 8px 15px;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.02);
}

.mobile-nav-list li:hover {
    transform: translateX(5px);
    background: rgba(0, 0, 0, 0.03);
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.mobile-nav-link:hover {
    color: var(--primary-color);
    padding-left: 25px;
}

.mobile-nav-link.active {
    background: linear-gradient(90deg, rgba(30, 136, 41, 0.1) 0%, rgba(0, 153, 0, 0) 100%);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

/* Mobile Dropdown */
.mobile-dropdown {
    position: relative;
}

.mobile-dropdown-menu {
    list-style: none;
    margin: 5px 15px 5px 30px;
    padding: 0;
    background: white;
    max-height: 0;
    overflow: hidden;
    transition: all 0.25s ease; /* Simplified transition */
    border-radius: 8px;
    border-top: 2px solid var(--primary-color);
    opacity: 0;
}

.mobile-dropdown.active .mobile-dropdown-menu {
    display: block !important;
    max-height: 500px !important;
    opacity: 1;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-top: 8px;
    margin-bottom: 8px;
}

.mobile-dropdown-header {
    padding: 15px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.mobile-dropdown-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mobile-dropdown-content {
    padding: 10px 0;
}

.mobile-dropdown-menu a {
    display: block;
    padding: 12px 20px;
    color: rgba(51, 51, 51, 0.8);
    text-decoration: none;
    font-size: 13px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 2px solid transparent;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    margin: 2px 5px;
    border-radius: 6px;
}

.mobile-dropdown-menu a:hover {
    background: rgba(30, 136, 41, 0.05);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    padding-left: 25px;
    transform: translateX(2px);
}

.mobile-dropdown-menu i {
    margin-right: 8px;
    width: 16px;
    color: var(--primary-color);
}

/* Mobile Dropdown Toggle */
.mobile-dropdown .fa-chevron-down {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 10px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(30, 136, 41, 0.08);
    color: var(--primary-color);
}

.mobile-dropdown.active .fa-chevron-down {
    transform: rotate(180deg);
    background: var(--primary-color);
    color: white;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ====================================
   RESPONSIVE STYLES
   ==================================== */

/* Note: Mobile responsive styles moved to mobile-responsive.css and mobile-nav.css */

/* ====================================
   ANIMATION ENHANCEMENTS
   ==================================== */

/* Smooth transitions for all interactive elements */
.hero-nav-link,
.dropdown-menu a,
.mobile-nav-link,
.mobile-dropdown-menu a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover effects with subtle animations */
.hero-nav-link:hover {
    text-shadow: 0 0 10px rgba(255, 204, 0, 0.3);
}

/* Focus states for accessibility */
.hero-nav-link:focus,
.mobile-nav-link:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Loading animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-container {
    animation: fadeInUp 0.6s ease-out;
}

.mobile-nav-menu.active {
    animation: slideInRight 0.4s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Add subtle pattern to dropdown headers */
.dropdown-menu-header, .mobile-dropdown-header {
    background-image: linear-gradient(45deg, rgba(30, 136, 41, 0.05) 25%, transparent 25%), 
                     linear-gradient(-45deg, rgba(30, 136, 41, 0.05) 25%, transparent 25%), 
                     linear-gradient(45deg, transparent 75%, rgba(30, 136, 41, 0.05) 75%), 
                     linear-gradient(-45deg, transparent 75%, rgba(30, 136, 41, 0.05) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* ====================================
   DROPDOWN VISIBILITY FIXES 
   ==================================== */

/* Fix for dropdown menus not appearing */
.nav-dropdown:hover .dropdown-menu {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 2000 !important;
}

/* Custom animation for dropdown appearance */
@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(10px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

/* Apply animation to dropdown when shown */
.nav-dropdown:hover .dropdown-menu {
    animation: fadeInDropdown 0.3s forwards cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Ensure mobile dropdowns appear */
.mobile-dropdown.active .mobile-dropdown-menu {
    display: block !important;
    max-height: 500px !important;
}
