/* =============================================================
   UAE CONSTRUCTION DIRECTORY — THEME.CSS
   Design: Industrial-precision · Gulf luxury
   Typography: Syne (display) + DM Sans (body)
   Palette: Deep Navy · Burnished Gold · Steel Blue
   ============================================================= */

/* ── 1. CSS Variables ──────────────────────────────────────── */
:root {
  /* Brand */
  --c-primary:        #0d2137;
  --c-primary-light:  #16344f;
  --c-primary-dark:   #080f17;
  --c-secondary:      #c8941a;
  --c-secondary-light:#e0ac3a;
  --c-secondary-pale: #fdf3e0;
  --c-accent:         #2a5380;
  --c-accent-light:   #3a6fa8;
  --c-surface:        #f4f6f8;
  --c-surface-2:      #eaecef;

  /* Neutrals */
  --c-white:   #ffffff;
  --c-black:   #080f17;
  --c-text:    #1a2e42;
  --c-muted:   #5e7080;
  --c-border:  #d6dce4;
  --c-divider: #e8ecf0;

  /* Semantic */
  --c-success: #17a763;
  --c-warning: #e08a12;
  --c-danger:  #d63b3b;
  --c-info:    #2a7aaf;

  /* Typography */
  --font-display: 'Syne', sans-serif;
  --font-body:    'DM Sans', sans-serif;

  /* Spacing */
  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  16px;
  --sp-lg:  24px;
  --sp-xl:  40px;
  --sp-2xl: 64px;
  --sp-3xl: 96px;

  /* Layout */
  --max-w:        1280px;
  --max-w-narrow: 900px;
  --header-h:     72px;
  --topbar-h:     38px;

  /* Radius */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  14px;
  --r-xl:  20px;
  --r-pill:999px;

  /* Shadow */
  --shadow-sm: 0 1px 4px rgba(8,15,23,.07);
  --shadow-md: 0 4px 16px rgba(8,15,23,.10);
  --shadow-lg: 0 12px 40px rgba(8,15,23,.14);
  --shadow-gold: 0 4px 24px rgba(200,148,26,.25);

  /* Transition */
  --t-fast:   150ms ease;
  --t-normal: 250ms ease;
  --t-slow:   400ms cubic-bezier(.4,0,.2,1);
}

/* ── 2. Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.admin-bar { --topbar-offset: 32px; }

a { color: var(--c-accent); text-decoration: none; transition: color var(--t-fast); }
a:hover { color: var(--c-secondary); }

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

h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--c-primary);
  letter-spacing: -.02em;
}

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

ul, ol { padding-left: 1.4em; }
ul li, ol li { margin-bottom: .35em; }

/* ── 3. Layout Utilities ───────────────────────────────────── */
.container       { max-width: var(--max-w);        margin: 0 auto; padding: 0 var(--sp-lg); }
.container-narrow{ max-width: var(--max-w-narrow);  margin: 0 auto; padding: 0 var(--sp-lg); }
.container-full  { width: 100%; padding: 0 var(--sp-lg); }

.site-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.site-main    { flex: 1; }

/* ── 4. Top Bar ────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-h);
  background: var(--c-primary-dark);
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.topbar-message {
  font-size: 12px;
  color: rgba(255,255,255,.6);
  letter-spacing: .03em;
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
}
.topbar-message::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--c-secondary);
  border-radius: 50%;
  flex-shrink: 0;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:.5; transform:scale(1.4); }
}
.topbar-links {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  list-style: none;
  padding: 0; margin: 0;
}
.topbar-links a {
  font-size: 12px;
  color: rgba(255,255,255,.55);
  letter-spacing: .03em;
  transition: color var(--t-fast);
}
.topbar-links a:hover { color: var(--c-secondary-light); }
.topbar-links .lang-btn {
  padding: 3px 10px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,.7);
  cursor: pointer;
  background: transparent;
  transition: all var(--t-fast);
}
.topbar-links .lang-btn:hover,
.topbar-links .lang-btn.active {
  background: var(--c-secondary);
  border-color: var(--c-secondary);
  color: var(--c-white);
}

/* ── 5. Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  background: var(--c-white);
  border-bottom: 1px solid var(--c-divider);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t-normal);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }
.admin-bar .site-header { top: 32px; }

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-xl);
  height: 100%;
}

/* Logo */
.site-branding { flex-shrink: 0; }
.site-branding a { display: flex; align-items: center; gap: 10px; }
.site-branding img { height: 44px; width: auto; }
.site-wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--c-primary);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -.03em;
}
.wordmark-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  color: #fff;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

/* Primary Nav */
.primary-nav { flex: 1; }
.primary-nav ul.menu {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
  list-style: none;
  margin: 0; padding: 0;
}
.primary-nav ul.menu > li > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text);
  transition: all var(--t-fast);
  white-space: nowrap;
}
.primary-nav ul.menu > li > a:hover,
.primary-nav ul.menu > li.current-menu-item > a,
.primary-nav ul.menu > li.current-menu-ancestor > a {
  background: var(--c-surface);
  color: var(--c-primary);
}
.nav-chevron { display: flex; transition: transform var(--t-fast); }
.primary-nav ul.menu > li:hover .nav-chevron { transform: rotate(180deg); }

/* Dropdown */
.primary-nav .sub-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 220px;
  background: var(--c-white);
  border: 1px solid var(--c-divider);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-sm);
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--t-normal);
  z-index: 100;
}
.primary-nav li.menu-item-has-children { position: relative; }
.primary-nav li.menu-item-has-children:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.primary-nav .sub-menu a {
  display: block;
  padding: 9px 14px;
  border-radius: var(--r-md);
  font-size: 14px;
  color: var(--c-text);
  transition: all var(--t-fast);
}
.primary-nav .sub-menu a:hover { background: var(--c-surface); color: var(--c-primary); }

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  flex-shrink: 0;
}
.header-search-btn {
  width: 38px; height: 38px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: none;
  cursor: pointer;
  color: var(--c-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--t-fast);
}
.header-search-btn:hover { border-color: var(--c-primary); color: var(--c-primary); }
.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: var(--c-secondary);
  color: var(--c-white) !important;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .01em;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.header-cta:hover { background: var(--c-secondary-light); transform: translateY(-1px); box-shadow: var(--shadow-gold); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  background: none;
  cursor: pointer;
  color: var(--c-text);
  margin-left: auto;
}

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8,15,23,.85);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 15vh;
  opacity: 0;
  visibility: hidden;
  transition: all var(--t-slow);
}
.search-overlay.open { opacity: 1; visibility: visible; }
.search-overlay-inner {
  width: 100%;
  max-width: 680px;
  padding: 0 var(--sp-lg);
  transform: translateY(-20px);
  transition: transform var(--t-slow);
}
.search-overlay.open .search-overlay-inner { transform: translateY(0); }
.search-overlay form { display: flex; gap: var(--sp-md); }
.search-overlay input[type="search"] {
  flex: 1;
  padding: 16px 20px;
  font-size: 18px;
  font-family: var(--font-body);
  border: 2px solid rgba(255,255,255,.2);
  border-radius: var(--r-lg);
  background: rgba(255,255,255,.1);
  color: var(--c-white);
  outline: none;
}
.search-overlay input::placeholder { color: rgba(255,255,255,.4); }
.search-overlay input:focus { border-color: var(--c-secondary); }
.search-overlay-close {
  position: absolute;
  top: var(--sp-xl);
  right: var(--sp-xl);
  width: 42px; height: 42px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: var(--r-md);
  color: var(--c-white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── 6. Hero Section ───────────────────────────────────────── */
.site-hero {
  position: relative;
  background: var(--c-primary);
  padding: var(--sp-3xl) 0 var(--sp-2xl);
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-image: var(--hero-image, none);
  background-size: cover;
  background-position: center;
  opacity: .18;
}
.hero-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(200,148,26,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(200,148,26,.06) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero-gradient {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  height: 200px;
  background: linear-gradient(to top, var(--c-primary), transparent);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}
.hero-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-secondary);
  margin-bottom: var(--sp-lg);
}
.hero-label::before {
  content: '';
  width: 28px; height: 2px;
  background: var(--c-secondary);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 800;
  color: var(--c-white);
  letter-spacing: -.03em;
  line-height: 1.08;
  margin-bottom: var(--sp-lg);
}
.hero-title em {
  font-style: normal;
  color: var(--c-secondary);
}
.hero-subtitle {
  font-size: 17px;
  color: rgba(255,255,255,.65);
  max-width: 560px;
  line-height: 1.6;
  margin-bottom: var(--sp-xl);
}
.hero-actions { display: flex; align-items: center; gap: var(--sp-md); flex-wrap: wrap; }
.hero-search {
  margin-top: var(--sp-xl);
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--r-xl);
  padding: 6px 6px 6px 20px;
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  max-width: 640px;
}
.hero-search input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: var(--font-body);
  color: var(--c-white);
}
.hero-search input::placeholder { color: rgba(255,255,255,.4); }
.hero-stats {
  display: flex;
  gap: var(--sp-xl);
  margin-top: var(--sp-2xl);
  flex-wrap: wrap;
}
.hero-stat-item { display: flex; flex-direction: column; gap: 2px; }
.hero-stat-num  { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--c-white); line-height: 1; }
.hero-stat-lbl  { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.45); }

/* ── 7. Breadcrumbs ────────────────────────────────────────── */
.breadcrumb-bar {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-divider);
  padding: 12px 0;
}
.breadcrumbs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  color: var(--c-muted);
}
.breadcrumbs a { color: var(--c-muted); }
.breadcrumbs a:hover { color: var(--c-secondary); }
.breadcrumbs .bc-sep { color: var(--c-border); font-size: 16px; }
.breadcrumbs span:last-child { color: var(--c-primary); font-weight: 500; }

/* ── 8. Page Header ────────────────────────────────────────── */
.page-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-divider);
  padding: var(--sp-xl) 0 var(--sp-lg);
}
.page-header-inner { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-lg); flex-wrap: wrap; }
.page-header-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 800;
  color: var(--c-primary);
  margin: 0;
}
.page-header-sub { font-size: 15px; color: var(--c-muted); margin-top: 6px; }

/* ── 9. Section Wrappers ───────────────────────────────────── */
.section         { padding: var(--sp-2xl) 0; }
.section-sm      { padding: var(--sp-xl) 0; }
.section-lg      { padding: var(--sp-3xl) 0; }
.section-surface { background: var(--c-surface); }
.section-primary { background: var(--c-primary); }
.section-dark    { background: var(--c-primary-dark); }

.section-header { margin-bottom: var(--sp-xl); }
.section-label {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-secondary);
  margin-bottom: var(--sp-sm);
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 800;
  color: var(--c-primary);
  letter-spacing: -.03em;
}
.section-title .accent { color: var(--c-secondary); }
.section-intro { font-size: 16px; color: var(--c-muted); max-width: 560px; margin-top: var(--sp-sm); line-height: 1.65; }

/* ── 10. Stat Bar (homepage) ───────────────────────────────── */
.stat-bar {
  background: var(--c-primary-dark);
  border-top: 1px solid rgba(255,255,255,.05);
  border-bottom: 3px solid var(--c-secondary);
}
.stat-bar-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stat-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--sp-lg) var(--sp-md);
  border-right: 1px solid rgba(255,255,255,.06);
}
.stat-bar-item:last-child { border-right: none; }
.stat-bar-num  { font-family: var(--font-display); font-size: 36px; font-weight: 800; color: var(--c-white); line-height: 1; }
.stat-bar-num  span { color: var(--c-secondary); }
.stat-bar-lbl  { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.4); margin-top: 4px; }

/* ── 11. Featured Sectors Strip ────────────────────────────── */
.sectors-strip {
  display: flex;
  gap: var(--sp-sm);
  overflow-x: auto;
  padding-bottom: var(--sp-sm);
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-wrap: nowrap;
}
.sectors-strip::-webkit-scrollbar { display: none; }
.sector-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--c-white);
  border: 1.5px solid var(--c-divider);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--t-fast);
  flex-shrink: 0;
}
.sector-chip:hover, .sector-chip.active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: var(--c-white);
}

/* ── 12. Company Cards ─────────────────────────────────────── */
.companies-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.companies-grid-4 { grid-template-columns: repeat(4, 1fr); }
.companies-grid-2 { grid-template-columns: repeat(2, 1fr); }

.company-card {
  background: var(--c-white);
  border: 1px solid var(--c-divider);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--t-normal), box-shadow var(--t-normal), border-color var(--t-normal);
  position: relative;
}
.company-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.company-card.is-featured {
  border-color: var(--c-secondary);
  box-shadow: 0 0 0 1px var(--c-secondary);
}
.company-card.is-premium {
  background: linear-gradient(145deg, #fff, var(--c-secondary-pale));
}
.featured-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  background: var(--c-secondary);
  color: var(--c-white);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: var(--r-pill);
}
.company-card-thumb {
  height: 150px;
  background: var(--c-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.company-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.company-card:hover .company-card-thumb img { transform: scale(1.04); }
.company-logo-placeholder {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  border-radius: var(--r-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 24px;
  color: var(--c-white);
  letter-spacing: -.02em;
}
.company-card-body { padding: 18px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.company-card-name {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  line-height: 1.25;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.company-card-name a { color: var(--c-primary); }
.company-card-name a:hover { color: var(--c-secondary); }
.company-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: rgba(23,167,99,.1);
  color: var(--c-success);
  flex-shrink: 0;
  margin-top: 1px;
}
.company-card-location {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--c-muted);
}
.company-card-location svg { flex-shrink: 0; }
.company-card-sectors {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.sector-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 3px 9px;
  background: rgba(42,83,128,.08);
  color: var(--c-accent);
  border-radius: var(--r-pill);
}
.company-card-excerpt { font-size: 13px; color: var(--c-muted); line-height: 1.5; flex: 1; }
.company-card-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--c-divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* ── 13. Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .01em;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--t-fast);
  white-space: nowrap;
}
.btn-primary { background: var(--c-primary); color: var(--c-white); }
.btn-primary:hover { background: var(--c-accent); color: var(--c-white); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-gold    { background: var(--c-secondary); color: var(--c-white); }
.btn-gold:hover { background: var(--c-secondary-light); color: var(--c-white); transform: translateY(-1px); box-shadow: var(--shadow-gold); }
.btn-outline { background: transparent; border: 1.5px solid var(--c-border); color: var(--c-text); }
.btn-outline:hover { border-color: var(--c-primary); background: var(--c-surface); color: var(--c-primary); }
.btn-outline-white { background: transparent; border: 1.5px solid rgba(255,255,255,.3); color: var(--c-white); }
.btn-outline-white:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); color: var(--c-white); }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 14px 32px; font-size: 16px; }
.btn-icon { padding: 10px; width: 40px; height: 40px; border-radius: var(--r-md); background: var(--c-surface); border: 1px solid var(--c-divider); color: var(--c-muted); }
.btn-icon:hover { background: var(--c-primary); color: var(--c-white); border-color: var(--c-primary); }

/* ── 14. Filter Bar ────────────────────────────────────────── */
.filter-bar {
  background: var(--c-white);
  border: 1px solid var(--c-divider);
  border-radius: var(--r-lg);
  padding: var(--sp-md) var(--sp-lg);
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--sp-xl);
}
.filter-bar-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); flex-shrink: 0; }
.filter-select {
  padding: 9px 14px;
  border: 1.5px solid var(--c-divider);
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--c-text);
  background: var(--c-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235e7080' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  padding-right: 32px;
  appearance: none;
  cursor: pointer;
  transition: border-color var(--t-fast);
}
.filter-select:focus { border-color: var(--c-primary); outline: none; }
.filter-search {
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--c-surface);
  border: 1.5px solid var(--c-divider);
  border-radius: var(--r-md);
  padding: 9px 14px;
  transition: border-color var(--t-fast);
}
.filter-search:focus-within { border-color: var(--c-primary); background: var(--c-white); }
.filter-search svg { color: var(--c-muted); flex-shrink: 0; }
.filter-search input { flex: 1; border: none; background: none; font-family: var(--font-body); font-size: 14px; outline: none; color: var(--c-text); }
.filter-search input::placeholder { color: var(--c-muted); }
.filter-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  padding: 9px 14px;
  border: 1.5px solid var(--c-divider);
  border-radius: var(--r-md);
  background: var(--c-white);
  color: var(--c-text);
  transition: all var(--t-fast);
}
.filter-toggle:has(input:checked),
.filter-toggle.active { border-color: var(--c-primary); background: rgba(42,83,128,.06); color: var(--c-primary); }
.filter-toggle input { display: none; }

/* ── 15. RFQ Cards ─────────────────────────────────────────── */
.rfq-grid { display: grid; gap: var(--sp-md); }
.rfq-card {
  background: var(--c-white);
  border: 1px solid var(--c-divider);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--sp-md);
  align-items: start;
  transition: box-shadow var(--t-normal), border-color var(--t-normal);
}
.rfq-card:hover { box-shadow: var(--shadow-md); border-color: var(--c-secondary); }
.rfq-card-content { display: flex; flex-direction: column; gap: 8px; }
.rfq-card-title { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: var(--c-primary); }
.rfq-card-desc  { font-size: 13px; color: var(--c-muted); line-height: 1.55; }
.rfq-card-meta  { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--c-muted); }
.rfq-meta-item  { display: flex; align-items: center; gap: 4px; }
.rfq-budget     { font-weight: 700; color: var(--c-success); font-size: 13px; }
.rfq-deadline   { font-weight: 600; color: var(--c-warning); }
.rfq-badge-count {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: var(--c-surface);
  border: 1px solid var(--c-divider);
  border-radius: var(--r-md);
  padding: var(--sp-md) var(--sp-lg);
  min-width: 80px;
}
.rfq-count-num { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: var(--c-primary); line-height: 1; }
.rfq-count-lbl { font-size: 10px; letter-spacing: .06em; text-transform: uppercase; color: var(--c-muted); }

/* ── 16. Company Single Profile ────────────────────────────── */
.company-profile { padding: var(--sp-2xl) 0; }
.company-profile-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--sp-xl);
  align-items: start;
}
.company-profile-main { min-width: 0; }
.company-profile-sidebar { position: sticky; top: calc(var(--header-h) + var(--sp-xl)); }

.company-hero-banner {
  height: 280px;
  background: var(--c-surface);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--sp-xl);
  position: relative;
}
.company-hero-banner img { width: 100%; height: 100%; object-fit: cover; }
.company-hero-banner .company-cover-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,15,23,.7) 0%, transparent 60%);
}
.company-identity {
  display: flex;
  align-items: flex-end;
  gap: var(--sp-lg);
  margin-bottom: var(--sp-xl);
}
.company-logo-large {
  width: 100px;
  height: 100px;
  border-radius: var(--r-lg);
  border: 3px solid var(--c-white);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  background: var(--c-surface);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -50px;
  position: relative;
  z-index: 2;
}
.company-logo-large img { width: 100%; height: 100%; object-fit: cover; }
.company-logo-large .placeholder {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  color: var(--c-primary);
}
.company-identity-text h1 {
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 800;
  color: var(--c-primary);
  margin-bottom: 6px;
}
.company-identity-meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-md); }

.profile-section { margin-bottom: var(--sp-xl); }
.profile-section-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--c-primary);
  border-bottom: 2px solid var(--c-secondary);
  padding-bottom: 10px;
  margin-bottom: var(--sp-md);
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--sp-md);
}
.info-item { display: flex; flex-direction: column; gap: 3px; }
.info-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--c-muted); }
.info-value { font-size: 14px; font-weight: 500; color: var(--c-text); }
.info-value a { color: var(--c-accent); }
.info-value a:hover { color: var(--c-secondary); }

.clients-list { display: flex; flex-wrap: wrap; gap: 8px; }
.client-chip {
  padding: 6px 14px;
  background: var(--c-surface);
  border: 1px solid var(--c-divider);
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  color: var(--c-text);
}

/* Sidebar card */
.sidebar-card {
  background: var(--c-white);
  border: 1px solid var(--c-divider);
  border-radius: var(--r-lg);
  overflow: hidden;
  margin-bottom: var(--sp-md);
}
.sidebar-card-header {
  background: var(--c-primary);
  padding: var(--sp-md) var(--sp-lg);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--c-white);
  letter-spacing: .01em;
}
.sidebar-card-body { padding: var(--sp-lg); }
.contact-list { list-style: none; padding: 0; margin: 0 0 var(--sp-md); display: flex; flex-direction: column; gap: 12px; }
.contact-item { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--c-text); }
.contact-item svg { color: var(--c-secondary); flex-shrink: 0; }
.contact-item a { color: var(--c-text); font-weight: 500; }
.contact-item a:hover { color: var(--c-secondary); }

/* ── 17. Forms ─────────────────────────────────────────────── */
.theme-form { max-width: 800px; }
.form-section {
  background: var(--c-white);
  border: 1px solid var(--c-divider);
  border-radius: var(--r-lg);
  padding: var(--sp-xl);
  margin-bottom: var(--sp-lg);
}
.form-section-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--c-primary);
  margin-bottom: var(--sp-lg);
  padding-bottom: var(--sp-md);
  border-bottom: 1px solid var(--c-divider);
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-md); }
.form-grid-3 { grid-template-columns: repeat(3, 1fr); }
.form-col-full { grid-column: 1 / -1; }

.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
  letter-spacing: .01em;
}
.form-label .required { color: var(--c-danger); margin-left: 2px; }
.form-input,
.form-select,
.form-textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--c-divider);
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--c-text);
  background: var(--c-white);
  transition: all var(--t-fast);
  width: 100%;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--c-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(42,83,128,.1);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-hint { font-size: 12px; color: var(--c-muted); }
.form-message {
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-message.success { background: rgba(23,167,99,.1); color: #0d7a50; border: 1px solid rgba(23,167,99,.3); }
.form-message.error   { background: rgba(214,59,59,.08); color: #b33030; border: 1px solid rgba(214,59,59,.25); }
.form-checkbox-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.checkbox-item { display: flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.checkbox-item input[type="checkbox"] { accent-color: var(--c-primary); width: 16px; height: 16px; cursor: pointer; }

/* ── 18. Pagination ────────────────────────────────────────── */
.theme-pagination { display: flex; justify-content: center; margin-top: var(--sp-2xl); }
.theme-pagination ul.page-numbers {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  padding: 0; margin: 0;
}
.theme-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 var(--sp-md);
  border: 1.5px solid var(--c-divider);
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text);
  transition: all var(--t-fast);
}
.theme-pagination .page-numbers:hover,
.theme-pagination .page-numbers.current {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: var(--c-white);
}
.theme-pagination .page-numbers.dots { border-color: transparent; background: none; }

/* ── 19. No Results / Empty State ──────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--sp-3xl) var(--sp-lg);
  grid-column: 1 / -1;
}
.empty-state-icon { font-size: 48px; margin-bottom: var(--sp-md); opacity: .4; }
.empty-state h3 { font-size: 20px; color: var(--c-primary); margin-bottom: var(--sp-sm); }
.empty-state p   { color: var(--c-muted); max-width: 400px; margin: 0 auto; }

/* ── 20. CTA Banner ────────────────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--c-primary) 0%, var(--c-accent) 100%);
  border-radius: var(--r-xl);
  padding: var(--sp-2xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-xl);
  flex-wrap: wrap;
  overflow: hidden;
  position: relative;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: rgba(200,148,26,.12);
  pointer-events: none;
}
.cta-banner-text h2 { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--c-white); margin-bottom: 8px; }
.cta-banner-text p  { color: rgba(255,255,255,.65); font-size: 15px; margin: 0; }
.cta-banner-actions { display: flex; gap: var(--sp-md); flex-shrink: 0; flex-wrap: wrap; }

/* ── 21. Footer ────────────────────────────────────────────── */
.site-footer { background: var(--c-primary-dark); color: rgba(255,255,255,.7); }
.footer-main { padding: var(--sp-2xl) 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.8fr 1fr 1fr 1fr;
  gap: var(--sp-2xl);
}
.footer-brand .site-wordmark { color: var(--c-white); }
.footer-tagline { font-size: 14px; color: rgba(255,255,255,.5); margin-top: var(--sp-md); margin-bottom: var(--sp-lg); line-height: 1.6; max-width: 280px; }
.footer-social { display: flex; gap: var(--sp-sm); }
.footer-social a {
  width: 36px; height: 36px;
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.5);
  font-size: 14px;
  transition: all var(--t-fast);
}
.footer-social a:hover { border-color: var(--c-secondary); color: var(--c-secondary); background: rgba(200,148,26,.1); }

.footer-col-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-white);
  margin-bottom: var(--sp-md);
}
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-links a {
  font-size: 14px;
  color: rgba(255,255,255,.5);
  transition: color var(--t-fast);
}
.footer-links a:hover { color: var(--c-secondary-light); }

.footer-stats-bar {
  background: rgba(0,0,0,.3);
  padding: var(--sp-lg) 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.footer-stats-inner {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-2xl);
  flex-wrap: wrap;
}
.footer-stat { text-align: center; }
.footer-stat-num { font-family: var(--font-display); font-size: 24px; font-weight: 800; color: var(--c-white); line-height: 1; }
.footer-stat-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.35); margin-top: 4px; }
.footer-stat-sep { width: 1px; height: 32px; background: rgba(255,255,255,.1); }

.footer-bottom {
  padding: var(--sp-md) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-md);
  flex-wrap: wrap;
}
.footer-copyright { font-size: 12px; color: rgba(255,255,255,.3); }
.footer-legal { display: flex; gap: var(--sp-lg); }
.footer-legal a { font-size: 12px; color: rgba(255,255,255,.3); }
.footer-legal a:hover { color: rgba(255,255,255,.6); }

/* ── 22. Sidebar & Widgets ─────────────────────────────────── */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--sp-xl);
  align-items: start;
}
.sidebar { position: sticky; top: calc(var(--header-h) + var(--sp-lg)); }
.widget {
  background: var(--c-white);
  border: 1px solid var(--c-divider);
  border-radius: var(--r-lg);
  padding: var(--sp-lg);
  margin-bottom: var(--sp-md);
}
.widget-title {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--c-primary);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: var(--sp-md);
  padding-bottom: var(--sp-sm);
  border-bottom: 2px solid var(--c-secondary);
}

/* ── 23. Verification Badge Levels (color overrides) ──────── */
.badge-level-0 { color: var(--c-muted) !important; background: var(--c-surface) !important; }
.badge-level-1 { color: var(--c-success) !important; background: rgba(23,167,99,.1) !important; }
.badge-level-2 { color: var(--c-info) !important; background: rgba(42,122,175,.1) !important; }
.badge-level-3 { color: var(--c-warning) !important; background: rgba(224,138,18,.1) !important; }
.badge-level-4 { color: #8b5cf6 !important; background: rgba(139,92,246,.1) !important; }

/* ── 24. Loading / Skeleton ────────────────────────────────── */
.skeleton { background: linear-gradient(90deg, var(--c-surface) 25%, var(--c-surface-2) 50%, var(--c-surface) 75%); background-size: 200% 100%; animation: skeleton-shimmer 1.5s infinite; border-radius: var(--r-md); }
@keyframes skeleton-shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }
.loading-spinner {
  display: inline-block;
  width: 24px; height: 24px;
  border: 3px solid var(--c-divider);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-overlay { display: flex; flex-direction: column; align-items: center; gap: var(--sp-md); padding: var(--sp-2xl); color: var(--c-muted); font-size: 14px; }

/* ── 25. Mobile Nav ────────────────────────────────────────── */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 900;
  pointer-events: none;
}
.mobile-nav-overlay {
  position: absolute;
  inset: 0;
  background: rgba(8,15,23,.6);
  opacity: 0;
  transition: opacity var(--t-slow);
}
.mobile-nav-panel {
  position: absolute;
  top: 0; left: 0;
  width: min(320px, 90vw);
  height: 100%;
  background: var(--c-white);
  box-shadow: var(--shadow-lg);
  transform: translateX(-100%);
  transition: transform var(--t-slow);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.mobile-nav.open { pointer-events: all; }
.mobile-nav.open .mobile-nav-overlay { opacity: 1; }
.mobile-nav.open .mobile-nav-panel   { transform: translateX(0); }
.mobile-nav-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-md) var(--sp-lg);
  border-bottom: 1px solid var(--c-divider);
}
.mobile-nav-close {
  width: 36px; height: 36px;
  border: 1px solid var(--c-divider);
  border-radius: var(--r-md);
  background: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-text);
}
.mobile-nav-menu {
  list-style: none;
  padding: var(--sp-md) 0;
  margin: 0;
  flex: 1;
}
.mobile-nav-menu > li > a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px var(--sp-lg);
  font-size: 15px;
  font-weight: 500;
  color: var(--c-text);
  border-bottom: 1px solid var(--c-divider);
  transition: color var(--t-fast);
}
.mobile-nav-menu > li > a:hover { color: var(--c-secondary); }
.mobile-nav-footer { padding: var(--sp-lg); border-top: 1px solid var(--c-divider); }

/* ── 26. Back to Top ───────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: var(--sp-lg);
  right: var(--sp-lg);
  width: 44px; height: 44px;
  background: var(--c-primary);
  color: var(--c-white);
  border-radius: var(--r-md);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all var(--t-normal);
  z-index: 500;
  box-shadow: var(--shadow-md);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover   { background: var(--c-secondary); transform: translateY(-2px); }

/* ── 27. Notices ───────────────────────────────────────────── */
.theme-notice {
  padding: 14px 18px;
  border-radius: var(--r-md);
  border-left: 4px solid;
  font-size: 14px;
  line-height: 1.5;
  margin-bottom: var(--sp-md);
}
.theme-notice.notice-info    { background: rgba(42,122,175,.08); border-color: var(--c-info);    color: #1a4f6e; }
.theme-notice.notice-success { background: rgba(23,167,99,.08);  border-color: var(--c-success); color: #0d5c35; }
.theme-notice.notice-warning { background: rgba(224,138,18,.08); border-color: var(--c-warning); color: #7a4b00; }
.theme-notice.notice-error   { background: rgba(214,59,59,.08);  border-color: var(--c-danger);  color: #7a1515; }

/* ── 28. Page-specific layouts ─────────────────────────────── */
.entry-content { max-width: 760px; }
.entry-content h2 { font-size: 26px; margin: var(--sp-xl) 0 var(--sp-md); }
.entry-content h3 { font-size: 20px; margin: var(--sp-lg) 0 var(--sp-sm); }
.entry-content p  { line-height: 1.75; color: #2c3e50; }
.entry-content img { border-radius: var(--r-lg); margin: var(--sp-lg) 0; }
.entry-content blockquote {
  margin: var(--sp-xl) 0;
  padding: var(--sp-lg) var(--sp-xl);
  border-left: 4px solid var(--c-secondary);
  background: var(--c-secondary-pale);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-style: italic;
  color: var(--c-muted);
}

/* 404 page */
.error-404-wrap { text-align: center; padding: var(--sp-3xl) 0; }
.error-404-code { font-family: var(--font-display); font-size: 120px; font-weight: 800; line-height: 1; color: var(--c-divider); letter-spacing: -.06em; }
.error-404-title { font-size: 32px; margin-bottom: var(--sp-md); }
.error-404-text  { color: var(--c-muted); max-width: 420px; margin: 0 auto var(--sp-xl); }

/* ── 29. Responsive ────────────────────────────────────────── */
@media (max-width: 1100px) {
  .companies-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid    { grid-template-columns: 1fr 1fr; gap: var(--sp-xl); }
  .stat-bar-inner { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
  .primary-nav { display: none; }
  .menu-toggle { display: flex; }
  .company-profile-grid { grid-template-columns: 1fr; }
  .company-profile-sidebar { position: static; }
  .content-with-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .hero-stats { gap: var(--sp-lg); }
  .cta-banner { flex-direction: column; text-align: center; }
  .cta-banner-actions { justify-content: center; }
}

@media (max-width: 700px) {
  :root {
    --sp-2xl: 40px;
    --sp-3xl: 60px;
  }
  .companies-grid, .companies-grid-4 { grid-template-columns: 1fr; }
  .topbar-message { display: none; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-lg); }
  .stat-bar-inner { grid-template-columns: repeat(2, 1fr); }
  .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
  .rfq-card { grid-template-columns: 1fr; }
  .footer-stats-inner { gap: var(--sp-lg); }
  .footer-stat-sep { display: none; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-search { min-width: unset; }
  .header-cta { display: none; }
}

@media (max-width: 480px) {
  .container { padding: 0 var(--sp-md); }
  .site-hero  { padding: var(--sp-2xl) 0; }
  .hero-title { font-size: 28px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .topbar { display: none; }
}

/* ── 30. RTL overrides ─────────────────────────────────────── */
.rtl, [dir="rtl"] {
  direction: rtl;
  font-family: 'Noto Kufi Arabic', var(--font-body), sans-serif;
}
[dir="rtl"] .filter-bar     { flex-direction: row-reverse; }
[dir="rtl"] .hero-label::before { margin-right: 0; margin-left: 0; order: 1; }
[dir="rtl"] .company-card-footer { flex-direction: row-reverse; }
[dir="rtl"] .footer-grid    { direction: rtl; }
[dir="rtl"] .breadcrumbs    { flex-direction: row-reverse; }
[dir="rtl"] .theme-notice   { border-left: none; border-right: 4px solid; }

/* ── 31. Print ─────────────────────────────────────────────── */
@media print {
  .topbar, .site-header, .mobile-nav, .back-to-top, .filter-bar, .site-footer { display: none !important; }
  .container { max-width: 100%; }
  a::after { content: " (" attr(href) ")"; font-size: 11px; }
}

/* ══════════════════════════════════════════════════════════════
   SECTOR ICON GRID  (homepage & archive)
   ══════════════════════════════════════════════════════════════ */

.sector-icon-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
}

@media (max-width: 1100px) { .sector-icon-grid { grid-template-columns: repeat(4,1fr); } }
@media (max-width: 800px)  { .sector-icon-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 560px)  { .sector-icon-grid { grid-template-columns: repeat(2,1fr); gap:10px; } }

.sector-icon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 12px 20px;
  background: var(--sector-bg, var(--c-surface));
  border: 1.5px solid color-mix(in srgb, var(--sector-color, var(--c-primary)) 15%, transparent);
  border-radius: var(--r-lg);
  text-decoration: none;
  text-align: center;
  transition: transform var(--t-normal), box-shadow var(--t-normal), border-color var(--t-normal);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.sector-icon-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--sector-color, var(--c-primary));
  opacity: 0;
  transition: opacity var(--t-normal);
}

.sector-icon-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
  border-color: var(--sector-color, var(--c-primary));
}

.sector-icon-card:hover::before { opacity: .06; }

.sector-icon-emoji {
  font-size: 36px;
  line-height: 1;
  position: relative;
  z-index: 1;
  transition: transform var(--t-normal);
}
.sector-icon-card:hover .sector-icon-emoji { transform: scale(1.2); }

.sector-icon-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--sector-color, var(--c-primary));
  line-height: 1.3;
  position: relative;
  z-index: 1;
}

.sector-icon-count {
  font-size: 11px;
  color: var(--c-muted);
  background: rgba(255,255,255,.7);
  border-radius: var(--r-pill);
  padding: 2px 8px;
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════════════════════════════════════
   EMIRATE GRID  (homepage)
   ══════════════════════════════════════════════════════════════ */

.emirate-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 12px;
}

@media (max-width: 900px) { .emirate-grid { grid-template-columns: repeat(4,1fr); } }
@media (max-width: 560px) { .emirate-grid { grid-template-columns: repeat(3,1fr); gap:8px; } }

.emirate-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 8px 14px;
  background: var(--c-white);
  border: 1.5px solid var(--c-divider);
  border-radius: var(--r-lg);
  text-decoration: none;
  text-align: center;
  transition: all var(--t-normal);
  border-top: 3px solid var(--em-color, var(--c-primary));
}

.emirate-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--em-color, var(--c-primary));
}

.emirate-icon  { font-size: 26px; line-height: 1; }
.emirate-name  { font-size: 12px; font-weight: 700; color: var(--c-primary); line-height: 1.2; }
.emirate-count { font-size: 10px; color: var(--c-muted); }

/* ══════════════════════════════════════════════════════════════
   PROJECT GALLERY  (single company profile)
   ══════════════════════════════════════════════════════════════ */

.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: var(--sp-md);
}

@media (max-width: 700px) { .project-gallery-grid { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 400px) { .project-gallery-grid { grid-template-columns: 1fr; } }

.project-gallery-item {
  display: block;
  border-radius: var(--r-md);
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--c-surface);
  position: relative;
  text-decoration: none;
}

.project-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--t-slow);
}

.project-gallery-item:hover img { transform: scale(1.06); }

.project-gallery-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(8,15,23,.8), transparent);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 20px 10px 8px;
  opacity: 0;
  transition: opacity var(--t-normal);
}

.project-gallery-item:hover .project-gallery-caption { opacity: 1; }

/* ══════════════════════════════════════════════════════════════
   PORTAL / DASHBOARD  (when theme wraps plugin shortcodes)
   ══════════════════════════════════════════════════════════════ */

/* Ensure plugin's container has enough breathing room */
.ucd-portal-wrap,
.ucd-dashboard {
  padding-top: var(--sp-xl);
  padding-bottom: var(--sp-2xl);
}

/* Dashboard in full-width page template */
.site-main > .ucd-dashboard {
  padding-left: var(--sp-lg);
  padding-right: var(--sp-lg);
}

/* ══════════════════════════════════════════════════════════════
   MISC FIXES & REFINEMENTS
   ══════════════════════════════════════════════════════════════ */

/* Sector tags on company card with colour-aware styles */
.sector-tag {
  transition: opacity var(--t-fast);
  white-space: nowrap;
}
.sector-tag:hover { opacity: .8; }

/* Stat bar — allow 15+ sectors count instead of RFQ count */
.stat-bar-inner.stat-bar-4 { grid-template-columns: repeat(4,1fr); }

/* RFQ form injected by plugin on single pages */
.ucd-rfq-form-wrap {
  margin-top: var(--sp-2xl);
  border-radius: var(--r-xl) !important;
}

/* Remove the old RFQ board archive styles (no longer needed in v2) */
/* They remain in the file but the template archive-ucd_rfq.php is now
   a 301-redirect page */

/* ══════════════════════════════════════════════════════
   COMPANY PROFILE — RFQ INLINE FORM
   ══════════════════════════════════════════════════════ */

/* Profile section spacing */
.company-sector-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--sp-xl);
}
.company-sector-tags .sector-tag {
  font-size: 13px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  text-decoration: none;
  transition: opacity var(--t-fast);
}
.company-sector-tags .sector-tag:hover { opacity: .8; }

.identity-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--c-muted);
}

/* Company hero placeholder */
.company-hero-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--c-primary), var(--c-accent));
  display: flex;
  align-items: center;
  justify-content: center;
}
.company-hero-placeholder span {
  font-family: var(--font-display);
  font-size: 80px;
  font-weight: 800;
  color: rgba(255,255,255,.12);
  letter-spacing: -.04em;
}

/* Verification badge display */
.verification-badge-display {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--sp-md);
  background: var(--c-surface);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-sm);
}
.vbd-icon { font-size: 28px; line-height: 1; }

/* Quick facts list in sidebar */
.quick-facts-list { display: flex; flex-direction: column; gap: 0; }
.quick-fact-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--c-divider);
  font-size: 13px;
}
.quick-fact-row:last-child { border-bottom: none; }
.qf-label { color: var(--c-muted); }
.qf-value  { color: var(--c-text); }

/* Sidebar actions stack */
.sidebar-actions { display: flex; flex-direction: column; gap: 8px; }

/* Similar company rows */
.similar-company-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--c-divider);
  text-decoration: none;
  transition: background var(--t-fast);
}
.similar-company-row:hover { background: var(--c-surface); }
.similar-company-row:last-child { border-bottom: none; }
.sc-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  object-fit: cover;
  flex-shrink: 0;
}
.sc-logo-placeholder {
  background: var(--c-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.sc-info { min-width: 0; }
.sc-name   { font-size: 13px; font-weight: 600; color: var(--c-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-emirate{ font-size: 11px; color: var(--c-muted); }

/* ── RFQ Form Section ─────────────────────────────── */
.profile-rfq-section {
  background: linear-gradient(135deg, #f8f9fb 0%, #fff 100%);
  border: 2px solid var(--c-secondary);
  border-radius: var(--r-xl);
  padding: var(--sp-xl) var(--sp-xl) var(--sp-lg);
  margin-top: var(--sp-xl);
  position: relative;
  overflow: hidden;
}

.profile-rfq-section::before {
  content: '📩';
  position: absolute;
  right: -20px;
  top: -20px;
  font-size: 100px;
  opacity: .04;
  line-height: 1;
  pointer-events: none;
}

.profile-rfq-section .profile-section-title {
  color: var(--c-primary);
  border-bottom-color: var(--c-secondary);
  font-size: 18px;
}

.profile-rfq-intro {
  font-size: 14px;
  color: var(--c-muted);
  margin-bottom: var(--sp-lg);
  line-height: 1.6;
}

/* RFQ form grid */
.rfq-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: var(--sp-lg);
}

.rfq-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rfq-field-full {
  grid-column: 1 / -1;
}

.rfq-field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--c-text);
}

.rfq-req {
  color: var(--c-danger);
  margin-left: 2px;
}

.rfq-field input,
.rfq-field select,
.rfq-field textarea {
  padding: 11px 13px;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--c-text);
  background: var(--c-white);
  width: 100%;
  transition: all var(--t-fast);
}

.rfq-field input:focus,
.rfq-field select:focus,
.rfq-field textarea:focus {
  border-color: var(--c-secondary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(200,148,26,.12);
}

.rfq-field textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.6;
}

/* Contact divider */
.rfq-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--c-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.rfq-divider::before,
.rfq-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--c-divider);
}

/* Form message */
.rfq-form-message {
  padding: 12px 16px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: var(--sp-md);
}
.rfq-form-message.success {
  background: rgba(23,167,99,.1);
  color: #0d5c35;
  border: 1px solid rgba(23,167,99,.3);
}
.rfq-form-message.error {
  background: rgba(214,59,59,.08);
  color: #8b1515;
  border: 1px solid rgba(214,59,59,.25);
}

/* Submit row */
.rfq-form-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-lg);
  flex-wrap: wrap;
}

.rfq-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
  justify-content: center;
}

.rfq-privacy-note {
  font-size: 12px;
  color: var(--c-muted);
  line-height: 1.5;
  max-width: 340px;
  margin: 0;
}

/* Success state — hide form after submission */
.theme-rfq-form.is-submitted .rfq-form-grid,
.theme-rfq-form.is-submitted .rfq-form-actions,
.theme-rfq-form.is-submitted .rfq-divider { display: none; }

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 700px) {
  .rfq-form-grid { grid-template-columns: 1fr; }
  .rfq-field-full { grid-column: 1; }
  .rfq-form-actions { flex-direction: column; align-items: flex-start; }
  .rfq-submit-btn { width: 100%; }
  .profile-rfq-section { padding: var(--sp-lg); }
}

/* ══════════════════════════════════════════════════════════════
   TAXONOMY PAGE HEADERS (sector & emirate full-width pages)
   ══════════════════════════════════════════════════════════════ */

.tax-page-header {
    padding: 32px 0;
    border-bottom: 3px solid var(--c-secondary);
}
.tax-page-header-inner {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}
.tph-icon {
    font-size: 56px;
    line-height: 1;
    flex-shrink: 0;
}
.tph-info { flex: 1; min-width: 0; }
.tph-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--c-muted);
    margin-bottom: 4px;
}
.tph-title {
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 800;
    margin: 0 0 6px;
    line-height: 1.15;
    font-family: var(--font-display);
}
.tph-desc {
    font-size: 14px;
    color: var(--c-muted);
    margin: 0 0 4px;
    line-height: 1.5;
}
.tph-count {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-muted);
}
.tph-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
}
@media (max-width: 600px) {
    .tph-actions { width: 100%; }
    .tph-icon    { font-size: 40px; }
}

/* Content area for taxonomy archive pages */
.tax-archive-content {
    padding: var(--sp-xl) 0;
}
.tax-archive-content .ucd-container {
    padding-top: 0;
}

/* ══════════════════════════════════════════════════════════════
   SECTORS INDEX PAGE (/sectors/)
   ══════════════════════════════════════════════════════════════ */

.page-header-sectors .page-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-lg);
    flex-wrap: wrap;
}
.sector-index-stats {
    display: flex;
    gap: 32px;
    justify-content: center;
    padding: var(--sp-lg) 0 var(--sp-xl);
    border-bottom: 1px solid var(--c-divider);
    margin-bottom: var(--sp-xl);
}
.sis-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}
.sis-num {
    font-size: 32px;
    font-weight: 800;
    color: var(--c-primary);
    font-family: var(--font-display);
    line-height: 1;
}
.sis-lbl {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--c-muted);
    font-weight: 600;
}
.sector-icon-grid-lg {
    grid-template-columns: repeat(5, 1fr) !important;
}
@media (max-width: 1100px) { .sector-icon-grid-lg { grid-template-columns: repeat(4,1fr) !important; } }
@media (max-width:  800px) { .sector-icon-grid-lg { grid-template-columns: repeat(3,1fr) !important; } }
@media (max-width:  560px) { .sector-icon-grid-lg { grid-template-columns: repeat(2,1fr) !important; gap: 10px !important; } }

/* ══════════════════════════════════════════════════════════════
   EMIRATES INDEX PAGE (/emirates/)
   ══════════════════════════════════════════════════════════════ */

.emirate-index-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: var(--sp-xl);
}
@media (max-width: 900px) { .emirate-index-grid { grid-template-columns: repeat(3,1fr); } }
@media (max-width: 600px) { .emirate-index-grid { grid-template-columns: repeat(2,1fr); gap: 10px; } }

.emirate-index-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 18px;
    background: var(--em-bg, var(--c-surface));
    border: 1.5px solid transparent;
    border-top: 4px solid var(--em-color, var(--c-primary));
    border-radius: var(--r-lg);
    text-decoration: none;
    transition: transform var(--t-normal), box-shadow var(--t-normal), border-color var(--t-normal);
    position: relative;
}
.emirate-index-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-left-color: var(--em-color, var(--c-primary));
    border-right-color: var(--em-color, var(--c-primary));
    border-bottom-color: var(--em-color, var(--c-primary));
}
.eic-icon  { font-size: 30px; line-height: 1; flex-shrink: 0; }
.eic-body  { flex: 1; min-width: 0; }
.eic-name  { font-size: 15px; font-weight: 800; color: var(--em-color, var(--c-primary)); margin-bottom: 2px; }
.eic-desc  { font-size: 11px; color: var(--c-muted); line-height: 1.4; margin-bottom: 3px; }
.eic-count { font-size: 11px; color: var(--c-muted); font-weight: 600; }
.eic-arrow {
    font-size: 16px;
    color: var(--em-color, var(--c-primary));
    opacity: .3;
    flex-shrink: 0;
    transition: opacity var(--t-fast), transform var(--t-fast);
}
.emirate-index-card:hover .eic-arrow { opacity: .8; transform: translateX(3px); }

/* ══════════════════════════════════════════════════════════════
   COMPANY PROFILE — INLINE RFQ FORM (full replacement)
   ══════════════════════════════════════════════════════════════ */

.profile-rfq-section {
    background: linear-gradient(135deg, #f8fafc 0%, #eef2f8 100%);
    border: 2px solid var(--c-divider);
    border-radius: var(--r-xl);
    padding: var(--sp-xl) var(--sp-2xl);
    margin-top: var(--sp-2xl);
    position: relative;
    overflow: hidden;
}
.profile-rfq-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--c-secondary), var(--c-primary));
}
.profile-rfq-section .profile-section-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--c-primary);
    margin: 0 0 6px;
    padding-bottom: 0;
    border-bottom: none;
}
.profile-rfq-intro {
    font-size: 14px;
    color: var(--c-muted);
    margin: 0 0 var(--sp-lg);
    line-height: 1.6;
}

/* Form grid */
.rfq-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: var(--sp-md);
}
.rfq-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.rfq-field-full {
    grid-column: 1 / -1;
}
.rfq-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--c-text);
}
.rfq-req { color: var(--c-danger, #d63b3b); margin-left: 2px; }
.rfq-field input,
.rfq-field select,
.rfq-field textarea {
    padding: 10px 13px;
    border: 1.5px solid var(--c-divider);
    border-radius: var(--r-md);
    font-size: 14px;
    font-family: inherit;
    color: var(--c-text);
    background: var(--c-white);
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    width: 100%;
    box-sizing: border-box;
}
.rfq-field input:focus,
.rfq-field select:focus,
.rfq-field textarea:focus {
    border-color: var(--c-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(13,33,55,.08);
}
.rfq-field textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

/* Divider between form sections */
.rfq-divider {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--c-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: 4px 0;
}
.rfq-divider::before,
.rfq-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--c-divider);
}

/* Messages */
.rfq-form-message {
    padding: 13px 16px;
    border-radius: var(--r-md);
    font-size: 14px;
    margin-top: var(--sp-md);
    line-height: 1.55;
}
.rfq-form-message.success {
    background: rgba(23,167,99,.08);
    border: 1px solid rgba(23,167,99,.3);
    color: #0d5c35;
}
.rfq-form-message.error {
    background: rgba(214,59,59,.06);
    border: 1px solid rgba(214,59,59,.25);
    color: #8b1515;
}

/* Submit row */
.rfq-form-actions {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    margin-top: var(--sp-lg);
    padding-top: var(--sp-md);
    border-top: 1px solid var(--c-divider);
    flex-wrap: wrap;
}
.rfq-submit-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    font-size: 15px;
    font-weight: 700;
    border-radius: var(--r-md);
    cursor: pointer;
    border: none;
    transition: all var(--t-normal);
}
.rfq-submit-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.rfq-privacy-note {
    font-size: 12px;
    color: var(--c-muted);
    line-height: 1.5;
    max-width: 320px;
    margin: 0;
}

/* Submitted state */
.theme-rfq-form.is-submitted .rfq-form-grid,
.theme-rfq-form.is-submitted .rfq-form-actions,
.theme-rfq-form.is-submitted .rfq-divider { display: none; }

/* Responsive */
@media (max-width: 700px) {
    .rfq-form-grid          { grid-template-columns: 1fr; }
    .rfq-field-full         { grid-column: 1; }
    .rfq-form-actions       { flex-direction: column; align-items: flex-start; }
    .rfq-submit-btn         { width: 100%; justify-content: center; }
    .profile-rfq-section    { padding: var(--sp-lg); }
}
