/*
Theme Name: WMF — World Medical Forum
Theme URI: https://worldmedicalforum.gr
Author: IACD
Description: Custom theme for the World Medical Forum hub. Navy + gold institutional aesthetic. Built around the "forum" custom post type with full ACF Pro integration.
Version: 1.0.2
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: wmf
*/

:root {
  --wmf-navy:       #0d2340;
  --wmf-navy-deep:  #081a30;
  --wmf-navy-soft:  #1a3458;
  --wmf-gold:       #c9a961;
  --wmf-gold-deep:  #a8893d;
  --wmf-gold-soft:  #f5edd8;
  --wmf-paper:      #fbfaf6;
  --wmf-paper-2:    #f4f1e8;
  --wmf-ink:        #0d2340;
  --wmf-ink-soft:   #4a5a73;
  --wmf-ink-mute:   #8a96a8;
  --wmf-line:       #e2dccb;
  --wmf-radius:     12px;
  --wmf-radius-sm:  8px;
  --wmf-shadow:     0 4px 24px rgba(13, 35, 64, 0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', 'Helvetica Neue', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--wmf-paper);
  color: var(--wmf-ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--wmf-gold-deep); text-decoration: none; }
a:hover { color: var(--wmf-navy); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ===== Header ===== */
.wmf-header {
  background: var(--wmf-navy);
  border-bottom: 2px solid var(--wmf-gold);
  position: sticky; top: 0; z-index: 100;
}
.wmf-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
  position: relative;
}
.wmf-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.wmf-brand-logo { height: 44px; width: auto; }
.wmf-brand-mark {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1.5px solid var(--wmf-gold);
  display: grid; place-items: center;
  font-size: 12px; font-weight: 600; letter-spacing: 1px;
  color: var(--wmf-gold);
  flex-shrink: 0;
}
.wmf-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.wmf-brand-text strong { font-size: 15px; color: #fff; font-weight: 500; }
.wmf-brand-text span {
  font-size: 11px; color: var(--wmf-gold);
  letter-spacing: 1.5px; text-transform: uppercase;
}
.wmf-nav { display: flex; gap: 28px; align-items: center; }
.wmf-nav a {
  font-size: 14px; color: rgba(255,255,255,0.78);
  letter-spacing: 0.3px; transition: color 0.2s;
  text-decoration: none;
}
.wmf-nav a:hover { color: var(--wmf-gold); }

/* ===== Mobile menu (hamburger, no JS) ===== */
input.wmf-menu-checkbox,
.wmf-menu-checkbox {
  position: absolute !important;
  opacity: 0 !important;
  pointer-events: none !important;
  width: 1px !important;
  height: 1px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.wmf-burger {
  display: none;
  cursor: pointer;
  width: 32px;
  height: 32px;
  position: relative;
  z-index: 101;
  flex-shrink: 0;
}
.wmf-burger span {
  display: block;
  position: absolute;
  height: 2px;
  width: 24px;
  left: 4px;
  background: var(--wmf-gold);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease;
}
.wmf-burger span:nth-child(1) { top: 9px; }
.wmf-burger span:nth-child(2) { top: 15px; }
.wmf-burger span:nth-child(3) { top: 21px; }

.wmf-menu-checkbox:checked ~ .wmf-burger span:nth-child(1) {
  top: 15px; transform: rotate(45deg);
}
.wmf-menu-checkbox:checked ~ .wmf-burger span:nth-child(2) { opacity: 0; }
.wmf-menu-checkbox:checked ~ .wmf-burger span:nth-child(3) {
  top: 15px; transform: rotate(-45deg);
}

/* ===== Hero ===== */
.wmf-hero {
  padding: 80px 0 64px;
  text-align: center;
  background: var(--wmf-paper);
  border-bottom: 0.5px solid var(--wmf-line);
}
.wmf-eyebrow {
  display: inline-block;
  font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase;
  color: var(--wmf-gold-deep);
  padding: 7px 18px;
  border: 0.5px solid var(--wmf-gold);
  border-radius: 100px;
  background: var(--wmf-gold-soft);
  margin-bottom: 28px;
}
.wmf-hero h1 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 500;
  color: var(--wmf-navy);
  line-height: 1.2;
  letter-spacing: -0.5px;
  margin-bottom: 18px;
}
.wmf-hero h1 .accent, .wmf-hero h1 em { color: var(--wmf-gold-deep); font-style: italic; }
.wmf-hero p {
  max-width: 620px; margin: 0 auto;
  font-size: 17px; color: var(--wmf-ink-soft);
}

/* ===== Section ===== */
.wmf-section { padding: 60px 0; }
.wmf-section.alt { background: var(--wmf-paper-2); }
.wmf-section-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 32px; padding-bottom: 18px;
  border-bottom: 0.5px solid var(--wmf-line);
  flex-wrap: wrap; gap: 12px;
}
.wmf-section-title { display: flex; align-items: center; gap: 12px; }
.wmf-section-title h2 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 26px; font-weight: 500;
  color: var(--wmf-navy);
  letter-spacing: -0.3px;
}
.wmf-dot { width: 10px; height: 10px; border-radius: 50%; }
.wmf-dot-up { background: var(--wmf-gold); box-shadow: 0 0 0 4px var(--wmf-gold-soft); }
.wmf-dot-past { background: var(--wmf-ink-mute); }
.wmf-count {
  font-size: 12px; color: var(--wmf-ink-mute);
  letter-spacing: 1px; text-transform: uppercase;
}

/* ===== Forum cards ===== */
.wmf-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.wmf-card {
  background: #fff;
  border: 0.5px solid var(--wmf-line);
  border-radius: var(--wmf-radius);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  position: relative;
}
.wmf-card:hover {
  transform: translateY(-3px);
  border-color: var(--wmf-gold);
  box-shadow: var(--wmf-shadow);
}
.wmf-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--wmf-gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s; z-index: 2;
}
.wmf-card:hover::before { transform: scaleX(1); }
.wmf-thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--wmf-navy), var(--wmf-navy-soft));
  position: relative; overflow: hidden;
  display: grid; place-items: center;
}
.wmf-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wmf-thumb-fallback { font-size: 64px; color: var(--wmf-gold); opacity: 0.9; }
.wmf-num {
  position: absolute; top: 12px; left: 12px;
  font-size: 11px; font-weight: 500; letter-spacing: 1.5px;
  color: var(--wmf-gold);
  background: rgba(8, 26, 48, 0.65);
  padding: 5px 12px; border-radius: 100px;
  border: 0.5px solid var(--wmf-gold);
  backdrop-filter: blur(4px);
  z-index: 1;
}
.wmf-badge {
  position: absolute; top: 12px; right: 12px;
  font-size: 10px; font-weight: 600; letter-spacing: 1.2px;
  padding: 5px 12px; border-radius: 100px; text-transform: uppercase;
  z-index: 1;
}
.wmf-badge-up { background: var(--wmf-gold); color: var(--wmf-navy); }
.wmf-badge-past {
  background: rgba(255,255,255,0.18); color: rgba(255,255,255,0.9);
  border: 0.5px solid rgba(255,255,255,0.35);
  backdrop-filter: blur(4px);
}
.wmf-card-body {
  padding: 22px 24px;
  display: flex; flex-direction: column; gap: 12px;
  flex: 1;
}
.wmf-card-body h3 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 19px; font-weight: 500;
  color: var(--wmf-navy); line-height: 1.35;
}
.wmf-sub { font-size: 14px; color: var(--wmf-ink-soft); line-height: 1.55; }
.wmf-meta {
  display: flex; flex-direction: column; gap: 8px;
  padding-top: 14px; border-top: 0.5px solid var(--wmf-line);
  margin-top: auto;
}
.wmf-meta-row {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: var(--wmf-ink-soft);
}
.wmf-meta-row svg {
  flex-shrink: 0; color: var(--wmf-gold-deep); width: 15px; height: 15px;
}
.wmf-cta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px; padding: 11px 16px;
  background: var(--wmf-navy);
  border-radius: var(--wmf-radius-sm);
  font-size: 13px; font-weight: 500; color: #fff;
  letter-spacing: 0.4px;
  transition: background 0.2s;
}
.wmf-card:hover .wmf-cta { background: var(--wmf-gold-deep); }
.wmf-cta-arrow { transition: transform 0.2s; color: var(--wmf-gold); }
.wmf-card:hover .wmf-cta-arrow { transform: translateX(4px); color: #fff; }
.wmf-empty {
  grid-column: 1 / -1;
  padding: 50px 24px; text-align: center;
  font-size: 14px; color: var(--wmf-ink-mute);
  border: 0.5px dashed var(--wmf-line);
  border-radius: var(--wmf-radius);
  background: #fff;
  line-height: 1.7;
}

/* ===== Single forum page ===== */
.wmf-forum-hero {
  background: linear-gradient(135deg, var(--wmf-navy), var(--wmf-navy-soft));
  color: #fff;
  padding: 80px 0;
  position: relative;
}
.wmf-forum-hero h1 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 500; line-height: 1.2;
  margin-bottom: 16px;
}
.wmf-forum-hero .subtitle {
  font-size: 18px; color: var(--wmf-gold);
  margin-bottom: 32px; max-width: 700px;
}
.wmf-forum-hero .meta {
  display: flex; flex-wrap: wrap; gap: 24px;
  font-size: 14px; color: rgba(255,255,255,0.85);
}
.wmf-forum-hero .meta div { display: flex; align-items: center; gap: 8px; }
.wmf-forum-hero .meta svg { color: var(--wmf-gold); }

.wmf-forum-body { padding: 60px 0; }
.wmf-forum-body h2 {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 24px; font-weight: 500;
  color: var(--wmf-navy);
  margin: 40px 0 20px;
  padding-bottom: 12px;
  border-bottom: 0.5px solid var(--wmf-line);
}
.wmf-forum-body p { margin-bottom: 16px; color: var(--wmf-ink-soft); }

.wmf-speakers {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
}
.wmf-speaker {
  text-align: center;
  padding: 20px;
  background: #fff;
  border: 0.5px solid var(--wmf-line);
  border-radius: var(--wmf-radius);
}
.wmf-speaker-photo {
  width: 96px; height: 96px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 14px;
  border: 2px solid var(--wmf-gold);
}
.wmf-speaker-photo-fallback {
  width: 96px; height: 96px;
  border-radius: 50%;
  margin: 0 auto 14px;
  background: var(--wmf-navy);
  color: var(--wmf-gold);
  display: grid; place-items: center;
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  border: 2px solid var(--wmf-gold);
}
.wmf-speaker-name { font-weight: 500; color: var(--wmf-navy); font-size: 15px; margin-bottom: 4px; }
.wmf-speaker-role { font-size: 12px; color: var(--wmf-ink-soft); line-height: 1.4; }

.wmf-agenda { display: flex; flex-direction: column; gap: 12px; }
.wmf-agenda-item {
  display: flex; gap: 20px;
  padding: 16px 20px;
  background: #fff;
  border-left: 3px solid var(--wmf-gold);
  border-radius: 0 var(--wmf-radius-sm) var(--wmf-radius-sm) 0;
}
.wmf-agenda-time { font-weight: 500; color: var(--wmf-navy); font-size: 14px; flex-shrink: 0; width: 90px; }
.wmf-agenda-topic { color: var(--wmf-ink-soft); font-size: 14px; }

.wmf-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.wmf-gallery img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border-radius: var(--wmf-radius-sm);
  cursor: pointer;
  transition: transform 0.2s;
}
.wmf-gallery img:hover { transform: scale(1.02); }

.wmf-rsvp {
  background: #fff;
  border: 0.5px solid var(--wmf-line);
  border-radius: var(--wmf-radius);
  padding: 32px;
  margin-top: 40px;
}
.wmf-rsvp h2 { margin-top: 0; }

/* ===== Footer ===== */
footer.wmf-footer {
  background: var(--wmf-navy) !important;
  color: rgba(255,255,255,0.7) !important;
  border-top: 2px solid var(--wmf-gold);
  padding: 50px 0 28px;
  margin-top: 60px;
}
footer.wmf-footer .wmf-footer-inner {
  display: flex; justify-content: space-between;
  flex-wrap: wrap; gap: 32px;
}
footer.wmf-footer p {
  font-size: 13px; line-height: 1.7; margin-bottom: 4px;
  color: rgba(255,255,255,0.7) !important;
}
footer.wmf-footer a {
  color: rgba(255,255,255,0.85) !important;
  text-decoration: none;
}
footer.wmf-footer a:hover { color: var(--wmf-gold) !important; }
footer.wmf-footer .wmf-org {
  color: var(--wmf-gold) !important;
  font-weight: 500;
  letter-spacing: 0.3px;
}
footer.wmf-footer .wmf-footer-social {
  display: flex; gap: 14px; margin-top: 12px;
}
footer.wmf-footer .wmf-footer-social a {
  color: rgba(255,255,255,0.6) !important;
}
footer.wmf-footer .wmf-footer-social a:hover { color: var(--wmf-gold) !important; }

footer.wmf-footer .wmf-footer-credit {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 0.5px solid rgba(201, 169, 106, 0.2);
  text-align: center;
}
footer.wmf-footer .wmf-footer-credit p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.45) !important;
  letter-spacing: 0.3px;
  margin: 0;
}
footer.wmf-footer .wmf-footer-credit a {
  color: var(--wmf-gold) !important;
}
footer.wmf-footer .wmf-footer-credit a:hover { color: #fff !important; }

/* Right column gold copyright line */
footer.wmf-footer .wmf-footer-inner > div:last-child p:first-child {
  color: var(--wmf-gold) !important;
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .wmf-burger { display: block; }

  .wmf-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: var(--wmf-navy-deep);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
    padding: 80px 28px 28px;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: -8px 0 30px rgba(0,0,0,0.3);
    z-index: 100;
    overflow-y: auto;
  }
  .wmf-menu-checkbox:checked ~ .wmf-nav {
    transform: translateX(0);
  }
  .wmf-nav a {
    width: 100%;
    padding: 16px 0;
    font-size: 16px;
    color: rgba(255,255,255,0.85);
    border-bottom: 0.5px solid rgba(255,255,255,0.08);
  }
  .wmf-nav a:hover { color: var(--wmf-gold); }

  body:has(.wmf-menu-checkbox:checked) { overflow: hidden; }

  /* Protect the brand from being squashed */
  .wmf-header-inner { gap: 12px; }
  .wmf-brand { flex-shrink: 1; min-width: 0; }
  .wmf-brand-text { min-width: 0; }
  .wmf-brand-text strong,
  .wmf-brand-text span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  .wmf-hero { padding: 50px 0 36px; }
  .wmf-section { padding: 40px 0; }
  .wmf-grid { grid-template-columns: 1fr; gap: 16px; }
  .wmf-forum-hero { padding: 50px 0; }

  .wmf-footer-inner { flex-direction: column; }
  .wmf-footer-inner > div:last-child { text-align: left !important; }
}

/* Extra-small phones */
@media (max-width: 400px) {
  .wmf-brand-text strong { font-size: 14px; }
  .wmf-brand-text span { font-size: 10px; letter-spacing: 1px; }
}