/* Header Styles for Dynamic Loading */

/* Header Menu Effects */
.nav-link {
    position: relative;
    padding: 8px 16px;
    border-radius: 8px;
    /* Limit transitions to avoid font-size swap looking animated */
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    font-weight: 500;
    color: #374151;
    font-size: 18px !important;
}

.nav-link:hover {
    color: #205781;
    transform: translateY(-1px);
}

/* Underline animation effect */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #205781, #c41a1b);
    transition: width 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

/* Logo: no hover animation/effects */
.logo-container img {
    transition: none !important;
    transform: none !important;
    filter: none !important;
}

.logo-container:hover img {
    transform: none !important;
    filter: none !important;
}

/* Reduce perceived font jump during webfont swap */
header .nav-link { font-size-adjust: 0.5; }

/* CTA Button Effects */
.cta-button {
    background: linear-gradient(135deg, #205781, #c41a1b);
    color: white;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: linear-gradient(135deg, #c41a1b, #205781);
    color: white;
}

/* Mobile menu button effect */
#mobile-menu-button {
    transition: all 0.3s ease;
}

#mobile-menu-button:hover {
    background-color: #f3f4f6;
    transform: scale(1.05);
}

/* Products dropdown animations */
#products-overlay {
    backdrop-filter: blur(4px);
}

.category-tab {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Category Tab Color States */
.category-tab.active,
.category-tab:focus {
    background-color: rgba(196, 26, 27, 0.1) !important;
    color: #c41a1b !important;
    border-color: rgba(196, 26, 27, 0.3) !important;
    box-shadow: 0 2px 4px rgba(196, 26, 27, 0.2);
}

.category-tab:not(.active) {
    background-color: rgba(32, 87, 129, 0.1) !important;
    color: #205781 !important;
    border-color: rgba(32, 87, 129, 0.3) !important;
}

.category-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.category-tab:hover::before {
    left: 100%;
}

.category-tab:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Product links hover effects */
.product-link {
    transition: all 0.2s ease;
}

/* Product links simple hover - matching original CSS */
.product-link:hover {
    color: #c41a1b !important;
    background-color: #fef2f2 !important;
}

/* Header shadow on scroll */
.header-scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    background-color: rgba(255,255,255,0.95);
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Mobile menu slide animation */
#mobile-menu {
    transition: all 0.3s ease;
    transform: translateY(-10px);
    opacity: 0;
}

#mobile-menu:not(.hidden) {
    transform: translateY(0);
    opacity: 1;
}

/* Products submenu animation and display */
#products-submenu {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

#products-submenu:not(.hidden) {
    max-height: 1000px;
    overflow: visible;
}

/* Ensure products toggle button is clickable */
#products-toggle {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

/* Improve touch targets for mobile */
@media (max-width: 768px) {
    #products-toggle {
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    #products-submenu a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Quick links animation */
.quick-link {
    transition: all 0.3s ease;
}

.quick-link:hover {
    color: #c41a1b !important;
    background-color: #fef2f2 !important;
}

/* Force hide desktop menu on tablets and below (iPad Pro + large tablets) */
/* Treat up to 1365px as mobile/tablet: hide desktop nav */
@media (max-width: 1365px) {
    .nav-center.nav-links {
        display: none !important;
    }
}

/* Between 1280px and 1365px Tailwind would show xl: elements; override to keep mobile */
@media (min-width: 1280px) and (max-width: 1365px) {
    /* Show hamburger button wrapper even though it has xl:hidden */
    .nav-right .xl\:hidden {
        display: block !important;
    }
    /* Ensure the button itself is visible as inline-flex */
    #mobile-menu-button {
        display: inline-flex !important;
    }
    /* Hide the desktop CTA which has xl:inline-flex */
    .nav-right .xl\:inline-flex {
        display: none !important;
    }
    /* Allow the slide-down mobile menu panel to open in this range */
    #mobile-menu.hidden { display: none !important; }
    #mobile-menu:not(.hidden) { display: block !important; }
}

@media (min-width: 1280px) {
    .container.mx-auto.px-6.py-8 {
    max-width: 1800px;
}
}
