/* ================================================================
   Leo's Plumbing and Irrigation — style.css
   Shared stylesheet for all pages
   Edit design tokens in :root to update the entire color scheme.
   ================================================================ */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Lato:wght@300;400;700&display=swap');

/* ================================================================
   DESIGN TOKENS
   ================================================================ */
:root {
  --navy:      #1E3A5F;
  --green:     #4A7C59;
  --sky:       #5B9FBF;
  --earth:     #7A5230;
  --white:     #FFFFFF;
  --offwhite:  #F5F7F9;
  --dark-text: #1A1A2E;

  --font-display: 'Oswald', sans-serif;
  --font-body:    'Lato', sans-serif;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.14);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.2);

  --radius:    6px;
  --radius-lg: 14px;

  --transition: 0.28s ease;
}

/* ================================================================
   RESET & BASE
   ================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-body);
  color: var(--dark-text);
  background: var(--white);
  line-height: 1.65;
}

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

a {
  color: var(--sky);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--green); }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--navy);
}

ul { list-style: none; }

/* ================================================================
   EMERGENCY BANNER
   ================================================================ */
.emergency-banner {
  background: #C0392B;
  color: var(--white);
  text-align: center;
  padding: 9px 20px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.emergency-banner a {
  color: var(--white);
  text-decoration: underline;
}

/* Phone number within the banner gets the pulse animation */
.emergency-phone {
  display: inline-block;
}

.emergency-phone.pulse {
  animation: phonePulse 1.6s ease-in-out infinite;
}

@keyframes phonePulse {
  0%, 100% { text-shadow: 0 0 4px rgba(255, 255, 255, 0.4); }
  50%       { text-shadow: 0 0 18px rgba(255, 255, 255, 1), 0 0 28px rgba(255, 200, 200, 0.7); }
}

/* ================================================================
   SITE HEADER (sticky wrapper for banner + navbar)
   ================================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* ================================================================
   NAVBAR
   ================================================================ */
.navbar {
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 40px;
  box-shadow: var(--shadow-md);
  position: relative; /* positioning context for mobile dropdown */
}

.navbar-logo img {
  height: 54px;
  width: auto;
}

.navbar-logo { transition: opacity var(--transition); }
.navbar-logo:hover { opacity: 0.88; }

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-links a {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--sky);
  border-bottom-color: var(--sky);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--white);
  border-radius: 2px;
  transition: all var(--transition);
}

.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-align: center;
  line-height: 1;
}

.btn-primary {
  background: var(--sky);
  color: var(--white);
  border-color: var(--sky);
}

.btn-primary:hover {
  background: #4a8fab;
  border-color: #4a8fab;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}

.btn-outline:hover {
  background: var(--white);
  color: var(--navy);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-green {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.btn-green:hover {
  background: #3d6649;
  border-color: #3d6649;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ================================================================
   SECTION UTILITIES
   ================================================================ */
.section { padding: 88px 20px; }
.section-white    { background: var(--white); }
.section-offwhite { background: var(--offwhite); }
.section-navy     { background: var(--navy); color: var(--white); }

.container {
  max-width: 1160px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  text-align: center;
  margin-bottom: 10px;
  color: var(--navy);
}

.section-navy .section-title { color: var(--white); }

.section-subtitle {
  text-align: center;
  color: #5a5a6e;
  font-size: 1.05rem;
  max-width: 620px;
  margin: 0 auto 52px;
}

.section-navy .section-subtitle { color: rgba(255, 255, 255, 0.78); }

.section-divider {
  width: 56px;
  height: 4px;
  background: linear-gradient(90deg, var(--sky), var(--green));
  margin: 14px auto 44px;
  border-radius: 2px;
}

/* ================================================================
   HOME HERO
   ================================================================ */
.home-hero {
  background: var(--navy);
  color: var(--white);
  min-height: 84vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px;
  position: relative;
  overflow: hidden;
}

/* CSS-only water/diagonal texture */
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -45deg,
      rgba(91, 159, 191, 0.055) 0px,
      rgba(91, 159, 191, 0.055) 1px,
      transparent 1px,
      transparent 28px
    ),
    repeating-linear-gradient(
      45deg,
      rgba(74, 124, 89, 0.035) 0px,
      rgba(74, 124, 89, 0.035) 1px,
      transparent 1px,
      transparent 28px
    );
}

/* Accent gradient bar at bottom of hero */
.home-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--sky), var(--earth));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 820px;
}

.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 3.8rem);
  color: var(--white);
  font-weight: 700;
  line-height: 1.14;
  margin-bottom: 22px;
}

.hero-content .slogan {
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 44px;
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 300;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ================================================================
   PAGE HERO (inner pages)
   ================================================================ */
.page-hero {
  background: var(--navy);
  color: var(--white);
  text-align: center;
  padding: 76px 20px;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg,
    rgba(91, 159, 191, 0.05) 0px,
    rgba(91, 159, 191, 0.05) 2px,
    transparent 2px,
    transparent 22px
  );
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--green), var(--sky), var(--earth));
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: var(--white);
  position: relative;
  z-index: 1;
}

.page-hero p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  margin-top: 14px;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}

/* ================================================================
   WHY CHOOSE US — ICON CARDS
   ================================================================ */
.icon-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.icon-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--green);
  transition: transform var(--transition), box-shadow var(--transition);
}

.icon-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.icon-card .card-icon {
  font-size: 2.6rem;
  margin-bottom: 14px;
  display: block;
}

.icon-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--navy);
  margin-bottom: 8px;
}

.icon-card p {
  font-size: 0.93rem;
  color: #5a5a6e;
  line-height: 1.55;
}

/* ================================================================
   SERVICE CARDS — OVERVIEW (Home page)
   ================================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 26px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--sky);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.service-card .service-icon {
  font-size: 2.2rem;
  margin-bottom: 14px;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 10px;
}

.service-card p {
  color: #5a5a6e;
  font-size: 0.93rem;
  line-height: 1.6;
  flex: 1;
  margin-bottom: 18px;
}

.service-card .card-link {
  color: var(--sky);
  font-weight: 700;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--transition), gap var(--transition);
}

.service-card .card-link:hover {
  color: var(--green);
  gap: 8px;
}

/* ================================================================
   SERVICE CARDS — DETAILED (Services page)
   ================================================================ */
.services-full-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.service-card-full {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 34px;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--green);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}

.service-card-full:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.service-card-full .service-icon {
  font-size: 3rem;
  margin-bottom: 18px;
}

.service-card-full h3 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  color: var(--navy);
  margin-bottom: 14px;
}

.service-card-full p {
  color: #5a5a6e;
  font-size: 1rem;
  line-height: 1.7;
  flex: 1;
  margin-bottom: 28px;
}

/* ================================================================
   SERVICE AREA
   ================================================================ */
.service-area-cities {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 44px;
}

.city-badge {
  background: var(--navy);
  color: var(--white);
  padding: 7px 20px;
  border-radius: 24px;
  font-size: 0.88rem;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.map-container {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 3px solid var(--sky);
}

.map-container iframe {
  display: block;
  width: 100%;
  height: 420px;
}

/* ================================================================
   QUICK CONTACT BAR
   ================================================================ */
.quick-contact {
  background: var(--navy);
  padding: 44px 20px;
  text-align: center;
}

.quick-contact h2 {
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.9rem;
  margin-bottom: 28px;
}

.contact-links {
  display: flex;
  gap: 36px;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.contact-link-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white);
  font-size: 1.25rem;
  font-family: var(--font-display);
  font-weight: 500;
  transition: color var(--transition);
}

.contact-link-item:hover { color: var(--sky); }

.contact-link-item .icon { font-size: 1.45rem; }

.contact-divider {
  width: 1px;
  height: 32px;
  background: rgba(255, 255, 255, 0.3);
}

/* ================================================================
   ABOUT PAGE
   ================================================================ */
.story-text {
  max-width: 740px;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.8;
  color: #444;
}

.story-text p + p { margin-top: 18px; }

.owners-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 32px;
  max-width: 680px;
  margin: 0 auto;
}

.owner-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 38px 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--sky);
  transition: transform var(--transition), box-shadow var(--transition);
}

.owner-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.owner-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid var(--navy);
  margin: 0 auto 20px;
  object-fit: cover;
}

.owner-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--navy);
  margin-bottom: 6px;
}

.owner-card .owner-title {
  color: var(--green);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.value-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 22px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border-bottom: 4px solid var(--earth);
  transition: transform var(--transition), box-shadow var(--transition);
}

.value-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}

.value-card .value-icon {
  font-size: 2.6rem;
  margin-bottom: 14px;
  display: block;
}

.value-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 10px;
}

.value-card p {
  color: #5a5a6e;
  font-size: 0.93rem;
  line-height: 1.55;
}

/* ================================================================
   CONTACT PAGE — FORM
   ================================================================ */
.contact-top-strip {
  background: var(--offwhite);
  padding: 44px 20px;
  text-align: center;
  border-bottom: 2px solid rgba(30, 58, 95, 0.08);
}

.contact-top-strip h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--navy);
  margin-bottom: 20px;
}

.contact-form-wrap {
  max-width: 740px;
  margin: 0 auto;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 50px 44px;
  box-shadow: var(--shadow-md);
}

.form-group { margin-bottom: 24px; }

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 7px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #dde2e8;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--dark-text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--sky);
  box-shadow: 0 0 0 3px rgba(91, 159, 191, 0.18);
}

.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231E3A5F' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-submit-note {
  font-size: 0.88rem;
  color: #777;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
  line-height: 1.6;
}

/* EDITABLE: phone number in note */
.form-submit-note a { color: var(--sky); font-weight: 700; }

.form-success {
  display: none;
  background: #d4edda;
  border: 2px solid #28a745;
  color: #155724;
  border-radius: var(--radius);
  padding: 22px 26px;
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.6;
}

.form-success.visible {
  display: block;
  animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Hours Table */
.hours-table-wrap {
  overflow-x: auto;
}

.hours-table {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  border-collapse: collapse;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.hours-table th {
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 1.05rem;
  padding: 14px 24px;
  text-align: left;
  letter-spacing: 0.05em;
}

.hours-table td {
  padding: 13px 24px;
  border-bottom: 1px solid #eee;
  font-size: 0.97rem;
}

.hours-table tr:nth-child(even) td { background: var(--offwhite); }
.hours-table tr:last-child td { border-bottom: none; }

.hours-badge {
  display: inline-block;
  background: var(--green);
  color: var(--white);
  padding: 4px 13px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  background: var(--navy);
  color: rgba(255, 255, 255, 0.8);
  padding: 64px 20px 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.4fr;
  gap: 52px;
  max-width: 1160px;
  margin: 0 auto;
  padding-bottom: 44px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.footer-brand img {
  height: 58px;
  width: auto;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.93rem;
  line-height: 1.65;
  max-width: 300px;
}

.footer-col h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 18px;
}

.footer-col ul { display: flex; flex-direction: column; gap: 10px; }

.footer-col ul li a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.93rem;
  transition: color var(--transition);
}

.footer-col ul li a:hover { color: var(--sky); }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 12px;
  font-size: 0.93rem;
}

.footer-contact-item .fi { flex-shrink: 0; }

.footer-contact-item a {
  color: rgba(255, 255, 255, 0.7);
  transition: color var(--transition);
  word-break: break-all;
}

.footer-contact-item a:hover { color: var(--sky); }

.footer-bottom {
  text-align: center;
  padding-top: 26px;
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.44);
  max-width: 1160px;
  margin: 0 auto;
}

/* ================================================================
   RESPONSIVE — 900px
   ================================================================ */
@media (max-width: 900px) {
  .services-full-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* ================================================================
   RESPONSIVE — 768px (mobile)
   ================================================================ */
@media (max-width: 768px) {
  /* Navbar */
  .navbar { padding: 10px 18px; }

  .hamburger { display: flex; }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 18px 20px 24px;
    gap: 4px;
    box-shadow: var(--shadow-md);
    border-top: 2px solid var(--sky);
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    font-size: 1.05rem;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    border-right: none;
  }

  /* Sections */
  .section { padding: 60px 16px; }

  .home-hero { min-height: 72vh; padding: 60px 18px; }

  /* Contact form */
  .form-row { grid-template-columns: 1fr; }
  .contact-form-wrap { padding: 32px 20px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .contact-divider { display: none; }

  .contact-links {
    flex-direction: column;
    gap: 18px;
  }
}

/* ================================================================
   RESPONSIVE — 480px
   ================================================================ */
@media (max-width: 480px) {
  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .btn { width: 100%; max-width: 290px; }

  .emergency-banner { font-size: 0.82rem; padding: 8px 12px; }
}
