/* site-pages3.css — logo image, hero globe, cinematic showcase, Pakistan flag */

/* ===== Header logo image ===== */
.gfm-brand { display: inline-flex; align-items: center; }
.gfm-brand-logo { height: 44px; width: auto; display: block; }
@media (max-width: 880px) { .gfm-brand-logo { height: 36px; } }

/* ===== Hero light variant ===== */
.gfm-hero-light { background: var(--bg-1); color: var(--fg-1); padding: var(--space-24) var(--space-6) var(--space-16); display: block; min-height: auto; }
.gfm-hero-light .gfm-hero-inner { max-width: 1100px; margin: 0 auto; text-align: center; align-items: center; display: flex; flex-direction: column; gap: var(--space-6); }
.gfm-hero-light .gfm-hero-title { color: var(--fg-1); font-size: clamp(40px, 7vw, 80px); font-weight: var(--font-medium); line-height: 1.05; letter-spacing: -0.05em; margin: 0; max-width: 14ch; }
.gfm-hero-light .gfm-hero-sub { color: var(--fg-2); font-size: var(--text-lg); line-height: var(--leading-relaxed); max-width: 56ch; margin: 0; }

.gfm-hero-globe { display: inline-flex; align-items: center; vertical-align: -0.12em; margin: 0 0.06em; }
.gfm-hero-globe svg { animation: gfmGlobeSpin 18s linear infinite; }
@keyframes gfmGlobeSpin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .gfm-hero-globe svg { animation: none; } }

/* ===== Showcase ===== */
.gfm-showcase-wrap { position: relative; height: 220vh; }   /* scroll runway */
.gfm-showcase-sticky { position: sticky; top: 80px; height: calc(100vh - 100px); display: flex; align-items: center; padding: 0; }
.gfm-showcase-row { display: flex; gap: 12px; width: 100%; max-width: none; margin: 0; height: min(82vh, 820px); }

.gfm-showcase-card { position: relative; border-radius: 32px; overflow: hidden; min-width: 0; transition: flex 600ms cubic-bezier(0.22,1,0.36,1), opacity 500ms ease, transform 600ms cubic-bezier(0.22,1,0.36,1), filter 500ms ease, aspect-ratio 600ms cubic-bezier(0.22,1,0.36,1); height: 100%; cursor: default; }
.gfm-showcase-side { background: var(--bg-2); }
.gfm-showcase-mid { background: #0a0a0a; cursor: pointer; }
.gfm-showcase-mid .gfm-showcase-video {
  position: absolute; inset: 0; overflow: hidden;
}
.gfm-showcase-mid .gfm-showcase-video iframe,
.gfm-showcase-mid .gfm-showcase-video video {
  position: absolute;
  top: 50%; left: 50%;
  /* size iframe so its 16:9 covers the card (which may be portrait initially, landscape later) */
  width: max(100%, calc(100vh * 16 / 9));
  height: max(100%, calc(100vw * 9 / 16));
  min-width: 100%; min-height: 100%;
  transform: translate(-50%, -50%) scale(1.18);
  border: 0;
  pointer-events: none;
  object-fit: cover;
}
.gfm-showcase-mid .gfm-showcase-video::after {
  content: '';
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.25) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.55) 100%);
  pointer-events: none;
}
.gfm-showcase-mid.is-cinema { cursor: pointer; }

.gfm-showcase-photo { position: absolute; inset: 0; background-size: cover; background-position: center; }
.gfm-showcase-photo span { position: absolute; left: 16px; bottom: 14px; color: #fff; font-size: var(--text-sm); text-shadow: 0 1px 8px rgba(0,0,0,0.55); }
.gfm-photo-versammlung { background-image: url('assets/hero-card-links.avif'); background-size: cover; background-position: center; filter: grayscale(15%); }
.gfm-photo-schulung    { background-image: url('assets/hero-card-rechts.avif'); background-size: cover; background-position: center; filter: grayscale(15%); }

/* hover pill on middle card (only when not yet expanded) */
.gfm-showcase-pill {
  position: absolute; left: 50%; bottom: 28px; transform: translate(-50%, 12px);
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 20px 10px 10px;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.6);
  color: var(--color-black);
  border-radius: var(--radius-full); font-weight: var(--font-medium); font-size: var(--text-sm);
  opacity: 0; pointer-events: none;
  transition: opacity 280ms ease, transform 380ms cubic-bezier(0.22,1,0.36,1);
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  white-space: nowrap;
}
.gfm-showcase-mid.is-cursor .gfm-showcase-pill { opacity: 1; }
.gfm-showcase-mid:hover .gfm-showcase-pill { opacity: 1; }
.gfm-showcase-pill-play { width: 28px; height: 28px; border-radius: 50%; background: #ffffff; color: var(--color-brand-primary); display: inline-flex; align-items: center; justify-content: center; }

/* cinematic centered play button (when fully expanded) */
.gfm-showcase-cinema-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 96px; height: 96px; border-radius: 50%;
  background: rgba(255,255,255,0.95); color: var(--color-brand-primary);
  border: 0; cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 40px rgba(0,0,0,0.45);
  transition: transform 300ms ease;
  z-index: 3;
}
.gfm-showcase-cinema-play:hover { transform: translate(-50%, -50%) scale(1.06); }
.gfm-showcase-cinema-play svg { margin-left: 4px; }

/* video modal (cinematic) */
.gfm-video-modal { aspect-ratio: 16/9; max-width: min(1200px, 92vw); width: 100%; padding: 0; background: #000; color: #fff; display: flex; align-items: center; justify-content: center; position: relative; border-radius: var(--radius-xl); overflow: hidden; }
.gfm-video-iframe { width: 100%; height: 100%; border: 0; display: block; }
.gfm-video-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; background: rgba(0,0,0,0.6); color: #fff; border: 0; font-size: 24px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; z-index: 4; }
.gfm-video-close:hover { background: rgba(0,0,0,0.85); }

/* video modal v2 — fullscreen overlay with video centered + Close pill below */
.gfm-vmodal {
  position: fixed; inset: 0;
  z-index: 9999;
  background: rgba(8, 8, 8, 0.92);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  padding: clamp(16px, 4vw, 48px);
  gap: clamp(16px, 2vw, 28px);
  animation: vmodalIn 220ms ease-out;
}
@keyframes vmodalIn { from { opacity: 0; } to { opacity: 1; } }
.gfm-vmodal-stage {
  display: flex; flex-direction: column; align-items: center;
  gap: clamp(16px, 2vw, 24px);
  width: 100%;
  max-width: min(1280px, 100%);
}
.gfm-vmodal-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: calc(100vh - 160px);
  border-radius: 14px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 24px 80px rgba(0,0,0,0.55);
}
.gfm-vmodal-iframe {
  /* Absolute + inset:0 sizes the iframe by its edges, so it fills the frame
     even on Safari/iOS, where a percentage height does not resolve against an
     aspect-ratio-derived parent height (iframe would otherwise collapse to 0,
     leaving audio but no picture). Mirrors the working .gfm-video iframe. */
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  border: 0; display: block;
}
.gfm-vmodal-close {
  appearance: none;
  border: 0;
  background: #0e0e0e;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 12px 14px 12px 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: transform 200ms ease, background 200ms ease;
}
.gfm-vmodal-close:hover { background: #1a1a1a; transform: translateY(-1px); }
.gfm-vmodal-close-x {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--color-brand-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}
@media (max-width: 720px) {
  .gfm-vmodal { padding: 14px; gap: 14px; }
  .gfm-vmodal-frame { border-radius: 10px; }
  .gfm-vmodal-close { font-size: 14px; padding: 10px 12px 10px 18px; }
  .gfm-vmodal-close-x { width: 24px; height: 24px; font-size: 16px; }
}

/* ===== Pakistan flag (animated) ===== */
.gfm-pak-flag { position: absolute; inset: 0; display: flex; overflow: hidden; }
.gfm-pak-white { width: 25%; height: 100%; background: #fff; }
.gfm-pak-green { flex: 1; height: 100%; background: #014421; position: relative; display: flex; align-items: center; justify-content: center; }
.gfm-pak-emblem { width: 36%; height: auto; max-width: 280px; }
/* gentle wave shimmer overlay */
.gfm-pak-shimmer {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.18) 0%, rgba(0,0,0,0) 22%, rgba(255,255,255,0.10) 50%, rgba(0,0,0,0) 78%, rgba(0,0,0,0.18) 100%),
    radial-gradient(ellipse at 50% 100%, rgba(0,0,0,0.25), transparent 60%);
  animation: gfmFlagWave 5.5s ease-in-out infinite;
  mix-blend-mode: overlay;
}
@keyframes gfmFlagWave {
  0%, 100% { transform: translateX(-3%) skewY(-0.4deg); }
  50%      { transform: translateX(3%)  skewY(0.4deg); }
}
@media (prefers-reduced-motion: reduce) { .gfm-pak-shimmer { animation: none; } }

/* responsive: showcase cards stack on small screens (no scroll-cinema) */
@media (max-width: 720px) {
  .gfm-showcase-wrap { height: auto; padding: 0 !important; }
  .gfm-showcase-sticky { position: static; height: auto; padding: var(--space-8) var(--gutter, 16px); }
  .gfm-showcase-row { flex-direction: column; height: auto; gap: var(--space-3); padding: 0; }
  .gfm-showcase-card { aspect-ratio: 4/3 !important; flex: 0 0 auto !important; opacity: 1 !important; transform: none !important; }
  /* Hide the left + right side cards on mobile — only the middle (video) card stays */
  .gfm-showcase-row > .gfm-showcase-side { display: none !important; }
  .gfm-showcase-row > .gfm-showcase-mid { aspect-ratio: 4/5 !important; width: 100%; }
}

/* Lock the pill dead-center wherever a precision hover is unlikely (mobile + tablets) */
@media (max-width: 1024px) {
  .gfm-showcase-mid .gfm-showcase-pill {
    left: 50% !important;
    top: 50% !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    opacity: 1 !important;
    pointer-events: none;
  }
}
