/* Header Styles */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    background: rgba(243, 244, 246, 0.95);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 1rem 0;
    min-height: 80px;
    transition: all 0.3s ease;
    width: 100%;
    will-change: transform;
}

.dark .site-header {
    background: rgba(23, 23, 23, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
}

/* Fix for sticky header */
body {
    overflow-x: hidden;
}

/* Special class to ensure sticky header works */
.has-sticky-header {
    position: static !important; /* Override any position that might interfere */
}

/* Ensure header is always on top */
.site-header.is-sticky {
    z-index: 1001;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Header Container */
.site-header > div {
    max-width: 80rem;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

/* Logo Styles */
.brand-logo {
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-text {
    color: #1d4ed8;
    font-weight: 600;
    letter-spacing: -0.025em;
    transition: all 0.3s ease;
    margin-left: 0.75rem;
}

.dark .logo-text {
    color: #60a5fa;
}

.brand-logo:hover .logo-text {
    color: #1e40af;
}

.dark .brand-logo:hover .logo-text {
    color: #93c5fd;
}

/* Desktop Navigation */
.site-header nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.nav-link:hover {
    color: #1d4ed8;
    background-color: rgba(29, 78, 216, 0.05);
    transform: translateY(-1px);
}

.nav-link i {
    opacity: 0.7;
    transition: all 0.3s ease;
    margin-right: 0.5rem;
}

.nav-link:hover i {
    opacity: 1;
    color: #1d4ed8;
}

.dark .nav-link {
    color: #d1d5db;
}

.dark .nav-link:hover {
    color: #60a5fa;
    background-color: rgba(96, 165, 250, 0.1);
}

.dark .nav-link:hover i {
    color: #60a5fa;
}

/* Active Link Styles */
.nav-link.active {
    color: #1d4ed8;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background-color: #f97316; /* Orange color */
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-link.active:hover::after {
    width: 70%;
}

.dark .nav-link.active {
    color: #60a5fa;
}

.dark .nav-link.active::after {
    background-color: #f97316; /* Keep orange in dark mode too */
}

/* Mobile Menu Button */
.mobile-menu-button {
    background: transparent;
    border: 2px solid #e5e7eb;
    color: #374151;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border-radius: 8px;
    padding: 0;
}

.mobile-menu-button:hover {
    border-color: #1d4ed8;
    background-color: rgba(29, 78, 216, 0.05);
}

.dark .mobile-menu-button {
    border-color: #374151;
    color: #d1d5db;
}

.dark .mobile-menu-button:hover {
    border-color: #60a5fa;
    background-color: rgba(96, 165, 250, 0.1);
}

/* Hamburger Animation */
.hamburger {
    width: 20px;
    height: 15px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger span {
    width: 100%;
    height: 2px;
    background-color: currentColor;
    transition: all 0.3s ease;
    border-radius: 1px;
    transform-origin: center;
}

.mobile-menu-button:hover .hamburger span:nth-child(2) {
    width: 80%;
}

/* Hamburger to X animation */
.mobile-menu-button.active .hamburger span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
}

.mobile-menu-button.active .hamburger span:nth-child(2) {
    opacity: 0;
    width: 100%;
}

.mobile-menu-button.active .hamburger span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
}

.mobile-menu-button.active {
    border-color: #1d4ed8;
    background-color: rgba(29, 78, 216, 0.1);
}

.dark .mobile-menu-button.active {
    border-color: #60a5fa;
    background-color: rgba(96, 165, 250, 0.15);
}

/* Hide mobile menu button on desktop */
@media (min-width: 1024px) {
    .mobile-menu-button {
        display: none;
    }
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 400px;
    height: 100%;
    background: white;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
}

.dark .mobile-menu-content {
    background: #1f2937;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.3);
}

.mobile-menu.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dark .mobile-menu-header {
    border-bottom-color: #374151;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    color: #6b7280;
    font-size: 1.25rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-menu-close:hover {
    color: #1d4ed8;
    background-color: rgba(29, 78, 216, 0.1);
}

.dark .mobile-menu-close {
    color: #9ca3af;
}

.dark .mobile-menu-close:hover {
    color: #60a5fa;
    background-color: rgba(96, 165, 250, 0.1);
}

.mobile-nav {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    padding: 1rem;
    color: #374151;
    text-decoration: none;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.mobile-nav-link:hover {
    background-color: rgba(29, 78, 216, 0.05);
    color: #1d4ed8;
    transform: translateX(4px);
}

.mobile-nav-link i {
    width: 20px;
    margin-right: 0.75rem;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover i {
    opacity: 1;
    color: #1d4ed8;
}

.dark .mobile-nav-link {
    color: #d1d5db;
}

.dark .mobile-nav-link:hover {
    background-color: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
}

.dark .mobile-nav-link:hover i {
    color: #60a5fa;
}

/* Mobile Active Link Styles */
.mobile-nav-link.active {
    color: #1d4ed8;
    background-color: rgba(29, 78, 216, 0.05);
    position: relative;
}

.mobile-nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background-color: #f97316; /* Orange color */
    border-radius: 0 2px 2px 0;
}

.mobile-nav-link.active i {
    color: #1d4ed8;
    opacity: 1;
}

.dark .mobile-nav-link.active {
    color: #60a5fa;
    background-color: rgba(96, 165, 250, 0.1);
}

.dark .mobile-nav-link.active i {
    color: #60a5fa;
}

.dark .mobile-nav-link.active::before {
    background-color: #f97316; /* Keep orange in dark mode too */
}

/* Social Icons Styles */
.social-icons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.social-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.04);
    color: #4b5563;
    transition: all 0.3s ease;
}

.social-icon-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.dark .social-icon-link {
    background-color: rgba(255, 255, 255, 0.1);
    color: #d1d5db;
}

.dark .social-icon-link:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.12);
}

/* Mobile Social Icons */
.mobile-social-icons {
    padding: 1rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 1rem;
}

.mobile-social-icons .social-icon-link {
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.04);
}

.dark .mobile-social-icons {
    border-top-color: rgba(255, 255, 255, 0.05);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.dark .mobile-social-icons .social-icon-link {
    background-color: rgba(255, 255, 255, 0.08);
}

/* WhatsApp Icon Specific Styles */
.social-icon-link .fa-whatsapp {
    color: #25D366;
}

.social-icon-link:hover .fa-whatsapp {
    color: #128C7E;
}

.dark .social-icon-link .fa-whatsapp {
    color: #25D366;
}

.dark .social-icon-link:hover .fa-whatsapp {
    color: #34eb7a;
}

/* Desktop Dropdown Menu Styles */
.nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    min-width: 240px;
    width: auto;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-radius: 0.75rem;
    z-index: 999;
    margin-top: 0.75rem;
    padding: 0.75rem 0;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background-color: #ffffff;
}

.dark .dropdown-menu {
    background-color: #1f2937 !important;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    display: block;
    transition-delay: 0.1s;
}

.dropdown-menu a {
    font-size: 0.95rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    border-radius: 0.5rem;
    margin: 0.25rem 0.5rem;
    padding: 0.75rem 1rem !important;
    transition: all 0.2s ease;
    color: #374151;
}

.dark .dropdown-menu a,
.dark .nav-dropdown .dropdown-menu a,
html.dark .dropdown-menu a,
html.dark .nav-dropdown .dropdown-menu a {
    color: #ffffff !important;
}

.dropdown-menu a:hover {
    transform: translateX(2px);
    background-color: rgba(0, 0, 0, 0.05);
}

.dark .dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.dropdown-menu a.active {
    background-color: rgba(29, 78, 216, 0.1);
    color: #1d4ed8;
}

.dark .dropdown-menu a.active {
    background-color: rgba(96, 165, 250, 0.2) !important;
    color: #60a5fa !important;
}

.dropdown-menu a i {
    width: 16px;
    text-align: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.dropdown-menu a:hover i {
    opacity: 1;
}

/* Mobile Dropdown Menu Styles */
.mobile-nav-dropdown {
    width: 100%;
}

.mobile-dropdown-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.mobile-dropdown-toggle .fa-chevron-down {
    transition: transform 0.2s ease;
}

.mobile-dropdown-toggle .fa-chevron-down.rotate-180 {
    transform: rotate(180deg);
}

.mobile-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: rgba(0, 0, 0, 0.03);
    margin-left: 1rem;
    border-left: 2px solid rgba(0, 0, 0, 0.05);
    border-radius: 0 0 0.75rem 0.75rem;
}

.dark .mobile-dropdown-menu {
    background-color: rgba(255, 255, 255, 0.05);
    border-left-color: rgba(255, 255, 255, 0.1);
}

.mobile-dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem 0.75rem 2rem;
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 1rem;
    margin: 0.25rem 0;
}

.mobile-dropdown-item:hover,
.mobile-dropdown-item.active {
    background-color: rgba(0, 0, 0, 0.05);
    transform: translateX(4px);
}

.dark .mobile-dropdown-item:hover,
.dark .mobile-dropdown-item.active {
    background-color: rgba(255, 255, 255, 0.05);
}

.mobile-dropdown-item i {
    opacity: 0.7;
    transition: opacity 0.2s ease;
    margin-right: 0.75rem;
    width: 1.25rem;
    text-align: center;
}

.mobile-dropdown-item:hover i,
.mobile-dropdown-item.active i {
    opacity: 1;
}

/* Force dark mode text color for dropdown - highest priority */
html.dark .site-header .nav-dropdown .dropdown-menu a,
html.dark .dropdown-menu a,
.dark .dropdown-menu a,
.dark .nav-dropdown .dropdown-menu a,
[data-theme="dark"] .dropdown-menu a,
body.dark .dropdown-menu a {
    color: #ffffff !important;
    text-decoration: none !important;
}

html.dark .site-header .nav-dropdown .dropdown-menu a:hover,
html.dark .dropdown-menu a:hover,
.dark .dropdown-menu a:hover,
.dark .nav-dropdown .dropdown-menu a:hover,
[data-theme="dark"] .dropdown-menu a:hover,
body.dark .dropdown-menu a:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Debug rule - this should make text red in dark mode to test if CSS is working */
html.dark .dropdown-menu a {
    color: #ff0000 !important;
}
