/* ============================================================
   Southern Foodservice Management - Static Site Styles
   Brand red: #B23439  (sampled from logo)
   ============================================================ */

:root {
  --brand-red: #B23439;
  --brand-red-dark: #8E282C;
  --text: #333;
  --text-muted: #666;
  --bg: #ffffff;
  --bg-soft: #f7f5f3;
  --border: #e5e5e5;
  --max-width: 1200px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--brand-red);
  text-decoration: none;
}
a:hover { color: var(--brand-red-dark); text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  margin: 0 0 0.6em;
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.brand img {
  width: 48px;
  height: 48px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text .wordmark {
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: 0.05em;
  color: var(--text);
}
.brand-text .tag {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ---------- Primary nav ---------- */
.primary-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav > li {
  position: relative;
}
.primary-nav > li > a {
  display: block;
  padding: 0.6rem 0.9rem;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}
.primary-nav > li > a:hover,
.primary-nav > li:hover > a {
  color: var(--brand-red);
  text-decoration: none;
}
.primary-nav .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border: 1px solid var(--border);
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  min-width: 220px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.primary-nav > li:hover .submenu,
.primary-nav > li:focus-within .submenu {
  display: block;
}
.primary-nav .submenu a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--text);
  font-size: 0.92rem;
}
.primary-nav .submenu a:hover {
  background: var(--bg-soft);
  color: var(--brand-red);
  text-decoration: none;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text);
}

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .primary-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    align-items: stretch;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
    padding-top: 0.5rem;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav .submenu {
    position: static;
    border: 0;
    box-shadow: none;
    padding-left: 1rem;
    display: block;
  }
}

/* ---------- Hero ---------- */
.hero {
  background:
    linear-gradient(rgba(0,0,0,0.15), rgba(0,0,0,0.25)),
    url('/assets/images/hero.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
  min-height: 380px;
  position: relative;
  overflow: hidden;
}
.hero .container { padding-top: 1.5rem; padding-bottom: 3rem; }
.hero-card {
  background:
    url('/assets/images/spoons-watermark.png') no-repeat right 1.25rem center / auto 80%,
    rgba(255,255,255,0.72);
  color: var(--text);
  padding: 2rem 8rem 2rem 2.25rem;
  max-width: 480px;
  border-radius: 2px;
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
}
.hero-card h1 {
  color: var(--text);
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
  font-weight: 400;
}
.hero-card p {
  color: var(--brand-red);
  font-size: 1.4rem;
  line-height: 1.4;
  margin: 0;
}

/* ---------- Sections ---------- */
.section {
  padding: 3.5rem 0;
}
.section.alt {
  background: var(--bg-soft);
}
.section h2 {
  text-align: center;
  margin-bottom: 0.4rem;
}
.section .lede {
  text-align: center;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0 auto 2.5rem;
}

/* Services / feature grid */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}
.tile {
  text-align: center;
  padding: 1rem;
}
.tile .icon {
  width: 130px;
  height: 130px;
  background: var(--bg-soft);
  border-radius: 4px;
  margin: 0 auto 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: var(--brand-red);
  padding: 18px;
}
.tile .icon img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.tile h3 {
  font-size: 1rem;
  font-weight: 500;
  margin: 0.25rem 0;
  color: var(--text-muted);
}
.tile a {
  color: inherit;
  display: block;
}
.tile a:hover { color: var(--brand-red); text-decoration: none; }

/* Feature row */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.feature {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2rem 1.75rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.feature h3 {
  color: var(--brand-red);
  font-weight: 700;
  font-size: 1.85rem;
  margin-bottom: 1rem;
  text-align: center;
}
.feature p {
  font-size: 1.2rem;
  line-height: 1.65;
  margin: 0;
  color: var(--text);
  text-align: center;
}

/* Markets photo tiles - use real photos like the original site */
.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.market-tile {
  display: block;
  overflow: hidden;
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 4px;
  text-decoration: none;
}
.market-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.market-tile:hover img {
  transform: scale(1.06);
}
.market-tile .label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.7) 100%);
  color: #fff;
  font-weight: 600;
  font-size: 1.05rem;
  padding: 1rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}
.market-tile:hover .label {
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 30%, rgba(178, 52, 57, 0.85) 100%);
}

/* Rolling flag banner */
.flag-section {
  background: var(--bg-soft);
  padding: 3.5rem 0 0;
  text-align: center;
  overflow: hidden;
}
.flag-section h2 {
  color: var(--brand-red);
  font-weight: 400;
  font-size: 2rem;
  margin-bottom: 1.5rem;
}
.flag-stage {
  overflow: hidden;
  width: 100%;
  position: relative;
  height: 280px;
  padding-bottom: 2rem;
}
.flag-track {
  display: flex;
  gap: 60px;
  position: absolute;
  left: 0;
  top: 0;
  align-items: center;
  height: 240px;
  animation: flag-roll 45s linear infinite;
  will-change: transform;
}
.flag-track img {
  height: 240px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
@keyframes flag-roll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.flag-stage:hover .flag-track {
  animation-play-state: paused;
}
@media (prefers-reduced-motion: reduce) {
  .flag-track { animation: none; }
}

/* About Us two-column intro */
.about-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 1rem;
}
@media (max-width: 700px) {
  .about-cols { grid-template-columns: 1fr; }
}

/* Page hero */
.page-hero {
  width: 100%;
  height: 260px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.services-intro {
  text-align: center;
  padding: 1rem 0 2.5rem;
  max-width: 720px;
  margin: 0 auto;
}
.services-intro h1 {
  color: var(--brand-red);
  font-size: 2.4rem;
  font-weight: 400;
  margin-bottom: 1rem;
}
.services-intro p {
  font-size: 1.1rem;
  line-height: 1.55;
  color: var(--text);
}
.service-banner {
  position: relative;
}
.service-banner-image {
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.service-banner-content {
  position: relative;
  background: #fff;
  text-align: center;
  padding: 4.5rem 1.5rem 3rem;
  max-width: 760px;
  margin: 0 auto;
}
.service-banner-icon {
  position: absolute;
  top: -45px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 90px;
  background: var(--bg-soft);
  border-radius: 4px;
  padding: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.service-banner-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.service-banner-content h2 {
  color: var(--text-muted);
  font-size: 2rem;
  font-weight: 400;
  margin-bottom: 1rem;
}
.service-banner-content p {
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 580px;
  margin: 0 auto 1rem;
  color: var(--text);
}
.service-link {
  color: var(--brand-red);
  font-weight: 500;
  text-decoration: none;
}
.service-link:hover {
  text-decoration: underline;
}

/* Meal Card Rewards section */
.mealcard-section {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
}
.mealcard-grid {
  display: grid;
  grid-template-columns: auto auto;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  max-width: 720px;
  margin: 0 auto;
}
.mealcard-image {
  text-align: right;
}
.mealcard-image img {
  max-width: 260px;
  width: 100%;
  height: auto;
  display: inline-block;
}
.mealcard-cta {
  text-align: center;
  max-width: 340px;
}
.mealcard-cta h2 {
  color: var(--text-muted);
  font-size: 1.85rem;
  font-weight: 400;
  margin-bottom: 0.75rem;
}
.mealcard-cta p {
  font-size: 1.1rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  color: var(--text-muted);
}
@media (max-width: 700px) {
  .mealcard-grid { grid-template-columns: 1fr; gap: 1.5rem; justify-content: stretch; }
  .mealcard-image, .mealcard-cta { text-align: center; }
}

.page-header {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0 2rem;
}
.page-header h1 {
  margin: 0;
  color: var(--brand-red);
  font-weight: 400;
}
.page-body { padding: 3rem 0; }
.page-body .container { max-width: 900px; }
.page-body h2 { color: var(--brand-red); font-weight: 500; }

/* Sub-nav (used inside Our Services etc) */
.sub-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}
.sub-nav a {
  font-size: 0.9rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
}
.sub-nav a:hover,
.sub-nav a.is-active {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
  text-decoration: none;
}

/* CTA */
.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: var(--brand-red);
  color: #fff;
  border: 0;
  font-weight: 500;
  border-radius: 2px;
  cursor: pointer;
  font-size: 0.95rem;
}
.btn:hover { background: var(--brand-red-dark); color: #fff; text-decoration: none; }
.btn.ghost {
  background: transparent;
  color: var(--brand-red);
  border: 1px solid var(--brand-red);
}
.btn.ghost:hover { background: var(--brand-red); color: #fff; }

/* Contact form */
.contact-form {
  display: grid;
  gap: 1rem;
  max-width: 560px;
  margin-top: 1.5rem;
}
.contact-form label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  font: inherit;
  font-size: 0.95rem;
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--brand-red);
}

/* Contact details list */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 3rem;
  margin-top: 1rem;
}
@media (max-width: 700px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-grid h3 {
  color: var(--brand-red);
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

/* ---------- Footer ---------- */
.site-footer {
  background: #2a2a2a;
  color: #cfcfcf;
  padding: 3rem 0 1.5rem;
  font-size: 0.9rem;
}
.site-footer a { color: #cfcfcf; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
}
.footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0 0 0.75rem;
}
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-col li { margin-bottom: 0.35rem; }
.footer-bottom {
  border-top: 1px solid #444;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
  color: #888;
  font-size: 0.82rem;
}
