/* Hill Country Foundation Repair - Main Stylesheet */
/* Mobile-first, lightweight, CWV-optimized */

:root {
  --primary: #2c5f2d;
  --primary-dark: #1a3d1b;
  --accent: #c4a35a;
  --text: #2d2d2d;
  --text-light: #555;
  --bg: #fff;
  --bg-light: #f8f7f4;
  --bg-dark: #1a1a1a;
  --border: #e0ddd5;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --radius: 6px;
  --max-width: 1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* Layout */
.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1rem; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }

@media (min-width: 768px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
}

/* Header */
.site-header {
  background: var(--bg);
  border-bottom: 2px solid var(--primary);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

.logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}
.logo span { color: var(--accent); }

.header-phone {
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.95rem;
  transition: background 0.2s;
}
.header-phone:hover { background: var(--primary-dark); color: #fff; }

/* Nav */
.site-nav { background: var(--primary-dark); }
.nav-list {
  display: flex;
  list-style: none;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  overflow-x: auto;
}
.nav-list li a {
  display: block;
  color: #fff;
  padding: 0.65rem 1rem;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: background 0.2s;
}
.nav-list li a:hover { background: rgba(255,255,255,0.1); }

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; color: #fff; font-size: 1.5rem; cursor: pointer; padding: 0.5rem; }

@media (max-width: 767px) {
  .nav-toggle { display: block; }
  .nav-list {
    display: none;
    flex-direction: column;
  }
  .nav-list.active { display: flex; }
  .site-nav { position: relative; }
  .nav-toggle-wrap { display: flex; justify-content: flex-end; max-width: var(--max-width); margin: 0 auto; padding: 0.5rem 1rem; }
}

/* Hero */
.hero {
  background: linear-gradient(135deg, rgba(26,61,27,0.88) 0%, rgba(44,95,45,0.85) 100%), url('/images/hero-bg.jpg') center/cover no-repeat;
  color: #fff;
  padding: 3rem 0;
  text-align: center;
}
.hero h1 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}
.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

@media (min-width: 768px) {
  .hero { padding: 4.5rem 0; }
  .hero h1 { font-size: 2.4rem; }
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}
.btn-primary { background: var(--accent); color: var(--bg-dark); }
.btn-primary:hover { background: #d4b36a; color: var(--bg-dark); }
.btn-secondary { background: #fff; color: var(--primary); }
.btn-secondary:hover { background: var(--bg-light); color: var(--primary); }
.btn-phone { background: var(--primary); color: #fff; }
.btn-phone:hover { background: var(--primary-dark); color: #fff; }

/* Sections */
.section { padding: 3rem 0; }
.section-alt { background: var(--bg-light); }
.section h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--primary-dark);
}
.section h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}
.section p { margin-bottom: 1rem; color: var(--text-light); }

/* Cards */
.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}
.card:hover { transform: translateY(-2px); }
.card h3 { margin-bottom: 0.5rem; }
.card p { font-size: 0.95rem; }

/* Trust bar */
.trust-bar {
  background: var(--bg-light);
  padding: 1.5rem 0;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.trust-items {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}
.trust-item {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary);
}
.trust-item::before {
  content: "\2713 ";
  color: var(--accent);
  font-weight: 700;
}

/* CTA Banner */
.cta-banner {
  background: var(--primary);
  color: #fff;
  padding: 2.5rem 0;
  text-align: center;
}
.cta-banner h2 { color: #fff; margin-bottom: 0.5rem; }
.cta-banner p { color: rgba(255,255,255,0.85); margin-bottom: 1.5rem; }

/* Contact Form */
.contact-form {
  max-width: 500px;
  margin: 0 auto;
}
.form-group { margin-bottom: 1rem; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
}
.form-group textarea { resize: vertical; min-height: 100px; }
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44,95,45,0.1);
}

/* Footer */
.site-footer {
  background: var(--bg-dark);
  color: #ccc;
  padding: 2.5rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 0.75rem; }
.site-footer a { color: #ccc; }
.site-footer a:hover { color: var(--accent); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-links li a { font-size: 0.9rem; }
.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: #888;
}

/* Page content */
.page-header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff;
  padding: 2.5rem 0;
  text-align: center;
}
.page-header h1 { font-size: 1.8rem; margin-bottom: 0.5rem; }
.page-header p { opacity: 0.9; }

.content { padding: 2.5rem 0; }
.content h2 { margin: 2rem 0 0.75rem; }
.content h3 { margin: 1.5rem 0 0.5rem; }
.content ul, .content ol { margin: 0 0 1rem 1.5rem; }
.content li { margin-bottom: 0.35rem; color: var(--text-light); }

/* Utility */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Images */
.img-rounded { border-radius: var(--radius); }
.img-full { width: 100%; height: auto; display: block; }
.img-section {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
}
@media (min-width: 768px) {
  .img-section { height: 320px; }
}
.img-card {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
}
.page-header-img {
  background-size: cover;
  background-position: center;
  position: relative;
}
.page-header-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26,61,27,0.85), rgba(44,95,45,0.8));
}
.page-header-img > .container { position: relative; z-index: 1; }
