/* ============================================================
   File: css/layout.css
   Purpose: Header, footer, grids, responsive layout
   Light, modern layout
   ============================================================ */

/* -----------------------------
   Header & Navigation
----------------------------- */
/* -----------------------------
   Header & Navigation
----------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease,
    transform 0.1s ease;
}

/* Optional: extra effects when scrolled */
.site-header.is-sticky {
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
  border-bottom-color: rgba(209, 213, 219, 0.9);
  transform: translateY(0);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* remove this line if you still have it:
     min-height: var(--header-height); */
  gap: var(--space-4);
  padding: 0.5rem 1rem;
}



/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.9rem;
  overflow: hidden;
  background: #e0f2fe;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* If logo.png is missing, you can keep the placeholder gradient:
   .brand-logo::before { ... } */

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--color-text-soft);
}

/* Desktop nav */
.main-nav {
  display: none;
}

.nav-list {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  font-size: 0.9rem;
  color: var(--color-text-soft);
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.nav-link:hover {
  color: var(--color-sky);
}

.nav-link.is-active {
  color: var(--color-heading);
  border-bottom-color: var(--color-sky);
}

/* Header CTA group */
.header-cta {
  display: none;
  align-items: center;
  gap: 0.65rem;
}

/* Mobile nav toggle */
.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  border: 1px solid rgba(203, 213, 225, 1);
  background: #ffffff;
  cursor: pointer;
  padding: 0;
}

.nav-toggle-bar {
  width: 1.1rem;
  height: 2px;
  background: var(--color-text);
  border-radius: 999px;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

/* Mobile navigation */
.mobile-nav {
  position: absolute;
  inset-inline: 0;
  top: calc(var(--header-height));
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding-block: 0.75rem;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding-inline: 1.25rem;
}

.mobile-nav-link {
  display: block;
  padding: 0.55rem 0;
  font-size: 0.95rem;
  color: var(--color-text-soft);
}

.mobile-nav-link:hover {
  color: var(--color-sky);
}

/* Desktop layout */
@media (min-width: 768px) {
  .main-nav {
    display: block;
  }

  .header-cta {
    display: flex;
  }

  .nav-toggle,
  .mobile-nav {
    display: none;
  }
}

/* =========================
   LOGO: image + text
   ========================= */
/* Logo in header */
.logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.logo-img {
  height: 40px;   /* change this number to make logo bigger/smaller */
  width: auto;    /* keep aspect ratio from your 600x300 image */
  display: block;
}

/* -----------------------------
   Hero & Main Layout
----------------------------- */
main {
  padding-top: 3rem;   /* or even 2.5rem, depending on how it looks */
}


.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr);
  gap: var(--space-6);
  align-items: flex-start;
}

.hero-subtitle {
  font-size: 1.02rem;
  color: var(--color-text-muted);
  max-width: 34rem;
}

/* Hero aside card */
.hero-aside {
  max-width: 26rem;
}

/* Hero stats */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
  font-family: var(--font-mono);
}

.hero-stat dt {
  font-size: 1.1rem;
  color: var(--color-sky);
}

.hero-stat dd {
  font-size: 0.8rem;
  color: var(--color-text-soft);
}

/* Hero actions */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: var(--space-3);
}

.hero-links {
  font-size: 0.85rem;
  color: var(--color-text-soft);
}

/* Problem grid adjustments */
.problem-grid .card-problem h3 {
  margin-bottom: 0.4rem;
}

.problem-tagline {
  font-size: 0.86rem;
  color: #92400e;
  margin-bottom: 0.75rem;
}

/* CTA section */
.cta-inner {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: flex-start;
  justify-content: space-between;
}

.cta-text p {
  max-width: 28rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border-subtle);
  background: #f9fafb;
  padding-block: var(--space-10);
  margin-top: var(--space-12);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr);
  gap: var(--space-8);
}

.footer-heading {
  font-size: 0.95rem;
  margin-bottom: var(--space-3);
}

.footer-meta {
  font-size: 0.78rem;
  color: var(--color-text-soft);
}

.footer-col p {
  font-size: 0.9rem;
}

/* -----------------------------
   Generic grids
----------------------------- */
.grid {
  display: grid;
  gap: var(--space-4);
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Responsive grid fallback */
@media (max-width: 1023.98px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: minmax(0, 1fr);
  }

  .cta-inner {
    align-items: flex-start;
  }

  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* -----------------------------
   Layout tweaks for large screens
----------------------------- */
@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.1fr);
    align-items: stretch;
  }

  .cta-inner {
    flex-direction: row;
    align-items: center;
  }

  .footer-grid {
    grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
  }
}

/* ========= Layout & Sections ========= */

.section {
  padding: 3rem 0;
}

.section-page-header {
  padding-top: 3.5rem;
  padding-bottom: 2.5rem;
  background: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.08),
    rgba(59, 130, 246, 0.08)
  );
}

.page-title {
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: clamp(2rem, 3vw, 2.6rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  color: #022c22;
}

.page-subtitle {
  max-width: 48rem;
  color: #0f172a;
  font-size: 0.98rem;
  line-height: 1.6;
}

.page-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Container (only if you don't already have this) */
.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ========= Services Cards ========= */

.section-services .section-header {
  margin-bottom: 1.75rem;
}

.section-services .section-header h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
}

.section-services .section-header p {
  color: #475569;
  font-size: 0.95rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 1.25rem;
}

.service-card {
  background: #ffffff;
  border-radius: 0.9rem;
  padding: 1.5rem 1.4rem 1.4rem;
  border: 1px solid rgba(15, 118, 110, 0.14);
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.service-card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
}

.service-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #022c22;
}

.service-price {
  text-align: right;
  font-size: 0.9rem;
  color: #0f172a;
}

.service-price .price {
  font-weight: 700;
  font-size: 1.05rem;
  color: #047857;
}

.service-price .price-note {
  display: block;
  font-size: 0.75rem;
  color: #64748b;
}

.service-tagline {
  font-size: 0.9rem;
  color: #475569;
}

.service-features {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: #0f172a;
}

.service-features li {
  padding-left: 1.1rem;
  position: relative;
  margin-bottom: 0.3rem;
}

.service-features li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: #10b981;
  font-weight: 700;
}

/* ========= Two Column Layout (Form + Sidebar) ========= */

.layout-two-column {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: flex-start;
  margin-top: 1rem;
}

.layout-main {
  min-width: 0;
}

.layout-sidebar {
  min-width: 0;
}

/* Mobile: stack columns, move sidebar under form */
@media (max-width: 900px) {
  .layout-two-column {
    grid-template-columns: 1fr;
  }

  .layout-sidebar {
    order: 2;
  }
}

/* ========= Sidebar Blocks ========= */

.sidebar-block {
  background: #ffffff;
  border-radius: 0.9rem;
  padding: 1rem 1rem 1.1rem;
  border: 1px solid rgba(15, 118, 110, 0.12);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
  margin-bottom: 1rem;
}

.sidebar-banner img {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 0.7rem;
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #022c22;
  margin-bottom: 0.5rem;
}

.sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
}

.sidebar-links li + li {
  margin-top: 0.3rem;
}

.sidebar-links a {
  color: #0369a1;
  text-decoration: none;
}

.sidebar-links a:hover {
  text-decoration: underline;
}

/* ========= Two-column layout with narrow sidebar ========= */

.layout-with-sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;  /* main flexible, sidebar as wide as its content */
  gap: 2rem;
  align-items: flex-start;
}

.layout-main {
  min-width: 0; /* prevent overflow in grid */
}

.layout-sidebar {
  width: 180px;              /* fits 160px banner + a bit of padding */
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  justify-self: end;         /* sticks to the right edge of container */
}

/* Mobile: stack columns */
@media (max-width: 960px) {
  .layout-with-sidebar {
    grid-template-columns: 1fr;
  }

  .layout-sidebar {
    width: 100%;
    max-width: 100%;
    justify-self: stretch;
  }

  .sidebar-banner {
    display: flex;
    justify-content: center;
  }
}

/* ========= Form helpers (generic) ========= */

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-group-full {
  margin-top: 0.75rem;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: #0f172a;
}

.form-input,
.form-select,
.form-textarea {
  border-radius: 0.55rem;
  border: 1px solid #cbd5e1;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  background-color: #ffffff;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: #22c55e;
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.35);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-top: 0.35rem;
}

.checkbox-item {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: #0f172a;
}

.checkbox-item input[type="checkbox"] {
  margin-top: 0.1rem;
}

.field-helper {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: #64748b;
}

.order-form-section {
  background: #f9fafb;
  border-radius: 1rem;
  padding: 1.5rem 1.4rem 1.6rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
}

.form-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

.form-subtitle {
  font-size: 0.9rem;
  color: #475569;
  margin-bottom: 1.1rem;
}

.form-submit-btn {
  margin-top: 1rem;
}

.form-footnote {
  margin-top: 0.6rem;
  font-size: 0.78rem;
  color: #64748b;
}
