﻿/* Modern Minimalist Header Theme */
:root {
    --header-primary: #1a1a2e;
    --header-secondary: #16213e;
    --header-accent: #0f3460;
    --header-highlight: #e94560;
    --header-light: #f1f1f1;
    --header-text: #ffffff;
    --header-text-muted: rgba(255, 255, 255, 0.8);
}

/* Clean, Modern Header */
#header {
    background: linear-gradient(to right, var(--header-primary), var(--header-secondary));
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 3px solid var(--header-highlight);
    width: 100%;
}

#header.scrolled {
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.25);
    border-bottom-width: 2px;
}

#headerContent{
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 50px;
    transition: padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#header.scrolled #headerContent {
    padding: 12px 50px;
}

/* Modern Two-Row Layout */
.titleSection{
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 100%;
    margin: 0 0 20px 0;
    padding: 0;
    transition: margin 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-wrap: wrap;
    gap: 15px;
}

#header.scrolled .titleSection {
    margin-bottom: 10px;
}

/* Logo Section with Modern Touch */
.titleSection .left {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 20px;
}

.titleSection .logo{
    width: 160px;
    height: auto;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    filter: brightness(1.1) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
    max-width: 100%;
}

#header.scrolled .titleSection .logo {
    width: 110px;
}

@media (hover: hover) {
    .titleSection .logo:hover {
        transform: scale(1.05);
        filter: brightness(1.2) drop-shadow(0 4px 12px rgba(233, 69, 96, 0.4));
    }
}

/* Brand Text - Modern Typography */
.titleSection .right{
    margin: 0;
    text-align: right;
    color: var(--header-text);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-grow: 1;
}

.titleSection .title{
    font-size: 44px;
    font-weight: 800;
    color: var(--header-text);
    display: block;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    font-family: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.2;
}

/* Animated accent line under title */
.titleSection .title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 60%;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--header-highlight));
    transition: width 0.4s ease;
}

@media (hover: hover) {
    .titleSection .right:hover .title::after {
        width: 100%;
    }
}

#header.scrolled .titleSection .title {
    font-size: 30px;
    letter-spacing: 0.5px;
}

.titleSection .subTitle{
    font-size: 14px;
    display: block;
    color: var(--header-text-muted);
    font-weight: 400;
    margin-top: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 40px;
    opacity: 1;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 12px;
}

#header.scrolled .titleSection .subTitle {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
    overflow: hidden;
}

/* Modern Navigation Bar */
.linksContent{
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 12px 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

#header.scrolled .linksContent {
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.05);
}

.links{
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
}

/* Modern Navigation Links */
.links a{
    color: var(--header-text);
    padding: 10px 22px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    background: transparent;
    border: 1px solid transparent;
    display: inline-block;
    white-space: nowrap;
}

#header.scrolled .links a {
    padding: 8px 18px;
    font-size: 13px;
}

/* Hover effect with accent color */
.links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--header-highlight);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: -1;
}

@media (hover: hover) {
    .links a:hover::before {
        transform: scaleX(1);
    }

    .links a:hover{
        color: white;
        border-color: var(--header-highlight);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(233, 69, 96, 0.3);
    }
}

.links a:active {
    transform: translateY(0);
}

/* Active/Current page indicator */
.links a.active {
    background: var(--header-highlight);
    border-color: var(--header-highlight);
    box-shadow: 0 2px 8px rgba(233, 69, 96, 0.4);
}

/* Mobile Menu Button - Modern Hamburger Design */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    position: relative;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    transition: all 0.3s ease;
}

.hamburger-line {
    width: 26px;
    height: 3px;
    background-color: var(--header-text);
    border-radius: 3px;
    transition: all 0.3s ease;
    display: block;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1100;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-overlay.active {
    display: block;
    opacity: 1;
}

/* Mobile Menu Slide-out */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    max-width: 85%;
    height: 100%;
    background: linear-gradient(to bottom, var(--header-primary), var(--header-secondary));
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.3);
    z-index: 1101;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.active {
    right: 0;
}

/* Prevent body scroll when menu is open */
body.mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Mobile Menu Header */
.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.2);
}

.mobile-menu-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--header-text);
    letter-spacing: 1px;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    color: var(--header-text);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
}

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

/* Mobile Menu Content */
.mobile-menu-content {
    padding: 10px 0;
    flex: 1;
}

.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 24px;
    color: var(--header-text);
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateX(20px);
    animation: slideInFade 0.3s ease forwards;
}

.mobile-menu.active .mobile-menu-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-menu.active .mobile-menu-link:nth-child(2) { animation-delay: 0.1s; }
.mobile-menu.active .mobile-menu-link:nth-child(3) { animation-delay: 0.15s; }
.mobile-menu.active .mobile-menu-link:nth-child(4) { animation-delay: 0.2s; }
.mobile-menu.active .mobile-menu-link:nth-child(5) { animation-delay: 0.25s; }
.mobile-menu.active .mobile-menu-link:nth-child(6) { animation-delay: 0.3s; }

@keyframes slideInFade {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mobile-menu-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: rgba(233, 69, 96, 0.2);
    transition: width 0.3s ease;
    z-index: 0;
}

.mobile-menu-link:active::before,
.mobile-menu-link.active::before {
    width: 100%;
}

.mobile-menu-link:active,
.mobile-menu-link.active {
    border-left-color: var(--header-highlight);
    background: rgba(233, 69, 96, 0.15);
}

.mobile-menu-link:active {
    transform: translateX(5px);
}

.mobile-menu-icon {
    font-size: 22px;
    width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.mobile-menu-link span:last-child {
    z-index: 1;
}

/* ========================================
   RESPONSIVE DESIGN - MOBILE OPTIMIZED
   ======================================== */

/* Desktop - Hide mobile menu elements */
@media only screen and (min-width: 769px) {
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .mobile-menu,
    .mobile-menu-overlay {
        display: none !important;
    }
    
    .linksContent {
        display: block !important;
    }
}

/* Large Tablets */
@media only screen and (max-width: 1024px) {
    #headerContent {
        padding: 18px 30px;
    }

    #header.scrolled #headerContent {
        padding: 10px 30px;
    }

    .titleSection .title {
        font-size: 38px;
    }

    #header.scrolled .titleSection .title {
        font-size: 26px;
    }

    .links a {
        padding: 9px 18px;
        font-size: 13px;
    }

    #header.scrolled .links a {
        padding: 7px 15px;
        font-size: 12px;
    }
}

/* Tablets and Mobile */
@media only screen and (max-width: 768px) {
    #headerContent {
        padding: 15px 20px;
    }

    #header.scrolled #headerContent {
        padding: 10px 20px;
    }

    .titleSection{
        flex-direction: row;
        text-align: left;
        gap: 12px;
        margin-bottom: 0;
        justify-content: space-between;
        align-items: center;
    }

    #header.scrolled .titleSection {
        margin-bottom: 0;
    }

    .titleSection .left {
        justify-content: flex-start;
        width: auto;
        flex-shrink: 0;
    }

    .titleSection .logo{
        width: 100px;
    }

    #header.scrolled .titleSection .logo {
        width: 70px;
    }

    .titleSection .right {
        text-align: left;
        width: auto;
        flex-grow: 1;
        min-width: 0;
    }

    .titleSection .title{
        font-size: 24px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .titleSection .title::after {
        display: none;
    }

    #header.scrolled .titleSection .title {
        font-size: 18px;
    }

    .titleSection .subTitle {
        font-size: 10px;
        letter-spacing: 1px;
        display: none;
    }

    /* Show mobile menu button */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Hide desktop navigation on mobile */
    .linksContent {
        display: none;
    }

    /* Better spacing for mobile touch */
    .titleSection .subTitle:last-child {
        margin-bottom: 0;
    }
}

/* Small Mobile */
@media only screen and (max-width: 540px) {
    #headerContent {
        padding: 10px 15px;
    }

    #header.scrolled #headerContent {
        padding: 8px 15px;
    }

    .titleSection .logo{
        width: 80px;
    }

    #header.scrolled .titleSection .logo {
        width: 60px;
    }

    .titleSection .title{
        font-size: 20px;
    }

    #header.scrolled .titleSection .title {
        font-size: 16px;
    }

    .titleSection .subTitle {
        font-size: 9px;
    }

    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
    }

    .hamburger-line {
        width: 22px;
        height: 2px;
    }

    .mobile-menu {
        width: 260px;
    }

    .mobile-menu-link {
        padding: 14px 20px;
        font-size: 15px;
    }
}

/* Extra Small Mobile */
@media only screen and (max-width: 400px) {
    #headerContent {
        padding: 10px 12px;
    }

    #header.scrolled #headerContent {
        padding: 8px 12px;
    }

    .titleSection .logo{
        width: 70px;
    }

    #header.scrolled .titleSection .logo {
        width: 55px;
    }

    .titleSection .title{
        font-size: 18px;
    }

    #header.scrolled .titleSection .title {
        font-size: 14px;
    }

    .mobile-menu {
        width: 240px;
        max-width: 90%;
    }

    .mobile-menu-header {
        padding: 16px;
    }

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

    .mobile-menu-link {
        padding: 12px 18px;
        font-size: 14px;
    }

    .mobile-menu-icon {
        font-size: 20px;
        width: 28px;
    }
}

/* Landscape orientation on phones */
@media only screen and (max-height: 500px) and (orientation: landscape) {
    #headerContent {
        padding: 10px 20px;
    }

    #header.scrolled #headerContent {
        padding: 8px 20px;
    }

    .titleSection {
        flex-direction: row;
        margin-bottom: 10px;
    }

    #header.scrolled .titleSection {
        margin-bottom: 6px;
    }

    .titleSection .right {
        text-align: right;
    }

    .titleSection .title {
        font-size: 24px;
    }

    #header.scrolled .titleSection .title {
        font-size: 18px;
    }

    .titleSection .subTitle {
        font-size: 9px;
    }

    .linksContent {
        padding: 8px 12px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Ensure all clickable elements meet minimum touch target size (44x44px) */
    .links a {
        min-width: 44px;
        min-height: 44px;
        padding: 8px 16px;
        touch-action: manipulation;
    }

    /* Remove hover states on touch devices */
    .links a:hover {
        transform: none;
        box-shadow: none;
    }

    /* Add active state for touch feedback */
    .links a:active {
        opacity: 0.7;
        transform: scale(0.98);
    }

    /* Faster transitions on touch devices */
    #header,
    .titleSection,
    .links a {
        transition-duration: 0.2s;
    }
}

/* Accessibility - Focus States */
.links a:focus,
.titleSection .logo:focus,
.mobile-menu-toggle:focus,
.mobile-menu-close:focus,
.mobile-menu-link:focus {
    outline: 2px solid var(--header-highlight);
    outline-offset: 2px;
}

.links a:focus-visible,
.titleSection .logo:focus-visible,
.mobile-menu-toggle:focus-visible,
.mobile-menu-close:focus-visible,
.mobile-menu-link:focus-visible {
    outline: 3px solid var(--header-highlight);
    outline-offset: 3px;
}

/* Remove focus outline for mouse users */
.links a:focus:not(:focus-visible),
.mobile-menu-toggle:focus:not(:focus-visible),
.mobile-menu-close:focus:not(:focus-visible),
.mobile-menu-link:focus:not(:focus-visible) {
    outline: none;
}

/* Smooth transitions for all interactive elements */
* {
    -webkit-tap-highlight-color: rgba(233, 69, 96, 0.2);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    #header {
        border-bottom-width: 4px;
    }

    .links a {
        border-width: 2px;
    }

    .links a.active {
        border-width: 3px;
    }
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .mobile-menu-link {
        opacity: 1;
        transform: translateX(0);
        animation: none;
    }
}

/* Print styles */
@media print {
    #header {
        position: relative;
        box-shadow: none;
        border-bottom: 2px solid #000;
        background: #fff !important;
    }

    .titleSection .title,
    .titleSection .subTitle,
    .links a {
        color: #000 !important;
        text-shadow: none !important;
    }

    .linksContent {
        background: transparent !important;
        border: 1px solid #ccc !important;
    }

    .titleSection .title::after,
    .links a::before {
        display: none;
    }
}