/* ========================================
   Header & Navigation Effects - JASO Style
   ======================================== */

/* 
   ========================================
   HEADER BASE STYLES
   ========================================
*/

/* Main Header Container */
.jaso-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    animation: headerSlideDown 0.6s ease-out;
}

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

/* Scrolled State */
.jaso-header.scrolled {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.95) 100%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1),
                0 1px 8px rgba(0, 0, 0, 0.05);
    border-bottom-color: rgba(0, 0, 0, 0.12);
}

/* Dark Mode Header */
.dark .jaso-header {
    background: linear-gradient(180deg, rgba(11, 14, 20, 0.95) 0%, rgba(11, 14, 20, 0.85) 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.dark .jaso-header.scrolled {
    background: linear-gradient(180deg, rgba(11, 14, 20, 0.98) 0%, rgba(11, 14, 20, 0.95) 100%);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4),
                0 1px 8px rgba(0, 0, 0, 0.3);
    border-bottom-color: rgba(255, 255, 255, 0.12);
}

/* 
   ========================================
   HEADER CONTAINER LAYOUT
   ========================================
*/

.jaso-header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    height: 80px;
    transition: height 0.3s ease;
}

.jaso-header.scrolled .jaso-header-container {
    height: 70px;
}

/* 
   ========================================
   LOGO STYLES & ANIMATIONS
   ========================================
*/

.jaso-logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.jaso-logo-wrapper:hover {
    transform: scale(1.02);
}

.jaso-logo-icon {
    width: 48px;
    height: 48px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.jaso-logo-wrapper:hover .jaso-logo-icon {
    transform: rotate(5deg) scale(1.1);
}

.jaso-logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #1A469D 0%, #0f2a5e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    transition: all 0.3s ease;
}

.dark .jaso-logo-text {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.jaso-logo-tagline {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #64748b;
    margin-top: 2px;
    transition: color 0.3s ease;
}

.jaso-logo-wrapper:hover .jaso-logo-tagline {
    color: #98ca3f;
}

.dark .jaso-logo-tagline {
    color: #94a3b8;
}

/* 
   ========================================
   NAVIGATION MENU
   ========================================
*/

.jaso-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    justify-content: center;
}

.jaso-nav-item {
    position: relative;
}

.jaso-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    letter-spacing: -0.025em;
}

.dark .jaso-nav-link {
    color: #cbd5e1;
}

/* Hover Effect with Underline Animation */
.jaso-nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #98ca3f 0%, #7ab32e 100%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

.jaso-nav-link:hover::after {
    width: 80%;
}

.jaso-nav-link:hover {
    color: #98ca3f;
}

/* Active State */
.jaso-nav-link.active {
    color: #98ca3f;
}

.jaso-nav-link.active::after {
    width: 80%;
}

/* Dropdown Arrow */
.jaso-nav-arrow {
    font-size: 1rem;
    transition: transform 0.3s ease;
    color: inherit;
}

.jaso-nav-item:hover .jaso-nav-arrow {
    transform: rotate(180deg);
}

/* 
   ========================================
   DROPDOWN MENU
   ========================================
*/

.jaso-dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 240px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 0.75rem;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1),
                0 2px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1001;
}

.dark .jaso-dropdown {
    background: rgba(30, 41, 59, 0.98);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4),
                0 2px 12px rgba(0, 0, 0, 0.3);
}

.jaso-nav-item:hover .jaso-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(4px);
}

.jaso-dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #334155;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.dark .jaso-dropdown-item {
    color: #e2e8f0;
}

/* Dropdown Item Hover with Slide Effect */
.jaso-dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(180deg, #98ca3f 0%, #7ab32e 100%);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 4px 4px 0;
}

.jaso-dropdown-item:hover::before {
    transform: scaleY(1);
}

.jaso-dropdown-item:hover {
    background: rgba(152, 202, 63, 0.08);
    color: #98ca3f;
    padding-left: 1.25rem;
}

/* Dropdown Divider */
.jaso-dropdown-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 0, 0, 0.08) 50%, transparent 100%);
    margin: 0.5rem 0;
}

.dark .jaso-dropdown-divider {
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.08) 50%, transparent 100%);
}

/* 
   ========================================
   HEADER ACTIONS (RIGHT SIDE)
   ========================================
*/

.jaso-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* Search Button */
.jaso-search-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(152, 202, 63, 0.1);
    border: 2px solid rgba(152, 202, 63, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #98ca3f;
}

.jaso-search-btn:hover {
    background: rgba(152, 202, 63, 0.2);
    border-color: #98ca3f;
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 20px rgba(152, 202, 63, 0.3);
}

.jaso-search-btn span {
    font-size: 22px;
}

/* Theme Toggle */
.jaso-theme-toggle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(26, 70, 157, 0.1);
    border: 2px solid rgba(26, 70, 157, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #1A469D;
}

.dark .jaso-theme-toggle {
    background: rgba(255, 215, 0, 0.1);
    border-color: rgba(255, 215, 0, 0.3);
    color: #FFD700;
}

.jaso-theme-toggle:hover {
    background: rgba(26, 70, 157, 0.2);
    border-color: #1A469D;
    transform: scale(1.1) rotate(-15deg);
    box-shadow: 0 8px 20px rgba(26, 70, 157, 0.3);
}

.dark .jaso-theme-toggle:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: #FFD700;
    box-shadow: 0 8px 20px rgba(255, 215, 0, 0.3);
}

/* CTA Button */
.jaso-cta-btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: white;
    background: linear-gradient(135deg, #98ca3f 0%, #7ab32e 100%);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(152, 202, 63, 0.3);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.jaso-cta-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(152, 202, 63, 0.4);
    background: linear-gradient(135deg, #7ab32e 0%, #98ca3f 100%);
}

.jaso-cta-btn:active {
    transform: translateY(0) scale(0.98);
}

/* 
   ========================================
   SEARCH OVERLAY
   ========================================
*/

.jaso-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.jaso-search-overlay.active {
    opacity: 1;
    visibility: visible;
}

.jaso-search-container {
    width: 90%;
    max-width: 800px;
    transform: scale(0.9) translateY(-20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.jaso-search-overlay.active .jaso-search-container {
    transform: scale(1) translateY(0);
}

.jaso-search-input-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    padding: 0.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.dark .jaso-search-input-wrapper {
    background: rgba(30, 41, 59, 0.98);
}

.jaso-search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    padding-right: 4rem;
    font-size: 1.125rem;
    border: 2px solid transparent;
    border-radius: 16px;
    background: rgba(241, 245, 249, 0.5);
    transition: all 0.3s ease;
    outline: none;
}

.dark .jaso-search-input {
    background: rgba(51, 65, 85, 0.5);
}

.jaso-search-input:focus {
    border-color: #98ca3f;
    background: white;
    box-shadow: 0 0 0 4px rgba(152, 202, 63, 0.1);
}

.dark .jaso-search-input:focus {
    background: #1e293b;
}

.jaso-search-close {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(152, 202, 63, 0.1);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #98ca3f;
}

.jaso-search-close:hover {
    background: rgba(152, 202, 63, 0.2);
    transform: translateY(-50%) rotate(90deg);
}

/* 
   ========================================
   TEXT ANIMATIONS & EFFECTS
   ========================================
*/

/* Gradient Text Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.jaso-animated-gradient-text {
    background: linear-gradient(270deg, #98ca3f, #7ab32e, #5a8f1e, #98ca3f);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 8s ease infinite;
}

/* Typewriter Effect */
@keyframes typing {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

@keyframes blink {
    50% {
        border-color: transparent;
    }
}

.jaso-typewriter-text {
    overflow: hidden;
    border-right: 2px solid #98ca3f;
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink 0.75s step-end infinite;
}

/* Fade In Up Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.jaso-fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Stagger Animation Delays */
.jaso-stagger-1 { animation-delay: 0.1s; }
.jaso-stagger-2 { animation-delay: 0.2s; }
.jaso-stagger-3 { animation-delay: 0.3s; }
.jaso-stagger-4 { animation-delay: 0.4s; }
.jaso-stagger-5 { animation-delay: 0.5s; }

/* 
   ========================================
   HERO SECTION TEXT EFFECTS
   ========================================
*/

.jaso-hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -2px;
    background: linear-gradient(135deg, #1A469D 0%, #98ca3f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1.5rem;
}

.dark .jaso-hero-title {
    background: linear-gradient(135deg, #60a5fa 0%, #98ca3f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.jaso-hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    font-weight: 500;
    color: #64748b;
    line-height: 1.6;
    max-width: 600px;
}

.dark .jaso-hero-subtitle {
    color: #94a3b8;
}

/* 
   ========================================
   RESPONSIVE DESIGN
   ========================================
*/

@media (max-width: 1024px) {
    .jaso-nav {
        display: none;
    }
    
    .jaso-header-container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    .jaso-header-container {
        height: 70px;
        padding: 0 1rem;
    }
    
    .jaso-logo-text {
        font-size: 1.25rem;
    }
    
    .jaso-logo-tagline {
        display: none;
    }
    
    .jaso-header-actions {
        gap: 0.5rem;
    }
    
    .jaso-cta-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
}

/* Mobile Menu Toggle */
.jaso-mobile-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(152, 202, 63, 0.1);
    border: 2px solid rgba(152, 202, 63, 0.2);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #98ca3f;
}

.jaso-mobile-toggle:hover {
    background: rgba(152, 202, 63, 0.2);
    transform: scale(1.1);
}

@media (max-width: 1024px) {
    .jaso-mobile-toggle {
        display: flex;
    }
}

/* 
   ========================================
   MOBILE MENU
   ========================================
*/

.jaso-mobile-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    z-index: 999;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    padding: 2rem;
}

.dark .jaso-mobile-menu {
    background: rgba(11, 14, 20, 0.98);
}

.jaso-mobile-menu.active {
    transform: translateX(0);
}

.jaso-mobile-nav-item {
    display: block;
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
}

.dark .jaso-mobile-nav-item {
    color: #e2e8f0;
}

.jaso-mobile-nav-item:hover {
    background: rgba(152, 202, 63, 0.1);
    color: #98ca3f;
    padding-left: 2rem;
}

/* 
   ========================================
   SCROLL PROGRESS INDICATOR
   ========================================
*/

.jaso-scroll-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #98ca3f 0%, #7ab32e 100%);
    width: 0%;
    transition: width 0.1s ease-out;
    border-radius: 0 4px 4px 0;
}

/* 
   ========================================
   NOTIFICATION BADGE
   ========================================
*/

.jaso-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
    font-weight: 700;
    color: white;
    padding: 0 6px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}
