/* =============================================
   Clifton Springs-Phelps Rotary Club — Shared Styles
   ============================================= */

:root {
  --blue:       #17458F;
  --blue-dark:  #0f2d5e;
  --blue-light: #1e5ab5;
  --gold:       #F7A81B;
  --gold-dark:  #d48b00;
  --white:      #ffffff;
  --light:      #f4f6fb;
  --text:       #2c2c2c;
  --text-light: #5a6070;
  --border:     #dce2ef;
  --shadow:     0 2px 14px rgba(0,0,0,0.09);
  --radius:     10px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  line-height: 1.65;
  background: var(--white);
}

img { max-width: 100%; display: block; }
a   { color: var(--blue); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold-dark); }

/* Offset anchor targets so sticky nav doesn't cover section headings */
[id] { scroll-margin-top: 80px; }

/* ---- NAVIGATION ---- */
nav {
  background: var(--blue);
  position: sticky; top: 0; z-index: 200;
  box-shadow: 0 2px 10px rgba(0,0,0,0.25);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  height: 66px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: white;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  flex-shrink: 0;
}

.nav-brand .logo-wheel {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}

.nav-brand span em {
  font-style: normal;
  font-weight: 800;
  font-size: 1.05rem;
  display: block;
}

.nav-brand:hover { color: var(--gold); }

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.1rem;
  align-items: center;
}

.nav-member {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: rgba(255,255,255,0.88);
  padding: 0.4rem 0.75rem;
  border-radius: 5px;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
  margin-left: 1.25rem;
  border: 1px solid rgba(255,255,255,0.3);
  transition: background .2s, color .2s, border-color .2s;
}
.nav-member:hover {
  background: rgba(255,255,255,0.14);
  color: var(--gold);
  border-color: var(--gold);
}
.nav-member svg { flex-shrink: 0; }

.nav-links a {
  color: rgba(255,255,255,0.88);
  padding: 0.45rem 0.9rem;
  border-radius: 5px;
  font-size: 0.875rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background .2s, color .2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: rgba(255,255,255,0.14);
  color: var(--gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  color: white;
  padding: 0.4rem;
  line-height: 0;
}

/* ---- HERO (compact home version) ---- */
.hero {
  background: linear-gradient(140deg, var(--blue-dark) 0%, var(--blue) 100%);
  color: white;
  padding: 2.2rem 1.5rem 1.8rem;
  text-align: center;
}

.hero h1 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 0.25rem;
  letter-spacing: -0.5px;
}

.hero .tagline {
  color: var(--gold);
  font-size: 1.05rem;
  font-style: italic;
  margin-bottom: 0.2rem;
}

.hero .est {
  color: rgba(255,255,255,0.6);
  font-size: 0.82rem;
  margin-top: 0.2rem;
}

/* ---- NAV DROPDOWNS ---- */
.nav-item { position: relative; list-style: none; }

.nav-caret {
  font-size: 0.65rem;
  margin-left: 2px;
  vertical-align: middle;
  opacity: 0.75;
  transition: transform .2s;
  display: inline-block;
}

.nav-item.open .nav-caret,
.nav-item:hover .nav-caret { transform: rotate(180deg); opacity: 1; }

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  background: var(--blue-dark);
  min-width: 210px;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
  z-index: 300;
  padding: 0.35rem 0;
}

.nav-item:hover .nav-dropdown,
.nav-item.open .nav-dropdown { display: block; }

.nav-dropdown a {
  display: block;
  padding: 0.55rem 1.2rem;
  color: rgba(255,255,255,0.85);
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 0;
  transition: background .15s, color .15s;
}

.nav-dropdown a:hover { background: rgba(255,255,255,0.1); color: var(--gold); }

/* ---- HOME SPOTLIGHT (3-column layout) ---- */
.home-spotlight {
  display: grid;
  grid-template-columns: 1fr 1.55fr 1fr;
  gap: 1.5rem;
  padding: 2rem 0 2.5rem;
}

.spotlight-col {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.spotlight-card {
  background: white;
  border-radius: var(--radius);
  padding: 1.3rem 1.5rem;
  box-shadow: var(--shadow);
  border-left: 4px solid var(--gold);
  flex: 1;
}

.spotlight-card h3 {
  color: var(--blue);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.spotlight-card p { font-size: 0.72rem; color: var(--text); margin-bottom: 0.35rem; }
.spotlight-card p:last-child { margin-bottom: 0; }
.spotlight-card strong { color: var(--blue); }

.quick-links { list-style: none; margin-top: 0.1rem; }

.quick-links li {
  border-bottom: 1px solid var(--border);
}
.quick-links li:last-child { border-bottom: none; }

.quick-links a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.2rem;
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 500;
  transition: color .2s;
}
.quick-links a:hover { color: var(--gold-dark); }
.quick-links .ql-arrow { margin-left: auto; color: var(--gold); font-size: 0.85rem; }

/* ---- PHOTO SLIDESHOW ---- */
.slideshow-wrap {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--blue-dark);
}

.slideshow-track {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.75s ease;
}

.slide.active { opacity: 1; }

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slide-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.68));
  color: white;
  padding: 1.8rem 0.9rem 0.65rem;
  font-size: 0.79rem;
  line-height: 1.35;
}

.slide-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 0.55rem 0 0.35rem;
  background: var(--blue-dark);
}

.slide-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background .2s, transform .2s;
}
.slide-dot.active { background: var(--gold); transform: scale(1.25); }

/* ---- BUTTONS ---- */
.btn {
  display: inline-block;
  padding: 0.72rem 1.8rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.3px;
  transition: transform .2s, box-shadow .2s, background .2s;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0,0,0,0.2); color: inherit; }
.btn-gold    { background: var(--gold); color: var(--blue-dark); }
.btn-gold:hover { background: var(--gold-dark); }
.btn-outline { border: 2px solid rgba(255,255,255,0.7); color: white; margin-left: 0.75rem; }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-blue    { background: var(--blue); color: white; }
.btn-blue:hover { background: var(--blue-dark); }

/* ---- LAYOUT ---- */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section { padding: 2rem 0; }
.section-alt { background: var(--light); }

.section-header { margin-bottom: 2rem; }

.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--blue);
  margin-bottom: 0.4rem;
}

.section-title::after {
  content: '';
  display: block;
  width: 44px;
  height: 4px;
  background: var(--gold);
  border-radius: 2px;
  margin-top: 0.5rem;
}

.section-sub {
  color: var(--text-light);
  font-size: 1.02rem;
  margin-top: 0.75rem;
}

/* ---- CARDS ---- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  background: white;
  border-radius: var(--radius);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--gold);
  transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.12); }

.card-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1;
}

.card h3 {
  color: var(--blue);
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
}

.card p { color: var(--text-light); font-size: 0.95rem; }

.card ul {
  list-style: none;
  margin-top: 0.5rem;
}
.card ul li {
  color: var(--text-light);
  font-size: 0.92rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.card ul li:last-child { border-bottom: none; }
.card ul li::before { content: '•'; color: var(--gold); font-weight: bold; }

/* ---- INFO BOX ---- */
.info-box {
  background: white;
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow);
  border-left: 5px solid var(--gold);
}
.info-box h3 { color: var(--blue); font-size: 1.15rem; margin-bottom: 0.75rem; }
.info-box p  { margin-bottom: 0.5rem; font-size: 0.97rem; }
.info-box p:last-child { margin-bottom: 0; }
.info-box strong { color: var(--blue); }

/* ---- TABLES ---- */
.table-wrap { overflow-x: auto; margin-top: 1rem; border-radius: var(--radius); box-shadow: var(--shadow); }

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  background: white;
}

th {
  background: var(--blue);
  color: white;
  padding: 0.8rem 1.1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 0.7rem 1.1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

tr:last-child td { border-bottom: none; }
tr:nth-child(even) td { background: var(--light); }
tr:hover td { background: #e8eef8; }

.compact-table td { padding: 0.38rem 1.1rem; }

/* ---- PRESIDENT GRID ---- */
.presidents-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.4rem;
  margin-top: 1.25rem;
}

.president-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.45rem 0.85rem;
  border-radius: 5px;
  font-size: 0.875rem;
  background: white;
  border: 1px solid var(--border);
}

.president-row:nth-child(odd) { background: var(--light); }

.president-year { color: var(--text-light); font-size: 0.8rem; white-space: nowrap; margin-left: 0.5rem; }

/* ---- PAUL HARRIS FELLOWS ---- */
.phf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.4rem;
  margin-top: 1rem;
}

.phf-item {
  padding: 0.5rem 0.85rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 5px;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.phf-item::before { display: none; }
.phf-item span { color: var(--text-light); font-size: 0.8rem; }

/* ---- NEWSLETTER ---- */
.newsletter-latest {
  background: var(--blue);
  color: white;
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow);
}

.newsletter-latest .nl-icon {
  font-size: 3rem;
  flex-shrink: 0;
  line-height: 1;
}

.newsletter-latest h3 { font-size: 1.2rem; margin-bottom: 0.35rem; }
.newsletter-latest p  { opacity: 0.85; font-size: 0.92rem; margin-bottom: 0.75rem; }

.newsletter-year { margin-bottom: 2rem; }
.newsletter-year h3 {
  color: var(--blue);
  font-size: 1.15rem;
  font-weight: 700;
  padding-bottom: 0.4rem;
  border-bottom: 3px solid var(--gold);
  margin-bottom: 0.85rem;
}

.newsletter-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 0.45rem;
}

.nl-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.8rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.82rem;
  color: var(--blue);
  transition: background .2s, color .2s, border-color .2s;
  font-weight: 500;
}
.nl-link:hover {
  background: var(--blue);
  color: white;
  border-color: var(--blue);
}
.nl-link svg { flex-shrink: 0; opacity: 0.7; }

/* ---- COMMITTEE SECTION ---- */
.committee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.committee-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.committee-card h3 {
  background: var(--blue);
  color: white;
  padding: 0.85rem 1.25rem;
  font-size: 0.95rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.committee-card .committee-body {
  padding: 1.25rem;
}

.committee-card p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}

.committee-card .chair { color: var(--blue); font-weight: 600; font-size: 0.92rem; }

.committee-card ul {
  list-style: none;
  margin-top: 0.75rem;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.committee-card ul li {
  font-size: 0.875rem;
  color: var(--text-light);
  padding: 0.2rem 0;
}

/* ---- EXTERNAL LINKS ---- */
.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.ext-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 1.25rem 1.5rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform .2s, border-color .2s;
  color: var(--text);
}
.ext-link:hover { transform: translateY(-3px); border-color: var(--blue); color: var(--text); }
.ext-link strong { color: var(--blue); font-size: 1rem; display: block; }
.ext-link small  { color: var(--text-light); font-size: 0.85rem; }
.ext-link .arrow { color: var(--gold); font-size: 1.2rem; margin-top: auto; }

/* ---- PAGE HEADER (interior pages) ---- */
.page-hero {
  background: linear-gradient(130deg, var(--blue-dark) 0%, var(--blue) 100%);
  color: white;
  padding: 3rem 1.5rem 2.5rem;
}
.page-hero h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); font-weight: 800; margin-bottom: 0.35rem; }
.page-hero p  { opacity: 0.85; font-size: 1rem; }
.page-hero .gold { color: var(--gold); }

/* ---- HISTORY ---- */
.history-block {
  max-width: 820px;
  line-height: 1.8;
}
.history-block p { margin-bottom: 1rem; font-size: 0.97rem; }

/* ---- HIGHLIGHTS LIST ---- */
.highlight-list {
  list-style: none;
  margin-top: 1rem;
}
.highlight-list li {
  padding: 0.5rem 0 0.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.93rem;
  position: relative;
}
.highlight-list li::before {
  content: '▸';
  color: var(--gold);
  position: absolute;
  left: 0;
}

/* ---- COLLAPSIBLE ---- */
.collapsible-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.9rem 1.25rem;
  margin-top: 1.25rem;
  background: white;
  border: 2px solid var(--blue);
  border-radius: 8px;
  color: var(--blue);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  transition: background .2s, color .2s;
}
.collapsible-btn:hover { background: var(--blue); color: white; }
.collapsible-btn:hover .chevron { stroke: white; }

.chevron {
  flex-shrink: 0;
  transition: transform .25s;
  stroke: var(--blue);
}
.collapsible-btn[aria-expanded="true"] .chevron { transform: rotate(180deg); }
.collapsible-btn[aria-expanded="true"] { background: var(--blue); color: white; }
.collapsible-btn[aria-expanded="true"] .chevron { stroke: white; }

.collapsible-body { margin-top: 1rem; }

/* ---- PHOTO GRID ---- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.photo-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: white;
  margin: 0;
  transition: transform .2s, box-shadow .2s;
}

.photo-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.14); }

.photo-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
  display: block;
}

.photo-card figcaption {
  padding: 0.65rem 0.9rem;
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.4;
  border-top: 3px solid var(--gold);
}

/* ---- FOOTER ---- */
footer {
  background: var(--blue-dark);
  color: rgba(255,255,255,0.75);
  padding: 3rem 0 0;
  margin-top: 4rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}

footer h4 {
  color: var(--gold);
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

footer p { font-size: 0.88rem; line-height: 1.7; }

footer ul { list-style: none; }
footer ul li { margin-bottom: 0.45rem; }
footer ul a { color: rgba(255,255,255,0.65); font-size: 0.88rem; transition: color .2s; }
footer ul a:hover { color: var(--gold); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.1rem 0;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; } /* tablet: keep 2 cols */
}

@media (max-width: 700px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 66px; left: 0; right: 0;
    background: var(--blue-dark);
    padding: 0.75rem 1rem 1rem;
    gap: 0.1rem;
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 0.7rem 1rem; font-size: 1rem; }
  .nav-toggle { display: block; }

  .nav-dropdown {
    position: static;
    box-shadow: none;
    border-radius: 0;
    padding: 0 0 0 1rem;
    background: rgba(0,0,0,0.2);
  }
  .nav-item:hover .nav-dropdown,
  .nav-item.open .nav-dropdown { display: block; }
  .nav-dropdown a { font-size: 0.9rem; padding: 0.5rem 0.8rem; }

  .home-spotlight { grid-template-columns: 1fr; }

  .hero { padding: 1.8rem 1rem 1.5rem; }
  .section { padding: 2.5rem 0; }
  .btn-outline { margin-left: 0; margin-top: 0.6rem; display: inline-block; }

  .newsletter-latest { flex-direction: column; gap: 1rem; }

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

@media (max-width: 480px) {
  .card-grid { grid-template-columns: 1fr; }
  .committee-grid { grid-template-columns: 1fr; }
  .links-grid { grid-template-columns: 1fr; }
  .officers-grid { grid-template-columns: 1fr !important; }
}
