/* ═══════════════════════════════════════════════════
   MENA Speakers — Portrait-First Card Design v2
   ═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --ms-navy:      #0b1f3a;
  --ms-navy2:     #152d4e;
  --ms-cyan:      #00c2d4;
  --ms-white:     #ffffff;
  --ms-text:      #1e293b;
  --ms-muted:     #64748b;
  --ms-radius:    20px;
  --ms-ease:      cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Grid ──────────────────────────────────────────── */
.menas-grid {
  display: grid;
  gap: 24px;
  padding: 4px 0 36px;
  align-items: start;
}
.menas-cols-1 { grid-template-columns: 1fr; max-width: 340px; margin: 0 auto; }
.menas-cols-2 { grid-template-columns: repeat(2, 1fr); }
.menas-cols-3 { grid-template-columns: repeat(3, 1fr); }
.menas-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1100px) {
  .menas-cols-4 { grid-template-columns: repeat(2, 1fr); }
  .menas-cols-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .menas-cols-2, .menas-cols-3, .menas-cols-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}
@media (max-width: 420px) {
  .menas-cols-2, .menas-cols-3, .menas-cols-4 { grid-template-columns: 1fr; }
}

/* ── Card ──────────────────────────────────────────── */
.menas-card {
  position: relative;
  border-radius: var(--ms-radius);
  overflow: hidden;
  cursor: default;
  aspect-ratio: 3 / 4;
  background: var(--ms-navy);
  box-shadow: 0 8px 32px rgba(11,31,58,.22);
  transition: transform 0.4s var(--ms-ease), box-shadow 0.4s var(--ms-ease);
}
.menas-card:hover {
  transform: translateY(-8px) scale(1.012);
  box-shadow: 0 28px 64px rgba(11,31,58,.38);
}

/* ── Full-bleed Image ──────────────────────────────── */
.menas-card-image-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.menas-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.65s var(--ms-ease);
}
.menas-card:hover .menas-card-img { transform: scale(1.07); }

.menas-card-img-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #0b1f3a, #1a4a7a);
}
.menas-card-img-placeholder svg { width: 72px; height: 72px; opacity: .35; }

/* ── Gradient Overlay ──────────────────────────────── */
.menas-card-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(11,31,58,0)    0%,
    rgba(11,31,58,0)    38%,
    rgba(11,31,58,0.6)  60%,
    rgba(11,31,58,0.95) 82%,
    rgba(11,31,58,1)    100%
  );
  transition: background 0.4s var(--ms-ease);
}
.menas-card:hover .menas-card-overlay {
  background: linear-gradient(
    to bottom,
    rgba(11,31,58,0)    0%,
    rgba(11,31,58,0)    30%,
    rgba(11,31,58,0.65) 57%,
    rgba(11,31,58,0.97) 80%,
    rgba(11,31,58,1)    100%
  );
}

/* ── Flag Badge (top-right) ────────────────────────── */
.menas-flag-badge {
  position: absolute;
  top: 14px; right: 14px;
  z-index: 3;
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 2.5px solid rgba(255,255,255,.8);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 3px 14px rgba(0,0,0,.3);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s var(--ms-ease), box-shadow 0.3s;
}
.menas-card:hover .menas-flag-badge {
  transform: scale(1.12);
  box-shadow: 0 6px 22px rgba(0,0,0,.4);
}
.menas-flag-badge .menas-flag-img {
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%; display: block;
}
.menas-flag-emoji { font-size: 20px; line-height: 1; }

/* ── Card Body (pinned to bottom) ──────────────────── */
.menas-card-body {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 2;
  padding: 0 18px 18px;
}

.menas-card-accent {
  width: 28px; height: 2.5px;
  background: var(--ms-cyan);
  border-radius: 2px;
  margin-bottom: 10px;
  transition: width 0.35s var(--ms-ease);
}
.menas-card:hover .menas-card-accent { width: 46px; }

.menas-card-name {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.22rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 4px;
  line-height: 1.25;
  text-shadow: 0 2px 10px rgba(0,0,0,.5);
}

.menas-card-position {
  font-family: 'Inter', sans-serif;
  font-size: 0.71rem;
  font-weight: 600;
  color: var(--ms-cyan);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 9px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Excerpt — slides up on hover */
.menas-card-excerpt {
  font-family: 'Inter', sans-serif;
  font-size: 0.79rem;
  color: rgba(255,255,255,.72);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 0.42s var(--ms-ease), opacity 0.35s var(--ms-ease), margin 0.32s var(--ms-ease);
}
.menas-card:hover .menas-card-excerpt {
  max-height: 80px;
  opacity: 1;
  margin-bottom: 12px;
}

/* ── Card Footer ───────────────────────────────────── */
.menas-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

/* ── Read More Button ──────────────────────────────── */
.menas-readmore-btn {
  font-family: 'Inter', sans-serif;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ms-navy);
  background: var(--ms-cyan);
  border: none;
  border-radius: 20px;
  padding: 7px 16px;
  cursor: pointer;
  transition: background 0.22s, transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 12px rgba(0,194,212,.4);
  white-space: nowrap;
}
.menas-readmore-btn:hover {
  background: #14d9ec;
  transform: scale(1.05);
  box-shadow: 0 4px 20px rgba(0,194,212,.6);
}

/* ── Country label ─────────────────────────────────── */
.menas-card-country {
  font-family: 'Inter', sans-serif;
  font-size: 0.72rem;
  color: rgba(255,255,255,.6);
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.menas-card-country .menas-flag-img {
  width: 16px; height: 11px;
  border-radius: 2px; object-fit: cover; opacity: .85;
}

/* ═══════════════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════════════ */
.menas-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(7,18,34,.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.menas-modal-overlay.active { display: flex; }

.menas-modal {
  background: #fff;
  border-radius: 24px;
  width: 100%;
  max-width: 840px;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 48px 120px rgba(0,0,0,.45);
  animation: menasModalIn 0.34s cubic-bezier(0.34,1.4,0.64,1) both;
}
@keyframes menasModalIn {
  from { transform: scale(.9) translateY(30px); opacity: 0; }
  to   { transform: scale(1) translateY(0);     opacity: 1; }
}

.menas-modal-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 34px; height: 34px;
  background: rgba(255,255,255,.18);
  border: 1.5px solid rgba(255,255,255,.35);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  transition: background 0.2s;
  z-index: 10;
  line-height: 1;
}
.menas-modal-close:hover { background: rgba(255,255,255,.32); }

.menas-modal-content {
  display: flex;
  max-height: 90vh;
  overflow: hidden;
}

/* Left image panel — respects portrait ratio */
.menas-modal-left {
  width: 310px;
  flex-shrink: 0;
  position: relative;
  background: var(--ms-navy);
  overflow: hidden;
}
.menas-modal-img-wrap {
  width: 100%;
  height: 100%;
  position: relative;
  min-height: 440px;
}
.menas-modal-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}
.menas-modal-img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 55%, rgba(11,31,58,.75) 100%);
  pointer-events: none;
}

.menas-modal-flag {
  position: absolute;
  bottom: 18px; right: 18px;
  width: 52px; height: 52px;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.85);
  overflow: hidden;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,.35);
  z-index: 2;
}
.menas-modal-flag .menas-flag-img {
  width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%;
}
.menas-modal-flag-emoji { font-size: 28px; }

/* Right text panel */
.menas-modal-right {
  flex: 1;
  padding: 44px 38px 36px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.menas-modal-bar {
  width: 44px; height: 3px;
  background: var(--ms-cyan);
  border-radius: 2px;
  margin-bottom: 22px;
  flex-shrink: 0;
}
.menas-modal-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.1rem;
  font-weight: 700;
  color: var(--ms-navy);
  margin: 0 0 7px;
  line-height: 1.15;
}
.menas-modal-position {
  font-family: 'Inter', sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ms-cyan);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin: 0 0 26px;
  line-height: 1.5;
}
.menas-modal-divider {
  height: 1px;
  background: #e9eef4;
  margin: 0 0 22px;
  flex-shrink: 0;
}
.menas-modal-bio {
  font-family: 'Inter', sans-serif;
  font-size: 0.93rem;
  color: #334155;
  line-height: 1.82;
  flex: 1;
}
.menas-modal-bio p { margin: 0 0 14px; }
.menas-modal-bio p:last-child { margin: 0; }
.menas-modal-country {
  margin-top: 26px;
  font-family: 'Inter', sans-serif;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ms-muted);
  display: flex;
  align-items: center;
  gap: 9px;
  padding-top: 22px;
  border-top: 1px solid #e9eef4;
  flex-shrink: 0;
}
.menas-modal-country .menas-flag-img {
  width: 26px; height: 18px;
  object-fit: cover; border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,.14);
}

/* Mobile */
@media (max-width: 680px) {
  .menas-modal-content { flex-direction: column; overflow-y: auto; max-height: 90vh; }
  .menas-modal-left { width: 100%; min-height: 0; height: 260px; flex-shrink: 0; }
  .menas-modal-img-wrap { min-height: 0; height: 260px; }
  .menas-modal-right { padding: 26px 22px 26px; }
  .menas-modal-name { font-size: 1.6rem; }
}

.menas-no-speakers {
  font-family: 'Inter', sans-serif;
  color: var(--ms-muted);
  text-align: center;
  padding: 48px;
  font-size: 0.95rem;
}
