/* Mid-America Services LLC - Match live site (white/red theme, mobile-friendly) */
:root {
  --color-red: #cc0000;
  --color-red-dark: #551118;
  --color-nav-hover: #6b7280;
  --color-white: #fff;
  --color-bg: #fff;
  --color-bg-section: #f8f8f8;
  --color-text: #333;
  --color-text-muted: #666;
  --color-heading: #333;
  --color-title-muted: #999;
  --font-sans: Helvetica, Arial, sans-serif;
  --max-width: 980px;
  --nav-height: 48px;
  --header-height: 100px;
  --collab-overlay-opacity: 0.78;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Keep section headings visible below sticky header when navigating via anchor links */
section[id] {
  scroll-margin-top: var(--header-height);
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  color: var(--color-text);
  background: var(--color-bg);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 1rem;
  background: var(--color-white);
  color: var(--color-red);
  z-index: 10000;
  border-radius: 4px;
}
.skip-link:focus {
  top: 10px;
}

/* ========== HEADER: Two rows – logo bar (white) above, menu bar (red) below ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
}

/* Row 1: Logo + wordmark, full-width white bar */
.header-logo-bar {
  width: 100%;
  background: var(--color-white);
  padding: 12px 20px 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-block {
  display: flex;
  align-items: center;
  gap: 14px;
}
.header-logo-bar .logo-link {
  display: block;
  flex-shrink: 0;
}
.header-logo-bar .logo-img {
  display: block;
  height: 46px;
  width: auto;
  max-width: 79px;
  object-fit: contain;
}
.header-logo-bar .logo-wordmark {
  display: block;
  height: 34px;
  width: auto;
  max-width: 176px;
  object-fit: contain;
}

/* Row 2: Menu only, full-width red bar; items are contiguous blocks, no gaps */
.header-nav-wrap {
  width: 100%;
  display: flex;
  align-items: stretch;
  background: var(--color-red);
}
.main-nav {
  width: 100%;
  display: flex;
  align-items: stretch;
}
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex: 1;
  gap: 0;
  align-items: stretch;
}
.main-nav li {
  margin: 0;
  padding: 0;
  flex: 1;
  min-width: 0;
  display: flex;
}
.main-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-width: 0;
  padding: 10px 8px;
  color: var(--color-white);
  text-decoration: none;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  background: var(--color-red);
  transition: background 0.15s ease;
}
.main-nav a:hover {
  background: var(--color-nav-hover);
}
.main-nav a.active {
  background: var(--color-red-dark);
}

/* Hamburger – hidden on desktop */
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-text);
}
.nav-check {
  display: none;
}

/* Mobile: logo bar stays white with hamburger; nav row hidden until open */
@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }
  .nav-toggle span {
    background: var(--color-text);
  }
  .header-nav-wrap {
    display: none;
  }
  .nav-check:checked ~ .header-nav-wrap {
    display: flex;
  }
  .main-nav ul {
    flex-direction: column;
    padding: 12px 0;
    justify-content: flex-start;
  }
  .main-nav a {
    width: 100%;
    text-align: center;
    padding: 14px 16px;
  }
}

/* ========== SECTIONS: White / light grey ========== */
.section {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px;
}

.section-title {
  font-size: clamp(32px, 5vw, 55px);
  font-weight: 700;
  text-align: center;
  color: var(--color-title-muted);
  letter-spacing: 0.05em;
  margin: 0 0 8px;
}

.section-line {
  width: 60px;
  height: 3px;
  background: var(--color-red);
  border: none;
  margin: 0 auto 40px;
}

/* ========== HERO: Data center image, white text ========== */
.hero {
  position: relative;
  min-height: 95vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: 8vh;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: url("images/datacenter2.png") center/cover no-repeat;
  background-color: #1a1a2e;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.4);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 920px;
  padding: 48px 24px;
}

/* Hero headline: match original – font_3 = 60px Avenir Heavy, white, 1.4em */
.hero h1 {
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(24px, 5vw, 50px);
  font-weight: 500;
  line-height: 1.4em;
  color: #ffffff;
  letter-spacing: 0em;
  margin: 0 0 20px;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Hero subheadline: match original – font_4 = 40px, same family, lighter weight, white */
.hero h2 {
  font-family: "Avenir Next", Avenir, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: clamp(16px, 2.4vw, 32px);
  font-weight: 400;
  line-height: 1.4em;
  color: #b8b8b8;
  margin: 0 0 24px;
  letter-spacing: 0em;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

/* Original hero shows only headline + subhead + scroll; tagline and CTA hidden */
.hero-tagline,
.cta-link {
  display: none;
}

/* Scroll hint – fixed near bottom of hero, below the text */
.hero-scroll {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-white);
  font-size: 28px;
  line-height: 1;
  opacity: 0.8;
}

/* ========== SERVICES: White background, light grey title, red underline ========== */
.section-services {
  background: var(--color-bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 24px;
  align-items: start;
}

@media (max-width: 900px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

.service-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.service-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
  border-radius: 4px;
}

.card-content {
  background: #f2f2f2;
  padding: 20px;
  border-radius: 4px;
}

.card-content h3 {
  font-size: 22px;
  color: #4a6b8a;
  margin: 0 0 12px;
  font-weight: 700;
}

.card-content p,
.card-content ul {
  margin: 0 0 12px;
  color: var(--color-text);
}

.card-content ul {
  list-style: disc;
  padding-left: 24px;
}
.card-content li {
  margin-bottom: 6px;
}

/* ========== COLLABORATION: Full-section background image, content box to left edge ========== */
.section-collab {
  max-width: 100%;
  padding-left: 0;
  position: relative;
  overflow: hidden;
  background: url("images/Original/shutterstock_255653545_1.jpg") center/cover no-repeat;
  background-color: #e8e8e8;
}

.section-collab::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, var(--collab-overlay-opacity, 0.65));
  pointer-events: none;
  z-index: 0;
}

.collab-content {
  position: relative;
  z-index: 1;
  width: 93.5%;
  min-width: 318px;
  max-width: 968px;
  margin: 0;
  padding: 28px 48px 28px 0;
  padding-left: min(40%, 350px);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 0 6px 6px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.collab-content .section-title {
  text-align: left;
  margin: 0 0 8px;
  color: var(--color-title-muted);
}

.collab-content .section-line {
  margin: 0 0 24px 0;
  margin-right: auto;
}

.collab-content p,
.collab-content ul {
  margin-bottom: 16px;
  color: var(--color-text);
}
.collab-content ul {
  padding-left: 24px;
}

/* ========== ABOUT ========== */
.section-about {
  background: var(--color-bg-section);
}

.about-content {
  max-width: 720px;
  margin: 0 auto;
}
.about-content p,
.about-content ul {
  margin-bottom: 16px;
  color: var(--color-text);
}
.about-content ul {
  padding-left: 24px;
}

/* ========== TEAM: Light background, subtle image ========== */
.section-team {
  position: relative;
  background: var(--color-bg-section);
}

.team-bg {
  position: absolute;
  inset: 0;
  background: url("images/team-bg.jpg") center/cover no-repeat;
  opacity: 0.08;
  pointer-events: none;
}

.team-content {
  position: relative;
  z-index: 1;
}

.team-intro {
  text-align: center;
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 40px;
  color: var(--color-text);
}

.team-grid {
  display: grid;
  gap: 24px;
}

.team-card {
  background: var(--color-white);
  padding: 24px;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  border: 1px solid #eee;
}

.team-card h3 {
  font-size: 20px;
  color: var(--color-heading);
  margin: 0 0 4px;
}

.team-card .role {
  font-size: 16px;
  color: var(--color-text-muted);
  margin: 0 0 12px;
}

.team-card .past {
  font-weight: 600;
  margin: 12px 0 8px;
  color: var(--color-text);
}

.team-card ul {
  padding-left: 24px;
  margin: 8px 0;
  color: var(--color-text);
}
.team-card li {
  margin-bottom: 4px;
}

.team-card p {
  color: var(--color-text);
}

.year-established {
  text-align: center;
  margin-top: 48px;
  font-size: 18px;
  color: var(--color-text);
}

/* ========== CLIENTS ========== */
.section-clients {
  padding: 32px 24px;
  background: var(--color-bg);
}

/* ========== CONTACT ========== */
.section-contact {
  background: var(--color-bg-section);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  max-width: 800px;
  margin: 0 auto;
}
@media (max-width: 600px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

.contact-inquiries h3,
.contact-details h3 {
  font-size: 18px;
  color: var(--color-heading);
  margin: 0 0 12px;
}

.contact-form label {
  display: block;
  margin-bottom: 4px;
  color: var(--color-text);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: var(--color-white);
  color: var(--color-text);
}
.contact-form button {
  padding: 10px 24px;
  background: var(--color-red);
  color: var(--color-white);
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
}
.contact-form button:hover {
  background: var(--color-red-dark);
}
.contact-form .form-note {
  color: #2e7d32;
  margin-bottom: 12px;
}

.contact-details address {
  font-style: normal;
  margin-bottom: 24px;
  color: var(--color-text);
}
.contact-details a {
  color: var(--color-red);
  text-decoration: none;
}
.contact-details a:hover {
  text-decoration: underline;
}

/* ========== FOOTER ========== */
.site-footer {
  text-align: center;
  padding: 24px;
  border-top: 1px solid #eee;
  background: var(--color-white);
  color: var(--color-text-muted);
  font-size: 14px;
}
.site-footer a {
  color: var(--color-red);
  text-decoration: none;
}

/* ========== Mobile: ensure tap targets and readability ========== */
@media (max-width: 600px) {
  .section {
    padding: 32px 16px;
  }
  .hero {
    min-height: 60vh;
  }
  .hero-content {
    padding: 32px 16px;
  }
}
