/* ==========================================================================
   BLUE JEWEL TYPING & DOCUMENTS CLEARING (الجوهرة الزرقاء للطباعة وتخليص المعاملات)
   OFFICIAL DESIGN SYSTEM & STYLESHEET
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@300;400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

/* --- COLOR PALETTE & DESIGN TOKENS --- */
:root {
  /* Core Brand Colors */
  --primary-navy: #123B72;      /* Main brand color, headings, navigation */
  --deep-navy: #0B2E5B;         /* Dark sections, footer, strong text */
  --brand-blue: #1D5A9B;        /* Buttons, links, active states */
  --turquoise: #55B8D1;         /* Accent, highlights, icons */
  --light-cyan: #DDF3F8;        /* Backgrounds, service highlights */
  --ice-blue: #F1F8FB;          /* Section backgrounds */
  --silver: #B9C1C8;            /* Borders, secondary elements */
  
  /* Text Colors */
  --text-dark: #172B3D;         /* Main body text */
  --text-muted: #667789;        /* Secondary text */
  --text-light: #94A3B8;
  --text-white: #FFFFFF;
  
  /* Surfaces */
  --bg-main: #FFFFFF;
  --bg-surface: #FFFFFF;
  --bg-surface-glass: rgba(255, 255, 255, 0.95);
  --bg-ice: #F1F8FB;
  --border-color: #E2EAF0;
  --border-glass: rgba(18, 59, 114, 0.1);
  
  /* Brand Gradient (Used Sparingly) */
  --brand-gradient: linear-gradient(135deg, #123B72 0%, #1D5A9B 55%, #55B8D1 100%);
  
  /* Shadows */
  --shadow-sm: 0 2px 6px rgba(23, 43, 61, 0.04);
  --shadow-md: 0 6px 16px rgba(23, 43, 61, 0.07);
  --shadow-lg: 0 14px 35px rgba(11, 46, 91, 0.12);
  --shadow-hover: 0 10px 25px rgba(29, 90, 155, 0.15);
  --backdrop-blur: blur(14px);
  
  /* Transitions & Radii */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

  /* Typography */
  --font-arabic-primary: 'IBM Plex Sans Arabic', sans-serif;
  --font-english-primary: 'Inter', sans-serif;
}

/* Dark Theme Overrides */
[data-theme="dark"] {
  --bg-main: #061528;
  --bg-surface: #0B2445;
  --bg-surface-glass: rgba(11, 36, 69, 0.95);
  --bg-ice: #0D2D57;
  --border-color: #173D6E;
  --text-dark: #F1F8FB;
  --text-muted: #B9C1C8;
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.6);
}

/* RTL Layout System */
html[dir="rtl"] {
  direction: rtl;
  text-align: right;
  font-family: var(--font-arabic-primary);
}

html[dir="ltr"] {
  direction: ltr;
  text-align: left;
  font-family: var(--font-english-primary);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--primary-navy);
  font-weight: 700;
  line-height: 1.25;
}

[data-theme="dark"] h1, 
[data-theme="dark"] h2, 
[data-theme="dark"] h3, 
[data-theme="dark"] h4, 
[data-theme="dark"] h5, 
[data-theme="dark"] h6 {
  color: var(--text-dark);
}

a {
  color: var(--brand-blue);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: var(--turquoise);
}

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

/* --- LAYOUT UTILITIES & BACKGROUND LEVEL SYSTEM --- */
.container {
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Level 1 Background: White */
.bg-level-1 {
  background-color: var(--bg-main);
}

/* Level 2 Background: Ice Blue */
.bg-level-2 {
  background-color: var(--bg-ice);
}

/* Level 3 Background: Deep Navy */
.bg-level-3 {
  background-color: var(--deep-navy);
  color: var(--text-white);
}

.section-padding {
  padding: 5.5rem 0;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem auto;
}

/* DIAMOND GRAPHIC MOTIF BADGE */
.diamond-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1.1rem;
  background: var(--light-cyan);
  color: var(--primary-navy);
  border: 1px solid rgba(85, 184, 209, 0.4);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.diamond-badge::before {
  content: '◇';
  color: var(--turquoise);
  font-weight: 700;
  font-size: 0.95rem;
}

.section-title {
  font-size: clamp(2.1rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
  color: var(--primary-navy);
  font-weight: 700;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* --- BUTTONS SYSTEM --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: var(--transition-normal);
  white-space: nowrap;
  text-decoration: none;
}

/* Primary Button: Navy (#123B72) -> Hover Brand Blue (#1D5A9B) */
.btn-primary {
  background: var(--primary-navy);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--brand-blue);
  color: #FFFFFF;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Secondary Button: Turquoise (#55B8D1) */
.btn-secondary {
  background: var(--turquoise);
  color: #FFFFFF;
}

.btn-secondary:hover {
  background: #44A7BF;
  color: #FFFFFF;
  transform: translateY(-2px);
}

/* Outline Button */
.btn-outline {
  background: transparent;
  border: 1px solid var(--primary-navy);
  color: var(--primary-navy);
}

.btn-outline:hover {
  background: var(--light-cyan);
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}

/* --- TOP ANNOUNCEMENT BAR --- */
.top-bar {
  background: var(--deep-navy);
  color: #B9C1C8;
  font-size: 0.88rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.top-bar-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.top-bar-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.top-bar-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.theme-toggle, .lang-toggle {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  padding: 0.3rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
}

.theme-toggle:hover, .lang-toggle:hover {
  background: var(--turquoise);
  color: #FFFFFF;
}

/* --- HEADER & NAVIGATION --- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 84px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
}

/* Diamond Logo Symbol Motif Frame */
.logo-symbol {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, var(--primary-navy) 0%, var(--brand-blue) 100%);
  border: 2px solid var(--turquoise);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--turquoise);
  font-size: 1.4rem;
  transform: rotate(45deg);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.logo-symbol span {
  transform: rotate(-45deg);
  font-weight: 700;
}

.logo-img {
  height: 52px;
  width: auto;
  object-fit: contain;
  border-radius: 6px;
  transition: var(--transition-fast);
}

.logo:hover .logo-img {
  transform: scale(1.03);
}

.logo-brand {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary-navy);
  line-height: 1.15;
}

.logo-brand span {
  color: var(--turquoise);
}

.logo-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  list-style: none;
}

.nav-link {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.98rem;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--turquoise);
  transition: var(--transition-fast);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-link.active {
  color: var(--primary-navy);
  font-weight: 700;
}

.mobile-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--primary-navy);
  font-size: 1.6rem;
  cursor: pointer;
}

/* --- HERO SECTION --- */
.hero {
  position: relative;
  padding: 4.5rem 0 6rem 0;
  background: var(--bg-ice);
  overflow: hidden;
}

/* Diamond Subtle Visual Pattern Overlay */
.hero-pattern {
  position: absolute;
  top: -50px;
  inset-inline-end: -50px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(85, 184, 209, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3.5rem;
  align-items: center;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  margin-bottom: 1.25rem;
  color: var(--primary-navy);
  line-height: 1.2;
}

.hero-content h1 span {
  color: var(--brand-blue);
  position: relative;
}

.hero-desc {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
}

.stat-item h3 {
  font-size: 2.1rem;
  color: var(--primary-navy);
  font-weight: 700;
  margin-bottom: 0.2rem;
}

.stat-item p {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

.hero-card-frame {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
}

.hero-img {
  width: 100%;
  height: 480px;
  object-fit: cover;
}

/* --- PREMIUM SERVICE CARDS (RECOMMENDED SPECIFICATION) --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color); /* 1px #E2EAF0 border */
  border-radius: var(--radius-md);      /* 12-16px radius */
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);           /* Subtle shadow */
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  text-decoration: none;
  color: var(--text-dark);
}

/* Card Hover Specification: Border changes to brand blue, card rises 4px, icon becomes cyan/blue */
.service-card:hover {
  border-color: var(--brand-blue);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.service-icon-box {
  width: 54px;
  height: 54px;
  background: var(--light-cyan);
  color: var(--primary-navy);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  transition: var(--transition-fast);
}

.service-card:hover .service-icon-box {
  background: var(--turquoise);
  color: #FFFFFF;
}

.service-card h3 {
  font-size: 1.3rem;
  color: var(--primary-navy);
  margin-bottom: 0.75rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.service-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.service-link {
  font-weight: 600;
  color: var(--brand-blue);
  font-size: 0.92rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.service-card:hover .service-link {
  color: var(--turquoise);
}

/* --- STEP PROCESS WORKFLOW --- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
}

.process-step {
  background: var(--bg-surface);
  padding: 2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.step-num {
  width: 44px;
  height: 44px;
  background: var(--primary-navy);
  color: var(--turquoise);
  border: 2px solid var(--turquoise);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  margin: 0 auto 1.25rem auto;
}

/* --- WIZARD APPLICATION FORM (apply.html) --- */
.wizard-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  padding: 3rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}

.wizard-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 3rem;
  position: relative;
}

.wizard-steps::before {
  content: '';
  position: absolute;
  top: 22px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--border-color);
  z-index: 1;
}

.step-indicator {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.step-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-ice);
  border: 2px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: var(--transition-normal);
}

.step-indicator.active .step-circle {
  background: var(--primary-navy);
  border-color: var(--turquoise);
  color: var(--turquoise);
}

.step-indicator.completed .step-circle {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #FFFFFF;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-input, .form-select {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-dark);
  font-family: inherit;
  font-size: 0.98rem;
  outline: none;
  transition: var(--transition-fast);
}

.form-input:focus, .form-select:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(29, 90, 155, 0.12);
}

/* --- FOOTER (DEEP NAVY #0B2E5B LEVEL 3) --- */
.footer {
  background: var(--deep-navy);
  color: #B9C1C8;
  padding-top: 4.5rem;
  padding-bottom: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  margin-top: 1rem;
  font-size: 0.95rem;
  max-width: 320px;
}

.footer-title {
  color: #FFFFFF;
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: #B9C1C8;
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--turquoise);
}

.footer-bottom {
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

/* --- FLOATING ACTIONS --- */
.floating-actions {
  position: fixed;
  bottom: 2rem;
  inset-inline-end: 2rem;
  z-index: 99;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.float-btn {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.4rem;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-normal);
  text-decoration: none;
}

.float-btn:hover {
  transform: scale(1.1);
}

.float-whatsapp {
  background: #25D366;
}

.float-phone {
  background: var(--brand-blue);
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .top-bar-info {
    display: none;
  }
  
  .nav-menu {
    position: fixed;
    top: 84px;
    inset-inline-start: -100%;
    width: 100%;
    height: calc(100vh - 84px);
    background: var(--bg-surface);
    flex-direction: column;
    justify-content: center;
    gap: 2.5rem;
    transition: var(--transition-normal);
    z-index: 99;
  }

  .nav-menu.active {
    inset-inline-start: 0;
  }

  .mobile-toggle {
    display: block;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

/* ==========================================================================
   ENHANCED RESPONSIVE SYSTEM (MOBILE, TABLET, IPAD & DESKTOP)
   ========================================================================== */

/* 1. Fluid Typography Clamping */
h1, .hero-title {
  font-size: clamp(1.85rem, 3.8vw + 1rem, 3.2rem);
  line-height: 1.25;
}

h2, .section-title {
  font-size: clamp(1.45rem, 2.8vw + 0.8rem, 2.3rem);
  line-height: 1.3;
}

h3 {
  font-size: clamp(1.15rem, 2vw + 0.6rem, 1.65rem);
}

.section-subtitle {
  font-size: clamp(0.95rem, 1.2vw + 0.5rem, 1.15rem);
}

/* 2. Touch Target & Accessibility Sizing */
button, .btn, .nav-link, .lang-toggle, .theme-toggle, .mobile-toggle, .pill-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.form-input, .form-select {
  font-size: 16px !important; /* Prevents iOS auto-zoom on input focus */
  min-height: 48px;
}

/* 3. Navigation Drawer for iPad Portrait & Mobile (< 992px) */
@media (max-width: 991px) {
  .top-bar-info {
    display: none;
  }

  .top-bar-controls {
    width: 100%;
    justify-content: space-between;
  }

  .header-container {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: var(--bg-ice);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1.4rem;
    color: var(--primary-navy);
    cursor: pointer;
  }

  .nav-menu {
    position: fixed;
    top: 72px;
    inset-inline-start: -100%;
    width: 82%;
    max-width: 360px;
    height: calc(100vh - 72px);
    background: var(--bg-surface);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 2rem 1.5rem;
    gap: 1rem;
    transition: inset-inline-start 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-lg);
    z-index: 999;
    overflow-y: auto;
  }

  .nav-menu.active {
    inset-inline-start: 0;
  }

  .nav-menu li {
    width: 100%;
  }

  .nav-menu .nav-link {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: var(--radius-sm);
    background: var(--bg-ice);
    font-size: 1.05rem;
    justify-content: flex-start;
  }

  .nav-menu .btn {
    width: 100%;
    margin-top: 0.5rem;
  }

  /* Body backdrop overlay when menu active */
  body.menu-open {
    overflow: hidden !important;
  }

  .nav-backdrop {
    position: fixed;
    top: 72px;
    left: 0;
    width: 100vw;
    height: calc(100vh - 72px);
    background: rgba(11, 46, 91, 0.5);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }

  .nav-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }
}

/* 4. Layout Grid Adjustments for Tablet / iPad / Mobile */
@media (max-width: 991px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-card-frame img {
    max-height: 320px;
    width: 100%;
    object-fit: cover;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 600px) {
  .container {
    padding-inline-start: 1rem;
    padding-inline-end: 1rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .popular-categories-grid {
    grid-template-columns: 1fr;
  }

  .wizard-card {
    padding: 1.5rem 1rem;
  }

  .wizard-steps {
    flex-direction: row;
    gap: 0.25rem;
  }

  .step-circle {
    width: 36px;
    height: 36px;
    font-size: 0.9rem;
  }

  .floating-actions {
    bottom: 1.25rem;
    inset-inline-end: 1.25rem;
    gap: 0.6rem;
  }

  .float-btn {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }
}

/* 5. Zero Horizontal Overflow Protection */
body, main, section, .header, .container, .hero-grid, .footer {
  max-width: 100vw;
  overflow-x: hidden;
}

/* --- CATEGORY PILLS BAR & BREADCRUMBS STYLING --- */
.category-pills-bar {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.pill-btn {
  background: var(--bg-ice);
  border: 1px solid var(--border-color);
  color: var(--primary-navy);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--transition-fast);
}

.pill-btn:hover, .pill-btn.active {
  background: var(--primary-navy);
  color: #FFFFFF;
  border-color: var(--primary-navy);
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.breadcrumb-nav a {
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 600;
}

.breadcrumb-nav a:hover {
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.breadcrumb-current {
  color: var(--primary-navy);
  font-weight: 700;
}

/* ==========================================================================
   POPULAR CATEGORIES COMPONENT STYLES
   ========================================================================== */
.popular-categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

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

@media (max-width: 640px) {
  .popular-categories-grid {
    grid-template-columns: 1fr;
  }
}

.popular-cat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  color: var(--text-dark);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.popular-cat-card:hover {
  transform: translateY(-5px);
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-hover);
}

.popular-cat-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.pop-cat-icon {
  width: 50px;
  height: 50px;
  background: var(--light-cyan);
  color: var(--primary-navy);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
  transition: var(--transition-fast);
}

.popular-cat-card:hover .pop-cat-icon {
  background: var(--turquoise);
  color: #FFFFFF;
}

.pop-cat-titles h3 {
  font-size: 1.2rem;
  color: var(--primary-navy);
  margin-bottom: 0.15rem;
  font-weight: 700;
  line-height: 1.3;
}

.pop-cat-sub {
  font-size: 0.82rem;
  color: var(--brand-blue);
  font-weight: 600;
  display: block;
}

.pop-cat-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
}

.pop-cat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.pop-cat-tags .tag {
  background: var(--bg-ice);
  color: var(--primary-navy);
  border: 1px solid var(--border-color);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-sm);
}

.popular-cat-card-gold {
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: linear-gradient(180deg, var(--bg-surface) 0%, rgba(212, 175, 55, 0.04) 100%);
}

.popular-cat-card-gold:hover {
  border-color: #D4AF37;
}

.gold-icon {
  background: rgba(212, 175, 55, 0.15);
  color: #B8860B;
}

.popular-cat-card-gold:hover .gold-icon {
  background: #D4AF37;
  color: #FFFFFF;
}

.tag-gold {
  background: rgba(212, 175, 55, 0.12) !important;
  color: #8B6508 !important;
  border-color: rgba(212, 175, 55, 0.3) !important;
}

.pop-cat-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.popular-cat-card .btn-link {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brand-blue);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
}

.popular-cat-card:hover .btn-link {
  color: var(--turquoise);
}

.gold-link {
  color: #B8860B !important;
}

.popular-cat-card-gold:hover .gold-link {
  color: #D4AF37 !important;
}


