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

/* ================= TABLET RESPONSIVE STYLES (768px - 1199px) ================= */

/* Small to Medium Tablets (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .header {
    width: 96%;
    height: clamp(60px, 8vw, 70px);
    margin: 10px auto;
    background: #1E1E1E;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    position: sticky;
    top: 10px;
  }
  
  .header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(16px, 3vw, 24px);
    height: 100%;
    position: relative;
  }
  
  .header__logo-link {
    display: flex;
    align-items: center;
    position: relative;
    z-index: 2;
  }
  
  .header__logo {
    height: clamp(32px, 6vw, 40px);
    width: auto;
    object-fit: contain;
  }
  
  /* Hide desktop navigation on smaller tablets */
  .header__nav {
    display: none !important;
  }
  
  /* Show hamburger menu toggle */
  .header__menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    width: clamp(28px, 6vw, 32px);
    height: clamp(28px, 6vw, 32px);
    padding: 0;
    position: relative;
    z-index: 3;
    margin-left: auto;
  }
  
  .header__menu-icon {
    position: relative;
    width: clamp(16px, 4vw, 20px);
    height: 2px;
    background-color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
  }
  
  .header__menu-icon::before,
  .header__menu-icon::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: clamp(20px, 5vw, 24px);
    height: 2px;
    background-color: #fff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
  }
  
  .header__menu-icon::before {
    top: -6px;
  }
  
  .header__menu-icon::after {
    top: 6px;
  }
  
  .header__menu-toggle[aria-expanded="true"] .header__menu-icon {
    background-color: transparent;
  }
  
  .header__menu-toggle[aria-expanded="true"] .header__menu-icon::before {
    transform: translateX(-50%) rotate(45deg);
    top: 0;
  }
  
  .header__menu-toggle[aria-expanded="true"] .header__menu-icon::after {
    transform: translateX(-50%) rotate(-45deg);
    top: 0;
  }
  
  /* Tablet Mobile Menu */
  .header__mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #1E1E1E;
    padding: clamp(80px, 15vw, 100px) clamp(24px, 5vw, 32px) clamp(60px, 12vw, 80px);
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
    overflow-y: auto;
    box-shadow: none !important;
    filter: none !important;
  }
  
  .header__mobile-menu-close {
    position: absolute;
    top: clamp(24px, 5vw, 32px);
    right: clamp(24px, 5vw, 32px);
    width: clamp(36px, 8vw, 44px);
    height: clamp(36px, 8vw, 44px);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, 2vw, 10px);
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 101;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  .header__mobile-menu-close-icon {
    width: clamp(24px, 6vw, 28px);
    height: clamp(24px, 6vw, 28px);
    filter: brightness(0) invert(1) !important;
    transition: all 0.3s ease;
  }
  
  .header__mobile-menu[aria-hidden="false"] {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
  }

  /* Tablet Mobile Header Logo */
  .mobile_header__logo {
    position: absolute !important;
    top: clamp(24px, 5vw, 32px) !important;
    left: clamp(24px, 5vw, 32px) !important;
    height: clamp(36px, 8vw, 44px) !important;
    width: auto !important;
    z-index: 101 !important;
  }
  
  .header__mobile-nav {
    list-style: none;
    padding: 0;
    margin: clamp(50px, 12vw, 70px) 0 0 0 !important;
    display: flex;
    flex-direction: column;
    gap: clamp(24px, 5vw, 32px);
  }
  
  .header__mobile-item {
    margin: 0;
  }
  
  .header__mobile-link {
    font-size: clamp(1.3rem, 4vw, 1.7rem);
    font-weight: 500;
    line-height: 1.2;
    display: block;
    padding: clamp(10px, 2.5vw, 14px) 0;
    transition: color 0.3s ease;
    border: none;
    background: none;
    text-shadow: none !important;
    box-shadow: none !important;
  }
  
  .header__mobile-item--has-dropdown .header__mobile-dropdown-toggle {
    font-size: clamp(1.3rem, 4vw, 1.7rem);
    font-weight: 500;
    background: none;
    border: none;
    padding: clamp(10px, 2.5vw, 14px) 0;
    text-align: left;
    width: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-shadow: none !important;
    box-shadow: none !important;
  }
  
  .header__mobile-dropdown-icon::after {
    display: none !important;
  }
  
  .header__mobile-dropdown-toggle[aria-expanded="true"] .header__mobile-dropdown-icon::after {
    display: none !important;
  }
  
  .header__mobile-dropdown {
    list-style: none;
    padding: clamp(16px, 3.5vw, 20px) 0 0 clamp(20px, 4.5vw, 28px);
    margin: 0;
    display: none;
    flex-direction: column;
    gap: clamp(16px, 3.5vw, 20px);
    box-shadow: none !important;
    background: transparent !important;
  }
  
  .header__mobile-dropdown-toggle[aria-expanded="true"] + .header__mobile-dropdown {
    display: flex;
  }
  
  .header__mobile-dropdown-link {
    color: #e0e0e0;
    text-decoration: none;
    font-size: clamp(1.1rem, 3.5vw, 1.4rem);
    font-weight: 400;
    line-height: 1.3;
    display: block;
    padding: clamp(8px, 2vw, 10px) 0;
    transition: color 0.3s ease;
    text-shadow: none !important;
    box-shadow: none !important;
  }
  
  /* Tablet Mobile Menu Footer */
  .header__mobile-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: clamp(20px, 4vw, 28px) clamp(24px, 5vw, 32px);
    background: #1E1E1E;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: nowrap;
    gap: clamp(12px, 3vw, 16px);
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  .header__mobile-footer-copyright {
    color: #fff;
    font-size: clamp(0.8rem, 2.2vw, 1rem);
    font-weight: 400;
    line-height: 1.3;
    flex-shrink: 0;
    white-space: nowrap;
  }
  
  .header__mobile-footer-credit {
    color: #fff;
    font-size: clamp(0.8rem, 2.2vw, 1rem);
    font-weight: 400;
    line-height: 1.3;
    text-align: right;
    flex-shrink: 1;
    min-width: 0;
  }
  
  .header__mobile-footer-credit--bold {
    font-weight: 700;
    color: #fff;
  }
}

/* Large Tablets (1024px - 1199px) */
@media (min-width: 1024px) and (max-width: 1199px) {
  .header {
    width: 96%;
    height: clamp(65px, 7vw, 72px);
    margin: 10px auto;
    background: #1E1E1E;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    position: sticky;
    top: 10px;
  }
  
  .header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 clamp(20px, 3.5vw, 28px);
    height: 100%;
  }
  
  .header__logo {
    height: clamp(36px, 6vw, 42px);
    width: auto;
    object-fit: contain;
  }
  
  /* Show desktop navigation on larger tablets */
  .header__nav {
    display: flex;
  }
  
  .header__nav-list {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2.5vw, 20px);
    list-style: none;
    margin: 0;
    padding: 0;
  }
  
  .header__nav-link {
    color: #fff;
    text-decoration: none;
    font-size: clamp(13px, 2.8vw, 16px);
    font-weight: 500;
    padding: clamp(8px, 2vw, 12px) clamp(12px, 2.5vw, 16px);
    border-radius: 0;
    transition: all 0.3s ease;
    position: relative;
    white-space: nowrap;
  }
  
  .header__nav-link:hover {
    color: var(--color-primary);
    text-decoration: none;
  }
  
  /* Hide hamburger menu on larger tablets */
  .header__menu-toggle {
    display: none;
  }
  
  /* Dropdown optimization for large tablets */
  .header__dropdown-container {
    width: clamp(220px, 45vw, 260px);
    position: absolute;
    top: 100%;
    left: 0;
    background: #1E1E1E;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  }
  
  .header__nav-item--has-dropdown:hover .header__dropdown-container,
  .header__dropdown-toggle[aria-expanded="true"] + .header__dropdown-container {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  
  .header__dropdown {
    list-style: none;
    margin: 0;
    padding: clamp(8px, 2vw, 12px) 0;
  }
  
  .header__dropdown-link {
    display: block;
    color: #fff;
    text-decoration: none;
    font-size: clamp(12px, 2.5vw, 15px);
    font-weight: 400;
    padding: clamp(8px, 2vw, 12px) clamp(14px, 3vw, 20px);
    transition: all 0.3s ease;
  }
  
  .header__dropdown-link:hover {
    background: rgba(229, 57, 53, 0.1);
    color: var(--color-primary);
    text-decoration: none;
  }
  
  .header__dropdown-icon::after {
    content: "▼";
    font-size: clamp(8px, 2vw, 10px);
    margin-left: clamp(4px, 1vw, 6px);
    transition: transform 0.3s ease;
  }
  
  .header__dropdown-toggle[aria-expanded="true"] .header__dropdown-icon::after {
    transform: rotate(180deg);
  }
}

/* iPad Pro and Large Tablets (1024px - 1366px) */
@media (min-width: 1024px) and (max-width: 1366px) {
  .header__container {
    padding: 0 clamp(0px, 0.2vw, 2px);
    gap: clamp(16px, 3vw, 24px);
  }
  
  .header__nav-list {
    gap: clamp(8px, 1.8vw, 14px);
    margin-left: auto;
  }
  
  .header__nav-link {
    font-size: clamp(11px, 2.2vw, 14px);
    padding: clamp(6px, 1.5vw, 10px) clamp(8px, 2vw, 12px);
  }
  
  .header__dropdown-container {
    width: clamp(200px, 40vw, 240px);
  }
  
  .header__dropdown-link {
    font-size: clamp(10px, 2vw, 13px);
    padding: clamp(6px, 1.5vw, 10px) clamp(12px, 2.5vw, 16px);
  }
  
  .header__dropdown-icon::after {
    font-size: clamp(7px, 1.5vw, 9px);
    margin-left: clamp(3px, 0.8vw, 5px);
  }
}

/* ================= MOBILE RESPONSIVE STYLES (max-width: 767px) ================= */
@media (max-width: 767px) {
  :root {
    /* Mobile header variables */
    --mobile-header-height: clamp(60px, 15vw, 70px);
    --mobile-header-padding: clamp(15px, 4vw, 20px);
    --mobile-logo-height: clamp(28px, 7vw, 35px);
    --mobile-menu-icon-size: clamp(24px, 6vw, 28px);
  }

  .header {
    width: calc(100% - calc(var(--mobile-header-padding) * 2)) !important;
    height: var(--mobile-header-height) !important;
    margin: clamp(8px, 2vw, 12px) auto !important;
    position: sticky !important;
    top: clamp(8px, 2vw, 12px) !important;
    background: #1E1E1E !important;
    border-radius: 0 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    z-index: 100 !important;
  }
  
  .header__container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 var(--mobile-header-padding) !important;
    height: 100% !important;
    position: relative !important;
  }
  
  .header__logo-link {
    display: flex !important;
    align-items: center !important;
    position: relative !important;
    z-index: 2 !important;
  }
  
  .header__logo {
    height: var(--mobile-logo-height) !important;
    width: auto !important;
    object-fit: contain !important;
  }
  
  .header__nav {
    display: none !important;
  }
  
  .header__menu-toggle {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    width: var(--mobile-menu-icon-size) !important;
    height: var(--mobile-menu-icon-size) !important;
    padding: 0 !important;
    position: relative !important;
    z-index: 3 !important;
    margin-left: auto !important;
  }
  
  .header__menu-icon {
    position: relative !important;
    width: clamp(14px, 3.5vw, 18px) !important;
    height: 2px !important;
    background-color: #fff !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 1px !important;
  }
  
  .header__menu-icon::before,
  .header__menu-icon::after {
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: clamp(18px, 4.5vw, 22px) !important;
    height: 2px !important;
    background-color: #fff !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border-radius: 1px !important;
  }
  
  .header__menu-icon::before {
    top: -6px !important;
  }
  
  .header__menu-icon::after {
    top: 6px !important;
  }
  
  .header__menu-toggle[aria-expanded="true"] .header__menu-icon {
    background-color: transparent !important;
  }
  
  .header__menu-toggle[aria-expanded="true"] .header__menu-icon::before {
    transform: translateX(-50%) rotate(45deg) !important;
    top: 0 !important;
  }
  
  .header__menu-toggle[aria-expanded="true"] .header__menu-icon::after {
    transform: translateX(-50%) rotate(-45deg) !important;
    top: 0 !important;
  }
  
  .header__mobile-menu {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100vh !important;
    background: #1E1E1E !important;
    padding: clamp(80px, 20vw, 100px) var(--mobile-header-padding) clamp(80px, 20vw, 100px) !important;
    transform: translateX(100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 99 !important;
    overflow-y: auto !important;
    box-shadow: none !important;
    filter: none !important;
  }

  .mobile_header__logo {
    position: absolute !important;
    top: clamp(20px, 5vw, 30px) !important;
    left: clamp(20px, 5vw, 30px) !important;
    height: clamp(32px, 8vw, 40px) !important;
    width: auto !important;
    z-index: 101 !important;
  }
  
  .header__mobile-menu-close {
    position: absolute !important;
    top: clamp(20px, 5vw, 30px) !important;
    right: clamp(20px, 5vw, 30px) !important;
    width: clamp(32px, 8vw, 40px) !important;
    height: clamp(32px, 8vw, 40px) !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: clamp(6px, 1.5vw, 8px) !important;
    border-radius: 50% !important;
    transition: all 0.3s ease !important;
    z-index: 101 !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  .header__mobile-menu-close-icon {
    width: clamp(20px, 5vw, 24px) !important;
    height: clamp(20px, 5vw, 24px) !important;
    filter: brightness(0) invert(1) !important;
    transition: all 0.3s ease !important;
  }
  
  .header__mobile-menu-close-icon {
    filter: brightness(0) invert(1) !important;
  }
  
  .header__mobile-menu[aria-hidden="false"] {
    transform: translateX(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }
  
  .header__mobile-nav {
    list-style: none !important;
    padding: 0 !important;
    margin: clamp(40px, 10vw, 60px) 0 0 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: clamp(20px, 5vw, 30px) !important;
  }
  
  .header__mobile-item {
    margin: 0 !important;
  }
  
  .header__mobile-link {
    font-size: clamp(1.2rem, 4vw, 1.6rem) !important;
    font-weight: 500 !important;
    line-height: 1.2 !important;
    display: block !important;
    padding: clamp(8px, 2vw, 12px) 0 !important;
    transition: color 0.3s ease !important;
    border: none !important;
    background: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
  }
  
  .header__mobile-item--has-dropdown .header__mobile-dropdown-toggle {
    font-size: clamp(1.2rem, 4vw, 1.6rem) !important;
    font-weight: 500 !important;
    background: none !important;
    border: none !important;
    padding: clamp(8px, 2vw, 12px) 0 !important;
    text-align: left !important;
    width: 100% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    text-shadow: none !important;
    box-shadow: none !important;
  }
  
  .header__mobile-dropdown-icon::after {
    display: none !important;
  }
  
  .header__mobile-dropdown-toggle[aria-expanded="true"] .header__mobile-dropdown-icon::after {
    display: none !important;
  }
  
  .header__mobile-dropdown {
    list-style: none !important;
    padding: clamp(12px, 3vw, 16px) 0 0 clamp(16px, 4vw, 20px) !important;
    margin: 0 !important;
    display: none !important;
    flex-direction: column !important;
    gap: clamp(12px, 3vw, 16px) !important;
    box-shadow: none !important;
    background: transparent !important;
  }
  
  .header__mobile-dropdown-toggle[aria-expanded="true"] + .header__mobile-dropdown {
    display: flex !important;
  }
  
  .header__mobile-dropdown-link {
    color: #e0e0e0 !important;
    text-decoration: none !important;
    font-size: clamp(1rem, 3.5vw, 1.3rem) !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    display: block !important;
    padding: clamp(6px, 1.5vw, 8px) 0 !important;
    transition: color 0.3s ease !important;
    text-shadow: none !important;
    box-shadow: none !important;
  }
  
  /* Mobile Menu Footer */
  .header__mobile-footer {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    padding: clamp(16px, 4vw, 24px) var(--mobile-header-padding) !important;
    background: #1E1E1E !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: clamp(8px, 2vw, 12px) !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }
  
  .header__mobile-footer-copyright {
    color: #fff !important;
    font-size: clamp(0.7rem, 2vw, 0.9rem) !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
  }
  
  .header__mobile-footer-credit {
    color: #fff !important;
    font-size: clamp(0.7rem, 2vw, 0.9rem) !important;
    font-weight: 400 !important;
    line-height: 1.3 !important;
    text-align: right !important;
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }
  
  .header__mobile-footer-credit--bold {
    font-weight: 700 !important;
    color: #fff !important;
  }
}

/* Ultra-compact Mobile Devices (max-width: 480px) */
@media (max-width: 480px) {
  :root {
    /* Ultra-compact header variables */
    --mobile-header-height: clamp(55px, 14vw, 65px) !important;
    --mobile-header-padding: clamp(12px, 3.5vw, 16px) !important;
    --mobile-logo-height: clamp(24px, 6vw, 30px) !important;
    --mobile-menu-icon-size: clamp(20px, 5.5vw, 26px) !important;
  }
  
  /* Ultra-compact mobile menu footer */
  .header__mobile-footer {
    padding: clamp(12px, 3vw, 16px) var(--mobile-header-padding) !important;
  }
}

/* Medium Mobile Devices (481px - 600px) */
@media (min-width: 481px) and (max-width: 600px) {
  :root {
    /* Medium mobile header variables */
    --mobile-header-height: clamp(60px, 14vw, 68px) !important;
    --mobile-header-padding: clamp(16px, 4vw, 18px) !important;
    --mobile-logo-height: clamp(28px, 6.5vw, 32px) !important;
    --mobile-menu-icon-size: clamp(22px, 5.5vw, 26px) !important;
  }
}

/* Large Mobile Devices (601px - 767px) */
@media (min-width: 601px) and (max-width: 767px) {
  :root {
    /* Large mobile header variables */
    --mobile-header-height: clamp(65px, 15vw, 70px) !important;
    --mobile-header-padding: clamp(18px, 4vw, 20px) !important;
    --mobile-logo-height: clamp(30px, 7vw, 35px) !important;
    --mobile-menu-icon-size: clamp(24px, 6vw, 28px) !important;
  }
}
