/* ==========================================================================
   SocialPlace365 Base Styles (base.css)
   Theme: Light, playful, geometric, social, bento layout
   ========================================================================== */

/* ==========================================================================   
   1. CSS VARIABLES (DESIGN TOKENS)
   ========================================================================= */

:root {
  /* Color Palette - Playful Bright, Light Theme */
  --color-bg: #fffaf5;               /* warm white base */
  --color-bg-alt: #fff5ea;           /* soft cream */
  --color-bg-peach: #ffe2cf;         /* pale peach accent */
  --color-bg-mint: #e6fbf3;          /* light mint accent */
  --color-bg-sky: #e6f4ff;           /* sky blue wash */
  --color-bg-coral: #ffe8e2;         /* coral blush */
  --color-bg-card: #f9f2e8;          /* warm beige cards */
  --color-bg-pill: rgba(255, 255, 255, 0.85); /* glassy pill header */

  --color-text: #2d3424;             /* dark olive text */
  --color-text-soft: #555948;        /* warm charcoal secondary */
  --color-text-muted: #7a7f6c;       /* muted labels */
  --color-border-soft: #f0e2d4;      /* subtle card borders */
  --color-border-peach: #ffc8a3;     /* pill / accent borders */

  --color-primary: #ff8f70;          /* coral primary */
  --color-primary-soft: #ffd2c2;     /* soft coral wash */
  --color-primary-strong: #f86a46;   /* stronger coral for hover */

  --color-accent-mint: #38c9a4;
  --color-accent-sky: #3da7ff;
  --color-accent-peach: #ffb37a;

  --color-success: #46b97a;          /* used sparingly, non-gambling */
  --color-warning: #f7b350;
  --color-danger: #e56a6a;           /* soft, non-casino red */

  --color-gray-50: #f9f7f4;
  --color-gray-100: #f1ece5;
  --color-gray-200: #e3dbcf;
  --color-gray-300: #d4ccbf;
  --color-gray-400: #b8af9f;
  --color-gray-500: #9c9384;
  --color-gray-600: #7e776a;

  /* Typography */
  --font-sans: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  --font-display: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont,
    "SF Pro Display", "Segoe UI", sans-serif;
  --font-mono: ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;

  --font-size-xs: 0.75rem;   /* 12px */
  --font-size-sm: 0.875rem;  /* 14px */
  --font-size-md: 1rem;      /* 16px */
  --font-size-lg: 1.125rem;  /* 18px */
  --font-size-xl: 1.375rem;  /* 22px */
  --font-size-2xl: 1.75rem;  /* 28px */
  --font-size-3xl: 2.25rem;  /* 36px */
  --font-size-4xl: 3rem;     /* 48px */

  --line-height-tight: 1.1;
  --line-height-snug: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.7;

  /* Spacing Scale (0 – 96px) */
  --space-0: 0;
  --space-1: 0.25rem;  /* 4px */
  --space-2: 0.5rem;   /* 8px */
  --space-3: 0.75rem;  /* 12px */
  --space-4: 1rem;     /* 16px */
  --space-5: 1.25rem;  /* 20px */
  --space-6: 1.5rem;   /* 24px */
  --space-7: 1.75rem;  /* 28px */
  --space-8: 2rem;     /* 32px */
  --space-10: 2.5rem;  /* 40px */
  --space-12: 3rem;    /* 48px */
  --space-16: 4rem;    /* 64px */
  --space-20: 5rem;    /* 80px */
  --space-24: 6rem;    /* 96px */

  /* Radii */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --radius-card-soft: 20px;
  --radius-bento-large: 28px;

  /* Shadows - soft, daylight, no heavy contrast */
  --shadow-xs: 0 4px 10px rgba(32, 26, 17, 0.04);
  --shadow-sm: 0 10px 25px rgba(32, 26, 17, 0.06);
  --shadow-md: 0 18px 45px rgba(32, 26, 17, 0.08);
  --shadow-glass: 0 18px 40px rgba(196, 163, 126, 0.25);

  /* Transitions */
  --transition-fast: 150ms ease-out;
  --transition-normal: 220ms ease-out;
  --transition-slow: 320ms ease-out;

  /* Layout Tokens */
  --layout-max-width: 1120px; /* fits bento and hero dashboard */
  --layout-max-width-wide: 1280px;
  --header-height: 72px;
}

/* --------------------------------------------------------------------------
   Reduced motion adjustments
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition-fast: 0ms;
    --transition-normal: 0ms;
    --transition-slow: 0ms;
  }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================   
   2. RESET & NORMALIZE
   ========================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
ul,
ol {
  margin: 0;
  padding: 0;
}

ul,
ol {
  list-style: none;
}

img,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ==========================================================================   
   3. BASE TYPOGRAPHY & BODY
   ========================================================================= */

body {
  font-family: var(--font-sans);
  font-size: var(--font-size-md);
  line-height: var(--line-height-normal);
  color: var(--color-text);
  background: radial-gradient(circle at top left, #fff7ee 0, #fffaf5 36%, #fffaf5 100%);
  -webkit-font-smoothing: antialiased;
}

main {
  min-height: calc(100vh - var(--header-height));
}

h1,
.h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 3vw, var(--font-size-4xl));
  line-height: var(--line-height-tight);
  letter-spacing: -0.02em;
}

h2,
.h2 {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 2.2vw, var(--font-size-3xl));
  line-height: var(--line-height-snug);
  letter-spacing: -0.015em;
}

h3,
.h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 1.7vw, var(--font-size-2xl));
  line-height: var(--line-height-snug);
}

h4,
.h4 {
  font-weight: 600;
  font-size: var(--font-size-xl);
}

p {
  margin-bottom: var(--space-3);
  color: var(--color-text-soft);
}

p:last-child {
  margin-bottom: 0;
}

small {
  font-size: var(--font-size-sm);
}

strong {
  font-weight: 600;
}

em {
  font-style: italic;
}

/* Links - light underline-on-hover, no dark blue */

a {
  position: relative;
  transition: color var(--transition-fast);
}

a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.15em;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-accent-sky), var(--color-accent-peach));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--transition-normal);
}

a:hover::after,
a:focus-visible::after {
  transform: scaleX(1);
}

/* ==========================================================================   
   4. ACCESSIBILITY & FOCUS
   ========================================================================= */

:focus-visible {
  outline: 2px solid transparent;
  box-shadow: 0 0 0 2px #ffffff, 0 0 0 5px rgba(61, 167, 255, 0.8);
  border-radius: 6px;
}

/* Screen-reader only utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================   
   5. LAYOUT UTILITIES
   ========================================================================= */

.container {
  width: 100%;
  max-width: var(--layout-max-width);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.container-wide {
  width: 100%;
  max-width: var(--layout-max-width-wide);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.section {
  padding-block: var(--space-12);
}

.section--tight {
  padding-block: var(--space-8);
}

.section__header {
  margin-bottom: var(--space-6);
}

.section__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 204, 163, 0.2);
  color: var(--color-text-muted);
  font-size: var(--font-size-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section__title {
  margin-top: var(--space-3);
  margin-bottom: var(--space-2);
}

.section__subtitle {
  max-width: 40rem;
}

/* Flex helpers */

.flex {
  display: flex;
}

.flex-center {
  display: flex;
  align-items: center;
  justify-content: center;
}

.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.gap-sm {
  gap: var(--space-3);
}

.gap-md {
  gap: var(--space-4);
}

.gap-lg {
  gap: var(--space-6);
}

/* Grid helpers */

.grid {
  display: grid;
  gap: var(--space-4);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
}

.grid-auto-fit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-4);
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Bento grid helper for homepage sections */

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-4);
}

.bento-item {
  background: var(--color-bg-card);
  border-radius: var(--radius-bento-large);
  padding: var(--space-5);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}

.bento-item--primary {
  background: radial-gradient(circle at top left, #ffe2cf 0, #fff5ea 45%, #fffaf5 100%);
}

.bento-item--mint {
  background: linear-gradient(135deg, #e6fbf3, #f8fff9);
}

.bento-item--sky {
  background: linear-gradient(135deg, #e6f4ff, #f7fbff);
}

.bento-item__tag {
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

@media (min-width: 900px) {
  .bento-span-6 {
    grid-column: span 6;
  }

  .bento-span-4 {
    grid-column: span 4;
  }

  .bento-span-3 {
    grid-column: span 3;
  }

  .bento-span-8 {
    grid-column: span 8;
  }
}

@media (max-width: 899px) {
  .bento-grid {
    grid-template-columns: 1fr;
  }
}

/* Spacing utilities */

.mt-sm { margin-top: var(--space-3); }
.mt-md { margin-top: var(--space-4); }
.mt-lg { margin-top: var(--space-6); }

.mb-xs { margin-bottom: var(--space-2); }
.mb-sm { margin-bottom: var(--space-3); }
.mb-md { margin-bottom: var(--space-4); }
.mb-lg { margin-bottom: var(--space-6); }

.text-center { text-align: center; }
.text-right { text-align: right; }

/* ==========================================================================   
   6. COMPONENTS
   ========================================================================= */

/* 6.1 Floating Pill Header (structure support) */

.site-header-shell {
  position: sticky;
  top: 0;
  z-index: 40;
  padding-top: var(--space-3);
  padding-inline: var(--space-4);
  pointer-events: none;
}

.site-header {
  max-width: var(--layout-max-width-wide);
  margin-inline: auto;
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-inline: var(--space-4);
  background: var(--color-bg-pill);
  backdrop-filter: blur(18px);
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 186, 143, 0.55);
  box-shadow: var(--shadow-glass);
  pointer-events: auto;
}

.site-header__left,
.site-header__center,
.site-header__right {
  display: flex;
  align-items: center;
}

.site-header__center {
  gap: var(--space-4);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  font-size: var(--font-size-sm);
}

.site-nav a {
  position: relative;
  padding-block: 0.15rem;
  color: var(--color-text-muted);
}

.site-nav a::after {
  height: 1.5px;
}

.site-nav a.is-active {
  color: var(--color-text);
}

.site-nav a.is-active::after {
  transform: scaleX(1);
}

.site-header__tag {
  font-size: var(--font-size-xs);
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: rgba(230, 244, 255, 0.8);
  color: var(--color-text-muted);
  border: 1px solid rgba(181, 212, 255, 0.8);
  white-space: nowrap;
}

.site-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--color-primary), var(--color-accent-peach));
  color: #fff;
  font-size: var(--font-size-sm);
  font-weight: 600;
  box-shadow: 0 12px 28px rgba(248, 106, 70, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    filter var(--transition-fast);
}

.site-header__cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 16px 32px rgba(248, 106, 70, 0.4);
}

.site-header__cta:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(248, 106, 70, 0.3);
}

.site-header__burger {
  display: none;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  align-items: center;
  justify-content: center;
  background: rgba(255, 245, 234, 0.9);
  border: 1px solid rgba(255, 188, 141, 0.6);
}

.site-header__burger-lines {
  width: 18px;
  height: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.site-header__burger-lines span {
  display: block;
  height: 2px;
  width: 100%;
  border-radius: 999px;
  background: var(--color-text);
}

.site-header--compact {
  height: 60px;
  box-shadow: 0 12px 28px rgba(170, 144, 114, 0.24);
}

.site-header__mobile-menu {
  position: absolute;
  top: calc(100% + 0.75rem);
  right: var(--space-4);
  min-width: 240px;
  padding: var(--space-3);
  border-radius: 22px;
  background: var(--color-bg-pill);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(255, 188, 141, 0.6);
  pointer-events: auto;
}

@media (max-width: 900px) {
  .site-header {
    padding-inline: var(--space-3);
  }

  .site-header__center,
  .site-header__right .site-header__tag {
    display: none;
  }

  .site-header__burger {
    display: inline-flex;
  }
}

/* 6.2 Logo base styles (animated geometric symbol support) */

.logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.logo__symbol-wrap {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: radial-gradient(circle at 30% 20%, #ffe8df 0, #ffd2c2 35%, #e6fbf3 90%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.logo__symbol-orbit {
  position: absolute;
  inset: 7px;
  border-radius: 999px;
  border: 1.5px dashed rgba(255, 255, 255, 0.7);
  opacity: 0.9;
}

.logo__symbol-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #fff;
}

.logo__wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.logo__title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.logo__subtitle {
  font-size: 0.7rem;
  color: var(--color-text-muted);
}

/* Soft orbit / draw animations for SVG symbols (class hooks) */

@keyframes sp365-orbit-pulse {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.85;
  }
  50% {
    transform: translate(1px, -1px) scale(1.05);
    opacity: 1;
  }
}

@keyframes sp365-circle-draw {
  0% {
    stroke-dasharray: 0 999;
  }
  100% {
    stroke-dasharray: 999 0;
  }
}

.logo-symbol--animated .logo-dot {
  animation: sp365-orbit-pulse 3.2s ease-in-out infinite;
}

.logo-symbol--animated .logo-circle-stroke {
  stroke-dasharray: 999 0;
  animation: sp365-circle-draw 1.3s ease-out 0.1s both;
}

.logo-symbol--hoverable:hover {
  filter: brightness(1.05) saturate(1.08);
  transition: filter var(--transition-normal), transform var(--transition-normal);
}

.logo-symbol--hoverable:hover .logo-dot {
  animation-duration: 2.4s;
}

/* 6.3 Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: var(--font-size-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition-normal), color var(--transition-fast),
    box-shadow var(--transition-normal), transform var(--transition-fast),
    border-color var(--transition-fast);
  white-space: nowrap;
}

.btn--primary {
  background: linear-gradient(120deg, var(--color-primary), var(--color-accent-peach));
  color: #ffffff;
  box-shadow: 0 14px 35px rgba(248, 106, 70, 0.35);
}

.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(248, 106, 70, 0.4);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: 0 8px 22px rgba(248, 106, 70, 0.35);
}

.btn--ghost {
  background: rgba(230, 244, 255, 0.8);
  color: var(--color-text);
  border-color: rgba(181, 212, 255, 0.9);
  box-shadow: 0 10px 26px rgba(160, 189, 226, 0.25);
}

.btn--ghost:hover {
  background: rgba(214, 236, 255, 0.95);
}

.btn--soft {
  background: rgba(255, 245, 234, 0.9);
  color: var(--color-text-soft);
  border-color: rgba(255, 204, 163, 0.8);
}

.btn--soft:hover {
  background: rgba(255, 241, 225, 0.95);
}

.btn--sm {
  padding: 0.45rem 1rem;
  font-size: var(--font-size-xs);
}

.btn--full {
  width: 100%;
}

.btn[disabled],
.btn--disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

/* 6.4 Inputs & Forms */

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.field__label {
  font-size: var(--font-size-sm);
  color: var(--color-text-soft);
}

.field__hint {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-soft);
  background: rgba(255, 255, 255, 0.92);
  color: var(--color-text);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast), transform var(--transition-fast);
}

.input:focus-visible,
.textarea:focus-visible,
.select:focus-visible {
  border-color: rgba(61, 167, 255, 0.9);
  box-shadow: 0 0 0 1px rgba(61, 167, 255, 0.7), 0 6px 18px rgba(61, 167, 255, 0.18);
  background: #ffffff;
}

.textarea {
  min-height: 120px;
  resize: vertical;
}

.input--error,
.textarea--error {
  border-color: rgba(229, 106, 106, 0.85);
}

/* 6.5 Card */

.card {
  background: var(--color-bg-card);
  border-radius: var(--radius-card-soft);
  padding: var(--space-5);
  box-shadow: var(--shadow-xs);
  border: 1px solid rgba(255, 245, 234, 0.9);
}

.card--lifted {
  box-shadow: var(--shadow-sm);
}

.card__title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.card__meta {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

/* 6.6 Hero Category Tiles */

.hero-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}

.hero-tile {
  position: relative;
  padding: var(--space-4);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px rgba(199, 173, 145, 0.26);
  border: 1px solid rgba(255, 217, 188, 0.9);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  cursor: pointer;
  transition: transform var(--transition-normal), box-shadow var(--transition-normal),
    background var(--transition-normal), border-color var(--transition-normal);
}

.hero-tile__icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.hero-tile--peach .hero-tile__icon-wrap {
  background: rgba(255, 201, 163, 0.25);
}

.hero-tile--mint .hero-tile__icon-wrap {
  background: rgba(56, 201, 164, 0.12);
}

.hero-tile--sky .hero-tile__icon-wrap {
  background: rgba(61, 167, 255, 0.12);
}

.hero-tile--coral .hero-tile__icon-wrap {
  background: rgba(248, 106, 70, 0.12);
}

.hero-tile__title {
  font-size: var(--font-size-md);
  font-weight: 600;
}

.hero-tile__desc {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.hero-tile:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  background: #ffffff;
}

.hero-tile:hover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(circle at top right, rgba(255, 195, 163, 0.3), transparent 60%);
  pointer-events: none;
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

/* 6.7 Gallery / Masonry Hint */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--space-3);
}

.gallery-item {
  border-radius: 18px;
  overflow: hidden;
  background: var(--color-bg-alt);
}

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

@media (min-width: 900px) {
  .gallery-span-4 {
    grid-column: span 4;
  }
  .gallery-span-6 {
    grid-column: span 6;
  }
  .gallery-span-8 {
    grid-column: span 8;
  }
}

@media (max-width: 899px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* 6.8 Age Popup Shell */

.age-popup-backdrop {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top, rgba(0, 0, 0, 0.04), rgba(0, 0, 0, 0.16));
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 60;
}

.age-popup {
  width: min(360px, 100% - 2.5rem);
  padding: var(--space-5);
  background: rgba(255, 250, 245, 0.96);
  border-radius: 24px;
  box-shadow: 0 24px 60px rgba(32, 26, 17, 0.22);
  border: 1px solid rgba(255, 204, 163, 0.9);
}

.age-popup__title {
  font-size: var(--font-size-lg);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.age-popup__buttons {
  display: flex;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.age-popup__buttons .btn {
  flex: 1;
}

/* ==========================================================================   
   7. MISC UTILITIES
   ========================================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: var(--font-size-xs);
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(230, 251, 243, 0.8);
  color: var(--color-text-muted);
}

.badge--peach {
  background: rgba(255, 225, 205, 0.85);
}

.badge--sky {
  background: rgba(230, 244, 255, 0.9);
}

.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  border: 1px dashed rgba(248, 106, 70, 0.35);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  background: rgba(255, 245, 238, 0.9);
}

/* Tag-like labels for micro copy (e.g., Magyarország, Offline programok) */

.micro-label-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: var(--space-3);
}

.micro-label {
  font-size: 0.7rem;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(243, 238, 232, 0.95);
  color: var(--color-text-muted);
}

/* ==========================================================================   
   8. AGE RESTRICTION POPUP REFINEMENTS
   ========================================================================= */

#sp365-age-popup {
  display: none;
}

#sp365-age-popup.is-visible {
  display: flex;
}

.age-popup__text {
  font-size: var(--font-size-sm);
  color: var(--color-text-soft);
}

@media (max-width: 480px) {
  .age-popup {
    padding: var(--space-4);
  }
}

/* ==========================================================================   
   END
   ========================================================================= */
