/* Gurukul Gokhali — opening announcement popup (plain CSS, no framework)
   Phones: unchanged (dialog is up to 540px wide, image fits inside it).
   Laptops / desktops / TVs (>=768px): the dialog shrink-wraps a LARGE image
   whose height is sized from the viewport, so the poster fills most of the
   screen instead of staying phone-sized. */

.gg-popup{position:fixed;inset:0;z-index:1200;display:none;align-items:center;justify-content:center;padding:14px;overflow:hidden}
.gg-popup.is-open{display:flex}
.gg-popup__backdrop{position:absolute;inset:0;background:rgba(12,14,20,.72);cursor:pointer}
.gg-popup__dialog{position:relative;z-index:1;display:flex;flex-direction:column;gap:10px;width:min(94vw,540px);max-height:94svh;padding:12px;background:#fff;border-radius:16px;box-shadow:0 22px 60px rgba(0,0,0,.38)}
.gg-popup__close{position:absolute;top:10px;right:10px;z-index:3;width:44px;height:44px;padding:0;font-size:19px;line-height:1;color:#1b1b1f;background:rgba(255,255,255,.94);border:1px solid rgba(0,0,0,.12);border-radius:50%;cursor:pointer;box-shadow:0 4px 14px rgba(0,0,0,.22)}
.gg-popup__close:hover,.gg-popup__close:focus{background:#fff}
.gg-popup__close:focus-visible,.gg-popup__dot:focus-visible,.gg-popup__cta:focus-visible{outline:3px solid #7a1f2b;outline-offset:2px}
.gg-popup__track{position:relative;overflow:hidden;border-radius:12px;background:#f4f4f6}
.gg-popup__slide{display:none;margin:0;text-align:center}
.gg-popup__slide.is-active{display:block}
.gg-popup__slide img{display:block;width:100%;height:auto;max-height:min(66svh,600px);object-fit:contain;background:#fff}
.gg-popup__caption{display:flex;flex-direction:column;gap:4px;padding:10px 6px 4px;font-size:14px;color:#33313a}
.gg-popup__caption strong{font-size:15px;color:#7a1f2b}
.gg-popup__caption span{color:#54525c}
.gg-popup__cta{align-self:center;margin:6px auto 2px;padding:10px 20px;font-weight:700;color:#fff;background:#7a1f2b;border-radius:999px;text-decoration:none}
.gg-popup__dots{display:flex;gap:8px;justify-content:center;padding:2px 0}
.gg-popup__dot{width:32px;height:7px;padding:0;background:#d6d5db;border:0;border-radius:999px;cursor:pointer}
.gg-popup__dot[aria-current="true"]{background:#7a1f2b}
body.gg-popup-open{overflow:hidden}
html:has(body.gg-popup-open){overflow:hidden}

/* ── Phones ─────────────────────────────────────────────────────────── */
@media (max-width:480px){
  .gg-popup{padding:10px}
  .gg-popup__dialog{width:100%;padding:10px}
  .gg-popup__close{top:8px;right:8px}
}

/* ── Tablets, laptops and desktops ──────────────────────────────────── */
@media (min-width:768px){
  .gg-popup{padding:24px}
  .gg-popup__dialog{
    width:auto;                       /* shrink-wrap the poster */
    min-width:min(92vw,520px);
    max-width:min(92vw,1100px);
    max-height:94svh;
    padding:16px;
    gap:12px;
    border-radius:20px;
  }
  .gg-popup__track{display:flex;justify-content:center;border-radius:14px}
  .gg-popup__slide{width:100%}
  .gg-popup__slide img{
    width:auto;                       /* width follows the poster's aspect ratio */
    max-width:100%;
    /* fill the available height: viewport minus padding, caption, button, dots */
    height:min(calc(94svh - 170px),860px);
    max-height:none;
    margin:0 auto;
    object-fit:contain;
  }
  /* long captions must not stretch the dialog wider than the poster */
  .gg-popup__caption{width:0;min-width:100%;font-size:15px;padding:12px 8px 4px}
  .gg-popup__caption strong{font-size:17px}
  .gg-popup__cta{padding:12px 28px;font-size:16px}
  .gg-popup__dot{width:38px;height:8px}
}

/* ── Large laptops / monitors ───────────────────────────────────────── */
@media (min-width:1200px){
  .gg-popup__dialog{max-width:min(90vw,1240px)}
  .gg-popup__slide img{height:min(calc(94svh - 180px),940px)}
}

/* ── 4K monitors and TVs ────────────────────────────────────────────── */
@media (min-width:1920px){
  .gg-popup__dialog{max-width:min(86vw,1600px);padding:20px;border-radius:24px}
  .gg-popup__slide img{height:min(calc(94svh - 200px),1180px)}
  .gg-popup__caption{font-size:18px}
  .gg-popup__caption strong{font-size:21px}
  .gg-popup__cta{padding:14px 34px;font-size:18px}
  .gg-popup__close{width:52px;height:52px;font-size:22px;top:14px;right:14px}
}

/* ── Short landscape screens (phones turned sideways) ───────────────── */
@media (max-height:520px) and (orientation:landscape){
  .gg-popup{padding:8px}
  .gg-popup__dialog{padding:8px;gap:6px}
  .gg-popup__slide img{height:min(calc(94svh - 110px),420px)}
  .gg-popup__caption{padding:6px 4px 2px}
}

@media (prefers-reduced-motion:reduce){.gg-popup *{transition:none!important;animation:none!important}}
