/* ============================================================
   JOEW Elegance – Custom Stylesheet
   Journey of Empowering Women · WordPress 6.7+
   ============================================================ */

/* ── Google Fonts Import ─────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,600;1,400&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

/* ── CSS Custom Properties ───────────────────────────────── */
:root {
  --joew-navy:      #0d2251;
  --joew-gold:      #e8a020;
  --joew-crimson:   #7a1c2e;
  --joew-cream:     #fdf8f3;
  --joew-warm-gray: #f0ebe4;
  --joew-text:      #1a1a2e;
  --joew-muted:     #5a5a7a;
  --joew-white:     #ffffff;
  --joew-shadow-card: 0 4px 32px rgba(13,34,81,0.10);
  --joew-shadow-nav:  0 2px 24px rgba(0,0,0,0.25);
}

/* ── Base ────────────────────────────────────────────────── */
body {
  background-color: var(--joew-cream);
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--joew-text);
}

/* ── HEADER / NAV ────────────────────────────────────────── */
.wp-block-template-part[data-area="header"],
header.wp-block-template-part {
  position: sticky;
  top: 0;
  z-index: 999;
}

/* Header group block */
.joew-header {
  background-color: var(--joew-navy) !important;
  box-shadow: var(--joew-shadow-nav);
  position: sticky;
  top: 0;
  z-index: 999;
}

/* Site title in header */
.joew-header .wp-block-site-title a,
.joew-header .wp-block-site-title {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: 1.4rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.04em;
  color: var(--joew-white) !important;
  text-decoration: none !important;
}

/* Navigation links */
.joew-header .wp-block-navigation a,
.joew-header .wp-block-navigation__container .wp-block-navigation-item a {
  color: var(--joew-white) !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none !important;
  padding: 0.4rem 0.8rem;
  border-radius: 100px;
  transition: background 0.2s, color 0.2s;
}

.joew-header .wp-block-navigation a:hover,
.joew-header .wp-block-navigation__container .wp-block-navigation-item a:hover,
.joew-header .wp-block-navigation__container .wp-block-navigation-item.current-menu-item a {
  background-color: var(--joew-gold) !important;
  color: var(--joew-navy) !important;
}

/* Mobile nav button */
.joew-header .wp-block-navigation__responsive-container-open,
.joew-header .wp-block-navigation__responsive-container-close {
  color: var(--joew-white) !important;
}

/* ── HERO SECTION ────────────────────────────────────────── */

/* FULL-WIDTH BREAKOUT
   <main> uses is-layout-constrained which caps width to --content-size.
   We must break the hero out to 100vw and re-centre it.
   This is the standard WP "alignfull inside constrained" technique.  */

main > .wp-block-cover:first-child,
main > .wp-block-group > .wp-block-cover:first-child,
.joew-hero {
  width: 80vw !important;
  max-width: 80vw !important;
  margin-left: auto !important;
  margin-right: auto !important;
  border-radius: 12px !important;
  /* 16:9 aspect ratio */
  aspect-ratio: 16 / 9 !important;
  min-height: unset !important;
  position: relative !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  overflow: hidden !important;
}

/* On smaller screens go full width */
@media (max-width: 768px) {
  main > .wp-block-cover:first-child,
  main > .wp-block-group > .wp-block-cover:first-child,
  .joew-hero {
    width: 100% !important;
    max-width: 100% !important;
    border-radius: 0 !important;
    aspect-ratio: unset !important;
    min-height: 380px !important;
  }
}

/* Gradient fallback — no hero image set on this page */
body:not(.has-hero-image) main > .wp-block-cover:first-child,
body:not(.has-hero-image) main > .wp-block-group > .wp-block-cover:first-child,
body:not(.has-hero-image) .joew-hero {
  background-image: linear-gradient(135deg, #0d2251 0%, #1a3a7a 60%, #7a1c2e 100%) !important;
  background-color: #0d2251;
}

/* Overlay hidden over gradient */
body:not(.has-hero-image) main > .wp-block-cover:first-child .wp-block-cover__background,
body:not(.has-hero-image) main > .wp-block-group > .wp-block-cover:first-child .wp-block-cover__background,
body:not(.has-hero-image) .joew-hero .wp-block-cover__background {
  opacity: 0 !important;
}

/* Cover image fills container when present */
main > .wp-block-cover:first-child .wp-block-cover__image-background,
main > .wp-block-group > .wp-block-cover:first-child .wp-block-cover__image-background,
.joew-hero .wp-block-cover__image-background {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center center !important;
}

.joew-hero h1,
.joew-hero .wp-block-heading {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  color: var(--joew-white) !important;
  font-size: clamp(2.5rem, 5vw, 4rem) !important;
  line-height: 1.1;
}

.joew-hero p {
  color: rgba(255,255,255,0.88) !important;
  font-size: 1.05rem;
}

/* ── SECTION DIVIDER / LABEL ─────────────────────────────── */
.joew-section-label {
  display: inline-block;
  background: var(--joew-navy);
  color: var(--joew-white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.3rem 1rem;
  border-radius: 0 0 8px 0;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.joew-gold-label {
  color: var(--joew-gold);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  margin-bottom: 0.3rem;
  display: block;
}

/* ── CARDS ───────────────────────────────────────────────── */
.joew-card {
  background: var(--joew-white);
  border-radius: 18px;
  box-shadow: var(--joew-shadow-card);
  overflow: hidden;
  padding: 2rem;
}

.joew-value-card {
  background: var(--joew-warm-gray);
  border-radius: 10px;
  padding: 1.2rem 1.4rem;
  border-left: 4px solid var(--joew-gold);
}

.joew-value-card h3,
.joew-value-card h4 {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-size: 1.1rem !important;
  color: var(--joew-navy) !important;
  margin-bottom: 0.3rem;
  font-weight: 600;
}

.joew-value-card p {
  font-size: 0.875rem;
  color: var(--joew-muted);
  margin: 0;
}

/* Mission / Vision cards */
.joew-mission-card {
  background: var(--joew-navy);
  color: var(--joew-white) !important;
  border-radius: 12px;
  padding: 1.5rem;
}

.joew-vision-card {
  background: var(--joew-gold);
  color: var(--joew-navy) !important;
  border-radius: 12px;
  padding: 1.5rem;
}

.joew-mission-card h3,
.joew-mission-card p { color: var(--joew-white) !important; }
.joew-vision-card h3, .joew-vision-card p { color: var(--joew-navy) !important; }

/* Service list item */
.joew-service-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--joew-warm-gray);
  font-size: 0.93rem;
  color: var(--joew-muted);
}

/* ── BUTTONS ─────────────────────────────────────────────── */
.joew-btn-crimson,
.wp-block-button.joew-btn-crimson .wp-block-button__link {
  background: var(--joew-crimson) !important;
  color: var(--joew-white) !important;
  border-radius: 100px !important;
  font-weight: 600 !important;
  font-size: 0.875rem !important;
  letter-spacing: 0.05em;
  padding: 0.7rem 1.8rem !important;
  border: none !important;
  transition: background 0.2s !important;
  text-decoration: none !important;
}

.joew-btn-crimson:hover,
.wp-block-button.joew-btn-crimson .wp-block-button__link:hover {
  background: var(--joew-navy) !important;
}

.joew-btn-gold,
.wp-block-button.joew-btn-gold .wp-block-button__link {
  background: var(--joew-gold) !important;
  color: var(--joew-navy) !important;
  border-radius: 100px !important;
  font-weight: 700 !important;
  font-size: 0.875rem !important;
  letter-spacing: 0.05em;
  padding: 0.7rem 1.8rem !important;
  border: none !important;
  transition: background 0.2s !important;
  text-decoration: none !important;
}

.joew-btn-gold:hover,
.wp-block-button.joew-btn-gold .wp-block-button__link:hover {
  background: var(--joew-crimson) !important;
  color: var(--joew-white) !important;
}

.joew-btn-outline,
.wp-block-button.joew-btn-outline .wp-block-button__link {
  background: transparent !important;
  color: var(--joew-white) !important;
  border: 2px solid rgba(255,255,255,0.5) !important;
  border-radius: 100px !important;
  font-weight: 500 !important;
  font-size: 0.875rem !important;
  padding: 0.65rem 1.6rem !important;
  transition: all 0.2s !important;
}

.joew-btn-outline:hover,
.wp-block-button.joew-btn-outline .wp-block-button__link:hover {
  background: var(--joew-gold) !important;
  border-color: var(--joew-gold) !important;
  color: var(--joew-navy) !important;
}

/* ── DONATE SECTION ──────────────────────────────────────── */
.joew-donate-bg {
  background: linear-gradient(135deg, #0d2251 0%, #1a3a7a 100%) !important;
}

.joew-donate-bg h2,
.joew-donate-bg h3,
.joew-donate-bg p {
  color: var(--joew-white) !important;
}

/* ── BOOK BLOCK ──────────────────────────────────────────── */
.joew-book-wrapper {
  background: linear-gradient(135deg, #fff9f0, #fff3e8);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid rgba(232,160,32,0.25);
}

/* ── CONTACT CARDS ───────────────────────────────────────── */
.joew-contact-card {
  background: var(--joew-white);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--joew-shadow-card);
}

.joew-contact-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.joew-contact-card h4 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  color: var(--joew-navy);
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
}

.joew-contact-card p, .joew-contact-card a {
  font-size: 0.875rem;
  color: var(--joew-muted);
  text-decoration: none;
}

/* ── FOOTER ──────────────────────────────────────────────── */
.joew-footer {
  background: var(--joew-navy) !important;
}

.joew-footer p,
.joew-footer a,
.joew-footer .wp-block-paragraph {
  color: rgba(255,255,255,0.7) !important;
  font-size: 0.875rem !important;
}

.joew-footer a:hover {
  color: var(--joew-gold) !important;
}

.joew-footer .wp-block-site-title a {
  color: var(--joew-white) !important;
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-weight: 600 !important;
}

/* ── UTILITY: CENTER ALIGNED CONTENT ─────────────────────── */
.joew-text-center {
  text-align: center !important;
}

.joew-section {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

/* ── SEPARATOR / GOLD LINE ───────────────────────────────── */
.wp-block-separator.is-style-wide {
  border-color: var(--joew-gold) !important;
  border-width: 2px !important;
  opacity: 1 !important;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
  .joew-hero {
    min-height: 380px;
    padding: 3rem 1.5rem;
  }

  .joew-hero h1 {
    font-size: 2.2rem !important;
  }

  .joew-card {
    border-radius: 12px;
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .joew-hero h1 {
    font-size: 1.8rem !important;
  }
}
