:root {
  --ffa-black: #0a0805;
  --ffa-charcoal: #1a1410;
  --ffa-deep: #251c12;
  --ffa-gold: #D4A537;
  --ffa-gold-bright: #F4C842;
  --ffa-gold-pale: #E8B923;
  --ffa-gold-dim: #8B6914;
  --ffa-ember: #FF8C2A;
  --ffa-cream: #F5E6B3;

  --glass-bg: rgba(20, 14, 8, 0.45);
  --glass-bg-strong: rgba(30, 22, 12, 0.55);
  --glass-bg-gold: rgba(212, 165, 55, 0.08);
  --glass-border: rgba(212, 165, 55, 0.25);
  --glass-border-bright: rgba(244, 200, 66, 0.4);
  --glass-shadow: 0 12px 40px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(212, 165, 55, 0.1) inset;
  --glass-shadow-hover: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(244, 200, 66, 0.3) inset, 0 0 30px rgba(212, 165, 55, 0.15);
  --glass-blur: 20px;

  --text: #f5e6b3;
  --text-light: #fefbe9;
  --text-muted: rgba(245, 230, 179, 0.75);
  --text-gold: #F4C842;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { min-height: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--ffa-black);
  background-image:
    radial-gradient(ellipse at 20% 0%, rgba(212, 165, 55, 0.18) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 30%, rgba(255, 140, 42, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(212, 165, 55, 0.15) 0%, transparent 55%),
    linear-gradient(180deg, #0a0805 0%, #1a1410 50%, #0a0805 100%);
  background-attachment: fixed;
  min-height: 100vh;
}

/* Animated subtle ember particles */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(244, 200, 66, 0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 70%, rgba(212, 165, 55, 0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 20%, rgba(255, 140, 42, 0.4) 0%, transparent 100%),
    radial-gradient(2px 2px at 30% 80%, rgba(244, 200, 66, 0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 90%, rgba(212, 165, 55, 0.5) 0%, transparent 100%);
  background-size: 200px 200px, 300px 300px, 250px 250px, 350px 350px, 280px 280px;
  pointer-events: none;
  z-index: -1;
  opacity: 0.6;
}

a { color: var(--ffa-gold-bright); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--ffa-cream); }

img { max-width: 100%; height: auto; display: block; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Navigation ---------- */
.navbar {
  position: sticky;
  top: 1rem;
  z-index: 100;
  margin: 1rem auto;
  max-width: 1200px;
  padding: 0.75rem 1.5rem;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.navbar-brand {
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--text-light);
  display: flex;
  align-items: center;
  gap: 0.65rem;
  letter-spacing: -0.01em;
}

.navbar-brand img {
  height: 40px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(212, 165, 55, 0.4));
}

.navbar-brand .brand-text {
  background: linear-gradient(135deg, var(--ffa-gold-bright), var(--ffa-cream));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.navbar-links {
  display: flex;
  gap: 0.4rem;
  list-style: none;
  align-items: center;
  flex-wrap: wrap;
}

.navbar-links a {
  color: var(--text-light);
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.2s;
}

.navbar-links a:hover {
  background: var(--glass-bg-gold);
  color: var(--ffa-gold-bright);
  text-shadow: 0 0 10px rgba(244, 200, 66, 0.5);
}

.navbar-toggle {
  display: none;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--ffa-gold-bright);
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 5rem 1.5rem 4rem;
  color: var(--text-light);
  overflow: hidden;
}

.hero-background {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.35;
  z-index: -1;
}

.hero-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 0%, rgba(10, 8, 5, 0.85) 70%, var(--ffa-black) 100%);
}

.hero-logo {
  width: clamp(140px, 22vw, 200px);
  height: auto;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 8px 30px rgba(212, 165, 55, 0.5));
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 800;
  margin-bottom: 1.25rem;
  letter-spacing: -0.025em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--ffa-cream) 0%, var(--ffa-gold-bright) 50%, var(--ffa-gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 40px rgba(212, 165, 55, 0.3);
}

.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 720px;
  margin: 0 auto 2rem;
  color: var(--text-muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.85rem;
  border-radius: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.25s;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, var(--ffa-gold-bright) 0%, var(--ffa-gold) 100%);
  color: var(--ffa-black);
  border-color: var(--ffa-gold-pale);
  box-shadow: 0 4px 20px rgba(212, 165, 55, 0.4), 0 0 0 1px rgba(244, 200, 66, 0.3) inset;
  font-weight: 700;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--ffa-cream) 0%, var(--ffa-gold-bright) 100%);
  color: var(--ffa-black);
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(244, 200, 66, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.4) inset;
}

.btn-glass {
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  color: var(--text-light);
  border-color: var(--glass-border);
}

.btn-glass:hover {
  background: var(--glass-bg-gold);
  color: var(--ffa-gold-bright);
  border-color: var(--glass-border-bright);
  box-shadow: 0 4px 20px rgba(212, 165, 55, 0.2);
}

.btn-danger {
  background: rgba(180, 40, 40, 0.7);
  color: var(--ffa-cream);
  border-color: rgba(220, 80, 80, 0.4);
  backdrop-filter: blur(10px);
}

.btn-danger:hover {
  background: rgba(200, 50, 50, 0.85);
  border-color: rgba(255, 100, 100, 0.6);
}

.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.85rem; }

/* ---------- Glass Card — frostier, more luminous ---------- */
.glass-card {
  position: relative;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.85rem;
  box-shadow: var(--glass-shadow);
  color: var(--text-light);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s, border-color 0.3s;
  overflow: hidden;
}

/* Top edge highlight (gives the frosted "glass top" feel) */
.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244, 200, 66, 0.5), transparent);
}

/* Inner sheen */
.glass-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, transparent 100%);
  pointer-events: none;
  border-radius: 20px 20px 0 0;
}

.glass-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--glass-shadow-hover);
  border-color: var(--glass-border-bright);
}

/* ---------- CDE Grid ---------- */
.section { padding: 3rem 1.5rem; }

.section-title {
  color: var(--text-light);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--ffa-cream) 0%, var(--ffa-gold-bright) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

.cde-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  max-width: 1200px;
  margin: 0 auto;
}

.cde-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text-light);
  cursor: pointer;
  position: relative;
}

.cde-card .icon {
  font-size: 2.75rem;
  margin-bottom: 0.85rem;
  filter: drop-shadow(0 2px 10px rgba(212, 165, 55, 0.4));
  position: relative;
  z-index: 1;
}

.cde-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
  color: var(--ffa-cream);
  position: relative;
  z-index: 1;
}

.cde-card .category {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ffa-gold-bright);
  font-weight: 700;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.cde-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  flex-grow: 1;
  position: relative;
  z-index: 1;
}

.cde-card .arrow {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--ffa-gold-bright);
  font-weight: 600;
  position: relative;
  z-index: 1;
  transition: transform 0.2s;
}

.cde-card:hover .arrow {
  transform: translateX(4px);
}

/* ---------- Category groups ---------- */
.category-group { margin-bottom: 3rem; }

.category-group h2 {
  color: var(--ffa-gold-bright);
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--glass-border);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ---------- CDE Detail ---------- */
.cde-detail-wrapper {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.cde-detail { color: var(--text-light); }

.cde-detail .icon-large {
  font-size: 4.5rem;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 16px rgba(212, 165, 55, 0.5));
}

.cde-detail h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 0.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--ffa-cream), var(--ffa-gold-bright));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cde-detail .category-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--ffa-gold-bright), var(--ffa-gold));
  color: var(--ffa-black);
  padding: 0.3rem 0.95rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px rgba(212, 165, 55, 0.4);
}

.cde-detail-section { margin-bottom: 1.5rem; }

.cde-detail-section h3 {
  color: var(--ffa-gold-bright);
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.cde-detail-section p { color: var(--text-muted); }

/* ---------- Flash messages ---------- */
.flash-container {
  max-width: 1200px;
  margin: 1rem auto;
  padding: 0 1.5rem;
}

.flash {
  padding: 0.85rem 1.25rem;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  color: var(--text-light);
}

.flash-success { border-left: 4px solid #6ee787; }
.flash-error { border-left: 4px solid #ff7a7a; }
.flash-info { border-left: 4px solid var(--ffa-gold-bright); }

/* ---------- Footer ---------- */
.footer {
  margin-top: 4rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  background: rgba(10, 8, 5, 0.6);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-top: 1px solid var(--glass-border);
}

.footer img {
  height: 50px;
  width: auto;
  margin: 0 auto 1rem;
  filter: drop-shadow(0 2px 8px rgba(212, 165, 55, 0.3));
  opacity: 0.8;
}

/* ---------- Forms ---------- */
.form-card { max-width: 480px; margin: 4rem auto; padding: 2.5rem; }

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--ffa-cream);
  font-weight: 500;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  background: rgba(10, 8, 5, 0.5);
  backdrop-filter: blur(8px);
  color: var(--ffa-cream);
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.2s;
}

.form-control::placeholder { color: rgba(245, 230, 179, 0.4); }

.form-control:focus {
  outline: none;
  border-color: var(--ffa-gold-bright);
  background: rgba(20, 14, 8, 0.7);
  box-shadow: 0 0 0 3px rgba(212, 165, 55, 0.2), 0 0 20px rgba(212, 165, 55, 0.15);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%23F4C842' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

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

.form-checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ffa-cream);
}

.form-checkbox input {
  width: auto;
  accent-color: var(--ffa-gold-bright);
}

@media (max-width: 768px) {
  .navbar { flex-wrap: wrap; }
  .navbar-toggle { display: block; }
  .navbar-links {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
    display: none;
  }
  .navbar-links.open { display: flex; }
  .navbar-links a { display: block; }
}

/* ---------- Logo blending overrides ---------- */
.hero-logo {
  width: clamp(180px, 28vw, 280px);
  margin: 0 auto 1.5rem;
  filter:
    drop-shadow(0 0 40px rgba(212, 165, 55, 0.45))
    drop-shadow(0 0 80px rgba(212, 165, 55, 0.25))
    drop-shadow(0 8px 30px rgba(0, 0, 0, 0.6));
  /* Soft radial mask so the rectangular edges fade into the background */
  -webkit-mask-image: radial-gradient(ellipse 70% 75% at center, #000 45%, rgba(0,0,0,0.85) 60%, rgba(0,0,0,0.4) 80%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 75% at center, #000 45%, rgba(0,0,0,0.85) 60%, rgba(0,0,0,0.4) 80%, transparent 100%);
  animation: float 6s ease-in-out infinite;
  /* Multiply blend lets the dark logo background mix with the hero */
  mix-blend-mode: screen;
}

/* Soften the vignette so it doesn't create a harsh dark ring */
.hero-background::after {
  background: radial-gradient(ellipse at center, transparent 0%, rgba(10, 8, 5, 0.55) 65%, rgba(10, 8, 5, 0.85) 100%);
}

/* Glow halo that sits behind the logo, blends into the hero */
.hero {
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 4rem;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(280px, 40vw, 420px);
  height: clamp(280px, 40vw, 420px);
  background: radial-gradient(circle, rgba(244, 200, 66, 0.22) 0%, rgba(212, 165, 55, 0.12) 30%, transparent 70%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
  animation: pulse-glow 4s ease-in-out infinite;
}

.hero-logo {
  position: relative;
  z-index: 1;
}

.hero h1, .hero p, .hero .btn {
  position: relative;
  z-index: 1;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 0.7; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.05); }
}

/* Round the logo corners — sits on top of the mask fade */
.hero-logo {
  border-radius: 24px;
  overflow: hidden;
}

.navbar-brand img {
  border-radius: 8px;
}

.footer img {
  border-radius: 10px;
}

.admin-brand img {
  border-radius: 8px;
}

/* ---------- Hero — layered background blending ---------- */
.hero {
  padding: 6rem 1.5rem 5rem;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.hero-background {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 1;
  z-index: -1;
  animation: kenburns 25s ease-in-out infinite alternate;
}

@keyframes kenburns {
  0%   { transform: scale(1.0) translateX(0); }
  100% { transform: scale(1.08) translateX(-1.5%); }
}

/* Warm gold-tinted overlay — colorizes the photo to match the palette */
.hero-background::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg,
      rgba(212, 165, 55, 0.25) 0%,
      rgba(255, 140, 42, 0.15) 50%,
      rgba(10, 8, 5, 0.4) 100%);
  mix-blend-mode: overlay;
}

/* Strong dark fade — top dim, bottom into-page-black */
.hero-background::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(10, 8, 5, 0.55) 0%,
      rgba(10, 8, 5, 0.35) 30%,
      rgba(10, 8, 5, 0.5) 70%,
      var(--ffa-black) 100%),
    radial-gradient(ellipse at 50% 40%, transparent 0%, rgba(10, 8, 5, 0.4) 80%);
}

/* Subtle film-grain feel */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 25% 35%, rgba(244, 200, 66, 0.4), transparent),
    radial-gradient(1px 1px at 70% 60%, rgba(212, 165, 55, 0.3), transparent),
    radial-gradient(1px 1px at 85% 25%, rgba(255, 140, 42, 0.4), transparent),
    radial-gradient(2px 2px at 15% 80%, rgba(244, 200, 66, 0.35), transparent);
  background-size: 250px 250px, 320px 320px, 280px 280px, 380px 380px;
  opacity: 0.7;
  animation: drift 30s linear infinite;
  z-index: 0;
}

@keyframes drift {
  0%   { background-position: 0 0, 0 0, 0 0, 0 0; }
  100% { background-position: 250px 250px, -320px 320px, 280px -280px, -380px 380px; }
}

/* Strengthen the gold halo behind the logo so it pops against the photo */
.hero::before {
  width: clamp(320px, 45vw, 480px);
  height: clamp(320px, 45vw, 480px);
  background: radial-gradient(circle,
    rgba(244, 200, 66, 0.35) 0%,
    rgba(212, 165, 55, 0.18) 30%,
    transparent 70%);
  filter: blur(30px);
}

/* Make sure all hero content sits above the grain layer */
.hero-logo, .hero h1, .hero p, .hero .btn {
  z-index: 2;
}

/* Slightly stronger drop shadow on the logo against a brighter background */
.hero-logo {
  filter:
    drop-shadow(0 0 50px rgba(212, 165, 55, 0.55))
    drop-shadow(0 0 100px rgba(212, 165, 55, 0.3))
    drop-shadow(0 12px 40px rgba(0, 0, 0, 0.8));
}

/* Add subtle text shadow back to body copy so it's readable over photo */
.hero h1 {
  text-shadow: 0 2px 30px rgba(0, 0, 0, 0.6), 0 0 60px rgba(212, 165, 55, 0.2);
}

.hero p {
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.7);
  color: var(--ffa-cream);
}

/* ---------- Stronger logo prominence + blurred hero ---------- */

/* Blur the hero background photo */
.hero-background {
  filter: blur(8px) saturate(1.15);
  transform: scale(1.1); /* avoid blur edge artifacts */
}

/* Re-apply ken burns on top of the scale */
.hero-background {
  animation: kenburns-blurred 30s ease-in-out infinite alternate;
}

@keyframes kenburns-blurred {
  0%   { transform: scale(1.1) translateX(0); }
  100% { transform: scale(1.18) translateX(-1.5%); }
}

/* Make the logo significantly larger and more dramatic */
.hero-logo {
  width: clamp(260px, 38vw, 420px) !important;
  margin: 0 auto 2rem;
  filter:
    drop-shadow(0 0 60px rgba(244, 200, 66, 0.7))
    drop-shadow(0 0 120px rgba(212, 165, 55, 0.5))
    drop-shadow(0 0 200px rgba(212, 165, 55, 0.3))
    drop-shadow(0 16px 50px rgba(0, 0, 0, 0.85));
}

/* Beef up the halo so the logo feels luminous */
.hero::before {
  width: clamp(450px, 60vw, 700px) !important;
  height: clamp(450px, 60vw, 700px) !important;
  background: radial-gradient(circle,
    rgba(244, 200, 66, 0.45) 0%,
    rgba(212, 165, 55, 0.25) 25%,
    rgba(255, 140, 42, 0.1) 50%,
    transparent 75%) !important;
  filter: blur(40px) !important;
}

/* Give the hero a bit more vertical room so the bigger logo breathes */
.hero {
  padding: 7rem 1.5rem 6rem;
  min-height: 720px;
}

/* ---------- FINAL logo overrides — for transparent PNG ---------- */
.hero-logo {
  -webkit-mask-image: none !important;
  mask-image: none !important;
  mix-blend-mode: normal !important;
  border-radius: 0 !important;
  background: transparent !important;
  /* Clean prominent gold glow without the screen blend */
  filter:
    drop-shadow(0 0 40px rgba(244, 200, 66, 0.55))
    drop-shadow(0 0 90px rgba(212, 165, 55, 0.35))
    drop-shadow(0 12px 40px rgba(0, 0, 0, 0.7))
    !important;
}

/* ---------- News cards ---------- */
.news-card {
  position: relative;
}

.news-image {
  height: 160px;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  margin: -0.5rem -0.5rem 1rem;
  border: 1px solid var(--glass-border);
}

.featured-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, var(--ffa-gold-bright), var(--ffa-gold));
  color: var(--ffa-black);
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  box-shadow: 0 2px 12px rgba(212, 165, 55, 0.4);
  z-index: 2;
}

/* Make sure glass overlays don't block clicks on buttons inside cards */
.glass-card::before,
.glass-card::after {
  pointer-events: none !important;
}

/* Make sure form buttons in admin tables/cards are clickable */
.admin-table button,
.admin-table form,
.glass-card button,
.glass-card form {
  position: relative;
  z-index: 2;
}

/* Inline form buttons shouldn't have weird block behavior */
.admin-table form,
.action-row form {
  display: inline-block !important;
  margin: 0;
}

/* ---------- CRITICAL: glass overlays must not block clicks ---------- */
.glass-card::before,
.glass-card::after,
.cde-card::before,
.cde-card::after,
.hero::before,
.hero::after,
.hero-background,
.hero-background::before,
.hero-background::after,
body::before {
  pointer-events: none !important;
}

/* Make sure interactive elements live above any decorative layers */
.glass-card form,
.glass-card button,
.glass-card a,
.glass-card input,
.glass-card select,
.glass-card textarea,
.admin-table form,
.admin-table button,
.admin-table a,
.action-row,
.action-row form,
.action-row button,
.action-row a {
  position: relative;
  z-index: 10;
}

/* Inline forms in tables shouldn't have block-level layout */
.admin-table form,
.action-row form {
  display: inline-block !important;
  margin: 0 !important;
}

/* ========== News Section — Editorial / Magazine Style ========== */
.news-section {
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 2.5rem 1.5rem;
}

.news-section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
}

.news-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ffa-gold-bright);
  margin-bottom: 0.4rem;
}

.news-headline {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--ffa-cream), var(--ffa-gold-bright));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

/* Two-column layout: hero left, rail right */
.news-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

/* ----- Featured hero article ----- */
.news-hero {
  position: relative;
  display: block;
  text-decoration: none;
  border-radius: 20px;
  overflow: hidden;
  min-height: 480px;
  background: var(--ffa-charcoal);
  border: 1px solid var(--glass-border);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  isolation: isolate;
}

.news-hero:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--glass-border-bright) inset;
  border-color: var(--glass-border-bright);
}

.news-hero-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
  z-index: 0;
}

.news-hero:hover .news-hero-image {
  transform: scale(1.05);
}

.news-hero-fallback {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(244, 200, 66, 0.35) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(255, 140, 42, 0.25) 0%, transparent 50%),
    linear-gradient(135deg, var(--ffa-charcoal) 0%, var(--ffa-deep) 100%);
}

/* Vignette overlay so text reads */
.news-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(10, 8, 5, 0.2) 0%,
    rgba(10, 8, 5, 0.4) 40%,
    rgba(10, 8, 5, 0.92) 100%
  );
  z-index: 1;
  pointer-events: none;
}

.news-hero-content {
  position: relative;
  z-index: 2;
  padding: 1.75rem 1.85rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  color: var(--text-light);
}

.news-hero-title {
  font-size: clamp(1.35rem, 2.5vw, 1.85rem);
  font-weight: 800;
  line-height: 1.2;
  margin: 0.5rem 0 0.75rem;
  letter-spacing: -0.015em;
  color: var(--ffa-cream);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.news-hero-summary {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 1.25rem;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
  max-width: 560px;
}

.news-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--ffa-gold-bright);
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.news-cta .arrow-icon {
  transition: transform 0.25s;
  display: inline-block;
}

.news-hero:hover .news-cta .arrow-icon {
  transform: translateX(5px);
}

/* ----- Side rail items ----- */
.news-rail {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.news-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 1rem;
  padding: 0.85rem;
  text-decoration: none;
  background: var(--glass-bg-strong);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  transition: all 0.25s;
  align-items: center;
  flex: 1;
  min-height: 0;
}

.news-item:hover {
  background: var(--glass-bg-gold);
  border-color: var(--glass-border-bright);
  transform: translateX(4px);
}

.news-item-image {
  width: 110px;
  height: 90px;
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
}

.news-item-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  background:
    radial-gradient(ellipse at center, rgba(212, 165, 55, 0.15) 0%, transparent 70%),
    var(--ffa-charcoal);
  filter: grayscale(0.3);
}

.news-item-content {
  min-width: 0; /* allow text to truncate */
}

.news-item-title {
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0.35rem 0;
  color: var(--ffa-cream);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ----- Shared meta row ----- */
.news-meta-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  font-size: 0.72rem;
}

.news-source-tag {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  background: rgba(212, 165, 55, 0.18);
  color: var(--ffa-gold-bright);
  border: 1px solid rgba(212, 165, 55, 0.35);
  border-radius: 999px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68rem;
}

.news-featured-pill {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  background: linear-gradient(135deg, var(--ffa-gold-bright), var(--ffa-gold));
  color: var(--ffa-black);
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.news-date {
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 500;
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .news-layout {
    grid-template-columns: 1fr;
  }
  .news-hero {
    min-height: 380px;
  }
}

@media (max-width: 540px) {
  .news-section-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .news-item {
    grid-template-columns: 80px 1fr;
    gap: 0.75rem;
  }
  .news-item-image {
    width: 80px;
    height: 70px;
  }
}

/* ============================================================
   MOBILE OPTIMIZATIONS
   Breakpoints: 1024 (tablet), 768 (small tablet), 540 (phone), 380 (small phone)
============================================================ */

/* ---------- Tablet / smaller laptops ---------- */
@media (max-width: 1024px) {
  .container { padding: 0 1.25rem; }

  .navbar {
    margin: 0.75rem 1rem;
    padding: 0.6rem 1rem;
  }

  .news-section { padding: 2rem 1.25rem; }
  .section { padding: 2.5rem 1.25rem; }
}

/* ---------- Tablet portrait & large phones ---------- */
@media (max-width: 768px) {

  /* Navbar — hamburger menu */
  .navbar {
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.6rem 0.85rem;
    margin: 0.5rem;
    border-radius: 14px;
  }

  .navbar-brand {
    font-size: 1rem;
    gap: 0.5rem;
  }

  .navbar-brand img { height: 32px; }

  .navbar-toggle {
    display: block;
    background: var(--glass-bg-gold);
    border: 1px solid var(--glass-border-bright);
    color: var(--ffa-gold-bright);
    font-size: 1.2rem;
    padding: 0.4rem 0.7rem;
  }

  .navbar-links {
    display: none;
    flex-direction: column;
    width: 100%;
    align-items: stretch;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--glass-border);
    gap: 0.15rem;
  }

  .navbar-links.open { display: flex; }

  .navbar-links a {
    display: block;
    width: 100%;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
  }

  /* Hero — scale down */
  .hero {
    padding: 4rem 1rem 3rem;
    min-height: auto;
  }

  .hero-logo {
    width: clamp(180px, 60vw, 280px) !important;
    margin-bottom: 1.25rem;
  }

  .hero h1 {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
    margin-bottom: 0.85rem;
  }

  .hero p {
    font-size: 1rem;
    padding: 0 0.5rem;
  }

  .hero::before {
    width: clamp(280px, 80vw, 400px) !important;
    height: clamp(280px, 80vw, 400px) !important;
  }

  /* Sections */
  .section { padding: 2rem 1rem; }
  .section-title { font-size: 1.5rem; }
  .section-subtitle {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
  }

  /* CDE / News grids */
  .cde-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Glass cards */
  .glass-card {
    padding: 1.25rem;
    border-radius: 16px;
  }

  /* News magazine layout — stack vertically */
  .news-section {
    padding: 1.5rem 1rem;
    margin-top: 1rem;
  }

  .news-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
    padding-bottom: 0.85rem;
    margin-bottom: 1.25rem;
  }

  .news-headline { font-size: 1.5rem; }

  .news-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .news-hero {
    min-height: 360px;
    border-radius: 16px;
  }

  .news-hero-content { padding: 1.25rem 1.25rem 1.5rem; }

  .news-hero-title {
    font-size: 1.3rem;
    line-height: 1.25;
  }

  .news-hero-summary {
    font-size: 0.92rem;
    margin-bottom: 1rem;
    -webkit-line-clamp: 3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .news-rail { gap: 0.65rem; }

  .news-item {
    grid-template-columns: 90px 1fr;
    gap: 0.75rem;
    padding: 0.65rem;
    border-radius: 12px;
  }

  .news-item-image {
    width: 90px;
    height: 75px;
  }

  .news-item-title {
    font-size: 0.88rem;
    -webkit-line-clamp: 2;
  }

  /* Category groups (CDE list) */
  .category-group h2 { font-size: 1.25rem; }

  /* CDE detail pages */
  .cde-detail-wrapper {
    margin: 1rem auto;
    padding: 0 1rem;
  }

  .cde-detail .icon-large { font-size: 3.5rem; }
  .cde-detail h1 { font-size: 1.75rem; }

  /* Buttons */
  .btn {
    padding: 0.75rem 1.4rem;
    font-size: 0.92rem;
  }

  /* Forms */
  .form-card {
    margin: 1.5rem auto;
    padding: 1.75rem 1.25rem;
    max-width: calc(100vw - 1.5rem);
  }

  /* Footer */
  .footer {
    padding: 1.75rem 1rem;
    margin-top: 2.5rem;
  }

  .footer img { height: 40px; }

  /* Flash messages */
  .flash-container { padding: 0 1rem; }
  .flash {
    padding: 0.7rem 1rem;
    font-size: 0.9rem;
  }
}

/* ---------- Phones (portrait) ---------- */
@media (max-width: 540px) {

  body { font-size: 15px; }

  .container { padding: 0 0.85rem; }

  /* Navbar even tighter */
  .navbar {
    padding: 0.5rem 0.75rem;
    margin: 0.4rem;
  }

  .navbar-brand .brand-text {
    /* Hide long brand text on tiny screens, keep just the logo */
    font-size: 0.9rem;
  }

  /* Hero — even smaller logo, tighter spacing */
  .hero {
    padding: 2.5rem 0.85rem 2.5rem;
  }

  .hero-logo {
    width: clamp(150px, 55vw, 220px) !important;
  }

  .hero h1 {
    font-size: clamp(1.5rem, 8vw, 2rem);
    line-height: 1.15;
  }

  .hero p {
    font-size: 0.95rem;
    padding: 0;
  }

  /* News hero card */
  .news-hero {
    min-height: 320px;
  }

  .news-hero-title { font-size: 1.15rem; }
  .news-hero-summary {
    font-size: 0.88rem;
    -webkit-line-clamp: 2;
  }

  /* News rail items — smaller */
  .news-item {
    grid-template-columns: 70px 1fr;
    gap: 0.65rem;
    padding: 0.55rem;
  }

  .news-item-image {
    width: 70px;
    height: 60px;
    border-radius: 8px;
  }

  .news-item-title {
    font-size: 0.82rem;
    margin: 0.25rem 0;
  }

  /* Cards — compact */
  .glass-card {
    padding: 1rem;
    border-radius: 14px;
  }

  .cde-card .icon { font-size: 2.25rem; }
  .cde-card h3 { font-size: 1.05rem; }
  .cde-card p { font-size: 0.85rem; }

  /* Featured badge — compact */
  .featured-badge {
    top: 0.75rem;
    right: 0.75rem;
    font-size: 0.65rem;
    padding: 0.2rem 0.55rem;
  }

  /* Section headers */
  .section { padding: 1.5rem 0.85rem; }
  .section-title { font-size: 1.35rem; }

  /* Tap targets — make sure buttons are at least 44px tall */
  .btn-sm {
    padding: 0.55rem 0.95rem;
    font-size: 0.82rem;
    min-height: 38px;
  }

  /* Form inputs taller for thumb taps */
  .form-control {
    padding: 0.85rem 1rem;
    font-size: 16px; /* Prevents iOS zoom on focus */
  }

  /* Login form */
  .form-card {
    margin: 1rem auto;
    padding: 1.5rem 1.1rem;
  }

  /* CDE detail */
  .cde-detail-wrapper { padding: 0 0.85rem; }
  .cde-detail h1 { font-size: 1.5rem; }
  .cde-detail-section h3 { font-size: 0.95rem; }

  /* Footer */
  .footer {
    padding: 1.5rem 0.85rem;
    font-size: 0.88rem;
  }
}

/* ---------- Tiny phones (iPhone SE etc.) ---------- */
@media (max-width: 380px) {
  .navbar-brand .brand-text { display: none; }

  .hero h1 { font-size: 1.4rem; }
  .hero-logo { width: 140px !important; }

  .news-item {
    grid-template-columns: 60px 1fr;
  }
  .news-item-image {
    width: 60px;
    height: 52px;
  }

  .btn { padding: 0.65rem 1.15rem; font-size: 0.85rem; }
}

/* ---------- Landscape phones — keep nav collapsible but allow hero compress ---------- */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
  .hero {
    padding: 1.5rem 1rem 1.5rem;
    min-height: auto;
  }
  .hero-logo {
    width: 120px !important;
    margin-bottom: 0.5rem;
  }
  .hero h1 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
  }
  .hero p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
  }
}

/* ---------- Touch device improvements ---------- */
@media (hover: none) and (pointer: coarse) {
  /* No hover transforms on touch — they're sticky and weird */
  .glass-card:hover,
  .cde-card:hover,
  .news-hero:hover,
  .news-item:hover {
    transform: none;
  }

  .news-hero:hover .news-hero-image {
    transform: none;
  }

  .news-hero:hover .news-cta .arrow-icon {
    transform: none;
  }

  /* But keep press-state feedback */
  .glass-card:active,
  .cde-card:active,
  .news-item:active,
  .btn:active {
    transform: scale(0.98);
    transition: transform 0.1s;
  }

  /* Bigger tap targets for navbar links */
  .navbar-links a { padding: 0.85rem 1rem; }

  /* Make admin table actions easier to hit */
  .action-row .btn-sm {
    min-width: 44px;
    min-height: 38px;
  }
}

/* ---------- Reduce motion preference ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
