/* ═══════════════════════════════════════════════
   CRC Network — Country Community Websites
   Built for real people in real places
   ═══════════════════════════════════════════════ */

/* ─── Design Tokens ─── */
:root {
  --color-text:        #1c1712;
  --color-text-mid:    #4a4540;
  --color-text-light:  #706860;
  --color-bg:          #f4efe6;
  --color-bg-warm:     #ece5d8;
  --color-cream:       #fdf9f3;
  --color-dark:        #1c1712;
  --color-border:      #d4ccc0;
  --font-display:      'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:         'Atkinson Hyperlegible', system-ui, -apple-system, sans-serif;
  --radius:            5px;
  --shadow-card:       0 3px 20px rgba(28,23,18,0.10);
  --shadow-lift:       0 8px 32px rgba(28,23,18,0.16);
  --max-width:         1060px;
}

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

body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--color-text);
  background: var(--color-bg) url('assets/texture-paper.png');
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
ul  { list-style: none; }

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: opacity 0.15s ease;
}
a:hover { text-decoration: underline; opacity: 0.8; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.2;
  color: var(--color-text);
}

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

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-primary);
  color: #fff;
  padding: 0.6rem 1.25rem;
  border-radius: 0 0 var(--radius) var(--radius);
  z-index: 1000;
  font-weight: 700;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; text-decoration: none; }


/* ═══════════════════════════════════════════════
   1. Navigation
   ═══════════════════════════════════════════════ */
.site-nav {
  background: var(--color-primary);
  padding: 0.8rem 0;
}

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

.nav-brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  letter-spacing: 0.01em;
}
.nav-brand:hover { text-decoration: none; opacity: 0.9; }

.nav-contact {
  display: flex;
  gap: 1.5rem;
  font-size: 0.875rem;
}
.nav-contact a            { color: rgba(255,255,255,0.85); }
.nav-contact a:hover      { color: #fff; text-decoration: underline; opacity: 1; }


/* ═══════════════════════════════════════════════
   2. Hero  — left-aligned, poster-like
   ═══════════════════════════════════════════════ */
.hero {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: flex-end; /* Text sits at the BOTTOM, not the middle */
  overflow: hidden;
  background: var(--color-primary);
  /* Intentional dot pattern when no photo */
  background-image:
    radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px),
    radial-gradient(rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 32px 32px, 16px 16px;
  background-position: 0 0, 8px 8px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  /* Gradient from transparent top to darker at bottom — frames the text */
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.1)  0%,
    rgba(0,0,0,0.25) 40%,
    rgba(0,0,0,0.65) 100%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 2.5rem 1.75rem 3rem;
  /* Left-aligned — the big change */
  text-align: left;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
}

.hero-eyebrow {
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 0.6rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-style: italic;           /* Italic Playfair = personality */
  font-size: clamp(2.6rem, 7vw, 4.4rem);
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,0.4);
  line-height: 1.1;
  margin-bottom: 0.85rem;
  /* Accent underline on the name itself */
  display: inline-block;
  border-bottom: 3px solid var(--color-accent);
  padding-bottom: 0.4rem;
}

.hero-tagline {
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  color: rgba(255,255,255,0.85);
  max-width: 520px;
  line-height: 1.55;
}


/* ═══════════════════════════════════════════════
   3. Services — Compact band, no separate section
   ═══════════════════════════════════════════════ */
.services {
  /* Sits right below hero, same background family */
  background: color-mix(in srgb, var(--color-primary) 92%, #000);
  padding: 0;
}

/* Hide the section heading — band needs no title */
.services .section-heading { display: none; }

.services-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 1.5rem 0.85rem 0;
  border-bottom: none;
  color: rgba(255,255,255,0.85);
  /* Thin right divider between items */
  border-right: 1px solid rgba(255,255,255,0.12);
  margin-right: 1.5rem;
}

.service-item:last-child {
  border-right: none;
  margin-right: 0;
}

.service-icon {
  color: var(--color-accent);
  flex-shrink: 0;
  opacity: 1;
}

.service-body { display: flex; flex-direction: column; }

.service-title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.92);
  white-space: nowrap;
}

/* Descriptions still in HTML for accessibility — just visually hidden on desktop */
.service-desc {
  display: none;
}


/* ═══════════════════════════════════════════════
   4. Opening Hours — Dark, bold, left side accent
   ═══════════════════════════════════════════════ */
.hours {
  background: var(--color-dark);
  background-image: url('assets/texture-paper.png');
  background-blend-mode: soft-light;
  padding: 3.5rem 0;
}

.hours-inner { max-width: 460px; }

.hours-table {
  border-collapse: collapse;
  width: 100%;
  border-left: 4px solid var(--color-accent);
}

.hours-table td {
  padding: 0.8rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  font-size: 1rem;
}

.hours-table tr:last-child td { border-bottom: none; }

.hours-day {
  font-family: var(--font-display);
  font-weight: 700;
  color: rgba(255,255,255,0.92);
  white-space: nowrap;
}

.hours-time {
  text-align: right;
  color: rgba(255,255,255,0.55);
}


/* ═══════════════════════════════════════════════
   Shared Section Headings
   ═══════════════════════════════════════════════ */
.section-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.55rem, 3vw, 2rem);
  color: var(--color-text);
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--color-border);
  position: relative;
}

/* Accent dash on left of heading underline */
.section-heading::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 52px;
  height: 2px;
  background: var(--color-accent);
}

.section-heading--light {
  color: rgba(255,255,255,0.95);
  border-bottom-color: rgba(255,255,255,0.12);
}
.section-heading--light::before {
  background: rgba(255,255,255,0.5);
}

/* ═══════════════════════════════════════════════
   Section Spacing
   ═══════════════════════════════════════════════ */
.news    { padding: 3.5rem 0; background: var(--color-bg-warm); }
.events  { padding: 3.5rem 0; background: var(--color-bg); }
.about   { padding: 3.5rem 0; background: var(--color-cream); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.contact { padding: 3.5rem 0; background: var(--color-bg); }


/* ═══════════════════════════════════════════════
   5. News — Editorial: featured + smaller cards
   ═══════════════════════════════════════════════ */
.news-board {
  display: grid;
  /* Featured item takes ~60%, rest stack in remaining space */
  grid-template-columns: 1.65fr 1fr;
  grid-template-rows: auto auto;
  gap: 1.25rem;
  align-items: start;
}

/* ── Featured card (first child) ── */
.news-card {
  background: var(--color-cream);
  border-radius: var(--radius);
  overflow: visible; /* Allow pin to show above */
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

/* Pushpin on every secondary card */
.news-card::before {
  content: '';
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%);
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 2px 5px rgba(0,0,0,0.25), inset 0 -1px 1px rgba(0,0,0,0.2);
  z-index: 10;
}

/* Featured card: full left column, tall, no rotation, no pin */
.news-card:first-child {
  grid-column: 1;
  grid-row: 1 / 3;
  border-left: 5px solid var(--color-primary);
  transform: none !important;
}
.news-card:first-child::before { display: none; } /* No pin on featured */
.news-card:first-child .news-card-body {
  padding: 1.75rem 1.75rem 2rem;
}
.news-card:first-child .news-card-body time {
  font-size: 0.78rem;
}
.news-card:first-child .news-card-body h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  line-height: 1.25;
}
.news-card:first-child .news-card-body p {
  font-size: 0.95rem;
  color: var(--color-text-mid);
  line-height: 1.65;
}

/* Secondary cards: right column, stacked, slight rotation */
.news-card:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
  transform: rotate(1deg);
  border-top: 3px solid var(--color-primary);
}
.news-card:nth-child(3) {
  grid-column: 2;
  grid-row: 2;
  transform: rotate(-0.8deg);
  border-top: 3px solid var(--color-primary);
}

.news-card:hover {
  transform: rotate(0) translateY(-3px) !important;
  box-shadow: var(--shadow-lift);
}
.news-card:first-child:hover {
  transform: translateY(-3px) !important;
}

.news-card-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.news-card-body {
  padding: 1.1rem 1.25rem 1.4rem;
  overflow: hidden; /* Clip inside the card */
}

.news-card-body time {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin-bottom: 0.45rem;
}

.news-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.news-card-body p {
  font-size: 0.85rem;
  color: var(--color-text-mid);
  line-height: 1.55;
}


/* ═══════════════════════════════════════════════
   6. Events
   ═══════════════════════════════════════════════ */
.events-list { max-width: 640px; }

.event-item {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  padding: 1.4rem 0;
  border-bottom: 1px solid var(--color-border);
}
.event-item:last-child { border-bottom: none; }

.event-date-badge {
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius);
  min-width: 60px;
  width: 60px;
  height: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.event-day {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 900;
  line-height: 1;
}

.event-month {
  font-size: 0.63rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-top: 2px;
}

.event-details h3       { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.2rem; }
.event-time             { font-size: 0.8rem; font-weight: 700; color: var(--color-accent); margin-bottom: 0.3rem; }
.event-description      { font-size: 0.88rem; color: var(--color-text-mid); line-height: 1.55; }


/* ═══════════════════════════════════════════════
   7. About
   ═══════════════════════════════════════════════ */
.about-layout {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.about-text { flex: 1; }

.about-text p {
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--color-text-mid);
}

/* Drop cap on the first letter of the about text */
.about-text p::first-letter {
  font-family: var(--font-display);
  font-size: 3.5em;
  font-weight: 900;
  font-style: italic;
  float: left;
  line-height: 0.75;
  margin-right: 0.1em;
  margin-top: 0.08em;
  color: var(--color-primary);
}

.about-image { flex: 0 0 40%; }
.about-image img {
  border-radius: var(--radius);
  object-fit: cover;
  width: 100%;
  box-shadow: var(--shadow-card);
}


/* ═══════════════════════════════════════════════
   8. Contact
   ═══════════════════════════════════════════════ */
.contact-layout {
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

.contact-details { flex: 0 0 280px; }

.contact-details address {
  font-style: normal;
  line-height: 2;
  font-size: 0.98rem;
  margin-bottom: 1.25rem;
}

.contact-address { font-weight: 700; margin-bottom: 0.15rem; }
.contact-details a { color: var(--color-primary); }

.contact-map { flex: 1; min-width: 0; }
.contact-map iframe {
  width: 100%;
  height: 300px;
  border-radius: var(--radius);
  border: none;
  box-shadow: var(--shadow-card);
}

.facebook-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.2rem;
  background: #1877f2;
  color: #fff;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.875rem;
  transition: background 0.2s;
}
.facebook-link:hover { background: #0d65d9; text-decoration: none; opacity: 1; color: #fff; }


/* ═══════════════════════════════════════════════
   9. Footer
   ═══════════════════════════════════════════════ */
.site-footer {
  background: var(--color-dark);
  background-image: url('assets/texture-paper.png');
  background-blend-mode: soft-light;
  text-align: center;
  padding: 2.75rem 0;
}

.footer-network  { font-size: 0.875rem; color: rgba(255,255,255,0.6); margin-bottom: 0.6rem; }
.footer-network strong { color: rgba(255,255,255,0.88); }
.footer-contact  { font-size: 0.875rem; margin-bottom: 1.25rem; }
.footer-contact a { color: rgba(255,255,255,0.8); }
.footer-contact a:hover { color: #fff; }
.footer-acknowledgement {
  font-size: 0.8rem;
  font-style: italic;
  color: rgba(255,255,255,0.4);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}


/* ═══════════════════════════════════════════════
   Responsive — Mobile (≤768px)
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  .hero                  { min-height: 280px; align-items: center; }
  .hero h1               { font-size: 2.2rem; }
  .hero-tagline          { font-size: 0.95rem; }

  .nav-contact           { display: none; }

  /* Services: show descriptions on mobile since there's room */
  .services-list         { flex-direction: column; gap: 0; }
  .service-item          { border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); padding: 0.9rem 0; margin-right: 0; }
  .service-desc          { display: block; font-size: 0.8rem; color: rgba(255,255,255,0.65); margin-top: 0.1rem; }

  /* News: single column on mobile */
  .news-board            { grid-template-columns: 1fr; }
  .news-card:first-child { grid-row: auto; }
  .news-card:nth-child(2),
  .news-card:nth-child(3) { grid-column: 1; grid-row: auto; }
  .news-card             { transform: none !important; }
  .news-card::before     { display: none; } /* No pins on mobile */

  .about-layout          { flex-direction: column; }
  .about-image           { flex: 0 0 auto; }
  .about-text p::first-letter { font-size: 2.5em; }

  .contact-layout        { flex-direction: column; }
  .contact-details       { flex: 0 0 auto; width: 100%; }
  .contact-map iframe    { height: 250px; }

  .news, .events, .about, .contact { padding: 2.5rem 0; }
  .hours { padding: 2.5rem 0; }
}

/* Fallback for browsers without color-mix() support */
@supports not (color: color-mix(in srgb, red, blue)) {
  .services { background: var(--color-primary); filter: brightness(0.88); }
}
