/* ================================================================
   ELITE EGYPT TOURS — DESIGN SYSTEM
   Brand Identity 2025 | Cairo Font | Navy + Teal Palette
   ================================================================ */

/* ================================================================
   0. GOOGLE FONTS — Cairo (covers Arabic + Latin)
   ================================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&display=swap');


/* ================================================================
   1. CSS CUSTOM PROPERTIES (TOKENS)
   ================================================================ */
:root {

  /* --- BRAND COLOR PALETTE --- */

  /* Primary Navy */
  --navy:          #0A2340;
  --navy-dark:     #071828;
  --navy-mid:      #0E2D50;
  --navy-light:    rgba(10, 35, 64, 0.08);
  --navy-glow:     rgba(10, 35, 64, 0.20);

  /* Primary Teal */
  --teal:          #0FB1A2;
  --teal-dark:     #0D9E91;
  --teal-light:    #3FC4B7;
  --teal-soft:     #9FD6C7;
  --teal-glow:     rgba(15, 177, 162, 0.22);
  --teal-border:   rgba(15, 177, 162, 0.28);
  --teal-glass:    rgba(15, 177, 162, 0.10);

  /* Neutrals */
  --neutral-light: #F4F5F7;
  --neutral-white: #FFFFFF;
  --slate:         #5A6B7A;
  --warm-gray:     #B8BEC6;

  /* Accent Colors */
  --cool-blue:     #2E8AB8;
  --soft-green:    #9FD6C7;
  --coral:         #FF8B5C;
  --mustard:       #FFC857;
  --electric-blue: #3266BF;

  /* Status Colors */
  --success:       #22C55E;
  --success-bg:    rgba(34, 197, 94, 0.12);
  --warning:       #FFC857;
  --warning-bg:    rgba(255, 200, 87, 0.12);
  --danger:        #EF4444;
  --danger-bg:     rgba(239, 68, 68, 0.12);
  --info:          #2E8AB8;
  --info-bg:       rgba(46, 138, 184, 0.12);

  /* Backgrounds */
  --bg-base:       #F4F5F7;
  --bg-white:      #FFFFFF;
  --bg-surface:    #FFFFFF;
  --bg-elevated:   #FFFFFF;
  --bg-dark:       #0A2340;
  --bg-overlay:    rgba(10, 35, 64, 0.78);
  --bg-glass:      rgba(255, 255, 255, 0.88);
  --bg-glass-dark: rgba(10, 35, 64, 0.75);

  /* Text */
  --text-primary:           #0A2340;
  --text-secondary:         #5A6B7A;
  --text-muted:             #B8BEC6;
  --text-on-dark:           #FFFFFF;
  --text-on-dark-secondary: rgba(255, 255, 255, 0.75);
  --text-on-dark-muted:     rgba(255, 255, 255, 0.45);
  --text-teal:              var(--teal);
  --text-inverse:           #FFFFFF;

  /* Borders */
  --border-subtle:  rgba(10, 35, 64, 0.06);
  --border-default: rgba(10, 35, 64, 0.12);
  --border-strong:  rgba(10, 35, 64, 0.25);
  --border-teal:    var(--teal-border);
  --border-dark:    rgba(255, 255, 255, 0.10);

  /* ---------------------------------------------------------------- */

  /* --- TYPOGRAPHY --- */

  --font-sans:   'Cairo', 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  --font-arabic: 'Cairo', 'Segoe UI', Tahoma, Arial, sans-serif;
  --font-serif:  Georgia, 'Times New Roman', serif;

  /* Font Sizes — brand spec + fluid clamp */
  --fs-xs:   clamp(0.70rem, 1.0vw, 0.75rem);   /* ~12px  caption/label  */
  --fs-sm:   clamp(0.80rem, 1.2vw, 0.875rem);  /* ~14px  small text     */
  --fs-base: clamp(0.90rem, 1.5vw, 1.0rem);    /* 16px   body regular   */
  --fs-md:   clamp(1.0rem,  1.8vw, 1.125rem);  /* ~18px  body-lg        */
  --fs-lg:   clamp(1.1rem,  2.0vw, 1.25rem);   /* ~20px  semibold heads */
  --fs-xl:   clamp(1.2rem,  2.5vw, 1.5rem);    /* ~24px  h3             */
  --fs-2xl:  clamp(1.4rem,  3.0vw, 1.875rem);  /* ~30px  section heads  */
  --fs-3xl:  clamp(1.6rem,  4.0vw, 2.25rem);   /* 36px   h2             */
  --fs-4xl:  clamp(1.9rem,  5.0vw, 3.0rem);    /* 48px   h1             */
  --fs-hero: clamp(2.2rem,  7.0vw, 4.5rem);    /* 48–72px hero title    */

  /* Font Weights */
  --fw-light:    300;
  --fw-regular:  400;
  --fw-semibold: 600;
  --fw-bold:     700;
  --fw-extrabold:800;

  /* Line Heights */
  --lh-tight:   1.15;
  --lh-snug:    1.30;
  --lh-normal:  1.55;
  --lh-relaxed: 1.75;

  /* Letter Spacing */
  --ls-tight:   -0.02em;
  --ls-normal:   0;
  --ls-wide:     0.04em;
  --ls-wider:    0.08em;
  --ls-widest:   0.16em;

  /* ---------------------------------------------------------------- */

  /* --- SPACING SCALE (base 4px) --- */
  --space-1:   0.25rem;   /*  4px */
  --space-2:   0.5rem;    /*  8px */
  --space-3:   0.75rem;   /* 12px */
  --space-4:   1.0rem;    /* 16px */
  --space-5:   1.25rem;   /* 20px */
  --space-6:   1.5rem;    /* 24px */
  --space-8:   2.0rem;    /* 32px */
  --space-10:  2.5rem;    /* 40px */
  --space-12:  3.0rem;    /* 48px */
  --space-16:  4.0rem;    /* 64px */
  --space-20:  5.0rem;    /* 80px */
  --space-24:  6.0rem;    /* 96px */
  --space-32:  8.0rem;    /* 128px */

  /* Section Padding */
  --section-py:  clamp(4rem, 8vw, 7rem);
  --section-px:  clamp(1.25rem, 6vw, 6rem);

  /* Container */
  --container-max: 1240px;
  --container-px:  clamp(1rem, 4vw, 2rem);

  /* ---------------------------------------------------------------- */

  /* --- BORDER RADIUS --- */
  --radius-sm:     6px;
  --radius-md:     10px;
  --radius-lg:     14px;
  --radius-xl:     20px;
  --radius-2xl:    28px;
  --radius-pill:   9999px;
  --radius-circle: 50%;

  /* ---------------------------------------------------------------- */

  /* --- SHADOWS --- */
  --shadow-sm:      0 1px 4px rgba(10, 35, 64, 0.08);
  --shadow-md:      0 4px 16px rgba(10, 35, 64, 0.10);
  --shadow-lg:      0 8px 32px rgba(10, 35, 64, 0.13);
  --shadow-xl:      0 16px 56px rgba(10, 35, 64, 0.16);
  --shadow-2xl:     0 24px 80px rgba(10, 35, 64, 0.20);
  --shadow-teal:    0 8px 32px rgba(15, 177, 162, 0.28);
  --shadow-teal-lg: 0 16px 56px rgba(15, 177, 162, 0.38);
  --shadow-inset:   inset 0 1px 0 rgba(255, 255, 255, 0.08);

  /* ---------------------------------------------------------------- */

  /* --- TRANSITIONS --- */
  --ease-fast:   150ms ease;
  --ease-normal: 250ms ease;
  --ease-slow:   400ms ease;
  --ease-bounce: 400ms cubic-bezier(0.34, 1.56, 0.64, 1);

  /* ---------------------------------------------------------------- */

  /* --- Z-INDEX SCALE --- */
  --z-below:   -1;
  --z-base:     0;
  --z-raised:   10;
  --z-dropdown: 100;
  --z-sticky:   200;
  --z-overlay:  300;
  --z-modal:    400;
  --z-toast:    500;
}


/* ================================================================
   2. RESET & BASE
   ================================================================ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-normal);
  color: var(--text-primary);
  background-color: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* RTL support */
[dir="rtl"],
body.rtl {
  font-family: var(--font-arabic);
  text-align: right;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input,
select,
textarea {
  font-family: inherit;
}

ul, ol {
  list-style: none;
}

::selection {
  background: var(--teal);
  color: var(--text-inverse);
}

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}


/* ================================================================
   3. TYPOGRAPHY
   ================================================================ */

/* Display / Hero */
.display {
  font-size: var(--fs-hero);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
}

/* Headings */
h1, .h1 {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  letter-spacing: var(--ls-tight);
  color: var(--text-primary);
}

h2, .h2 {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  color: var(--text-primary);
}

h3, .h3 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  line-height: var(--lh-snug);
  color: var(--text-primary);
}

h4, .h4 {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-normal);
  color: var(--text-primary);
}

h5, .h5 {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-normal);
  color: var(--text-primary);
}

h6, .h6 {
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-normal);
  color: var(--text-primary);
}

/* Body text */
.body-lg  { font-size: var(--fs-md);   line-height: var(--lh-relaxed); }
.body     { font-size: var(--fs-base); line-height: var(--lh-normal);  }
.body-sm  { font-size: var(--fs-sm);   line-height: var(--lh-normal);  }

/* Utility text */
.label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--text-muted);
}

.caption {
  font-size: var(--fs-xs);
  font-weight: var(--fw-light);
  color: var(--text-secondary);
  line-height: var(--lh-normal);
}

/* Color utilities */
.text-teal      { color: var(--teal); }
.text-navy      { color: var(--navy); }
.text-muted     { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success   { color: var(--success); }
.text-danger    { color: var(--danger); }
.text-warning   { color: var(--warning); }
.text-on-dark   { color: var(--text-on-dark); }

/* Teal gradient text */
.text-gradient {
  background: linear-gradient(120deg, var(--navy), var(--teal), var(--cool-blue));
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer-text 5s linear infinite;
}

@keyframes shimmer-text {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* Section overline / eyebrow */
.overline {
  display: inline-block;
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--teal);
  padding: var(--space-1) var(--space-4);
  background: var(--teal-glass);
  border: 1px solid var(--teal-border);
  border-radius: var(--radius-pill);
  margin-bottom: var(--space-4);
}


/* ================================================================
   4. LAYOUT
   ================================================================ */

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-px);
}

.section {
  padding-block: var(--section-py);
  padding-inline: var(--section-px);
}

.section--light    { background: var(--bg-base); }
.section--white    { background: var(--bg-white); }
.section--dark     { background: var(--bg-dark); color: var(--text-on-dark); }
.section--teal     { background: var(--teal); color: var(--text-inverse); }

/* Section header block */
.section-header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: var(--space-12);
}

.section-header h2 {
  margin-bottom: var(--space-4);
}

.section-header p {
  color: var(--text-secondary);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
}

/* Divider */
.divider {
  height: 1px;
  background: var(--border-subtle);
  border: none;
  margin-block: var(--space-8);
}

.divider--teal {
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
}


/* ================================================================
   5. GRID UTILITIES
   ================================================================ */

.grid          { display: grid; }
.grid-2        { grid-template-columns: repeat(2, 1fr); }
.grid-3        { grid-template-columns: repeat(3, 1fr); }
.grid-4        { grid-template-columns: repeat(4, 1fr); }
.grid-auto-sm  { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.grid-auto-md  { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid-auto-lg  { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); }
.gap-2         { gap: var(--space-2); }
.gap-3         { gap: var(--space-3); }
.gap-4         { gap: var(--space-4); }
.gap-6         { gap: var(--space-6); }
.gap-8         { gap: var(--space-8); }

.flex          { display: flex; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.flex-col      { flex-direction: column; }
.flex-wrap     { flex-wrap: wrap; }
.items-center  { align-items: center; }
.gap-sm        { gap: var(--space-2); }
.gap-md        { gap: var(--space-4); }
.gap-lg        { gap: var(--space-6); }


/* ================================================================
   6. BUTTONS
   ================================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  line-height: 1;
  letter-spacing: var(--ls-wide);
  padding: 0.75em 1.75em;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all var(--ease-normal);
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* Primary — Teal */
.btn-primary {
  background: linear-gradient(135deg, var(--teal), var(--teal-light));
  color: var(--text-inverse);
  border-color: transparent;
  box-shadow: 0 4px 20px var(--teal-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--teal-dark), var(--teal));
  box-shadow: var(--shadow-teal);
  transform: translateY(-2px);
}

.btn-primary:active {
  transform: translateY(0);
  background: var(--teal-dark);
}

/* Secondary — Outlined Teal */
.btn-secondary {
  background: transparent;
  color: var(--teal);
  border-color: var(--teal);
}

.btn-secondary:hover {
  background: var(--teal-glass);
  border-color: var(--teal-light);
  box-shadow: 0 0 0 3px var(--teal-glow);
  transform: translateY(-2px);
}

/* Navy — filled navy */
.btn-navy {
  background: var(--navy);
  color: var(--text-inverse);
  border-color: transparent;
}

.btn-navy:hover {
  background: var(--navy-mid);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Ghost — subtle */
.btn-ghost {
  background: rgba(10, 35, 64, 0.05);
  color: var(--text-secondary);
  border-color: var(--border-default);
}

.btn-ghost:hover {
  background: rgba(10, 35, 64, 0.10);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

/* Danger */
.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: transparent;
}

.btn-danger:hover {
  background: #DC2626;
  box-shadow: 0 4px 20px rgba(239, 68, 68, 0.35);
  transform: translateY(-2px);
}

/* Success */
.btn-success {
  background: var(--success);
  color: #fff;
  border-color: transparent;
}

/* Sizes */
.btn-xs  { font-size: var(--fs-xs);   padding: 0.5em 1.2em;  }
.btn-sm  { font-size: var(--fs-sm);   padding: 0.6em 1.4em;  }
.btn-md  { font-size: var(--fs-base); padding: 0.75em 1.75em;}
.btn-lg  { font-size: var(--fs-md);   padding: 0.85em 2.2em; }
.btn-xl  { font-size: var(--fs-lg);   padding: 1.0em 2.5em;  }
.btn-block{ width: 100%; }

/* Icon button */
.btn-icon {
  padding: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-circle);
  font-size: var(--fs-md);
}

.btn-icon-sm {
  width: 2rem;
  height: 2rem;
  font-size: var(--fs-sm);
}

/* Loading state */
.btn.loading {
  pointer-events: none;
  opacity: 0.75;
}

.btn.loading::after {
  content: '';
  width: 1em;
  height: 1em;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin-left: var(--space-2);
}

@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ================================================================
   7. INPUTS & FORMS
   ================================================================ */

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.form-label {
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--text-secondary);
}

.form-label .required {
  color: var(--danger);
  margin-left: var(--space-1);
}

/* Base input */
.input,
.select,
.textarea {
  width: 100%;
  background: var(--bg-white);
  color: var(--text-primary);
  border: 1.5px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 0.75em 1em;
  font-size: var(--fs-base);
  font-family: inherit;
  line-height: 1.5;
  transition: border-color var(--ease-fast), box-shadow var(--ease-fast);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}

.input::placeholder,
.textarea::placeholder {
  color: var(--text-muted);
}

.input:hover,
.select:hover,
.textarea:hover {
  border-color: var(--border-strong);
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-glow);
}

/* States */
.input--error,
.select--error,
.textarea--error {
  border-color: var(--danger);
}

.input--error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.18);
}

.input--success,
.select--success {
  border-color: var(--success);
}

/* Sizes */
.input-sm { padding: 0.5em 0.75em;  font-size: var(--fs-sm); }
.input-lg { padding: 1.0em 1.25em;  font-size: var(--fs-md); }

/* Textarea */
.textarea {
  resize: vertical;
  min-height: 120px;
}

/* Select custom arrow */
.select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%230FB1A2' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1em center;
  padding-right: 2.5em;
  cursor: pointer;
}

.select option {
  background: var(--bg-white);
  color: var(--text-primary);
}

/* Form error message */
.form-error {
  font-size: var(--fs-xs);
  color: var(--danger);
  margin-top: var(--space-1);
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.form-hint {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  margin-top: var(--space-1);
}

/* Form row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

/* Search field wrapper */
.input-wrapper {
  position: relative;
}

.input-wrapper .input-icon {
  position: absolute;
  left: 1em;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  font-size: var(--fs-md);
}

.input-wrapper .input {
  padding-left: 2.75em;
}

[dir="rtl"] .input-wrapper .input-icon {
  left: auto;
  right: 1em;
}

[dir="rtl"] .input-wrapper .input {
  padding-left: 1em;
  padding-right: 2.75em;
}


/* ================================================================
   8. CARDS
   ================================================================ */

.card {
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform var(--ease-normal), box-shadow var(--ease-normal), border-color var(--ease-normal);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-teal);
}

.card--elevated {
  box-shadow: var(--shadow-md);
}

.card--glass {
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--border-default);
}

.card--teal {
  border-color: var(--teal-border);
  box-shadow: var(--shadow-teal);
}

.card-body    { padding: var(--space-6); }
.card-body-sm { padding: var(--space-4); }
.card-body-lg { padding: var(--space-8); }

/* Tour card specific */
.tour-card {
  background: var(--bg-white);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--ease-bounce), box-shadow var(--ease-normal), border-color var(--ease-normal);
}

.tour-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 56px rgba(10, 35, 64, 0.14), 0 0 0 1px var(--teal-border), 0 0 40px var(--teal-glow);
  border-color: var(--teal-border);
}

.tour-card__image {
  position: relative;
  height: 220px;
  overflow: hidden;
  background: var(--bg-base);
}

.tour-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--ease-slow);
}

.tour-card:hover .tour-card__image img {
  transform: scale(1.08);
}

.tour-card__body {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  flex: 1;
}

.tour-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-4);
  margin-top: auto;
  border-top: 1px solid var(--border-subtle);
}


/* ================================================================
   9. BADGES
   ================================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: var(--fs-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  padding: 0.3em 0.85em;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.badge-teal    { background: var(--teal-glass); color: var(--teal-dark); border: 1px solid var(--teal-border); }
.badge-navy    { background: var(--navy-light);  color: var(--navy);      border: 1px solid rgba(10,35,64,0.15); }
.badge-popular { background: rgba(15,177,162,0.15); color: var(--teal-dark); border: 1px solid var(--teal-border); }
.badge-new     { background: var(--success-bg); color: var(--success);    border: 1px solid rgba(34,197,94,0.25); }
.badge-info    { background: var(--info-bg);    color: var(--info);       border: 1px solid rgba(46,138,184,0.25); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger);     border: 1px solid rgba(239,68,68,0.25); }
.badge-muted   { background: rgba(10,35,64,0.05); color: var(--text-muted); border: 1px solid var(--border-subtle); }
.badge-coral   { background: rgba(255,139,92,0.12); color: var(--coral);  border: 1px solid rgba(255,139,92,0.25); }
.badge-mustard { background: rgba(255,200,87,0.15); color: #9a6d00;       border: 1px solid rgba(255,200,87,0.30); }


/* ================================================================
   10. STARS / RATING
   ================================================================ */

.stars {
  display: inline-flex;
  gap: 1px;
  color: var(--mustard);
  font-size: var(--fs-sm);
}

.star-filled  { color: var(--mustard); }
.star-empty   { color: var(--border-default); }
.star-half    { color: var(--mustard); }

.rating-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.rating-score {
  font-weight: var(--fw-bold);
  color: var(--text-primary);
  font-size: var(--fs-sm);
}

.rating-count {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}


/* ================================================================
   11. TAGS / PILLS (Filter chips)
   ================================================================ */

.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 0.45em 1.1em;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  border: 1.5px solid var(--border-default);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--ease-fast);
  user-select: none;
}

.tag:hover {
  border-color: var(--teal-border);
  color: var(--teal-dark);
  background: var(--teal-glass);
}

.tag.active,
.tag--active {
  background: var(--teal);
  border-color: transparent;
  color: var(--text-inverse);
  box-shadow: 0 4px 14px var(--teal-glow);
}


/* ================================================================
   12. TOASTS / ALERTS
   ================================================================ */

.toast-container {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  pointer-events: none;
}

[dir="rtl"] .toast-container {
  right: auto;
  left: var(--space-6);
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  background: var(--bg-white);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  backdrop-filter: blur(12px);
  pointer-events: all;
  transform: translateX(120%);
  opacity: 0;
  transition: transform var(--ease-bounce), opacity var(--ease-normal);
  max-width: 340px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  color: var(--text-primary);
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

[dir="rtl"] .toast {
  transform: translateX(-120%);
}

.toast--success { border-color: rgba(34,197,94,0.30);   color: var(--success); }
.toast--error   { border-color: rgba(239,68,68,0.30);   color: var(--danger);  }
.toast--warning { border-color: rgba(255,200,87,0.30);  color: #9a6d00; }
.toast--info    { border-color: rgba(46,138,184,0.30);  color: var(--info);    }
.toast--teal    { border-color: var(--teal-border);     color: var(--teal-dark); }

/* Inline alert */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  border-radius: var(--radius-lg);
  font-size: var(--fs-sm);
  border: 1px solid;
}

.alert--success { background: var(--success-bg); color: var(--success); border-color: rgba(34,197,94,0.25);  }
.alert--error   { background: var(--danger-bg);  color: var(--danger);  border-color: rgba(239,68,68,0.25);  }
.alert--warning { background: var(--warning-bg); color: #9a6d00;        border-color: rgba(255,200,87,0.25); }
.alert--info    { background: var(--info-bg);    color: var(--info);    border-color: rgba(46,138,184,0.25); }


/* ================================================================
   13. MODAL
   ================================================================ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(6px);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease-normal);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--bg-white);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-2xl);
  transform: scale(0.92) translateY(20px);
  transition: transform var(--ease-bounce);
  scrollbar-width: thin;
  scrollbar-color: var(--teal) transparent;
}

.modal-backdrop.open .modal {
  transform: scale(1) translateY(0);
}

.modal--lg  { max-width: 760px; }
.modal--xl  { max-width: 960px; }

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
  background: var(--navy);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.modal__header h3 {
  font-size: var(--fs-xl);
  font-weight: var(--fw-bold);
  color: var(--text-on-dark);
}

.modal__close {
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-circle);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-on-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: var(--fs-md);
  transition: background var(--ease-fast), color var(--ease-fast);
  border: none;
}

.modal__close:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

.modal__body   { padding: var(--space-6); }
.modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  padding: var(--space-5) var(--space-6);
  border-top: 1px solid var(--border-subtle);
}


/* ================================================================
   14. AVATAR
   ================================================================ */

.avatar {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-circle);
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-bold);
  font-size: var(--fs-md);
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--navy), var(--teal));
  color: var(--text-inverse);
}

.avatar-sm { width: 2.0rem; height: 2.0rem; font-size: var(--fs-sm); }
.avatar-lg { width: 3.5rem; height: 3.5rem; font-size: var(--fs-xl); }
.avatar-xl { width: 5.0rem; height: 5.0rem; font-size: var(--fs-2xl); }


/* ================================================================
   15. SKELETON LOADER
   ================================================================ */

@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.skeleton {
  background: var(--border-subtle);
  border-radius: var(--radius-md);
  animation: skeleton-pulse 1.6s ease-in-out infinite;
}

.skeleton-text  { height: 1em;    border-radius: var(--radius-sm); margin-bottom: var(--space-2); }
.skeleton-title { height: 1.5em;  width: 60%; }
.skeleton-image { height: 220px;  border-radius: var(--radius-lg) var(--radius-lg) 0 0; }


/* ================================================================
   16. MISC UTILITIES
   ================================================================ */

.mt-auto { margin-top: auto; }
.mx-auto { margin-inline: auto; }
.mb-4    { margin-bottom: var(--space-4); }
.mb-6    { margin-bottom: var(--space-6); }
.mb-8    { margin-bottom: var(--space-8); }

.hidden  { display: none !important; }
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.aspect-video    { aspect-ratio: 16 / 9; }
.aspect-square   { aspect-ratio: 1 / 1; }
.aspect-portrait { aspect-ratio: 3 / 4; }

.object-cover    { object-fit: cover;   width: 100%; height: 100%; }
.object-contain  { object-fit: contain; width: 100%; height: 100%; }

.overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.overlay--dark {
  background: linear-gradient(to top, rgba(10,35,64,0.92) 0%, rgba(10,35,64,0.38) 60%, transparent 100%);
}

.overlay--darker {
  background: rgba(10, 35, 64, 0.60);
}

.relative { position: relative; }
.absolute { position: absolute; }
.inset-0  { inset: 0; }

/* Scrollbar */
::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--teal-border); border-radius: var(--radius-pill); }
::-webkit-scrollbar-thumb:hover { background: var(--teal); }


/* ================================================================
   17. RESPONSIVE BREAKPOINTS
   ================================================================ */

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-4,
  .grid-3,
  .grid-2 { grid-template-columns: 1fr; }

  .section {
    padding-block: clamp(3rem, 6vw, 5rem);
    padding-inline: var(--container-px);
  }

  .hide-mobile { display: none !important; }
}

@media (max-width: 480px) {
  .toast-container {
    left: var(--space-4);
    right: var(--space-4);
  }
  .toast { max-width: 100%; }
}

@media (min-width: 769px) {
  .hide-desktop { display: none !important; }
}

@media (max-width: 360px) {
  .container { padding-inline: clamp(0.75rem, 3vw, 1rem); }
  .grid-2    { grid-template-columns: 1fr; }
  h1, .h1   { font-size: clamp(1.6rem, 8vw, 2.4rem); }
  h2, .h2   { font-size: clamp(1.3rem, 6vw, 2rem); }
}
