/* =============================================
   TIDEWATER HOA — Main Stylesheet
   ============================================= */

/* --- Reset & Variables --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --green-dark:   #2d5239;
  --green:        #3a6b4a;
  --green-mid:    #4e8c63;
  --green-light:  #e8f0eb;
  --blue:         #5b90c2;
  --blue-light:   #ddeaf7;
  --tan:          #c8b89a;
  --tan-light:    #f7f3ee;
  --text:         #2c2c2c;
  --text-light:   #5a5a5a;
  --white:        #ffffff;
  --border:       #ddd;
  --shadow:       0 2px 12px rgba(0,0,0,0.1);
  --radius:       6px;
  --transition:   0.2s ease;
  --max-width:    1160px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--white);
}

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

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

h1, h2, h3, h4, h5 {
  font-family: 'Playfair Display', serif;
  line-height: 1.3;
  color: var(--green-dark);
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.05rem; font-family: 'Lato', sans-serif; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

p { margin-bottom: 1rem; }
ul { list-style: none; }

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

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-decoration: none;
}
.btn-primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}
.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--white);
  text-decoration: none;
}
.btn-outline {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}
.btn-outline:hover {
  background: var(--green);
  color: var(--white);
  text-decoration: none;
}


/* =============================================
   HEADER & NAVIGATION
   ============================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 3px solid var(--green);
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 1rem;
}

.site-logo img { height: 52px; width: auto; }
.logo-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  color: var(--green-dark);
  font-weight: 600;
}

/* Nav */
.site-nav { display: flex; align-items: center; gap: 0.5rem; }
.nav-list { display: flex; align-items: center; gap: 0.1rem; }

.nav-item { position: relative; }

.nav-item > a,
.nav-btn {
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  border: none;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  border-radius: var(--radius);
  transition: background var(--transition), color var(--transition);
  font-family: 'Lato', sans-serif;
}

.nav-item > a:hover,
.nav-btn:hover,
.nav-item.open > .nav-btn {
  background: var(--green-light);
  color: var(--green-dark);
  text-decoration: none;
}

.chevron { font-size: 0.6rem; margin-left: 3px; }

/* Dropdown */
.dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 3px solid var(--green);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow);
  z-index: 200;
}
.nav-item.open .dropdown,
.nav-item:focus-within .dropdown { display: block; }

.dropdown li a {
  display: block;
  padding: 0.55rem 1rem;
  font-size: 0.88rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.dropdown li:last-child a { border-bottom: none; }
.dropdown li a:hover {
  background: var(--green-light);
  color: var(--green-dark);
  text-decoration: none;
}

/* Nav icons */
.nav-icons { display: flex; gap: 0.6rem; margin-left: 0.5rem; }
.nav-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--green);
  border: 2px solid var(--green-light);
  transition: all var(--transition);
}
.nav-icons a:hover { background: var(--green); color: var(--white); border-color: var(--green); }

/* Mobile toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--green-dark);
  border-radius: 2px;
  transition: all var(--transition);
}


/* =============================================
   HERO SECTION
   ============================================= */
.hero {
  position: relative;
  height: clamp(320px, 55vh, 540px);
  overflow: hidden;
  background: var(--green-dark);
}

.hero-slides { display: flex; height: 100%; transition: transform 0.6s ease; }

.hero-slide {
  min-width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
}

.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.45) 100%);
}

.hero-caption {
  position: absolute;
  bottom: 2rem;
  left: 2rem;
  z-index: 2;
  color: var(--white);
}
.hero-caption .label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.9;
}
.hero-caption h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--white);
  margin-top: 0.2rem;
}

/* Hero controls */
.hero-controls {
  position: absolute;
  bottom: 1rem;
  right: 1.5rem;
  z-index: 3;
  display: flex;
  gap: 0.5rem;
}
.hero-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: none;
  cursor: pointer;
  transition: background var(--transition);
}
.hero-dot.active { background: var(--white); }

.hero-prev, .hero-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  background: rgba(255,255,255,0.2);
  border: 2px solid rgba(255,255,255,0.5);
  color: var(--white);
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  transition: background var(--transition);
  display: flex; align-items: center; justify-content: center;
}
.hero-prev { left: 1rem; }
.hero-next { right: 1rem; }
.hero-prev:hover, .hero-next:hover { background: rgba(255,255,255,0.4); }


/* =============================================
   PAGE HERO (inner pages)
   ============================================= */
.page-hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 100%);
  color: var(--white);
  padding: 3rem 0 2.5rem;
  text-align: center;
}
.page-hero h1 { color: var(--white); }
.page-hero .subtitle {
  font-size: 1.05rem;
  opacity: 0.85;
  margin-top: 0.5rem;
  font-style: italic;
}
.breadcrumb {
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
  opacity: 0.75;
}
.breadcrumb a { color: var(--white); }
.breadcrumb span { margin: 0 0.4rem; }


/* =============================================
   HOME PAGE SECTIONS
   ============================================= */
.home-intro {
  padding: 4rem 0;
  background: var(--white);
}
.home-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.home-intro blockquote {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  color: var(--green);
  border-left: 4px solid var(--green-mid);
  padding-left: 1rem;
  margin: 1rem 0 1.5rem;
  font-style: italic;
}
.home-intro-image {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  min-height: 300px;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
}
.home-intro-image img { width: 100%; height: 100%; object-fit: cover; }

/* Quick links */
.home-quicklinks {
  background: var(--green-light);
  padding: 3rem 0;
}
.quicklinks-header {
  text-align: center;
  margin-bottom: 2rem;
}
.quicklinks-header h2 { margin-bottom: 0.25rem; }
.quicklinks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.quicklink-card {
  background: var(--white);
  border-radius: 8px;
  padding: 1.75rem 1.5rem;
  text-align: center;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  display: block;
  color: var(--text);
}
.quicklink-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  text-decoration: none;
  color: var(--text);
}
.quicklink-icon {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--green-light);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem;
  color: var(--green);
}
.quicklink-card h3 {
  font-size: 1rem;
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 0.4rem;
}
.quicklink-card p { font-size: 0.88rem; color: var(--text-light); margin: 0; }

/* Newsletter strip */
.newsletter-strip {
  background: var(--green-dark);
  color: var(--white);
  padding: 2rem 0;
  text-align: center;
}
.newsletter-strip h2 { color: var(--white); font-size: 1.3rem; margin-bottom: 1rem; }
.newsletter-strip .btn-outline { border-color: var(--white); color: var(--white); }
.newsletter-strip .btn-outline:hover { background: var(--white); color: var(--green-dark); }


/* =============================================
   CONTENT PAGES
   ============================================= */
.page-content {
  padding: 3rem 0 4rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.prose h2 { margin: 2rem 0 0.75rem; }
.prose h3 { margin: 1.5rem 0 0.5rem; }
.prose ul { list-style: disc; margin-left: 1.5rem; margin-bottom: 1rem; }
.prose ul li { margin-bottom: 0.25rem; }
.prose strong { color: var(--green-dark); }

/* Sidebar */
.sidebar-card {
  background: var(--green-light);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 4px solid var(--green);
}
.sidebar-card h4 { margin-bottom: 0.75rem; color: var(--green-dark); }
.sidebar-card ul { list-style: none; }
.sidebar-card ul li { margin-bottom: 0.4rem; }
.sidebar-card ul li a { font-size: 0.9rem; }

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}
.stat-box {
  text-align: center;
  background: var(--green-light);
  border-radius: 8px;
  padding: 1.25rem 1rem;
}
.stat-box .number {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  color: var(--green);
  font-weight: 600;
  display: block;
}
.stat-box .label { font-size: 0.8rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 0.05em; }


/* =============================================
   COMMUNITY DOWNLOADS
   ============================================= */
.downloads-page { padding: 3rem 0 4rem; }

.downloads-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
}
.tab-btn {
  padding: 0.6rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  color: var(--text-light);
  transition: all var(--transition);
  font-family: 'Lato', sans-serif;
}
.tab-btn:hover { color: var(--green); }
.tab-btn.active { color: var(--green); border-bottom-color: var(--green); }

.downloads-section { margin-bottom: 3rem; scroll-margin-top: 100px; }
.downloads-section h2 { margin-bottom: 1.25rem; }

.file-list { display: grid; gap: 0.75rem; }
.file-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.file-item:hover { border-color: var(--green); box-shadow: 0 2px 8px rgba(58,107,74,0.12); }
.file-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  background: #e53935;
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.file-info { flex: 1; min-width: 0; }
.file-info .name { font-weight: 600; font-size: 0.92rem; color: var(--text); display: block; }
.file-info .meta { font-size: 0.78rem; color: var(--text-light); margin-top: 0.1rem; }
.file-actions { display: flex; gap: 0.5rem; flex-shrink: 0; }
.file-actions a {
  padding: 0.35rem 0.8rem;
  font-size: 0.78rem;
  font-weight: 700;
  border-radius: var(--radius);
  border: 1px solid var(--green);
  color: var(--green);
  text-decoration: none;
  transition: all var(--transition);
}
.file-actions a:hover { background: var(--green); color: var(--white); }


/* =============================================
   CONTACT FORM
   ============================================= */
.contact-grid {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
}

.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  color: var(--text);
}
.form-group label .req { color: #c0392b; }
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: 'Lato', sans-serif;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(58,107,74,0.1);
}
.form-group textarea { min-height: 120px; resize: vertical; }

.radio-group { display: flex; gap: 1.5rem; flex-wrap: wrap; margin-top: 0.4rem; }
.radio-group label {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
}
.radio-group input[type="radio"] { width: auto; }

.form-success {
  display: none;
  background: var(--green-light);
  border: 1px solid var(--green);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  color: var(--green-dark);
}


/* =============================================
   BOD PAGE
   ============================================= */
.bod-image-wrap {
  max-width: 700px;
  margin: 0 auto;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.bod-image-wrap img { width: 100%; }
.bod-placeholder {
  background: var(--green-light);
  border-radius: 8px;
  padding: 3rem;
  text-align: center;
  color: var(--text-light);
  border: 2px dashed var(--green-mid);
  font-style: italic;
}


/* =============================================
   GALLERY
   ============================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}
.gallery-item {
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--green-light);
  cursor: pointer;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }


/* =============================================
   GENERAL UTILITY
   ============================================= */
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header p { color: var(--text-light); max-width: 600px; margin: 0.5rem auto 0; }

.notice-box {
  background: var(--blue-light);
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.cta-box {
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  color: var(--white);
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
}
.cta-box h3 { color: var(--white); margin-bottom: 0.5rem; }
.cta-box p { opacity: 0.85; margin-bottom: 1.25rem; }


/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: var(--green-dark);
  color: rgba(255,255,255,0.85);
  padding-top: 3rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding-bottom: 2.5rem;
}
.footer-logo { height: 50px; width: auto; filter: brightness(10); margin-bottom: 0.75rem; }
.footer-tagline { font-size: 0.85rem; line-height: 1.6; opacity: 0.8; }
.footer-brand .logo-text-footer {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--white);
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: block;
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.4rem; }
.footer-col ul li a { color: rgba(255,255,255,0.75); font-size: 0.88rem; }
.footer-col ul li a:hover { color: var(--white); text-decoration: none; }
.footer-col p { font-size: 0.88rem; opacity: 0.8; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 1rem 0;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.7;
}
.footer-bottom a { color: rgba(255,255,255,0.85); }
.footer-bottom a:hover { color: var(--white); }


/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
  .home-intro-grid,
  .content-grid,
  .contact-grid,
  .footer-inner { grid-template-columns: 1fr; }

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

@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    overflow-y: auto;
    z-index: 99;
    border-top: 1px solid var(--border);
  }
  .site-nav.is-open { display: flex; }

  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-item > a, .nav-btn { font-size: 1rem; padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); }

  .dropdown {
    display: none;
    position: static;
    border: none;
    border-top: none;
    box-shadow: none;
    background: var(--green-light);
    border-radius: 0;
  }
  .nav-item.open .dropdown { display: block; }
  .dropdown li a { padding-left: 2rem; font-size: 0.95rem; }

  .nav-icons { margin-left: auto; margin-top: 1rem; justify-content: center; }

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

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

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

  .file-actions { flex-direction: column; }
}

@media (max-width: 480px) {
  .quicklinks-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
}
