/* =============================================
   The Hithe Residents' Association
   Shared Stylesheet
   Palette: Cotswold greens & stone
   ============================================= */

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

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

body {
  font-family: Georgia, 'Times New Roman', serif;
  background-color: #f7f3ec;
  color: #2c2a24;
  line-height: 1.75;
}

/* --- Colour Variables --- */
:root {
  --green-dark:   #3a5c33;
  --green-mid:    #4e7a45;
  --green-light:  #6b9460;
  --stone-dark:   #9c8460;
  --stone-mid:    #c4a87a;
  --stone-light:  #e5d9c0;
  --cream:        #f7f3ec;
  --cream-dark:   #ede5d4;
  --text-dark:    #2c2a24;
  --text-mid:     #4a4640;
  --text-light:   #7a7060;
  --white:        #ffffff;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: Georgia, serif;
  color: var(--green-dark);
  line-height: 1.3;
}

h1 { font-size: 2.2rem; margin-bottom: 0.5rem; }
h2 { font-size: 1.6rem; margin-bottom: 0.75rem; margin-top: 2rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; margin-top: 1.5rem; color: var(--green-mid); }
h4 { font-size: 1rem; margin-bottom: 0.4rem; margin-top: 1.2rem; color: var(--stone-dark); }

p { margin-bottom: 1rem; color: var(--text-mid); }

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

ul, ol { padding-left: 1.4rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; color: var(--text-mid); }

strong { color: var(--text-dark); }

hr {
  border: none;
  border-top: 2px solid var(--stone-light);
  margin: 2rem 0;
}

/* --- Header & Site Title --- */
.site-header {
  background: var(--green-dark);
  padding: 0;
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.4rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  color: var(--white);
  font-size: 1.1rem;
  font-family: Georgia, serif;
  line-height: 1.3;
  text-decoration: none;
}

.site-title span {
  display: block;
  font-size: 0.75rem;
  font-weight: normal;
  color: var(--stone-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- Navigation --- */
.site-nav {
  background: var(--green-mid);
  border-bottom: 3px solid var(--stone-mid);
}

.site-nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.site-nav a {
  display: inline-block;
  color: var(--white);
  text-decoration: none;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  font-family: Georgia, serif;
  transition: background 0.2s;
  border-bottom: 3px solid transparent;
  margin-bottom: -3px;
}

.site-nav a:hover,
.site-nav a.active {
  background: var(--green-dark);
  color: var(--stone-light);
  text-decoration: none;
  border-bottom-color: var(--stone-mid);
}

/* --- Page Hero Banner --- */
.page-hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 100%);
  color: var(--white);
  padding: 3rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.page-hero h1 {
  color: var(--white);
  font-size: 2.4rem;
  position: relative;
}

.page-hero p {
  color: var(--stone-light);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0.5rem auto 0;
  position: relative;
}

/* Home hero variant */
.page-hero--home {
  padding: 5rem 2rem;
  background:
    linear-gradient(rgba(30, 55, 25, 0.55), rgba(30, 55, 25, 0.55)),
    url('hero.jpeg') center center / cover no-repeat;
}

.page-hero--home h1 {
  font-size: 2.8rem;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.page-hero--home p {
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* --- Main Content Layout --- */
.page-content {
  max-width: 1100px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

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

/* --- Cards --- */
.card {
  background: var(--white);
  border: 1px solid var(--stone-light);
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.card h3 {
  margin-top: 0;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--stone-light);
  margin-bottom: 0.8rem;
}

/* --- Sidebar --- */
.sidebar .card {
  background: var(--cream-dark);
  border-color: var(--stone-mid);
}

.sidebar h3 {
  color: var(--green-dark);
}

/* --- Quick Links Grid (Home) --- */
.quicklinks {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  margin: 2rem 0;
}

.quicklink-card {
  background: var(--white);
  border: 2px solid var(--stone-light);
  border-radius: 8px;
  padding: 1.5rem 1.2rem;
  text-align: center;
  text-decoration: none;
  transition: all 0.2s;
  display: block;
}

.quicklink-card:hover {
  border-color: var(--green-mid);
  background: #f0f7ee;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(78,122,69,0.15);
  text-decoration: none;
}

.quicklink-card .ql-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.quicklink-card .ql-title {
  display: block;
  font-family: Georgia, serif;
  font-size: 1rem;
  color: var(--green-dark);
  font-weight: bold;
  margin-bottom: 0.3rem;
}

.quicklink-card .ql-desc {
  display: block;
  font-size: 0.82rem;
  color: var(--text-light);
}

/* --- Notice / Callout Box --- */
.notice {
  background: #eef5ec;
  border-left: 4px solid var(--green-mid);
  padding: 1rem 1.2rem;
  border-radius: 0 6px 6px 0;
  margin: 1.5rem 0;
}

.notice p { margin-bottom: 0; }

.notice--stone {
  background: #f5f0e6;
  border-left-color: var(--stone-mid);
}

/* --- Committee Table --- */
.committee-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--white);
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.committee-table th {
  background: var(--green-dark);
  color: var(--white);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: normal;
  font-family: Georgia, serif;
}

.committee-table td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--stone-light);
  color: var(--text-mid);
  vertical-align: top;
}

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

/* --- Covenant / Rule List --- */
.rule-item {
  background: var(--white);
  border: 1px solid var(--stone-light);
  border-radius: 6px;
  padding: 1.2rem 1.4rem;
  margin-bottom: 1rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.rule-item .rule-num {
  background: var(--green-dark);
  color: var(--white);
  font-family: Georgia, serif;
  font-size: 0.9rem;
  min-width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.rule-item .rule-body p { margin-bottom: 0.4rem; }
.rule-item .rule-body p:last-child { margin-bottom: 0; }

.rule-note {
  font-size: 0.85rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: 0.4rem;
}

/* --- Section Divider --- */
.section-label {
  display: inline-block;
  background: var(--stone-mid);
  color: var(--white);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.2rem 0.7rem;
  border-radius: 3px;
  margin-bottom: 0.5rem;
  font-family: Georgia, serif;
}

/* --- Footer --- */
.site-footer {
  background: var(--green-dark);
  color: var(--stone-light);
  text-align: center;
  padding: 2rem;
  margin-top: 4rem;
  font-size: 0.85rem;
}

.site-footer a {
  color: var(--stone-light);
  text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .sidebar { order: -1; }

  .site-header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .page-hero h1 { font-size: 1.8rem; }
  .page-hero--home h1 { font-size: 2rem; }

  h1 { font-size: 1.7rem; }
  h2 { font-size: 1.35rem; }

  .quicklinks { grid-template-columns: repeat(2, 1fr); }

  .committee-table { font-size: 0.82rem; }
  .committee-table th, .committee-table td { padding: 0.5rem 0.6rem; }
}

@media (max-width: 480px) {
  .quicklinks { grid-template-columns: 1fr; }
  .page-content { padding: 2rem 1.2rem; }
}
