/* South Coast Weekly — Community Hub */
:root {
  --navy: #1a2744;
  --navy-light: #243354;
  --ocean: #2b6cb0;
  --ocean-light: #4299e1;
  --sand: #f7f3ee;
  --sand-dark: #e8e0d5;
  --coral: #ed6a5a;
  --coral-dark: #d4534a;
  --gold: #d69e2e;
  --green: #38a169;
  --text: #2d3748;
  --text-light: #718096;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.12);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--sand);
  color: var(--text);
  line-height: 1.6;
}

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

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }

/* Typography */
h1, h2, h3 { font-family: 'Playfair Display', Georgia, serif; color: var(--navy); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin-bottom: 1rem; }
h3 { font-size: 1.15rem; }

/* ==========  NAVIGATION  ========== */
.site-nav {
  background: var(--navy);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-nav .logo {
  color: white;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.site-nav .logo:hover { text-decoration: none; }
.site-nav .logo .icon { font-size: 1.5rem; }
.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,0.8);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}
.nav-links a:hover, .nav-links a.active {
  color: white;
  background: rgba(255,255,255,0.1);
  text-decoration: none;
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 0.5rem 1rem 1rem;
    box-shadow: var(--shadow-lg);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 0.75rem; }
}

/* ==========  HERO  ========== */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--ocean) 100%);
  color: white;
  padding: 4rem 0 3.5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 70%, rgba(255,255,255,0.05) 0%, transparent 50%);
}
.hero h1 { color: white; margin-bottom: 1rem; position: relative; }
.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto 2rem;
  position: relative;
}

/* Subscribe form */
.subscribe-form {
  display: flex;
  max-width: 480px;
  margin: 0 auto;
  gap: 0.5rem;
  position: relative;
}
.subscribe-form input {
  flex: 1;
  padding: 0.85rem 1.25rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50px;
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 1rem;
  outline: none;
  backdrop-filter: blur(4px);
}
.subscribe-form input::placeholder { color: rgba(255,255,255,0.6); }
.subscribe-form input:focus { border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.2); }
.subscribe-form button {
  padding: 0.85rem 1.75rem;
  background: var(--coral);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.subscribe-form button:hover { background: var(--coral-dark); transform: translateY(-1px); }

/* Stats row */
.stats-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  position: relative;
}
.stat { text-align: center; }
.stat-num { font-size: 1.75rem; font-weight: 700; font-family: 'Playfair Display', serif; }
.stat-label { font-size: 0.8rem; opacity: 0.7; text-transform: uppercase; letter-spacing: 0.05em; }

/* ==========  SECTIONS  ========== */
.section { padding: 3rem 0; }
.section-alt { background: var(--white); }
.section-header { text-align: center; margin-bottom: 2rem; }
.section-header p { color: var(--text-light); max-width: 600px; margin: 0.5rem auto 0; }

/* ==========  TOWN GRID  ========== */
.town-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.town-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: all 0.2s;
  border-left: 4px solid var(--ocean);
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  display: block;
}
.town-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.town-card h3 { margin-bottom: 0.35rem; }
.town-card .event-count {
  font-size: 0.85rem;
  color: var(--ocean);
  font-weight: 600;
}
.town-card .town-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* ==========  EVENT CARDS  ========== */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.event-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--shadow);
  transition: all 0.2s;
}
.event-card:hover { box-shadow: var(--shadow-lg); }
.event-card .date-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--coral);
  margin-bottom: 0.5rem;
}
.event-card h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.event-card .meta {
  font-size: 0.8rem;
  color: var(--text-light);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.event-card .meta span { display: inline-flex; align-items: center; gap: 0.2rem; }
.event-card .desc {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.badge {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
}
.badge-free { background: #c6f6d5; color: #22543d; }
.badge-cat { background: #e9d8fd; color: #553c9a; }

/* ==========  FEATURED EVENTS  ========== */
.featured-event {
  background: linear-gradient(135deg, var(--navy) 0%, var(--ocean) 100%);
  color: white;
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.5rem;
}
.featured-event h3 { color: white; font-size: 1.35rem; margin-bottom: 0.5rem; }
.featured-event .meta { color: rgba(255,255,255,0.8); }
.featured-event .desc { color: rgba(255,255,255,0.7); }

/* ==========  NEWSLETTER ARCHIVE  ========== */
.newsletter-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
  transition: all 0.2s;
}
.newsletter-card:hover { box-shadow: var(--shadow-lg); }
.newsletter-card .issue-num {
  background: var(--navy);
  color: white;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
}
.newsletter-card .issue-meta { flex: 1; }
.newsletter-card h3 { margin-bottom: 0.25rem; }
.newsletter-card .date { font-size: 0.8rem; color: var(--text-light); }
.newsletter-card .preview { font-size: 0.85rem; color: var(--text-light); margin-top: 0.35rem; }

/* ==========  RESOURCES  ========== */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.resource-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--green);
}
.resource-card .icon { font-size: 2rem; margin-bottom: 0.75rem; }
.resource-card h3 { margin-bottom: 0.5rem; }
.resource-card p { font-size: 0.85rem; color: var(--text-light); }
.resource-card ul { font-size: 0.85rem; color: var(--text-light); margin-top: 0.5rem; padding-left: 1.25rem; }
.resource-card li { margin-bottom: 0.25rem; }

/* ==========  FOOTER  ========== */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 2rem;
  margin-top: 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 {
  color: white;
  font-family: 'Playfair Display', serif;
  margin-bottom: 0.75rem;
}
.footer-col a { color: rgba(255,255,255,0.7); display: block; padding: 0.25rem 0; font-size: 0.9rem; }
.footer-col a:hover { color: white; text-decoration: none; }
.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
}
.footer-bottom .heart { color: var(--coral); }

/* ==========  ABOUT PAGE  ========== */
.about-hero {
  background: linear-gradient(135deg, var(--ocean) 0%, var(--navy) 100%);
  color: white;
  padding: 3rem 0;
  text-align: center;
}
.about-hero h1 { color: white; }
.about-hero p { opacity: 0.9; max-width: 600px; margin: 1rem auto 0; }
.value-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  text-align: center;
}
.value-card .icon { font-size: 2.5rem; margin-bottom: 0.75rem; }
.value-card h3 { margin-bottom: 0.5rem; }
.value-card p { font-size: 0.9rem; color: var(--text-light); }

/* ==========  TOWN PAGE  ========== */
.town-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--ocean) 100%);
  color: white;
  padding: 3rem 0;
}
.town-hero h1 { color: white; margin-bottom: 0.5rem; }
.town-hero p { opacity: 0.9; }
.town-hero .back-link { color: rgba(255,255,255,0.8); font-size: 0.9rem; display: inline-flex; align-items: center; gap: 0.35rem; margin-bottom: 1rem; }
.town-hero .back-link:hover { color: white; text-decoration: none; }

/* ==========  UTILITIES  ========== */
.btn-primary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: var(--coral);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}
.btn-primary:hover { background: var(--coral-dark); text-decoration: none; color: white; transform: translateY(-1px); }

.btn-outline-white {
  display: inline-block;
  padding: 0.65rem 1.25rem;
  border: 2px solid rgba(255,255,255,0.4);
  color: white;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.6); text-decoration: none; color: white; }

.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* ==========  RESPONSIVE  ========== */
@media (max-width: 600px) {
  .hero { padding: 3rem 0 2.5rem; }
  .subscribe-form { flex-direction: column; }
  .subscribe-form button { width: 100%; }
  .stats-row { gap: 1.5rem; }
  .stat-num { font-size: 1.5rem; }
  .section { padding: 2rem 0; }
  .town-grid { grid-template-columns: 1fr; }
  .event-grid { grid-template-columns: 1fr; }
  .resource-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}
