/* =========================================
 * layout.css — Header, Footer, Grid Systems
 * ====================================== */

/* 1) Site Header (Sticky Top Nav) */
/* ------------------------------- */

.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 80px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

html.dark .site-header {
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

/* Brand Logo */
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #2563eb;
  color: #fff;
  border-radius: 12px;
  font-weight: 900;
  font-size: 1.25rem;
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-text strong {
  font-size: 1.1rem;
  color: #0f172a;
}
html.dark .brand-text strong { color: #f8fafc; }
.brand-text small {
  font-size: 0.75rem;
  color: #64748b;
  letter-spacing: 1px;
}

/* Desktop Navigation */
.desktop-nav {
  display: none; /* Hidden on mobile */
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 1024px) {
  .desktop-nav {
    display: flex;
  }
}

.desktop-nav a {
  font-size: 0.95rem;
  font-weight: 600;
  color: #475569;
  padding: 0.5rem 0;
  position: relative;
}

html.dark .desktop-nav a { color: #cbd5e1; }

.desktop-nav a:hover,
.desktop-nav a.active {
  color: #2563eb;
}

html.dark .desktop-nav a:hover,
html.dark .desktop-nav a.active {
  color: #60a5fa;
}

/* Header Actions & CTA */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  transition: all 0.2s;
}
html.dark .header-icon-btn { background: #1e293b; border-color: #334155; }

.header-cta {
  display: none;
  padding: 0.5rem 1.25rem;
  background: #0f172a;
  color: #fff;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
}
html.dark .header-cta { background: #2563eb; }
@media (min-width: 768px) { .header-cta { display: block; } }

/* Theme Icon Logic */
html.dark .theme-icon-dark { display: none; }
html.light .theme-icon-light { display: none; }

/* 2) Site Footer */
/* -------------- */

.site-footer {
  background-color: #f8fafc;
  padding-top: 4rem;
  border-top: 1px solid #e2e8f0;
  margin-top: 4rem;
}

html.dark .site-footer {
  background-color: #020617;
  border-top: 1px solid #1e293b;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-grid h3 {
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
  color: #0f172a;
}
html.dark .footer-grid h3 { color: #f8fafc; }

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a, .footer-socials a {
  color: #64748b;
  font-size: 0.95rem;
}
.footer-links a:hover, .footer-socials a:hover { color: #2563eb; }
html.dark .footer-links a, html.dark .footer-socials a { color: #94a3b8; }
html.dark .footer-links a:hover, html.dark .footer-socials a:hover { color: #60a5fa; }

.footer-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom {
  text-align: center;
  padding-block: 1.5rem;
  border-top: 1px solid #e2e8f0;
  font-size: 0.85rem;
  color: #94a3b8;
}
html.dark .footer-bottom { border-top-color: #1e293b; }

/* 3) Global Grid Utilities */
/* ------------------------ */

.section { padding-block: 4rem; }
.grid { display: grid; gap: 1.5rem; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}