/**
 * Next Gen — poster-style speakers page (ICSA theme)
 */
/* Body is white in the global template; avoid a “white bar” under the fixed header */
.page-next-gen {
  background-color: #06060c;
}

.page-next-gen #main.ng-next-gen {
  --ng-accent: #f82249;
  --ng-accent-soft: rgba(248, 34, 73, 0.35);
  --ng-bg-0: #06060c;
  --ng-bg-1: #101018;
  --ng-bg-2: #0a0810;
  --ng-text: #f4f4f6;
  --ng-muted: rgba(255, 255, 255, 0.72);

  min-height: 100vh;
  padding: 0 0 3rem;
  color: var(--ng-text);
  background-color: var(--ng-bg-0);
  background-image:
    radial-gradient(ellipse 90% 55% at 15% -10%, rgba(248, 34, 73, 0.28), transparent 55%),
    radial-gradient(ellipse 70% 50% at 95% 105%, rgba(248, 34, 73, 0.18), transparent 50%),
    radial-gradient(ellipse 50% 40% at 50% 50%, rgba(248, 34, 73, 0.06), transparent 65%),
    linear-gradient(168deg, var(--ng-bg-0) 0%, var(--ng-bg-1) 42%, var(--ng-bg-2) 100%);
  background-attachment: fixed;
}

.page-next-gen #main.ng-next-gen::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    -18deg,
    transparent,
    transparent 120px,
    rgba(248, 34, 73, 0.02) 120px,
    rgba(248, 34, 73, 0.02) 121px
  );
  z-index: 0;
}

.ng-next-gen .ng-inner {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0;
}

@media (min-width: 1200px) {
  .ng-next-gen .ng-inner {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Header row */
.ng-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.75rem;
}

@media (min-width: 992px) {
  .ng-header {
    grid-template-columns: minmax(160px, 220px) 1fr minmax(140px, 200px);
    gap: 1.5rem;
  }
}

.ng-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
}

.ng-brand img {
  max-height: 56px;
  width: auto;
}

.ng-brand-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ng-muted);
  max-width: 18rem;
  line-height: 1.35;
}

.ng-tagline {
  font-family: "Raleway", sans-serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(0.95rem, 2.1vw, 1.35rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.35;
  color: #fff;
  text-shadow: 0 0 40px rgba(248, 34, 73, 0.25);
}

.ng-badge {
  justify-self: center;
}

@media (min-width: 992px) {
  .ng-badge {
    justify-self: end;
  }
}

.ng-badge-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border: 2px solid var(--ng-accent);
  border-radius: 4px;
  background: rgba(248, 34, 73, 0.12);
  box-shadow: 0 0 24px rgba(248, 34, 73, 0.2);
}

.ng-badge-icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ng-accent);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.1rem;
}

.ng-badge-text {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
}

/* Body: sidebar + grid */
.ng-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

@media (min-width: 992px) {
  .ng-body {
    grid-template-columns: auto 1fr;
    gap: 2rem 2.5rem;
  }
}

.ng-sidebar {
  display: flex;
  justify-content: center;
}

@media (min-width: 992px) {
  .ng-sidebar {
    justify-content: flex-start;
    padding-top: 0.5rem;
  }
}

/* Mobile / tablet: horizontal title; desktop: vertical outline (poster style) */
.ng-sidebar-title {
  font-family: "Raleway", sans-serif;
  font-weight: 800;
  font-size: clamp(1.25rem, 5vw, 1.75rem);
  line-height: 1.2;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  writing-mode: horizontal-tb;
  transform: none;
  margin: 0 auto;
  max-width: 100%;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ng-accent);
  text-shadow: 0 0 20px rgba(248, 34, 73, 0.28);
  user-select: none;
}

@media (min-width: 992px) {
  .ng-sidebar-title {
    font-size: clamp(2.75rem, 6vw, 5.25rem);
    line-height: 0.85;
    letter-spacing: 0.08em;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    margin: 0;
    max-width: none;
    text-align: start;
    -webkit-text-stroke: 2px var(--ng-accent);
    text-shadow: 0 0 28px rgba(248, 34, 73, 0.35);
  }
}

@media (min-width: 992px) and (prefers-reduced-motion: no-preference) {
  .ng-sidebar-title {
    animation: ng-title-pulse 5s ease-in-out infinite;
  }
}

@keyframes ng-title-pulse {
  0%,
  100% {
    filter: drop-shadow(0 0 0 rgba(248, 34, 73, 0));
  }
  50% {
    filter: drop-shadow(0 0 12px rgba(248, 34, 73, 0.45));
  }
}

.ng-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.75rem 1.25rem;
}

@media (min-width: 576px) {
  .ng-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .ng-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem 1.5rem;
  }
}

/* Speaker card */
.ng-card {
  text-align: center;
}

.ng-card__frame {
  position: relative;
  margin: 0 auto 1rem;
  max-width: 280px;
  padding: 3px;
  background: #c82631;
  transform: skewX(-8deg);
  border-radius: 2px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  transition: box-shadow 0.4s ease, transform 0.4s ease;
}

.ng-card__inner {
  transform: skewX(8deg);
  overflow: hidden;
  background: var(--ng-accent);
}

.ng-card__img-wrap img {
  display: block;
  width: 100%;
  height: clamp(240px, 32vw, 300px);
  object-fit: cover;
  object-position: center top;
  filter: grayscale(100%) contrast(1.08) brightness(0.95);
  transition: filter 0.45s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, filter;
}

.ng-card__img-wrap .ng-card__img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: clamp(240px, 32vw, 300px);
  background: linear-gradient(145deg, #2a1014 0%, #120709 100%);
  color: rgba(255, 255, 255, 0.92);
  font-family: "Raleway", sans-serif;
  font-size: clamp(2.25rem, 7vw, 3.25rem);
  font-weight: 800;
  letter-spacing: 0.04em;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.ng-card:hover .ng-card__img-placeholder,
.ng-card:focus-within .ng-card__img-placeholder {
  transform: scale(1.05);
  filter: brightness(1.12);
}

@media (prefers-reduced-motion: no-preference) {
  .ng-card__img-wrap img {
    animation: ng-drift 12s ease-in-out infinite;
  }

  .ng-card:nth-child(3n + 2) .ng-card__img-wrap img {
    animation-delay: -4s;
  }

  .ng-card:nth-child(3n) .ng-card__img-wrap img {
    animation-delay: -8s;
  }
}

@keyframes ng-drift {
  0%,
  100% {
    transform: scale(1.04) translateY(0);
  }
  50% {
    transform: scale(1.07) translateY(-5px);
  }
}

.ng-card:hover .ng-card__frame,
.ng-card:focus-within .ng-card__frame {
  box-shadow:
    0 0 0 1px rgba(248, 34, 73, 0.55),
    0 18px 48px rgba(248, 34, 73, 0.35);
  transform: skewX(-8deg) translateY(-4px);
}

.ng-card:hover .ng-card__img-wrap img,
.ng-card:focus-within .ng-card__img-wrap img {
  filter: grayscale(0%) contrast(1.02) brightness(1);
  transform: scale(1.08);
  animation: none;
}

.ng-card__name {
  font-size: clamp(0.95rem, 1.8vw, 1.05rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 0.35rem;
  color: #fff;
}

.ng-card__role {
  font-size: 0.82rem;
  color: var(--ng-muted);
  margin: 0;
  line-height: 1.35;
}

.ng-card__org {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0.2rem 0 0;
}

/* Footer strip */
.ng-footer {
  margin-top: 2.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ng-meta-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
  .ng-meta-row {
    grid-template-columns: 1fr 1fr;
  }
}

.ng-meta {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
}

.ng-meta i {
  color: var(--ng-accent);
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.ng-meta span {
  line-height: 1.35;
}

.ng-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

@media (min-width: 768px) {
  .ng-bottom {
    flex-direction: row;
    align-items: center;
  }
}

.ng-site {
  font-size: 0.85rem;
  color: var(--ng-muted);
}

.ng-site a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(248, 34, 73, 0.45);
}

.ng-site a:hover {
  color: var(--ng-accent);
  border-bottom-color: var(--ng-accent);
}

.ng-social {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: center;
}

.ng-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

.ng-social a:hover {
  background: var(--ng-accent);
  border-color: var(--ng-accent);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(248, 34, 73, 0.35);
}

/* --------------------------------------------------------------------------
   Site header + menu (template defaults use a very tall logo; fix on this page)
   -------------------------------------------------------------------------- */
.page-next-gen #header {
  background: rgba(6, 12, 34, 0.98);
  height: 110px;
}

.page-next-gen #header #logo img {
  padding-top: 0 !important;
  height: 100px !important;
  max-height: 100px;
  width: auto;
}

.page-next-gen #header .navbar > ul > li {
  padding-top: 6px;
  padding-bottom: 6px;
}

/* Use padding (not margin) so the main background fills the offset under the fixed header */
.page-next-gen #main.main-page {
  margin-top: 0 !important;
  padding-top: 110px;
}

@media (max-width: 992px) {
  .page-next-gen #header {
    height: 85px !important;
  }

  .page-next-gen #header #logo img {
    height: 80px !important;
    padding-top: 10px !important;
  }

  .page-next-gen #main.main-page {
    padding-top: 85px;
  }
}
