/* ==========================================================================
   UNIVERSAL FLEX LAYOUT ENGINE & COMPONENTS
   ========================================================================== */
* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex !important;
  flex-direction: column !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body > *:not(#site-header):not(#site-footer):not(#cms-ad-slot-1):not(#cms-ad-slot-2):not(#cms-ad-toast) {
  flex: 1 0 auto !important;
  width: 100%;
}

.cms-container {
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.cms-navbar {
  padding: 1rem 0 0 0;
  width: 100%;
  background: var(--nav-bg);
  transition: background-color 0.2s ease;
}
.cms-navbar .cms-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* --- HORIZONTAL TOP SLIDER TRACK --- */
.cms-slider-nav-container {
  width: 100%;
  border-top: 1px solid var(--border-color);
  margin-top: 0.75rem;
  overflow: hidden;
}

.cms-slider-track {
  display: flex !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  white-space: nowrap !important;
  padding: 0.75rem 1.5rem !important;
  gap: 0.75rem !important;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cms-slider-track::-webkit-scrollbar { display: none !important; }

.cms-slider-item {
  display: inline-block !important;
  padding: 0.5rem 1rem !important;
  text-decoration: none !important;
  border-radius: 20px !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  background: var(--card-bg) !important;
  color: var(--text-muted) !important;
  transition: all 0.2s ease;
  flex: 0 0 auto !important;
}
.cms-slider-item:hover, .cms-slider-item.active {
  background: #2563eb !important;
  color: #ffffff !important;
}

/* --- THEME DESIGN VALUES --- */
body[data-theme="light"] {
  --nav-bg: #ffffff;
  --card-bg: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border-color: #e2e8f0;
  background-color: #ffffff !important;
}
body[data-theme="dark"] {
  --nav-bg: #0f172a;
  --card-bg: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: #1e293b;
  background-color: #0f172a !important;
}

.cms-brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; text-decoration: none; color: var(--text-main); font-size: 1.25rem; }
.cms-nav-item { color: var(--text-muted); text-decoration: none; margin-left: 1.5rem; font-weight: 500; font-size: 0.95rem; }

/* --- AD-STYLE POPUP NOTIFICATION SNIPPET --- */
.cms-notification-toast {
  position: fixed;
  bottom: 2rem;
  right: -360px; /* Safe parking vector off-screen right */
  width: 320px;
  max-width: calc(100vw - 3rem);
  background: #1e293b;
  border: 1px solid #3b82f6;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  padding: 1rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4);
  z-index: 99999;
  opacity: 0;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}
.cms-notification-toast.reveal {
  right: 1.5rem; /* Animates into view smoothly from the lower side */
  opacity: 1;
}
.cms-toast-body { position: relative; color: #ffffff; text-align: left; }
.cms-toast-close { position: absolute; top: -5px; right: 0; font-size: 1.25rem; cursor: pointer; color: #94a3b8; }
.cms-toast-close:hover { color: #ffffff; }
.cms-toast-tag { font-size: 0.65rem; text-transform: uppercase; color: #3b82f6; font-weight: 700; margin-bottom: 0.25rem; }
.cms-toast-body h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 0.75rem; color: #ffffff; }
.cms-toast-btn { display: inline-block; background: #2563eb; color: #ffffff; padding: 0.4rem 0.8rem; border-radius: 4px; font-size: 0.8rem; text-decoration: none; font-weight: 500; }
.cms-toast-btn:hover { background: #1d4ed8; }

/* YMYL Disclaimers & Footer Scaffolding */
.cms-compliance-disclaimer { max-width: 1100px; margin: 2rem auto; padding: 1rem 1.5rem; font-size: 0.8rem; border-radius: 6px; }
body[data-theme="light"] .cms-compliance-disclaimer { background: #fef2f2; border-left: 4px solid #ef4444; color: #991b1b; }
body[data-theme="dark"] .cms-compliance-disclaimer { background: rgba(239, 68, 68, 0.06); border-left: 4px solid #f87171; color: #fca5a5; }
.cms-footer { background: #0b0f19 !important; color: #94a3b8; padding: 2rem 0; width: 100%; text-align: center; font-size: 0.85rem; border-top: 1px solid #1e293b; margin-top: auto; }
.cms-ad-hidden { display: none !important; }

@media (max-width: 640px) {
  .cms-navbar .cms-container { flex-direction: column; gap: 0.5rem; align-items: flex-start; }
  .cms-nav-links { margin-top: 0.25rem; }
  .cms-nav-item { margin-left: 0; margin-right: 1rem; }
}
/* ==========================================================================
   PRODUCTION FOOTER LAYOUT & SPACING ENGINE
   ========================================================================== */
.cms-footer {
  background: #0b0f19 !important;
  color: #f8fafc !important;
  padding: 3rem 1.5rem 1.5rem 1.5rem !important;
  width: 100%;
  border-top: 1px solid #1e293b;
  margin-top: auto;
}

.cms-footer-content {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  text-align: left !important; /* Forces left alignment for professional look */
}

.cms-footer-info {
  flex: 1;
  min-width: 280px;
  max-width: 500px;
}

.cms-footer-info h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #ffffff !important;
  margin-bottom: 0.75rem;
}

.cms-footer-info p {
  color: #94a3b8 !important;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* Fixes the compressed purple link look */
.cms-footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem; /* Gives clean vertical breathing room to each link */
  min-width: 160px;
}

.cms-footer-links h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff !important;
  margin-bottom: 0.5rem;
}

/* Strips out the default purple/blue link styling */
.cms-footer-links a {
  color: #94a3b8 !important; /* Premium muted text gray */
  text-decoration: none !important;
  font-size: 0.9rem;
  transition: color 0.2s ease;
  display: inline-block;
}

.cms-footer-links a:hover {
  color: #3b82f6 !important; /* Clean interactive blue on touch/hover */
  text-decoration: underline !important;
}

.cms-footer-bottom {
  max-width: 1100px;
  margin: 2.5rem auto 0 auto;
  padding-top: 1.25rem;
  border-top: 1px solid #1e293b;
  text-align: center;
}

.cms-footer-bottom p {
  color: #64748b !important;
  font-size: 0.8rem;
}

/* Mobile Breakpoint Guard */
@media (max-width: 768px) {
  .cms-footer-content {
    flex-direction: column !important;
    gap: 1.75rem;
  }
}
