/* ===================================================================
   Dream Counselling — brochure carousel + lightbox.
   Split out of blog.css because only the EIT Faridabad post uses it;
   every other /blog page should not have to load this. Uses the same
   design tokens (--accent, --card, --border, --muted, etc.) defined
   in blog.css, so this file must always be loaded *after* blog.css.
   =================================================================== */

/* ── CAROUSEL CARD ── */
.brochure-carousel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 20px 24px;
  margin: 20px 0 8px;
}
.brochure-carousel-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 18px;
}

/* ── FRAME (image only — no controls live inside it, so nothing can
   ever overlap the brochure page itself) ── */
.brochure-carousel-frame {
  position: relative;
  max-width: 380px;
  margin: 0 auto;
  aspect-ratio: 1000 / 1588;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
}
.brochure-carousel-frame:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.brochure-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition:
    opacity 0.5s ease,
    transform 0.6s ease;
  pointer-events: none;
}
.brochure-slide.is-active {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.brochure-slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ── CONTROLS BAR (below the frame — prev / dots+counter / next) ── */
.brochure-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.brochure-carousel-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.brochure-arrow {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s;
}
.brochure-arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.brochure-dots {
  display: flex;
  gap: 8px;
}
.brochure-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  padding: 0;
  transition:
    background 0.2s,
    transform 0.2s;
}
.brochure-dot.is-active {
  background: var(--accent);
  transform: scale(1.3);
}
.brochure-counter {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* Fullscreen toggle sits in its own row so it never competes with the
   dots/counter/arrows for space. */
.brochure-fullscreen-btn,
a.brochure-fullscreen-btn {
  margin: 14px auto 0;
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1.5px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  padding: 10px 20px;
  min-height: 40px;
  border-radius: 999px;
  cursor: pointer;
  width: fit-content;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.brochure-fullscreen-btn:hover,
a.brochure-fullscreen-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

/* ── LIGHTBOX ──
   Column layout: a reserved header strip for the close button, a
   flexible stage that centers the image within whatever space is
   left, and a reserved footer strip for prev/counter/next. Because
   each piece owns its own row, the image can never be covered. */
.brochure-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.brochure-lightbox.is-active {
  opacity: 1;
  pointer-events: all;
}
.brochure-lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background 0.2s;
}
.brochure-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.28);
}
.brochure-lightbox-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 64px 20px 8px;
}
.brochure-lightbox-img {
  max-width: min(92vw, 640px);
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.96);
  transition: transform 0.3s ease;
  object-fit: contain;
}
.brochure-lightbox.is-active .brochure-lightbox-img {
  transform: scale(1);
}
.brochure-lightbox-controls {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 10px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  color: #fff;
}
.brochure-lightbox-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  transition: background 0.2s;
}
.brochure-lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.28);
}
.brochure-lightbox-counter {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  min-width: 42px;
  text-align: center;
}

/* ── MOBILE ── */
@media (max-width: 600px) {
  .brochure-carousel {
    padding: 16px 14px 20px;
  }
  .brochure-carousel-frame {
    max-width: 260px;
  }
  .brochure-carousel-controls {
    gap: 10px;
  }
  .brochure-lightbox-stage {
    padding: 56px 12px 8px;
  }
  .brochure-lightbox-img {
    max-width: 94vw;
  }
}

@media (max-width: 400px) {
  .brochure-carousel-frame {
    max-width: 100%;
  }
  .brochure-carousel-controls {
    gap: 8px;
  }
  .brochure-arrow {
    width: 40px;
    height: 40px;
  }
  .brochure-fullscreen-btn,
  a.brochure-fullscreen-btn {
    width: 100%;
    justify-content: center;
  }
  .brochure-lightbox-controls {
    gap: 14px;
  }
}
