/* Basic responsive grid template for beginners (updated)
   - Page content is centered using .container (approx 70% width)
   - Navbar: logo left, menu right
   - Hero: full-width image with overlay content
   - Grid examples: .cols-2, .cols-3
   - Footer: 4-column footer grid (3 link columns + 1 logo column)
   - Overhang divider (80% of viewport width) sitting across the main section
*/

/* variables */
:root{
  --page-width: 70%;
  --page-max: 1200px;
  --gap: 1rem;
  --bg: #fafafa;
  --accent: #2b6cb0;
  --muted: #666;
  --radius: 8px;
}

* { box-sizing: border-box; }
html,body { height: 100%; margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; color: #222; background: var(--bg); }

/* Container: centers content and keeps it about 70% width */
.container {
  width: var(--page-width);
  max-width: var(--page-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Header / nav */
.site-header {
  background: white;
  border-bottom: 1px solid #e6e6e6;
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.logo img { display:block; height: auto; max-height: 48px; }

/* Nav list - desktop */
.main-nav { display: flex; align-items: center; gap: 1rem; }
.nav-list {
  list-style: none;
  display: flex;
  gap: 1rem;
  margin: 0;
  padding: 0;
}
.nav-list a {
  text-decoration: none;
  color: var(--muted);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
}
.nav-list a:hover { background: rgba(43,108,176,0.08); color: var(--accent); }

/* Nav toggle for small screens */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid #ddd;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
}

/* Hero area */
.hero {
  position: relative;
  color: white;
  margin-bottom: 1.5rem;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.6);
  z-index: 0;
}
.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 320px;
  padding: 3rem 0;
  color: white;
}
.hero-logo { max-width: 180px; opacity: 0.95; }
.hero-text h1 { margin: 0 0 0.25rem 0; font-size: clamp(1.5rem, 3vw, 2.25rem); }
.hero-text p { margin: 0; opacity: 0.95; }

/* Main content */
.site-main { padding-top: 1rem; padding-bottom: 2rem; }

/* Intro paragraph */
.intro p { color: var(--muted); line-height: 1.6; }

/* Overhang divider (80% of the viewport width) */
.overhang-divider {
  position: relative;
  width: 80vw;
  height: 1px;
  background: rgba(0,0,0,0.08);
  margin: 2rem auto;
  left: 50%;
  transform: translateX(-50%);
  /* keep divider visually behind content (if needed) */
  z-index: 1;
}

.overhang-divider span {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: -10px;
  background: var(--bg);
  padding: 0 0.6rem;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Grid wrapper used for examples */
.grid {
  display: grid;
  gap: var(--gap);
  margin-top: 0.75rem;
}

.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }

/* Card styles */
.card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.card img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.card-body {
  padding: 0.85rem;
  text-align: center;
}

.card-body h4 { margin: 0 0 0.35rem 0; font-size: 1rem; }
.card-body p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Footer: 4-column footer grid */
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 1rem;
}

.footer-col h4 {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li { margin: 0.35rem 0; }
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.footer-links a:hover { color: var(--accent); }

/* Footer logo column specifics */
.footer-logo-col img { max-width: 160px; display:block; margin-bottom: 0.5rem; }
.footer-note { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* Footer container styles */
.site-footer {
  border-top: 1px solid #e6e6e6;
  background: #fff;
  padding: 1.5rem 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Responsive behaviour */
/* On small screens: stack everything and enable nav toggle */
@media (max-width: 900px) {
  .header-inner { gap: 0.5rem; }
  .nav-list { display: none; flex-direction: column; background: white; position: absolute; right: 1rem; top: 64px; padding: 0.5rem; border-radius: 8px; box-shadow: 0 4px 12px rgba(0,0,0,0.08); z-index: 30; }
  .nav-list.open { display: flex; }
  .nav-toggle { display: inline-block; }

  .hero-content { flex-direction: column; text-align: center; padding: 2.5rem 0; min-height: 360px; }
  .hero-logo { max-width: 140px; }

  /* Make the divider fit comfortably on small screens */
  .overhang-divider { width: calc(100% - 2rem); left: 50%; transform: translateX(-50%); }

  /* Let the grid auto-fit to available space: each card will be at least 220px */
  .cols-2, .cols-3 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }

  /* Footer stacks to fewer columns on small screens */
  .footer-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

/* On very small screens make text comfortable */
@media (max-width: 420px) {
  .container { width: calc(100% - 2rem); }
  .hero-content { padding: 1.75rem 0; }
}