/* =============================================================
   Rotary Club of Winter Park — Sunrise
   Site stylesheet
   ============================================================= */

/* --- Brand tokens (Rotary brand center palette) ----------- */
:root {
  --rotary-royal-blue: #17458F;
  --rotary-azure: #0C3C7C;
  --rotary-gold: #F7A81B;
  --rotary-sky: #009BDA;
  --rotary-cranberry: #D81860;

  --color-text: #1F1F1F;
  --color-muted: #5A5A5A;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F5F2EC;
  --color-border: #E5E5E5;

  --container-max: 1200px;
  --gutter: 1.5rem;
  --radius: 4px;

  --font-body: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* --- Reset / base ----------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--rotary-royal-blue);
  text-decoration: none;
  transition: color .15s ease;
}
a:hover { color: var(--rotary-azure); text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-body);
  font-weight: 700;
  line-height: 1.25;
  margin: 0 0 .6em;
  color: var(--rotary-azure);
}
h1 { font-size: 2.25rem; }
h2 { font-size: 1.65rem; }
h3 { font-size: 1.2rem; }

p { margin: 0 0 1rem; }

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

/* --- Header ----------------------------------------------- */
.site-header {
  background: var(--rotary-azure);
  color: #fff;
  border-top: 4px solid var(--rotary-gold);
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-top: .4rem;
  padding-bottom: .4rem;
}

.logo-lockup {
  display: flex;
  align-items: center;
  gap: .9rem;
  text-decoration: none;
}
.logo-lockup:hover { text-decoration: none; }

.logo-mark {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.logo-text { line-height: 1.1; }
.logo-text .name {
  display: block;
  font-size: 1.55rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: .01em;
}
.logo-text .club {
  display: block;
  font-size: .9rem;
  font-weight: 400;
  color: rgba(255, 255, 255, .85);
  letter-spacing: .02em;
  margin-top: 2px;
}

.logo-image {
  height: 72px;
  width: auto;
  display: block;
  max-width: 100%;
}

@media (max-width: 720px) {
  .logo-image { height: 56px; }
}

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.75rem;
}
.main-nav a {
  color: #fff;
  font-weight: 600;
  font-size: .95rem;
  padding: .5rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color .15s ease, color .15s ease;
}
.main-nav a:hover {
  color: var(--rotary-gold);
  border-bottom-color: var(--rotary-gold);
  text-decoration: none;
}
.main-nav a.is-active {
  color: var(--rotary-gold);
  border-bottom-color: var(--rotary-gold);
}

/* Mobile nav toggle (progressively enhanced) */
.nav-toggle {
  display: none;
  background: none;
  border: 0;
  font-size: 1.5rem;
  color: #fff;
  cursor: pointer;
}

@media (max-width: 820px) {
  .site-header .container {
    flex-wrap: wrap;
  }
  .nav-toggle { display: block; }
  .main-nav {
    flex-basis: 100%;
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: .5rem 0 1rem;
  }
  .main-nav a {
    display: block;
    padding: .65rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
  }
}

/* --- Section: About --------------------------------------- */
.section {
  padding: 3.5rem 0;
}
.section-alt {
  background: var(--color-bg-alt);
}

.about-block .eyebrow,
.section .eyebrow {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  color: var(--rotary-gold);
  margin-bottom: .5rem;
}

.about-block h2 {
  font-size: 2rem;
}

.about-block .lead {
  font-size: 1.15rem;
  color: var(--color-muted);
  max-width: 65ch;
}

/* --- Recent post card ------------------------------------- */
.recent-post {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  background: #fff;
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.recent-post .post-image {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--rotary-royal-blue), var(--rotary-sky));
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.65);
  font-weight: 700;
  letter-spacing: .1em;
}
.recent-post .post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.recent-post .post-meta {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rotary-gold);
  margin-bottom: .5rem;
}
.recent-post h2 {
  font-size: 1.75rem;
  margin-bottom: .75rem;
}
.recent-post .synopsis {
  font-size: 1.1rem;
  color: var(--color-muted);
  margin-bottom: 1.25rem;
}

.btn {
  display: inline-block;
  padding: .65rem 1.4rem;
  background: var(--rotary-royal-blue);
  color: #fff;
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: background .15s ease;
}
.btn:hover { background: var(--rotary-azure); color: #fff; text-decoration: none; }

.btn-outline {
  background: transparent;
  color: var(--rotary-royal-blue);
  border: 2px solid var(--rotary-royal-blue);
  padding: calc(.65rem - 2px) calc(1.4rem - 2px);
}
.btn-outline:hover { background: var(--rotary-royal-blue); color: #fff; }

@media (max-width: 720px) {
  .recent-post { grid-template-columns: 1fr; }
}

/* --- Leadership grid -------------------------------------- */
.leadership .section-head {
  text-align: center;
  margin-bottom: 2.5rem;
}
.leadership .section-head h2 {
  font-size: 2rem;
  margin-bottom: .5rem;
}

.leaders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}
.leader {
  background: #fff;
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--rotary-gold);
  border-radius: var(--radius);
  padding: 1.25rem 1.25rem 1.4rem;
  text-align: center;
  transition: transform .15s ease, box-shadow .15s ease;
}
.leader:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,.07);
}
.leader .role {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rotary-royal-blue);
  margin-bottom: .35rem;
}
.leader .name {
  display: block;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text);
}

/* --- Footer ----------------------------------------------- */
.site-footer {
  background: var(--rotary-azure);
  color: rgba(255,255,255,.85);
  padding: 3rem 0 1.5rem;
  font-size: .95rem;
}
.site-footer a {
  color: #fff;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.4);
  text-underline-offset: 3px;
}
.site-footer a:hover {
  color: var(--rotary-gold);
  text-decoration-color: var(--rotary-gold);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  margin-bottom: 2rem;
}
.site-footer h3 {
  color: #fff;
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .8rem;
  border-bottom: 2px solid var(--rotary-gold);
  padding-bottom: .4rem;
  display: inline-block;
}
.site-footer p { margin: 0 0 .4rem; }
.site-footer .label {
  display: block;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--rotary-gold);
  margin-top: .9rem;
  margin-bottom: .15rem;
}

.social-links {
  display: flex;
  gap: .75rem;
  margin-top: .8rem;
}
.social-links a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}
.social-links a:hover {
  background: var(--rotary-gold);
}
.social-links svg { width: 18px; height: 18px; fill: #fff; }
.social-links a:hover svg { fill: var(--rotary-azure); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding-top: 1.25rem;
  font-size: .8rem;
  color: rgba(255,255,255,.6);
  text-align: center;
}

@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 1.75rem; }
}

/* --- News article page ------------------------------------ */
.article {
  background: #fff;
}
.article-wrap {
  max-width: 760px;
  margin: 0 auto;
}
.article-meta {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--rotary-gold);
  margin-bottom: .75rem;
}
.article-wrap h1 {
  font-size: 2.4rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}
.article-hero {
  margin: 0 0 1rem;
  border-radius: var(--radius);
  overflow: hidden;
}
.article-hero img {
  width: 100%;
  height: auto;
  display: block;
}
.article-caption {
  font-size: .9rem;
  color: var(--color-muted);
  font-style: italic;
  margin-bottom: 2.5rem;
}
.article-body p {
  font-size: 1.08rem;
  line-height: 1.75;
}
.article-body p + p { margin-top: 1.1rem; }
.article-back {
  border-top: 1px solid var(--color-border);
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  font-size: .95rem;
}

/* News listing on news.html (the index) */
.news-list {
  display: grid;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}
.news-item {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.5rem;
  align-items: start;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: box-shadow .15s ease, transform .15s ease;
}
.news-item:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
.news-item a.thumb {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  border-radius: var(--radius);
  text-decoration: none;
}
.news-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.news-item .body { padding: 0; }
.news-item .meta {
  font-size: .75rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rotary-gold);
  font-weight: 700;
  margin-bottom: .35rem;
}
.news-item h3 { font-size: 1.2rem; margin: 0 0 .5rem; }
.news-item .excerpt { color: var(--color-muted); margin: 0 0 .75rem; font-size: .95rem; }
.news-item a.read-more { font-weight: 700; font-size: .9rem; }

@media (max-width: 600px) {
  .news-item { grid-template-columns: 1fr; gap: 1rem; }
  .news-item .body { padding: 0; }
}

/* Allow .post-image to be a link without underline shift */
a.post-image {
  text-decoration: none;
  display: flex;
}

/* --- Recent posts grid (home page) ------------------------ */
.section-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.see-all {
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.recent-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.post-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .15s ease, transform .15s ease;
}
.post-card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  transform: translateY(-2px);
}
.post-card a.thumb {
  display: block;
  aspect-ratio: 16/10;
  overflow: hidden;
  text-decoration: none;
}
.post-card a.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.post-card .body {
  padding: 1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.post-card .meta {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--rotary-gold);
  margin: 0 0 .4rem;
}
.post-card h3 {
  font-size: 1.1rem;
  margin: 0 0 .55rem;
  line-height: 1.3;
}
.post-card h3 a {
  color: var(--rotary-azure);
  text-decoration: none;
}
.post-card h3 a:hover {
  color: var(--rotary-royal-blue);
  text-decoration: underline;
}
.post-card .excerpt {
  color: var(--color-muted);
  font-size: .92rem;
  margin: 0 0 .9rem;
  flex: 1;
  line-height: 1.55;
}
.post-card .read-more {
  font-weight: 700;
  font-size: .85rem;
  margin-top: auto;
}

/* --- About block: hero treatment with background photo --- */
.about-block {
  position: relative;
  background-image: url('../../images/sunrise_rotary_sign.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  overflow: hidden;
}
.about-block::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(12, 60, 124, .88), rgba(12, 60, 124, .62));
  pointer-events: none;
}
.about-block .container {
  position: relative;
  z-index: 1;
}
.about-block h2 {
  color: #fff;
}
.about-block .lead {
  color: rgba(255, 255, 255, .95);
}
.about-block .btn-outline {
  color: #fff;
  border-color: #fff;
}
.about-block .btn-outline:hover {
  background: #fff;
  color: var(--rotary-azure);
  border-color: #fff;
}

/* --- Photo gallery (article pages) ------------------------ */
.gallery {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}
.gallery h2 {
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
  color: var(--rotary-azure);
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: 1fr; }
}
.gallery-item {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  cursor: zoom-in;
  background: var(--color-bg-alt);
  text-decoration: none;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
  display: block;
}
.gallery-item:hover img { transform: scale(1.05); }

/* --- Lightbox modal --------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .92);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox.is-open { display: flex; }
.lb-figure {
  margin: 0;
  max-width: min(100%, 1400px);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
}
.lb-figure img {
  max-width: 100%;
  max-height: calc(100vh - 6rem);
  object-fit: contain;
  display: block;
}
.lb-figure figcaption {
  color: rgba(255, 255, 255, .85);
  font-size: .9rem;
  text-align: center;
}
.lb-figure figcaption:empty { display: none; }
.lb-close,
.lb-prev,
.lb-next {
  position: absolute;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .3);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: background .15s ease;
}
.lb-close { top: 1rem; right: 1rem; font-size: 1.8rem; }
.lb-prev  { left: 1rem;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: 1rem; top: 50%; transform: translateY(-50%); }
.lb-close:hover,
.lb-prev:hover,
.lb-next:hover { background: rgba(255, 255, 255, .25); }

/* --- Pagination (news listing pages) --------------------- */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  max-width: 800px;
  margin: 4rem auto 0;
  padding-top: 2.25rem;
  border-top: 1px solid var(--color-border);
  font-weight: 700;
  font-size: .95rem;
}
.pagination a {
  color: var(--rotary-royal-blue);
  text-decoration: none;
}
.pagination a:hover { color: var(--rotary-azure); text-decoration: underline; }
.pagination .page-info {
  color: var(--color-muted);
  font-weight: 400;
}

/* --- Slideshow (16:9 photo carousel) --------------------- */
.slideshow {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}
.slideshow .slides {
  position: relative;
  width: 100%;
  height: 100%;
}
.slideshow .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .55s ease-in-out;
}
.slideshow .slide.is-active { opacity: 1; }
.slideshow .slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ss-prev, .ss-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  transition: background .15s ease;
  z-index: 2;
}
.ss-prev { left: 14px; }
.ss-next { right: 14px; }
.ss-prev:hover, .ss-next:hover { background: rgba(0, 0, 0, .75); }

.ss-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}
.ss-dot {
  width: 10px;
  height: 10px;
  background: rgba(255, 255, 255, .45);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
  transition: background .15s ease;
}
.ss-dot.is-active { background: #fff; }
.ss-dot:hover { background: rgba(255, 255, 255, .8); }

@media (max-width: 600px) {
  .ss-prev, .ss-next { width: 38px; height: 38px; font-size: 1.2rem; }
  .ss-dot { width: 8px; height: 8px; }
}

/* --- Meetings page: schedule cards --------------------- */
.meeting-list {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  max-width: 880px;
  margin: 0 auto;
}
.meeting-card {
  display: grid;
  grid-template-columns: 92px 1fr;
  align-items: stretch;
  background: var(--rotary-azure);
  color: #fff;
  border-radius: var(--radius);
  border-left: 5px solid var(--rotary-gold);
  overflow: hidden;
}
.meeting-card .meeting-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem .5rem;
  border-right: 1px solid rgba(255, 255, 255, .2);
  text-align: center;
}
.meeting-card .m-month {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .18em;
  color: var(--rotary-gold);
  line-height: 1;
}
.meeting-card .m-day {
  display: block;
  font-size: 2.3rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.05;
  margin: .15rem 0 .25rem;
}
.meeting-card .m-weekday {
  display: block;
  font-size: .7rem;
  font-weight: 600;
  letter-spacing: .15em;
  color: rgba(255, 255, 255, .85);
  line-height: 1;
}
.meeting-card .meeting-info {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.meeting-card .meeting-speaker {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.meeting-card .meeting-topic {
  margin: .3rem 0 0;
  font-size: .98rem;
  font-style: italic;
  color: rgba(255, 255, 255, .85);
  line-height: 1.4;
}

@media (max-width: 600px) {
  .meeting-card { grid-template-columns: 80px 1fr; }
  .meeting-card .meeting-date { padding: .75rem .25rem; }
  .meeting-card .m-day { font-size: 2rem; }
  .meeting-card .meeting-info { padding: .75rem 1rem; }
  .meeting-card .meeting-speaker { font-size: 1.1rem; }
  .meeting-card .meeting-topic { font-size: .9rem; }
}

/* --- Home page: Upcoming Programs (3-up grid) ---------- */
.upcoming-programs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.upcoming-programs-grid .meeting-card {
  /* Cards are narrower in 3-up — tighten the date column slightly */
  grid-template-columns: 78px 1fr;
}
.upcoming-programs-grid .meeting-card .m-day {
  font-size: 2rem;
}
.upcoming-programs-grid .meeting-card .meeting-speaker {
  font-size: 1.1rem;
}
.upcoming-programs-grid .meeting-card .meeting-topic {
  font-size: .92rem;
}

@media (max-width: 900px) {
  .upcoming-programs-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .upcoming-programs-grid { grid-template-columns: 1fr; }
}
