/* ========================================
   Cohousing talks – GitHub Pages theme
   Matching original WordPress color scheme
   ======================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 21px;
  line-height: 1.5;
  color: #000;
  background-color: #f5efe0;
}

.page-content,
.intro {
  font-family: "Hoefler Text", "Noto Serif", Garamond, "Times New Roman", serif;
}

a {
  color: #cd2653;
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #a01d41;
  text-decoration: underline;
}

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

/* --- Layout --- */
.content-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.header-inner,
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header --- */
.site-header {
  background-color: #f5efe0;
  border-bottom: 2px solid #cd2653;
  padding: 1.5rem 0;
}

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

.site-branding {
  flex-shrink: 0;
}

.site-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: #000;
  text-decoration: none;
  display: block;
  line-height: 1.2;
}

.site-title:hover {
  color: #cd2653;
  text-decoration: none;
}

.site-tagline {
  font-size: 0.85rem;
  color: #6d6d6d;
  margin-top: 0.15rem;
}

/* --- Navigation --- */
.nav-menu {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.nav-menu a {
  color: #000;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: #cd2653;
  border-bottom-color: #cd2653;
  text-decoration: none;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-icon {
  display: block;
  width: 24px;
  height: 2px;
  background-color: #000;
  position: relative;
}

.menu-icon::before,
.menu-icon::after {
  content: '';
  display: block;
  width: 24px;
  height: 2px;
  background-color: #000;
  position: absolute;
  left: 0;
}

.menu-icon::before { top: -7px; }
.menu-icon::after { top: 7px; }

/* --- Hero (homepage) --- */
.hero {
  background-color: #cd2653;
  color: #fff;
  padding: 5rem 1.5rem;
  text-align: center;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.0415625em;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: 1.4rem;
  opacity: 0.9;
  font-weight: 400;
}

/* --- Intro section (homepage) --- */
.intro {
  padding: 3rem 0;
}

.intro p {
  margin-bottom: 1.25rem;
  font-size: 1.1rem;
}

/* --- Page content --- */
.page-content {
  padding: 3rem 0;
  overflow-x: clip;
}

.page-content h1,
.page-content h2,
.page-content h3 {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
}

.page-content h1 {
  font-size: 5rem;
  font-weight: 800;
  letter-spacing: -0.0415625em;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #cd2653;
}

.page-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: #000;
}

.page-content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.page-content p {
  margin-bottom: 1.25rem;
}

.page-content ul,
.page-content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.page-content li {
  margin-bottom: 0.5rem;
}

.page-content strong {
  font-weight: 600;
}

/* --- Community cards --- */
.community-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.community-card {
  display: block;
  background: #fff;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid #cd2653;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}

a.community-card:hover {
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
  transform: translateY(-2px);
  text-decoration: none;
}

div.community-card {
  border-left-style: dashed;
  opacity: 0.6;
}

.community-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  color: #000;
}

div.community-card .no-page {
  font-size: 0.8rem;
  color: #999;
  font-style: italic;
  margin: 0.25rem 0 0;
}

.community-card .location {
  font-size: 0.9rem;
  color: #6d6d6d;
  margin: 0;
}

.memorial .community-card {
  border-left-color: #6d6d6d;
  opacity: 0.75;
}

/* --- Images --- */
.page-image,
.page-content img {
  width: 100%;
  margin-bottom: 1.5rem;
}

.page-content img.featured-image {
  width: 85vw;
  max-width: none;
  margin-left: 50%;
  transform: translateX(-50%);
}

/* --- Gallery --- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 0.5rem;
  margin: 1.5rem 0;
}

.gallery img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.2s;
  margin-bottom: 0;
}

.gallery img:hover {
  transform: scale(1.02);
}

/* --- Lightbox --- */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.lightbox-overlay.is-active {
  display: flex;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

/* --- Member medallions --- */
.members {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  margin: 1.5rem 0;
}

.member {
  text-align: center;
}

.page-content .member img {
  width: 100%;
  aspect-ratio: 2/1;
  object-fit: cover;
  margin-bottom: 0;
}

.page-content .member h3 {
  margin-top: 0.25rem;
  margin-bottom: 0.35rem;
}

.page-content .member p {
  color: #444;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: background-color 0.2s, color 0.2s;
}

.btn-primary {
  background-color: #cd2653;
  color: #fff;
}

.btn-primary:hover {
  background-color: #a01d41;
  color: #fff;
  text-decoration: none;
}

/* --- Footer --- */
.site-footer {
  border-top: 2px solid #cd2653;
  padding: 1.5rem 0;
  margin-top: 3rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-footer p {
  font-size: 0.9rem;
  color: #6d6d6d;
}

.back-to-top {
  font-size: 0.9rem;
  color: #6d6d6d;
}

.back-to-top:hover {
  color: #cd2653;
}

/* --- Contact cards --- */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.contact-card {
  background: #fff;
  padding: 1.5rem 1.75rem;
  border-left: 4px solid #cd2653;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.contact-card h3 {
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: #000;
}

.contact-card p {
  margin: 0;
  font-size: 1rem;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  body {
    font-size: 16px;
    line-height: 1.55;
    overflow-x: hidden;
  }

  /* Header: keep title and hamburger on the same row */
  .site-branding {
    flex: 1;
    min-width: 0;
  }

  .site-tagline {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  /* Larger hamburger menu, aligned near the title */
  .menu-toggle {
    display: block;
    padding: 0.5rem;
    align-self: flex-start;
    margin-top: 0.25rem;
  }

  .menu-icon {
    width: 28px;
    height: 3px;
  }

  .menu-icon::before,
  .menu-icon::after {
    width: 28px;
    height: 3px;
  }

  .menu-icon::before { top: -9px; }
  .menu-icon::after { top: 9px; }

  /* Mobile nav */
  .site-nav {
    display: none;
    width: 100%;
    order: 3;
  }

  .site-nav.is-open {
    display: block;
  }

  .nav-menu {
    flex-direction: column;
    gap: 0;
    padding-top: 0.75rem;
  }

  .nav-menu a {
    display: block;
    padding: 0.6rem 0;
    font-size: 1.05rem;
  }

  /* Hero */
  .hero {
    padding: 2.5rem 1.5rem;
  }

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

  .hero-subtitle {
    font-size: 1.1rem;
  }

  /* Page content – tighter spacing */
  .page-content {
    padding: 2rem 0;
  }

  .page-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
  }

  .page-content h2 {
    margin-top: 1.75rem;
    margin-bottom: 0.65rem;
  }

  .page-content h3 {
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
  }

  .page-content p {
    margin-bottom: 0.85rem;
  }

  .intro {
    padding: 2rem 0;
  }

  .intro p {
    font-size: 1rem;
    margin-bottom: 0.85rem;
  }

  /* Community cards */
  .community-list {
    grid-template-columns: 1fr;
  }

  /* Members grid – tighter on mobile */
  .members {
    gap: 1.25rem;
  }
}
