/* ------------------------------------------------------------------
   Scroll-reveal animation
   Replicates the framer-motion `whileInView` fade-up used on the
   original devConf 1.0 site ({ opacity: 0, y: 50 } -> { opacity: 1, y: 0 }).
   ------------------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: opacity, transform;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Graceful fallback: if JS is disabled, show everything. */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* ------------------------------------------------------------------
   Grand Day schedule chips (admin-coloured) + time text
   ------------------------------------------------------------------ */
.grand-chip {
  display: inline-block;
  padding: 4px 18px;
  border-radius: 999px;
  font-size: 1.125rem;
  line-height: 1.5rem;
  font-weight: 500;
  color: #fff;
}
.grand-time {
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: #9aa0b4;
}

/* ------------------------------------------------------------------
   Gallery — seamless right-to-left marquee.
   Images are managed from /admin (Gallery tab) and served via
   api/config.php. The whole strip scrolls non-stop; hovering any
   image pauses the scroll and enlarges that image above its
   neighbours, resuming when the pointer leaves.
   ------------------------------------------------------------------ */
.gallery-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 60px 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}

.gallery-track {
  display: flex;
  width: max-content;
  gap: 24px;
  animation: gallery-scroll 40s linear infinite;
}

/* pause the whole strip while any image is hovered */
.gallery-viewport:hover .gallery-track {
  animation-play-state: paused;
}

.gallery-item {
  flex: 0 0 auto;
  width: 280px;
  height: 190px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: #11131a;
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  will-change: transform;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* hovered image grows above the rest */
.gallery-item:hover {
  transform: scale(1.5);
  z-index: 20;
  border-color: rgba(123, 239, 255, 0.6);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
}

@keyframes gallery-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-track { animation: none; }
}

/* ------------------------------------------------------------------
   Teachers' Message — quote carousel.
   One teacher's message shows at a time as a styled quote; every 10s
   the track slides right-to-left to the next message (managed in JS).
   Content comes from /admin (Gallery → Teachers Message) via config.php.
   ------------------------------------------------------------------ */
.teachers-viewport {
  width: 100%;
  overflow: hidden;
}

.teachers-track {
  display: flex;
  will-change: transform;
}

.teacher-slide {
  flex: 0 0 100%;
  min-width: 100%;
  padding: 0 12px;
  box-sizing: border-box;
}

.teacher-quote {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  padding: 48px 40px 36px;
  text-align: center;
}

.teacher-quote .quote-mark {
  font-size: 2.5rem;
  line-height: 1;
  color: #07C926;
  opacity: 0.7;
  margin-bottom: 14px;
}

.teacher-message {
  font-size: 1.1rem;
  line-height: 1.9;
  color: #d7dbe4;
  font-style: italic;
  font-weight: 300;
  margin-bottom: 28px;
}

.teacher-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.teacher-photo {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(123, 239, 255, 0.5);
  flex: 0 0 auto;
}

.teacher-info { text-align: left; }

.teacher-name {
  font-size: 1.05rem;
  font-weight: 600;
  color: #09D5FB;
}

.teacher-position {
  font-size: 0.875rem;
  color: #959DA5;
}

@media (max-width: 640px) {
  .teacher-quote { padding: 36px 22px 28px; }
  .teacher-message { font-size: 1rem; line-height: 1.75; }
}

/* ------------------------------------------------------------------
   Hero countdown — counts down to the admin-set event date.
   ------------------------------------------------------------------ */
.countdown {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 6px 0 24px;
}

.cd-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 76px;
  padding: 12px 10px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.cd-num {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.cd-lbl {
  margin-top: 7px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #959DA5;
}

.cd-message {
  flex-basis: 100%;
  text-align: center;
  color: #07C926;
  font-weight: 600;
  margin-top: 4px;
}

@media (max-width: 480px) {
  .cd-box { min-width: 62px; padding: 10px 8px; }
  .cd-num { font-size: 1.5rem; }
}

/* ------------------------------------------------------------------
   Registered Users — same seamless right-to-left marquee as the
   Gallery, but each card shows the registrant's photo, name + batch.
   Oldest registration shows first (ordered server-side).
   ------------------------------------------------------------------ */
.reg-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 12px 0;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
}

.reg-track {
  display: flex;
  width: max-content;
  gap: 22px;
  animation: gallery-scroll 40s linear infinite;
}

.reg-viewport:hover .reg-track {
  animation-play-state: paused;
}

.reg-card {
  flex: 0 0 auto;
  width: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 14px;
  border-radius: 14px;
  text-align: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.reg-photo {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(123, 239, 255, 0.5);
}

.reg-name {
  font-weight: 600;
  color: #fff;
  font-size: 0.98rem;
  line-height: 1.3;
}

.reg-batch {
  font-size: 0.82rem;
  color: #959DA5;
}

@media (prefers-reduced-motion: reduce) {
  .reg-track { animation: none; }
}

/* ------------------------------------------------------------------
   Site header — sticky top bar with theme switcher, language switcher
   and a Student Login button (UI only for now).
   ------------------------------------------------------------------ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  background: rgba(8, 8, 18, 0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.site-header-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 20px;
}

.site-header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: 0 0 auto;
}
.site-header-brand img { height: 40px; width: auto; }
.site-header-brand span { color: #fff; font-weight: 700; font-size: 1.05rem; }

.site-header-actions { display: flex; align-items: center; gap: 12px; }

.hdr-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #d7dbe4;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: background 0.2s, color 0.2s;
}
.hdr-icon-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

.hdr-lang {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  overflow: hidden;
}
.hdr-lang-opt {
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: #959DA5;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
}
.hdr-lang-opt.is-active {
  background: linear-gradient(to right, #485df5, #0ccffb);
  color: #fff;
}

.hdr-login {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 16px;
  border-radius: 10px;
  text-decoration: none;
  background: linear-gradient(to right, #4ba2d3, #7335fe);
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  transition: transform 0.2s, filter 0.2s;
}
.hdr-login:hover { transform: translateY(-1px); filter: brightness(1.08); }

@media (max-width: 640px) {
  .site-header-inner { padding: 8px 14px; gap: 8px; }
  .site-header-brand span { display: none; }
  .site-header-brand img { height: 34px; }
  .site-header-actions { gap: 8px; }
  .hdr-icon-btn { width: 34px; height: 34px; }
  .hdr-lang-opt { padding: 7px 9px; font-size: 0.8rem; }
  .hdr-login { padding: 8px 12px; font-size: 0.82rem; }
  .hdr-login span { display: none; }
}

/* footer developer logo (left side) — keep it modest, not oversized */
.footer-dev-logo { width: 128px; height: auto; }

/* ==================================================================
   MOBILE RESPONSIVENESS (home page)
   custom.css loads after the compiled Tailwind, so these phone-only
   rules override the oversized desktop spacing without touching the
   larger layouts.
   ================================================================== */
@media (max-width: 640px) {
  /* --- tighten the big vertical gaps between sections --- */
  .mt-28 { margin-top: 2.5rem; }
  .mt-20 { margin-top: 2rem; }
  .mt-16 { margin-top: 1.75rem; }
  .mb-20 { margin-bottom: 2rem; }
  .mb-12 { margin-bottom: 1.5rem; }
  .mb-11 { margin-bottom: 1.5rem; }
  .pt-24 { padding-top: 2.25rem; }
  .pb-24 { padding-bottom: 2.25rem; }

  /* --- footer: stack as a centred column on phones (the single row is
         wider than the viewport), with the social icons laid out 2 × 2 --- */
  .footer > div {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 16px;
  }
  /* let the copyright text wrap within the screen instead of forcing one
     wide line (which was overflowing the viewport) */
  .footer .text-center { width: 100%; max-width: 340px; }
  .footer-dev-logo { width: 110px; }
  .footer-social {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    flex: 0 0 auto;
  }
  .footer-social li { margin: 0; }
  .footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
  }

  /* --- speaker & organizer avatar grids: 2 per row on phones
         (instead of 1 full-width card) so the page isn't absurdly
         tall, with proportionally smaller circular photos --- */
  #speakersGrid, #organizersGrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  #speakersGrid > div, #organizersGrid > div {
    width: 100%;
    margin-bottom: 1.5rem;
  }
  #speakersGrid .profile, #organizersGrid .profile {
    max-width: 150px;
    max-height: 150px;
  }
  #speakersGrid .profile > div, #organizersGrid .profile > div {
    max-width: 146px;
    max-height: 146px;
  }
  #speakersGrid h3, #organizersGrid h3 { font-size: 1.05rem; }

  /* prevent any accidental horizontal scrolling on phones */
  html, body { overflow-x: hidden; }
}

/* ------------------------------------------------------------------
   Sponsor / partner logo cards — give them a visible frame + shadow so
   they stand out against the dark background (light override in theme.css).
   ------------------------------------------------------------------ */
/* the bordered card is a direct <a> for sponsors but a nested <div> for
   partners — both carry the .border-slate-700/30 class, so target that. */
#sponsorsGrid .border-slate-700\/30, #partnersGrid .border-slate-700\/30 {
  border-color: rgba(255, 255, 255, 0.16) !important;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.38);
  border-radius: 14px;
}
#sponsorsGrid .border-slate-700\/30:hover, #partnersGrid .border-slate-700\/30:hover {
  border-color: rgba(255, 255, 255, 0.30) !important;
}
