/* ============================================
   Del Dios Mutual Water Company - Main Stylesheet
   This file controls all the visual styling for the website
   ============================================ */

/* CSS VARIABLES - These are like "color swatches" you can reuse throughout the site
   If you want to change colors later, just update these values once! */
:root {
  /* Primary Colors - Inspired by Lake Hodges photo */
  --water-blue: #2B6BA8;        /* Deep blue from the lake */
  --sky-blue: #C7EBFF;          /* Light blue from the sky */
  --earth-green: #E9F5DC;       /* Green from the hills */
  --warm-earth: #8B7355;        /* Earthy brown tones */
  
  /* Neutral Colors */
  --white: #FFFFFF;
  --off-white: #F8F9FA;
  --light-gray: #E9ECEF;
  --medium-gray: #6C757D;
  --dark-gray: #343A40;
  --black: #1A1A1A;
  
  /* Accent Colors */
  --accent-blue: #1E5A8E;       /* Darker blue for important elements */
  --success-green: #4A7C59;     /* For success messages */
  --warning-orange: #D97F3E;    /* For alerts */
  
  /* Typography */
  --font-heading: 'Georgia', serif;           /* Classic, trustworthy serif for headings */
  --font-body: 'Segoe UI', Tahoma, sans-serif; /* Clean, readable sans-serif for body text */
  
  /* Spacing System - Consistent spacing throughout the site */
  --space-xs: 0.5rem;   /* 8px */
  --space-sm: 1rem;     /* 16px */
  --space-md: 1.5rem;   /* 24px */
  --space-lg: 2rem;     /* 32px */
  --space-xl: 3rem;     /* 48px */
  --space-xxl: 4rem;    /* 64px */
  
  /* Border Radius - Rounded corners */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Shadows - For depth and elevation */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

/* Reset default browser styles for consistency */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth; /* Smooth scrolling when clicking anchor links */
}

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

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--accent-blue);
  line-height: 1.2;
  margin-bottom: var(--space-md);
}

h1 { font-size: 2.5rem; }    /* 40px */
h2 { font-size: 2rem; }      /* 32px */
h3 { font-size: 1.5rem; }    /* 24px */
h4 { font-size: 1.25rem; }   /* 20px */

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--water-blue);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-blue);
  text-decoration: underline;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

header {
  background-color: var(--sky-blue);
  box-shadow: var(--shadow-md);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xs) var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.logo {
  height: 200px;
  width: auto;
}

.site-title {
  font-size: 1.25rem;
  color: var(--accent-blue);
  font-weight: 600;
  margin: 0;
}

/* Navigation Menu */
nav {
  flex-grow: 1;
  display: flex;
  justify-content: flex-end;
}

nav ul {
  list-style: none;
  display: flex;
  gap: var(--space-md);
  flex-wrap: wrap;
  align-items: center;
}

nav a {
  color: var(--dark-gray);
  font-weight: 500;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: background-color 0.3s ease, color 0.3s ease;
}

nav a:hover,
nav a.active {
  background-color: var(--water-blue);
  color: var(--white);
  text-decoration: none;
}

/* ============================================
   HERO SECTION (Homepage Banner)
   ============================================ */

.hero {
  position: relative;
  height: 300px;
  background-image: url('images/LakeHodgesHeroPhoto.png');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  text-align: center;
}

/* Dark overlay to make text readable over photo */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.5));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  padding: var(--space-lg);
}

.hero h1 {
  font-size: 3rem;
  color: var(--white);
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
  margin-bottom: var(--space-sm);
}

.hero p {
  font-size: 1.5rem;
  color: var(--white);
  text-shadow: 1px 1px 4px rgba(0,0,0,0.5);
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-lg);
}

.page-title {
  text-align: center;
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 3px solid var(--water-blue);
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */

.section {
  margin-bottom: var(--space-xxl);
}

.section-title {
  color: var(--water-blue);
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--light-gray);
}

/* Info Cards - For important information boxes */
.info-card {
  background-color: var(--earth-green);
  border-left: 4px solid var(--water-blue);
  padding: var(--space-lg);
  margin-bottom: var(--space-lg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.info-card h3 {
  margin-top: 0;
}

.emergency-card {
  background-color: #FFF3E0;
  border-left-color: var(--warning-orange);
}

.emergency-card h3 {
  color: var(--warning-orange);
}

/* ============================================
   TEAM MEMBERS (Board & Staff)
   ============================================ */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-lg);
  margin-top: var(--space-lg);
}

.team-member {
  background-color: var(--earth-green);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.team-member:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.team-photo {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto var(--space-md);
  border: 4px solid var(--water-blue);
}

.team-member h3 {
  font-size: 1.25rem;
  margin-bottom: var(--space-xs);
}

.team-member .title {
  color: var(--medium-gray);
  font-style: italic;
  margin-bottom: var(--space-md);
  display: block;
}

.team-member p {
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================
   TABLES (Billing Rates)
   ============================================ */

.table-wrapper {
  overflow-x: auto;
  margin: var(--space-lg) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  background-color: var(--white);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-md);
  overflow: hidden;
}

thead {
  background-color: var(--water-blue);
  color: var(--white);
}

th, td {
  padding: var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--light-gray);
}

th {
  font-weight: 600;
  font-size: 1rem;
}

tbody tr:hover {
  background-color: var(--off-white);
}

tbody tr:last-child td {
  border-bottom: none;
}

/* ============================================
   LISTS
   ============================================ */

.content-list {
  list-style: none;
  margin-left: 0;
}

.content-list li {
  padding: var(--space-sm) 0;
  padding-left: var(--space-lg);
  position: relative;
}

.content-list li::before {
  content: '✓';
  color: var(--success-green);
  font-weight: bold;
  position: absolute;
  left: 0;
}

/* ============================================
   PDF LINKS
   ============================================ */

.pdf-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background-color: var(--water-blue);
  color: var(--white);
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: background-color 0.3s ease, transform 0.2s ease;
  margin-right: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.pdf-link:hover {
  background-color: var(--sky-blue);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pdf-link::before {
  content: '📄';
  font-size: 1.2rem;
}

.pdf-placeholder {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  background-color: var(--light-gray);
  color: var(--medium-gray);
  border-radius: var(--radius-md);
  font-weight: 500;
  margin-right: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.pdf-placeholder::before {
  content: '📄';
  font-size: 1.2rem;
}

/* ============================================
   FAQ SECTION
   ============================================ */

.faq-item {
  margin-bottom: var(--space-xl);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid var(--light-gray);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  color: var(--water-blue);
  font-size: 1.25rem;
  margin-bottom: var(--space-md);
}

.faq-answer {
  margin-left: var(--space-lg);
}

/* ============================================
   CONTACT INFO
   ============================================ */

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-xl);
  margin-top: var(--space-lg);
}

.contact-section {
  background-color: var(--off-white);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border-top: 4px solid var(--water-blue);
}

.contact-section h3 {
  margin-top: 0;
}

.contact-person {
  margin-bottom: var(--space-lg);
}

.contact-person:last-child {
  margin-bottom: 0;
}

.contact-person h4 {
  color: var(--dark-gray);
  margin-bottom: var(--space-xs);
}

.contact-person p {
  margin-bottom: var(--space-xs);
  color: var(--medium-gray);
}

.contact-person a {
  word-break: break-all;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  background-color: var(--dark-gray);
  color: var(--white);
  padding: var(--space-xl) var(--space-lg);
  margin-top: var(--space-xxl);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-content p {
  margin-bottom: var(--space-sm);
  color: var(--light-gray);
}

.footer-content a {
  color: var(--sky-blue);
}

.footer-content a:hover {
  color: var(--white);
}

/* ============================================
   RESPONSIVE DESIGN
   This makes the site work on tablets and phones
   ============================================ */

/* Tablets and smaller (max-width: 768px) */
@media (max-width: 768px) {
  /* Reduce font sizes for smaller screens */
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }
  
  .hero {
    height: 250px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1.25rem;
  }
  
  /* Stack navigation vertically on mobile */
  .header-container {
    flex-direction: column;
    text-align: center;
  }
  
  nav {
    margin-top: var(--space-xs);
    width: 100%;
    justify-content: center;
  }
  
  nav ul {
    justify-content: center;
    gap: var(--space-xs);
  }
  
  /* Reduce container padding on mobile */
  .container {
    padding: var(--space-xs) var(--space-xs);
  }
  
  /* Make team grid single column on mobile */
  .team-grid {
    grid-template-columns: 1fr;
  }
  
  /* Make contact grid single column on mobile */
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Small phones (max-width: 480px) */
@media (max-width: 480px) {
  html {
    font-size: 14px;
  }
  
  .logo {
    height: 50px;
  }
  
  .hero {
    height: 250px;
  }
  
  nav ul {
    flex-direction: column;
    gap: var(--space-xs);
  }
  
  nav a {
    display: block;
    width: 100%;
    text-align: center;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-center {
  text-align: center;
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.mt-lg {
  margin-top: var(--space-lg);
}

.highlight {
  background-color: #FFF9E6;
  padding: var(--space-sm);
  border-left: 3px solid var(--warning-orange);
  border-radius: var(--radius-sm);
}
