/* header-styles.css - Reusable Header Styles */
/* Place this file in your root directory or in a /css folder */

:root {
  --red: #D4112A;
  --red-dark: #B10F24;
  --red-light: #E8C5CC;
  --white: #FFFFFF;
  --ink: #121212;
  --muted: #5A5A5A;
  --line: #EFEFEF;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.08);
}

* {
  box-sizing: border-box;
}

html {
  margin: 0 !important;
  padding: 0 !important;
}

body {
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  margin: 0 !important;
  padding: 0 !important;
  padding-top: 78px !important;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(1200px, 94%);
  margin: 0 auto;
  padding: 0 20px;
}

.btn {
  display: inline-block;
  padding: 14px 20px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .2px;
}

.btn.primary {
  background: var(--red);
  color: var(--white);
}

.btn.primary:hover {
  background: var(--red-dark);
}

.btn.ghost {
  border: 2px solid var(--red);
  color: var(--red);
}

.btn.ghost:hover {
  background: var(--red);
  color: var(--white);
}

/* Enhanced Header */
header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 9999 !important;
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  box-shadow: 0 4px 20px rgba(212,17,42,.25);
  transition: all 0.3s ease;
  margin: 0 !important;
  padding: 0 !important;
}

header.scrolled {
  box-shadow: 0 6px 30px rgba(212,17,42,.4);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  min-height: 70px;
}

/* ============================================== */
/* BRAND STYLES - INLINE WITH SAME SIZE */
/* ============================================== */

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
  transition: all 0.3s ease;
}

.brand:hover {
  transform: translateY(-2px);
}

.brand-text {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: nowrap;
}

.brand-en,
.brand-ar {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--white);
  white-space: nowrap;
  text-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: all 0.3s ease;
  font-family: "Times New Roman", Times, serif;
}

.brand-ar {
  font-family: "Times New Roman", "Tajawal", "Cairo", serif;
  letter-spacing: 0;
}

/* Elegant separator between brand names */
.brand-separator {
  width: 2px;
  height: 28px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255,255,255,0.7),
    transparent
  );
  border-radius: 2px;
}

/* Alternative: dot separator */
.brand-dot {
  width: 6px;
  height: 6px;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(255,255,255,0.5);
}

/* Hover effects for brand text */
.brand:hover .brand-en,
.brand:hover .brand-ar {
  text-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.brand:hover .brand-separator {
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(255,255,255,1),
    transparent
  );
}

/* Logo image if used */
.logo-img {
  height: 50px;
  width: auto;
  display: block;
  background: white;
  padding: 6px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
  max-width: 250px;
  object-fit: contain;
}

nav ul {
  display: flex;
  gap: 26px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
  /* FIX: Prevent Arabic text from wrapping */
  flex-wrap: nowrap;
  white-space: nowrap;
}

nav a {
  font-weight: 700;
  color: var(--white);
  transition: all .2s;
  position: relative;
  display: block;
  padding: 8px 0;
  /* FIX: Keep Arabic text on one line */
  white-space: nowrap;
  word-break: keep-all;
  text-align: center;
}

nav a:hover {
  color: var(--red-light);
  transform: translateY(-1px);
}

/* Dropdown Menu Styles */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

.dropdown-toggle::after {
  content: '▼';
  font-size: 10px;
  transition: transform .3s;
}

.dropdown:hover .dropdown-toggle::after {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,.15);
  min-width: 320px;
  opacity: 0;
  visibility: hidden;
  transition: all .3s;
  margin-top: 10px;
  overflow: hidden;
  z-index: 1000;
}

.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  margin-top: 15px;
}

.dropdown-search {
  padding: 16px;
  border-bottom: 2px solid #f0f0f0;
}

.dropdown-search input {
  width: 100%;
  padding: 10px 14px;
  border: 2px solid var(--red-light);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border .2s;
}

.dropdown-search input:focus {
  border-color: var(--red);
}

.dropdown-search input::placeholder {
  color: #999;
}

.dropdown-items {
  max-height: 400px;
  overflow-y: auto;
}

.dropdown-item {
  display: block;
  padding: 12px 20px;
  color: #333;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: all .2s;
  border-left: 3px solid transparent;
}

.dropdown-item:hover {
  background: #f8f8f8;
  border-left-color: var(--red);
  color: var(--red);
  padding-left: 24px;
}

.dropdown-item.hidden {
  display: none;
}

.no-results {
  padding: 20px;
  text-align: center;
  color: #999;
  font-size: 14px;
  display: none;
}

.no-results.show {
  display: block;
}

.dropdown-category {
  padding: 8px 20px;
  font-size: 11px;
  font-weight: 800;
  color: var(--red);
  text-transform: uppercase;
  letter-spacing: 1px;
  background: #f8f8f8;
  border-top: 1px solid #e0e0e0;
}

.dropdown-items::-webkit-scrollbar {
  width: 6px;
}

.dropdown-items::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.dropdown-items::-webkit-scrollbar-thumb {
  background: var(--red-light);
  border-radius: 3px;
}

.dropdown-items::-webkit-scrollbar-thumb:hover {
  background: var(--red);
}

.nav-right {
  display: flex !important;
  gap: 12px;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.nav-right .btn.ghost {
  border-color: white;
  color: white;
  background: rgba(255,255,255,.1);
}

.nav-right .btn.ghost:hover {
  background: white;
  color: var(--red);
}

.burger {
  display: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: white;
  font-size: 1.5rem;
  background: transparent;
  transition: all 0.2s ease;
  line-height: 1;
}

.burger:hover {
  opacity: 0.8;
}

.burger:active {
  transform: scale(0.95);
}

/* ============================================== */
/* LANGUAGE SWITCHER STYLES */
/* ============================================== */

.language-switcher {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: 999px;
  padding: 3px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  margin-left: 12px;
  flex-shrink: 0;
}

.language-switcher button,
.language-switcher a {
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  border-radius: 999px;
  transition: all 0.2s ease;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.2;
}

.language-switcher button:hover,
.language-switcher a:hover {
  color: var(--red);
}

.language-switcher button.active,
.language-switcher a.active {
  background: var(--red);
  color: var(--white);
}

/* ============================================== */
/* ENHANCED RESPONSIVE FIXES START HERE */
/* ============================================== */

/* Large Tablets (1024px and below) */
@media (max-width: 1024px) {
  .container {
    width: 96%;
    padding: 0 15px;
  }
  
  nav ul {
    gap: 20px;
  }
  
  .logo-img {
    max-width: 220px;
    height: auto;
  }
  
  .btn {
    padding: 12px 18px;
    font-size: 14px;
  }
  
  .brand-en,
  .brand-ar {
    font-size: 22px;
  }
  
  .brand-separator {
    height: 24px;
  }
}

/* ============================================== */
/* DESKTOP FIX - FORCE NAV TO SHOW, HIDE BURGER */
/* ============================================== */

@media (min-width: 981px) {
  /* Force navigation to show on desktop */
  nav {
    display: flex !important;
  }
  
  nav ul {
    display: flex !important;
  }
  
  /* Force burger to hide on desktop */
  .burger {
    display: none !important;
  }
}

/* Mobile Menu Breakpoint (980px and below) */
@media (max-width: 980px) {
  body {
    padding-top: 50px !important;
  }
  
  header {
    height: 50px;
  }
  
  .nav {
    flex-wrap: wrap;
    padding: 5px 0;
    gap: 10px;
    min-height: 50px;
  }
  
  /* Brand responsive adjustments */
  .brand {
    order: 1;
    flex: 1;
    min-width: 0;
    justify-content: flex-start;
  }
  
  .brand-text {
    gap: 8px;
  }
  
  .brand-en,
  .brand-ar {
    font-size: 18px;
    letter-spacing: 0.8px;
  }
  
  .brand-separator {
    height: 20px;
    width: 1px;
  }
  
  .logo-img {
    max-width: 180px;
    max-height: 38px;
    height: auto;
    object-fit: contain;
    padding: 4px;
    border-radius: 8px;
  }
  
  /* Fix burger positioning */
  .burger {
    display: block !important;
    order: 2;
    margin-left: auto;
    padding: 8px;
    font-size: 1.5rem;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    outline: none !important;
  }
  
  /* Fix navigation menu */
  nav {
    order: 4;
    width: 100%;
    display: block !important;
  }
  
  nav ul {
    display: none !important;
    position: static;
    background: var(--red-dark);
    padding: 0;
    margin-top: 5px;
    border-radius: var(--radius);
    overflow: hidden;
    flex-direction: column;
    gap: 0;
    width: 100%;
  }
  
  nav ul.open {
    display: flex !important;
    animation: slideDown 0.3s ease;
  }
  
  nav li {
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  
  nav li:last-child {
    border-bottom: none;
  }
  
  nav a {
    padding: 10px 15px;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 14px;
    /* Reset for mobile */
    white-space: normal;
    word-break: normal;
  }
  
  /* Fix dropdown for mobile */
  .dropdown-menu {
    position: static !important;
    transform: none !important;
    width: 100% !important;
    min-width: 100% !important;
    opacity: 1 !important;
    visibility: visible !important;
    margin-top: 0 !important;
    background: rgba(0,0,0,0.1) !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    display: block !important;
  }
  
  .dropdown.active .dropdown-menu {
    max-height: 400px;
    overflow-y: auto;
  }
  
  .dropdown-toggle::after {
    content: '▶';
    font-size: 10px;
    margin-left: auto;
    transition: transform 0.3s;
  }
  
  .dropdown.active .dropdown-toggle::after {
    transform: rotate(90deg);
  }
  
  /* Fix dropdown items for mobile */
  .dropdown-item {
    padding: 8px 15px 8px 25px !important;
    color: rgba(255,255,255,0.9) !important;
    font-size: 13px;
    border-left: 3px solid transparent;
  }
  
  .dropdown-item:hover {
    background: rgba(255,255,255,0.1) !important;
    color: var(--red-light) !important;
  }
  
  /* Fix dropdown categories for mobile */
  .dropdown-category {
    padding: 6px 15px 6px 25px !important;
    color: var(--red-light) !important;
    font-size: 11px;
    background: rgba(0,0,0,0.2) !important;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  
  /* Fix search input for mobile */
  .dropdown-search {
    padding: 10px;
  }
  
  .dropdown-search input {
    background: white !important;
    color: var(--ink) !important;
    padding: 8px 12px;
    font-size: 13px;
  }
  
  /* Fix no results for mobile */
  .no-results {
    color: rgba(255,255,255,0.7);
    padding: 15px;
    font-size: 13px;
  }
  
  /* Fix nav-right for mobile */
  .nav-right {
    order: 3;
    margin-left: auto;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: nowrap;
    display: flex !important;
  }
  
  .nav-right .btn.ghost {
    padding: 6px 12px;
    font-size: 12px;
    border-width: 1px;
  }
  
  /* Hide language switcher on mobile - show in menu instead */
  .nav-right .language-switcher {
    display: none !important;
  }
  
  /* Language switcher inside mobile menu */
  .mobile-lang-switcher {
    display: flex;
    justify-content: center;
    padding: 12px 15px;
    background: rgba(0,0,0,0.15);
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  
  .mobile-lang-switcher .language-switcher {
    display: flex !important;
    margin: 0;
  }
  
  /* Adjust mobile menu top position to match shorter header */
  nav ul {
    top: 50px;
  }
}

/* Medium Tablets (768px and below) */
@media (max-width: 768px) {
  .logo-img {
    max-width: 150px;
    max-height: 32px;
  }
  
  .brand-en,
  .brand-ar {
    font-size: 16px;
  }
  
  .brand-separator {
    height: 18px;
  }
  
  nav a {
    font-size: 13px;
    padding: 8px 12px;
  }
  
  .dropdown-item {
    font-size: 12px;
    padding: 7px 12px 7px 20px !important;
  }
  
  .dropdown-category {
    font-size: 10px;
    padding: 5px 12px 5px 20px !important;
  }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
  .container {
    width: 100%;
    padding: 0 12px;
  }
  
  body {
    padding-top: 45px !important;
  }
  
  header {
    height: 45px;
  }
  
  .nav {
    gap: 8px;
    padding: 4px 0;
    min-height: 45px;
  }
  
  .brand-text {
    gap: 6px;
  }
  
  .brand-en,
  .brand-ar {
    font-size: 14px;
    letter-spacing: 0;
  }
  
  .brand-separator {
    height: 16px;
  }
  
  .logo-img {
    max-width: 130px;
    max-height: 28px;
    padding: 3px;
    border-radius: 6px;
  }
  
  .brand {
    flex: 1;
  }
  
  .burger {
    padding: 6px;
    font-size: 1.4rem;
  }
  
  nav a {
    padding: 7px 10px;
    font-size: 12px;
  }
  
  .dropdown-item {
    padding: 6px 10px 6px 18px !important;
    font-size: 11px;
  }
  
  .dropdown-category {
    padding: 4px 10px 4px 18px !important;
    font-size: 9px;
  }
  
  .nav-right .btn.ghost {
    display: none;
  }
  
  .dropdown-search input {
    padding: 6px 10px;
    font-size: 12px;
  }
  
  /* Adjust mobile menu top position for very small screens */
  nav ul {
    top: 45px;
  }
}

/* ============================================== */
/* RTL HEADER STYLES WITH RESPONSIVE FIXES */
/* ============================================== */

/* RTL Base Layout */
[dir="rtl"] header .nav {
  flex-direction: row-reverse;
}

/* REMOVED: Brand RTL flipping rules to keep brand order same */

[dir="rtl"] nav {
  order: 2;
  margin: 0 auto;
}

[dir="rtl"] .nav-right {
  order: 3;
  margin-left: 0;
  margin-right: auto;
}

[dir="rtl"] .nav-right .btn.ghost {
  margin-right: 0;
}

/* RTL Navigation */
[dir="rtl"] nav ul {
  direction: rtl;
  text-align: right;
  /* Keep Arabic text on one line */
  flex-wrap: nowrap;
  white-space: nowrap;
  /* Slightly reduce gap for Arabic */
  gap: 20px;
}

[dir="rtl"] nav a {
  text-align: right;
  /* Keep Arabic text on one line */
  white-space: nowrap;
  word-break: keep-all;
}

/* RTL Dropdown */
[dir="rtl"] .dropdown-menu {
  left: auto;
  right: 50%;
  transform: translateX(50%);
  text-align: right;
  direction: rtl;
}

[dir="rtl"] .dropdown-item {
  border-left: none;
  border-right: 3px solid transparent;
  text-align: right;
}

[dir="rtl"] .dropdown-item:hover {
  border-left: none;
  border-right-color: var(--red);
  padding-left: 20px;
  padding-right: 24px;
}

[dir="rtl"] .dropdown-search input {
  text-align: right;
  direction: rtl;
}

[dir="rtl"] .dropdown-search input::placeholder {
  text-align: right;
}

[dir="rtl"] .dropdown-category {
  text-align: right;
}

[dir="rtl"] .dropdown-toggle::after {
  margin-left: 0;
  margin-right: 6px;
}

/* RTL Burger Menu */
[dir="rtl"] .burger {
  margin-left: 0;
  margin-right: 15px;
}

/* RTL Mobile Responsive Adjustments */
@media (max-width: 980px) {
  /* REMOVED: Brand RTL flipping rules */
  
  [dir="rtl"] .burger {
    order: 2;
    margin-right: 0;
    margin-left: auto;
  }
  
  [dir="rtl"] .nav-right {
    order: 3;
    margin-right: 0;
    margin-left: auto;
  }
  
  [dir="rtl"] nav {
    order: 4;
    text-align: right;
    direction: rtl;
    width: 100%;
  }
  
  [dir="rtl"] nav a {
    text-align: right;
    flex-direction: row-reverse;
    justify-content: space-between;
    /* Reset for mobile */
    white-space: normal;
    word-break: normal;
  }
  
  [dir="rtl"] .dropdown-toggle::after {
    margin-left: 0;
    margin-right: auto;
    content: '◀';
  }
  
  [dir="rtl"] .dropdown.active .dropdown-toggle::after {
    transform: rotate(-90deg);
  }
  
  [dir="rtl"] .dropdown-item {
    text-align: right;
    border-left: none;
    border-right: 3px solid transparent;
    padding: 8px 25px 8px 15px !important;
  }
  
  [dir="rtl"] .dropdown-item:hover {
    border-right-color: var(--red);
    padding-right: 29px !important;
  }
  
  [dir="rtl"] .dropdown-category {
    text-align: right;
    padding: 6px 25px 6px 15px !important;
  }
  
  [dir="rtl"] .dropdown-search input {
    text-align: right;
    direction: rtl;
  }
  
  [dir="rtl"] .no-results {
    text-align: right;
  }
}

@media (max-width: 768px) {
  [dir="rtl"] .dropdown-item {
    padding: 7px 20px 7px 12px !important;
  }
  
  [dir="rtl"] .dropdown-category {
    padding: 5px 20px 5px 12px !important;
  }
}

@media (max-width: 480px) {
  [dir="rtl"] .dropdown-item {
    padding: 6px 18px 6px 10px !important;
  }
  
  [dir="rtl"] .dropdown-category {
    padding: 4px 18px 4px 10px !important;
  }
}

/* Enhanced RTL Support for Larger Screens */
@media (min-width: 981px) {
  [dir="rtl"] .nav {
    gap: 20px;
  }
  
  /* REMOVED: Desktop brand RTL flipping rules */
  
  [dir="rtl"] nav {
    flex: 1;
    display: flex;
    justify-content: center;
  }
  
  [dir="rtl"] .nav-right {
    flex: 0 0 auto;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 980px) {
  .dropdown-items {
    max-height: 300px;
    overflow-y: auto;
  }
  
  .dropdown-items::-webkit-scrollbar {
    width: 4px;
  }
  
  .dropdown-items::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.3);
  }
}

@media (max-height: 500px) and (max-width: 980px) {
  nav ul.open {
    max-height: 70vh;
  }
  
  .dropdown.active .dropdown-menu {
    max-height: 40vh;
  }
}

header .nav .brand,
header .nav .nav-right,
header .nav .burger {
  min-height: 50px;
  display: flex;
  align-items: center;
}

@media (max-width: 980px) {
  header .nav > nav {
    min-height: 0 !important;
  }
}

/* ============================================== */
/* SMALL PREMIUM ANIMATIONS (HEADER + NAV + BUTTONS) */
/* ============================================== */

/* Smooth hover feel everywhere */
header, .logo-img, nav a, .btn, .burger, .dropdown-menu, .dropdown-item {
  transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, color .25s ease, opacity .25s ease;
}

/* Header subtle entrance (optional) */
header {
  animation: headerDrop .5s ease both;
}

@keyframes headerDrop {
  from { transform: translateY(-12px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

/* Logo hover bounce */
.logo-img:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 10px 28px rgba(0,0,0,.18);
}

/* Nav links underline slide */
nav a::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  height: 3px;
  width: 100%;
  background: rgba(255,255,255,.9);
  border-radius: 999px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

nav a:hover::before {
  transform: scaleX(1);
}

/* Buttons hover */
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.14);
}
.btn:active {
  transform: translateY(0);
  box-shadow: none;
}

/* Burger micro animation */
.burger:hover {
  transform: translateY(-1px) scale(1.02);
}
.burger:active {
  transform: scale(.98);
}

/* Dropdown menu open animation (desktop hover) */
@media (min-width: 981px) {
  .dropdown:hover .dropdown-menu {
    animation: dropFade .22s ease both;
  }
}

@keyframes dropFade {
  from { transform: translateX(-50%) translateY(-8px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}

/* Dropdown item hover slide */
.dropdown-item:hover {
  transform: translateX(3px);
}

/* RTL: slide the other way */
[dir="rtl"] .dropdown-item:hover {
  transform: translateX(-3px);
}

/* Mobile menu open animation stays smooth */
@media (max-width: 980px) {
  nav ul.open {
    animation: menuReveal .25s ease both;
  }

  @keyframes menuReveal {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================== */
/* PREMIUM SCROLL ANIMATION (shrink + blur) */
/* ============================================== */

/* smooth transitions for scroll state */
header,
header .nav,
header .logo-img,
header nav a,
header .btn,
header .burger {
  transition: all .28s ease;
}

/* default header look */
header {
  backdrop-filter: blur(0px);
}

/* when scrolled */
header.scrolled {
  backdrop-filter: blur(10px);
  background: rgba(212,17,42,.92);
  box-shadow: 0 10px 35px rgba(0,0,0,.18);
}

/* shrink nav height */
header.scrolled .nav {
  padding: 8px 0;
  min-height: 58px;
}

/* shrink logo */
header.scrolled .logo-img {
  transform: scale(.92);
  box-shadow: 0 6px 18px rgba(0,0,0,.16);
}

/* small nav text tighten */
header.scrolled nav a {
  opacity: .95;
  transform: translateY(0);
}

/* micro shrink buttons */
header.scrolled .btn {
  transform: scale(.97);
}

/* Mobile: keep it subtle (avoid too much shrink) */
@media (max-width: 980px) {
  header.scrolled .nav {
    min-height: 50px;
    padding: 5px 0;
  }

  header.scrolled .logo-img {
    transform: scale(.96);
  }
}