/* 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 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.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;
}

nav a {
  font-weight: 700;
  color: var(--white);
  transition: all .2s;
  position: relative;
  display: block;
  padding: 8px 0;
}

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: 2px solid white;
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
  color: white;
  font-size: 1.2rem;
  background: transparent;
}

/* ============================================== */
/* LANGUAGE SWITCHER STYLES - FIXED */
/* ============================================== */






/* ============================================== */
/* 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;
  }
}

/* ============================================== */
/* 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; /* SHORTER: Changed from 70px to 50px */
  }
  
  header {
    height: 50px; /* SHORTER: Added fixed height */
  }
  
  .nav {
    flex-wrap: wrap;
    padding: 5px 0; /* SHORTER: Reduced from 12px to 5px */
    gap: 10px; /* SHORTER: Reduced from 15px to 10px */
    min-height: 50px; /* SHORTER: Changed from 60px to 50px */
  }
  
  /* Fix brand/logo positioning */
  .brand {
    order: 1;
    flex: 1;
    min-width: 0;
    justify-content: flex-start;
  }
  
  .logo-img {
    max-width: 180px; /* SHORTER: Reduced from 200px */
    max-height: 38px; /* SHORTER: Reduced from 45px */
    height: auto;
    object-fit: contain;
    padding: 4px; /* SHORTER: Reduced padding */
    border-radius: 8px; /* SHORTER: Slightly smaller */
  }
  
  /* Fix burger positioning */
  .burger {
    display: block !important;
    order: 2;
    margin-left: auto;
    padding: 5px 8px; /* SHORTER: Reduced padding */
    font-size: 1rem; /* SHORTER: Smaller font */
  }
  
  /* 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; /* SHORTER: Reduced from 10px */
    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; /* SHORTER: Reduced from 14px 20px */
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 14px; /* SHORTER: Smaller font */
  }
  
  /* 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; /* SHORTER: Reduced from 500px */
    overflow-y: auto;
  }
  
  .dropdown-toggle::after {
    content: '▶';
    font-size: 10px; /* SHORTER: Reduced from 12px */
    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; /* SHORTER: Reduced padding */
    color: rgba(255,255,255,0.9) !important;
    font-size: 13px; /* SHORTER: Smaller font */
    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; /* SHORTER: Reduced padding */
    color: var(--red-light) !important;
    font-size: 11px; /* SHORTER: Smaller font */
    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; /* SHORTER: Reduced from 15px */
  }
  
  .dropdown-search input {
    background: white !important;
    color: var(--ink) !important;
    padding: 8px 12px; /* SHORTER: Reduced padding */
    font-size: 13px; /* SHORTER: Smaller font */
  }
  
  /* Fix no results for mobile */
  .no-results {
    color: rgba(255,255,255,0.7);
    padding: 15px; /* SHORTER: Reduced padding */
    font-size: 13px; /* SHORTER: Smaller font */
  }
  
  /* 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; /* SHORTER: Reduced from 10px 16px */
    font-size: 12px; /* SHORTER: Smaller font */
    border-width: 1px;
  }
  


  
  /* Adjust mobile menu top position to match shorter header */
  nav ul {
    top: 50px; /* SHORTER: Matches header height */
  }
}

/* Medium Tablets (768px and below) */
@media (max-width: 768px) {
  .logo-img {
    max-width: 150px; /* SHORTER: Reduced from 180px */
    max-height: 32px; /* SHORTER: Reduced from 40px */
  }
  
  nav a {
    font-size: 13px; /* SHORTER: Smaller font */
    padding: 8px 12px; /* SHORTER: Reduced padding */
  }
  
  .dropdown-item {
    font-size: 12px; /* SHORTER: Smaller font */
    padding: 7px 12px 7px 20px !important; /* SHORTER: Reduced padding */
  }
  
  .dropdown-category {
    font-size: 10px; /* SHORTER: Smaller font */
    padding: 5px 12px 5px 20px !important; /* SHORTER: Reduced padding */
  }
  
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
  .container {
    width: 100%;
    padding: 0 12px;
  }
  
  body {
    padding-top: 45px !important; /* SHORTER: Even shorter on very small screens */
  }
  
  header {
    height: 45px; /* SHORTER: Even shorter on very small screens */
  }
  
  .nav {
    gap: 8px; /* SHORTER: Reduced from 10px */
    padding: 4px 0; /* SHORTER: Reduced from 10px 0 */
    min-height: 45px; /* SHORTER: Even shorter */
  }
  
  .logo-img {
    max-width: 130px; /* SHORTER: Reduced from 150px */
    max-height: 28px; /* SHORTER: Reduced from 35px */
    padding: 3px; /* SHORTER: Reduced padding */
    border-radius: 6px; /* SHORTER: Smaller border radius */
  }
  
  .brand {
    flex: 1;
  }
  
  .burger {
    padding: 4px 6px; /* SHORTER: Reduced padding */
    font-size: 0.9rem; /* SHORTER: Smaller font */
  }
  
  nav a {
    padding: 7px 10px; /* SHORTER: Reduced padding */
    font-size: 12px; /* SHORTER: Smaller font */
  }
  
  .dropdown-item {
    padding: 6px 10px 6px 18px !important; /* SHORTER: Reduced padding */
    font-size: 11px; /* SHORTER: Smaller font */
  }
  
  .dropdown-category {
    padding: 4px 10px 4px 18px !important; /* SHORTER: Reduced padding */
    font-size: 9px; /* SHORTER: Smaller font */
  }
  
  .nav-right .btn.ghost {
    display: none;
  }
  
  .dropdown-search input {
    padding: 6px 10px; /* SHORTER: Reduced padding */
    font-size: 12px; /* SHORTER: Smaller font */
  }

  
  /* Adjust mobile menu top position for very small screens */
  nav ul {
    top: 45px; /* SHORTER: Matches header height */
  }
}

/* ============================================== */
/* RTL HEADER STYLES WITH RESPONSIVE FIXES */
/* ============================================== */

/* RTL Base Layout */
[dir="rtl"] header .nav {
  flex-direction: row-reverse;
}

[dir="rtl"] .brand {
  order: 1;
  margin-left: 0;
  margin-right: 0;
  justify-content: flex-end;
}

[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;
}

[dir="rtl"] nav a {
  text-align: right;
}

/* 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) {
  [dir="rtl"] .brand {
    order: 1;
    justify-content: flex-end;
  }
  
  [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;
  }
  
  [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; /* SHORTER: Adjusted for RTL */
  }
  
  [dir="rtl"] .dropdown-item:hover {
    border-right-color: var(--red);
    padding-right: 29px !important; /* SHORTER: Adjusted for RTL */
  }
  
  [dir="rtl"] .dropdown-category {
    text-align: right;
    padding: 6px 25px 6px 15px !important; /* SHORTER: Adjusted for RTL */
  }
  
  [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; /* SHORTER: Adjusted for RTL */
  }
  
  [dir="rtl"] .dropdown-category {
    padding: 5px 20px 5px 12px !important; /* SHORTER: Adjusted for RTL */
  }
}

@media (max-width: 480px) {
  [dir="rtl"] .dropdown-item {
    padding: 6px 18px 6px 10px !important; /* SHORTER: Adjusted for RTL */
  }
  
  [dir="rtl"] .dropdown-category {
    padding: 4px 18px 4px 10px !important; /* SHORTER: Adjusted for RTL */
  }
}

/* Enhanced RTL Support for Larger Screens */
@media (min-width: 981px) {
  [dir="rtl"] .nav {
    gap: 20px;
  }
  
  [dir="rtl"] .brand {
    flex: 0 0 auto;
  }
  
  [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); /* glassy red */
  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);
  }
}

