/* ═══════════════════════════════════════════════════════════════
   FOGS CONSULTANTS — UNIFIED PLATFORM BRAND SYSTEM
   File: /css/platform-brand.css
   Reusable branding component for all 18 FOGS platforms.
   Guarantees 100% responsive safety, zero CLS, zero navbar overlap.
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Official Platform Brand Colors */
  --pbrand-fogs:        #2563eb; /* 🔵 Royal Blue */
  --pbrand-hr:          #1d4ed8; /* 🔵 Corporate Blue */
  --pbrand-hire:        #4f46e5; /* 🟣 Indigo */
  --pbrand-payroll:     #06b6d4; /* 🔷 Teal / Cyan */
  --pbrand-epf:         #10b981; /* 🟢 Emerald Green */
  --pbrand-talent:      #7c3aed; /* 🟪 Purple / Violet */
  --pbrand-legal:       #d97706; /* 🟨 Warm Gold */
  --pbrand-saantvana:   #e11d48; /* 🩷 Rose / Pink */
  --pbrand-training:    #ea580c; /* 🟧 Vibrant Orange */
  --pbrand-expert:      #0284c7; /* 🟦 Sky Blue / Azure */
  --pbrand-marinex:     #0f3a5d; /* ⚓ Deep Navy / Ocean */
  --pbrand-fogsbooks:   #059669; /* 🟩 Forest Green */
  --pbrand-compliance:  #dc2626; /* 🟥 Crimson Red */
  --pbrand-ccms:        #dc2626; /* 🟥 Crimson Red (alias) */
  --pbrand-insight:     #2563eb; /* 🔵 Electric Blue */
  --pbrand-it:          #4338ca; /* 🟦 Deep Violet-Blue */
  --pbrand-business:    #f59e0b; /* 🟨 Amber Gold */
  --pbrand-wellness:    #0d9488; /* 🌿 Jade / Mint */
  --pbrand-esic:        #0891b2; /* 🌊 Turquoise */
}

/* ── Base Platform Brand Link / Container ── */
.platform-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  max-width: 100%;
  min-width: 0;
  line-height: 1;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

/* ── 3D Winged Platform Mark ── */
.platform-logo {
  width: 44px;
  height: 39px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.16));
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.platform-brand:hover .platform-logo {
  transform: scale(1.06);
}

/* ── Typography Stack ── */
.platform-meta {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  text-align: left;
}

.platform-name {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: hsl(var(--fg, 222 40% 12%));
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  line-height: 1.15;
}

/* Light / Dark Mode dynamic text contrast */
[data-theme="dark"] .platform-name,
.dark .platform-name,
html.dark .platform-name,
body.dark .platform-name,
body[data-theme="dark"] .platform-name {
  color: #f8fafc;
}

[data-theme="light"] .platform-name,
.light .platform-name,
html.light .platform-name,
body.light .platform-name,
body[data-theme="light"] .platform-name {
  color: #0f172a;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not(.light) .platform-name {
    color: #f8fafc;
  }
}

/* Optional Parent Indicator Pill */
.platform-parent {
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  background: rgba(100, 116, 139, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  display: inline-block;
  vertical-align: middle;
  line-height: 1.2;
}

[data-theme="dark"] .platform-parent,
.dark .platform-parent,
html.dark .platform-parent,
body.dark .platform-parent {
  background: rgba(255, 255, 255, 0.1);
  color: #94a3b8;
}

/* ── Platform Tagline (2-line layout, clean and space-efficient) ── */
.platform-tagline {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  color: var(--brand-color, #2563eb);
  white-space: normal;
  max-width: 215px;
  line-height: 1.22;
  margin-top: 2px;
  display: block;
}

/* ── Platform-Specific Color Classes ── */
.brand-fogs        { --brand-color: var(--pbrand-fogs); }
.brand-hr          { --brand-color: var(--pbrand-hr); }
.brand-hire        { --brand-color: var(--pbrand-hire); }
.brand-payroll     { --brand-color: var(--pbrand-payroll); }
.brand-epf         { --brand-color: var(--pbrand-epf); }
.brand-talent      { --brand-color: var(--pbrand-talent); }
.brand-legal       { --brand-color: var(--pbrand-legal); }
.brand-saantvana   { --brand-color: var(--pbrand-saantvana); }
.brand-training    { --brand-color: var(--pbrand-training); }
.brand-expert      { --brand-color: var(--pbrand-expert); }
.brand-marinex     { --brand-color: var(--pbrand-marinex); }
.brand-fogsbooks   { --brand-color: var(--pbrand-fogsbooks); }
.brand-compliance  { --brand-color: var(--pbrand-compliance); }
.brand-ccms        { --brand-color: var(--pbrand-ccms); }
.brand-insight     { --brand-color: var(--pbrand-insight); }
.brand-it          { --brand-color: var(--pbrand-it); }
.brand-business    { --brand-color: var(--pbrand-business); }
.brand-wellness    { --brand-color: var(--pbrand-wellness); }
.brand-esic        { --brand-color: var(--pbrand-esic); }

/* ── Footer Variant ── */
.platform-brand.footer-brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  margin-bottom: 0.75rem !important;
  text-decoration: none;
}

.platform-brand.footer-brand .platform-logo {
  width: 40px !important;
  height: 36px !important;
  flex-shrink: 0;
}

.platform-brand.footer-brand .platform-meta {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  text-align: left;
}

.platform-brand.footer-brand .platform-name {
  font-size: 1.1rem !important;
  line-height: 1.2 !important;
  font-weight: 800;
}

.platform-brand.footer-brand .platform-tagline {
  font-size: 0.58rem !important;
  max-width: 250px !important;
  white-space: normal !important;
  line-height: 1.25 !important;
  margin-top: 2px !important;
  display: block !important;
}

/* ── Navbar Anti-Congestion Controls ── */
.nav-inner {
  gap: 0.75rem;
}

.nav-links {
  gap: 0.2rem;
}

.nav-links a {
  padding: 0.35rem 0.5rem;
  font-size: 0.82rem;
  white-space: nowrap;
}

.nav-actions {
  flex-shrink: 0;
  gap: 0.35rem;
}

/* ── Responsive Safeguards (Strict Navbar Protection) ── */

/* Laptop / Intermediate Breakpoint (900px - 1180px) */
@media (max-width: 1180px) {
  .platform-brand {
    gap: 0.55rem;
  }
  .platform-logo {
    width: 40px;
    height: 36px;
  }
  .platform-name {
    font-size: 1.05rem;
  }
  .platform-tagline {
    font-size: 0.54rem;
    max-width: 185px;
    line-height: 1.2;
    letter-spacing: 0.025em;
  }
  .nav-links a {
    padding: 0.3rem 0.42rem;
    font-size: 0.79rem;
  }
}

/* Tablet (768px - 899px) */
@media (max-width: 899px) {
  .platform-brand {
    gap: 0.5rem;
  }
  .platform-logo {
    width: 38px;
    height: 34px;
  }
  .platform-name {
    font-size: 0.98rem;
  }
  .platform-tagline {
    font-size: 0.52rem;
    max-width: 165px;
  }
}

/* Mobile Devices (< 768px) */
@media (max-width: 767px) {
  .platform-brand {
    gap: 0.45rem;
  }
  .platform-logo {
    width: 36px;
    height: 32px;
  }
  .platform-name {
    font-size: 0.94rem;
  }
  .platform-parent {
    display: none; /* Hide parent pill on mobile to prevent overflow */
  }
  .platform-tagline {
    font-size: 0.50rem;
    max-width: 155px;
    line-height: 1.2;
  }
}

/* Compact Mobile (< 380px) */
@media (max-width: 380px) {
  .platform-brand {
    gap: 0.38rem;
  }
  .platform-logo {
    width: 32px;
    height: 28px;
  }
  .platform-name {
    font-size: 0.88rem;
  }
  .platform-tagline {
    font-size: 0.46rem;
    max-width: 130px;
  }
}

/* ── Real Location-Tagged Map Card Component ── */
.map-embed-card,
a.map-embed {
  display: block;
  margin-top: 1.5rem;
  border-radius: 1.1rem;
  overflow: hidden;
  border: 1px solid hsl(var(--border, 222 20% 90%));
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  position: relative;
  text-decoration: none !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  background: hsl(var(--card, 0 0% 100%));
  aspect-ratio: auto !important;
  text-align: left;
  padding: 0 !important;
}

.map-embed-card:hover,
a.map-embed:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.16);
  border-color: hsl(var(--primary, 222 80% 55%));
}

.map-embed-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 280px;
  overflow: hidden;
  background: #e2e8f0;
}

.map-embed-wrap .map-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.35s ease;
}

.map-embed-card:hover .map-img,
a.map-embed:hover .map-img {
  transform: scale(1.03);
}

.map-overlay-badge {
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 10px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .map-overlay-badge,
.dark .map-overlay-badge {
  background: rgba(19, 27, 46, 0.95);
  border-color: rgba(51, 65, 85, 0.9);
}

.map-pin-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  line-height: 1;
}

.map-badge-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  text-align: left;
}

.map-badge-text strong {
  font-size: 0.82rem;
  color: #0f172a;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

[data-theme="dark"] .map-badge-text strong,
.dark .map-badge-text strong {
  color: #f8fafc;
}

.map-badge-text small {
  font-size: 0.70rem;
  color: #2563eb;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

[data-theme="dark"] .map-badge-text small,
.dark .map-badge-text small {
  color: #60a5fa;
}

