/* ============================================
   ECD Adventist Clone — Stylesheet
   ============================================ */

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

:root {
  --sidebar-blue: #1f4e91;
  --sidebar-blue-dark: #163a6d;
  --teal: #159b9b;
  --teal-dark: #0f7a7a;
  --text: #333;
  --muted: #6b7280;
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --border: #e5e7eb;
  --sidebar-width: 90px;
  --header-height: 110px;

  --font-sans: 'Open Sans', system-ui, -apple-system, Arial, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

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

/* Reserve space for the fixed right sidebar */
body { padding-right: var(--sidebar-width); }

/* ============ HEADER ============ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 18px 32px 10px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.logo-placeholder {
  width: 60px;
  height: 60px;
  background: transparent;
  flex-shrink: 0;
}
.logo-placeholder.dark {
  border-color: rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.05);
}

.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-title {
  color: var(--teal);
  font-weight: 600;
  font-size: 18px;
}
.logo-sub {
  color: #4b5563;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  margin-top: 2px;
}

.header-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

/* Utility bar (top row) */
.utility-bar {
  display: flex;
  align-items: center;
  gap: 20px;
  position: relative;
}
.util-btn {
  font-size: 12px;
  letter-spacing: 0.12em;
  color: #4b5563;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 4px;
}
.util-btn:hover { color: var(--teal); }
.star { color: var(--teal); }
.caret { font-size: 10px; }

.util-dropdown {
  position: absolute;
  top: 100%;
  right: 60px;
  background: #fff;
  border: 1px solid var(--border);
  min-width: 160px;
  list-style: none;
  padding: 6px 0;
  margin: 6px 0 0;
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  display: none;
  z-index: 20;
}
.util-dropdown.open { display: block; }
.util-dropdown a {
  display: block;
  padding: 8px 16px;
  font-size: 13px;
}
.util-dropdown a:hover { background: var(--bg-alt); color: var(--teal); }

/* Main nav */
.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 6px;
}
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 400;
  color: #222;
  transition: color 0.2s;
}
.main-nav > ul > li > a:hover { color: var(--teal); }

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-top: 3px solid var(--teal);
  min-width: 200px;
  list-style: none;
  padding: 8px 0;
  margin: 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  z-index: 30;
}
.has-dropdown:hover > .dropdown,
.has-dropdown:focus-within > .dropdown,
.has-dropdown.open > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown a {
  display: block;
  padding: 10px 18px;
  font-size: 12px;
  color: #333;
}
.dropdown a:hover { background: var(--bg-alt); color: var(--teal); }

/* Hamburger */
.hamburger {
  display: none;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #333;
  transition: 0.3s;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile utility */
.mobile-utility {
  display: none;
  padding: 8px 20px;
  border-top: 1px solid var(--border);
  gap: 24px;
}

/* ============ RIGHT SIDEBAR ============ */
.right-sidebar {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--sidebar-blue);
  z-index: 90;
  display: flex;
  justify-content: center;
  padding-top: 24px;
}
.emblem {
  width: 60px;
}
.emblem svg { width: 100%; height: auto; }

/* ============ OFFCANVAS (mobile menu) ============ */
.offcanvas-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s;
  z-index: 150;
}
.offcanvas-overlay.open { opacity: 1; visibility: visible; }

.offcanvas {
  position: fixed;
  top: 0;
  right: 0;
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: #fff;
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  overflow-y: auto;
  padding: 60px 0 24px;
  box-shadow: -4px 0 20px rgba(0,0,0,0.15);
}
.offcanvas.open { transform: translateX(0); }
.offcanvas-close {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 32px;
  color: #333;
  line-height: 1;
}
.offcanvas-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}
.oc-item { border-bottom: 1px solid var(--border); }
.oc-toggle {
  width: 100%;
  text-align: left;
  padding: 14px 20px;
  font-size: 16px;
  font-weight: 600;
  color: #222;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.oc-toggle:hover { color: var(--teal); }
.oc-sub {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  background: var(--bg-alt);
}
.oc-item.open .oc-sub { max-height: 400px; }
.oc-item.open .oc-toggle .caret { transform: rotate(180deg); }
.oc-toggle .caret { transition: transform 0.2s; }
.oc-sub a {
  display: block;
  padding: 10px 32px;
  font-size: 14px;
  color: #444;
}
.oc-sub a:hover { color: var(--teal); background: #eef; }

/* ============ SEARCH OVERLAY ============ */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  z-index: 250;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.search-overlay.open { display: flex; }
.search-close {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: #fff;
  line-height: 1;
}
.search-form {
  display: flex;
  width: 100%;
  max-width: 600px;
  border-bottom: 2px solid #fff;
}
.search-form input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 24px;
  padding: 12px 8px;
  outline: none;
}
.search-form button {
  color: #fff;
  font-size: 28px;
  padding: 0 12px;
}

/* ============ HERO ============ */
.hero {
  position: relative;
  height: calc(100vh - var(--header-height));
  min-height: 500px;
  overflow: hidden;
}
.hero-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  isolation: isolate;
}

.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: opacity;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.15) 0%,
    rgba(0, 0, 0, 0.45) 100%
  );
}
.hero-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.hero-content h1 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: #fff;
  font-size: clamp(28px, 5vw, 64px);
  text-align: center;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.4);
  margin: 0;
}

/* ============ SECTIONS ============ */
.section { padding: 70px 0; }
.section.who { background: #fff; }
.section.virtual-tour { background: var(--bg-alt); text-align: center; }
.section.news { background: #fff; }
.section.events { background: var(--bg-alt); }

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 700;
  color: #222;
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-title .bar {
  display: inline-block;
  width: 5px;
  height: 28px;
  background: var(--teal);
  border-radius: 2px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 30px;
}
.section-head .section-title { margin: 0; }

.who p { font-size: 16px; margin: 0 0 16px; color: #444; text-align: justify;}
.center { text-align: center; }
.virtual-tour h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(18px, 2.4vw, 26px);
  color: #222;
  max-width: 780px;
  margin: 0 auto 24px;
}

/* Buttons */
.btn-outline, .btn-primary {
  display: inline-block;
  padding: 12px 28px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: all 0.2s;
  margin-top: 12px;
}
.btn-outline {
  color: var(--teal);
  border: 2px solid var(--teal);
}
.btn-outline:hover { background: var(--teal); color: #fff; }
.btn-primary {
  background: var(--teal);
  color: #fff;
  border: 2px solid var(--teal);
}
.btn-primary:hover { background: var(--teal-dark); border-color: var(--teal-dark); }

.link-more {
  color: var(--teal);
  font-weight: 600;
  font-size: 14px;
}
.link-more:hover { color: var(--teal-dark); text-decoration: underline; }

/* News grid */
.news-grid, .events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.news-card, .event-card {
  background: #fff;
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s;
}
.news-card:hover, .event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(0,0,0,0.08);
}
.news-img, .event-img {
  display: block;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.news-img img, .event-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.lead img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  transition: transform 0.4s;
}

.news-card:hover .news-img img,
.event-card:hover .event-img img { transform: scale(1.05); }

.news-card h3 {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  padding: 18px 20px 22px;
  margin: 0;
  line-height: 1.35;
}
.news-card h3 a { color: #222; }
.news-card h3 a:hover { color: var(--teal); }

.event-body { padding: 20px; }
.event-body h3 {
  font-family: var(--font-serif);
  font-size: 22px;
  margin: 0 0 10px;
  color: #222;
}
.event-body p {
  font-size: 14px;
  color: #555;
  margin: 0 0 14px;
}

/* ============ FOOTER ============ */
.site-footer {
  background: var(--sidebar-blue-dark);
  color: #e5e7eb;
  padding-top: 50px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-logo {
  display: flex;
  gap: 14px;
  align-items: center;
}
.footer-title {
  font-family: var(--font-serif);
  font-size: 18px;
  color: #fff;
  margin: 0;
  line-height: 1.3;
}
.footer-title small {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #cbd5e1;
}
.footer-text p {
  font-size: 14px;
  margin: 0 0 12px;
  color: #cbd5e1;
}
.footer-bottom {
  background: rgba(0,0,0,0.25);
  padding: 16px 0;
  font-size: 12px;
  color: #cbd5e1;
  text-align: center;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .news-grid, .events-grid { grid-template-columns: repeat(2, 1fr); }
  .main-nav > ul > li > a { font-size: 12px; padding: 10px 10px; }
}

@media (max-width: 820px) {
  :root { --sidebar-width: 60px; }
  .emblem { width: 40px; }

  .main-nav, .utility-bar { display: none; }
  .hamburger { display: flex; }
  .mobile-utility { display: flex; }

  .header-inner { padding: 14px 20px; align-items: center; }
  .logo-title { font-size: 15px; }
  .logo-sub { font-size: 9px; }
  .logo-placeholder { width: 46px; height: 46px; }

  .footer-inner { grid-template-columns: 1fr; }
  .news-grid, .events-grid { grid-template-columns: 1fr; }

  .hero { height: 60vh; min-height: 380px; }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .section { padding: 50px 0; }
  .header-inner { padding: 12px 16px; }
  .logo-title { font-size: 13px; }
}

/* -----------  */

.fonct {
  font-style: italic;
  font-size: 12px;
  font-weight: normal;
}

/* --  */

.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
}

.modal-content {
  width: 80%;
  max-width: 900px;
  margin: 5% auto;
  background: white;
  padding: 10px;
}

.close {
  float: right;
  font-size: 30px;
  cursor: pointer;
}


/* ============ HERO ARTICLE ============ */

.hero-art {
  position: relative;
  min-height: 20vh;
  height: 30vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-media-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  isolation: isolate;
}

.hero-media-art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-overlay-art {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.20) 0%,
    rgba(0, 0, 0, 0.60) 100%
  );
}

.hero-content-art {
  position: relative;
  z-index: 3;
  width: 100%;
  height: 100%;
  padding: 30px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.titre-art {
  margin: 0 0 14px;
  font-family: var(--font-serif);
  font-size: clamp(28px, 5vw, 58px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.02em;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.details-art {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 20px;
  color: #fff;
  font-size: 13px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
}

.date-art,
.author-art {
  margin: 0;
}

.date-art {
  font-weight: 600;
}

.author-art {
  font-weight: 400;
}

/* -------- Responsive -------- */

@media (max-width: 820px) {
  .hero-art {
    min-height: 20vh;
    height: 28vh;
  }

  .hero-content-art {
    padding: 24px 20px;
  }

  .titre-art {
    font-size: clamp(25px, 6vw, 42px);
  }

  .details-art {
    font-size: 12px;
    gap: 5px 14px;
  }
}

@media (max-width: 480px) {
  .hero-art {
    min-height: 20vh;
    height: 25vh;
  }

  .hero-content-art {
    padding: 20px 16px;
  }

  .titre-art {
    font-size: clamp(23px, 7vw, 34px);
    margin-bottom: 10px;
  }

  .details-art {
    flex-direction: column;
    gap: 3px;
    font-size: 11px;
  }
}