/*
Theme Name: PotterHead
Theme URI: https://yoursite.com
Author: Hogwarts Theme
Author URI: https://yoursite.com
Description: V4 — Epic blog redesign, dedicated Sorting Hat page, mobile header fixed, full design upgrade. A magical Harry Potter themed WordPress theme with Sorting Hat quiz, bilingual support (ES/EN), house info cards, spells section, and more.
Version: 4.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hogwarts-theme
Domain Path: /languages
Tags: harry-potter, hogwarts, quiz, bilingual, dark, fantasy
*/

/* ==========================================
   CSS VARIABLES & ROOT
========================================== */
:root {
  --gold: #f0c040;
  --gold-dark: #c8960c;
  --gold-light: #ffd966;
  --parchment: #f5e6c8;
  --parchment-dark: #d4b896;
  --dark-bg: #0a0d14;
  --dark-mid: #111827;
  --dark-card: rgba(10, 10, 20, 0.85);
  --red-house: #740001;
  --blue-house: #0e1a40;
  --yellow-house: #ecb939;
  --green-house: #1a472a;
  --silver: #aaaaaa;
  --font-magic: 'MedievalSharp', 'Palatino Linotype', serif;
  --font-body: 'Crimson Text', 'Georgia', serif;
  --transition: all 0.3s ease;
  --shadow-gold: 0 0 20px rgba(240, 192, 64, 0.3);
  --shadow-dark: 0 8px 32px rgba(0,0,0,0.6);
}

/* ==========================================
   GOOGLE FONTS + RESET
========================================== */
@import url('https://fonts.googleapis.com/css2?family=Cinzel+Decorative:wght@400;700;900&family=Cinzel:wght@400;600;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap');

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Crimson Text', Georgia, serif;
  background: #060810 url('images/hogwarts-bg.avif') center top / cover no-repeat fixed;
  color: var(--parchment);
  font-size: 18px;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ==========================================
   STARS BACKGROUND OVERLAY
========================================== */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 10%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 80%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 10% 60%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 50%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 15%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 70%, rgba(255,255,255,0.3) 0%, transparent 100%),
    radial-gradient(2px 2px at 15% 85%, rgba(255,215,0,0.2) 0%, transparent 100%),
    radial-gradient(2px 2px at 65% 25%, rgba(255,215,0,0.15) 0%, transparent 100%),
    radial-gradient(1px 1px at 45% 45%, rgba(255,255,255,0.3) 0%, transparent 100%);
  background-size: 400px 400px, 300px 300px, 500px 500px, 350px 350px, 250px 250px, 450px 450px, 200px 200px, 600px 600px, 380px 380px, 320px 320px;
  animation: twinkle 8s ease-in-out infinite alternate;
  pointer-events: none;
  z-index: 0;
}

@keyframes twinkle {
  0% { opacity: 0.6; }
  100% { opacity: 1; }
}

/* ==========================================
   NAVIGATION
========================================== */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(6, 8, 20, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0 1.8rem;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* LOGO */
.site-logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-shrink: 0;
  max-width: 210px;
}

.logo-hat-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  background: transparent;
  image-rendering: crisp-edges;
}

.logo-text {
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.72rem;
  color: #f5c518;
  text-shadow: 1px 1px 0 #8B6914, 0 0 12px rgba(245,197,24,0.4);
  line-height: 1.3;
  font-weight: 700;
}

/* NAV centrado */
#site-header nav {
  flex: 1;
  display: flex;
  justify-content: center;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  list-style: none;
}

.main-nav li > a {
  color: rgba(230, 225, 215, 0.9);
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.07);
  transition: var(--transition);
  letter-spacing: 0.04em;
  text-transform: capitalize;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  border: 1px solid rgba(255,255,255,0.05);
}

.main-nav li > a:hover {
  color: #fff;
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,255,255,0.12);
}

/* Nav SVG icons */
.nav-icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.85;
  color: var(--gold);
}

.main-nav li > a:hover .nav-icon {
  opacity: 1;
}

/* dropdown chevron via CSS */
.has-dropdown > a::after {
  content: '›';
  font-size: 0.8rem;
  opacity: 0.6;
  transform: rotate(90deg);
  display: inline-block;
  margin-left: 2px;
}

/* HEADER RIGHT */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.lang-globe-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(230, 225, 215, 0.9);
  padding: 0.38rem 0.75rem;
  border-radius: 20px;
  cursor: none;
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  transition: var(--transition);
  white-space: nowrap;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.lang-globe-btn:hover {
  background: rgba(255,255,255,0.13);
  color: #fff;
}

.signin-btn {
  background: #c0392b;
  color: white !important;
  border-radius: 20px;
  padding: 0.42rem 1.2rem;
  font-family: 'Cinzel', serif;
  font-size: 0.64rem;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.05em;
  text-transform: capitalize;
  transition: var(--transition);
  white-space: nowrap;
  border: none;
}

.signin-btn:hover {
  background: #e74c3c;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(192,57,43,0.5);
}

/* Hide obsolete elements */
.lang-switcher { display: none; }
.lang-btn { display: none; }
.nav-cta { display: none !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: none;
  padding: 5px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--gold);
  transition: var(--transition);
}

/* ==========================================
   MAGIC WAND CURSOR
========================================== */
html, body, * { cursor: none !important; }

#wand-cursor {
  position: fixed;
  pointer-events: none;
  z-index: 99999;
  top: 0; left: 0;
  width: 48px;
  height: 48px;
  transform: translate(-4px, -4px);
  will-change: left, top;
}

#wand-cursor img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: drop-shadow(0 0 4px rgba(255,220,80,0.9)) drop-shadow(0 0 10px rgba(255,180,0,0.5));
}

/* Sparkles */
.sparkle {
  position: fixed;
  pointer-events: none;
  z-index: 99998;
  border-radius: 50%;
  animation: sparkle-fade 0.55s ease-out forwards;
}

@keyframes sparkle-fade {
  0%   { opacity: 1; transform: scale(1) translate(0, 0); }
  100% { opacity: 0; transform: scale(0.2) translate(var(--dx), var(--dy)); }
}

/* ==========================================
   HERO SECTION
========================================== */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 2rem 4rem;
  position: relative;
  background: none;
}

.hero-inner {
  position: relative;
  max-width: 900px;
  width: 100%;
  text-align: center;
  z-index: 1;
}

.parchment-card {
  position: relative;
  background: url('images/background-paper.png') center/cover no-repeat, #ddc898;
  border-radius: 6px;
  padding: 5rem 5rem 4rem;
  box-shadow: 0 30px 80px rgba(0,0,0,0.9), inset 0 0 60px rgba(139,90,43,0.12), 0 0 0 2px rgba(180,130,60,0.4);
  min-height: 550px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

.parchment-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,252,240,0.45) 0%, rgba(215,185,130,0.25) 100%);
  border-radius: 6px;
  pointer-events: none;
  z-index: 0;
}

.hero-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: #2a1a0a;
  line-height: 1.3;
  margin-bottom: 1.5rem;
  text-shadow: 1px 1px 2px rgba(255,255,255,0.3);
  position: relative;
  z-index: 1;
}

.hero-text {
  font-family: 'Crimson Text', serif;
  font-size: 1.05rem;
  color: #3d2b1a;
  line-height: 1.8;
  margin-bottom: 2rem;
  position: relative;
  z-index: 1;
}

.wax-seal-btn {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  cursor: pointer;
  background: none;
  border: none;
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease;
}

.wax-seal-btn:hover {
  transform: scale(1.05);
}

.wax-seal {
  width: 90px;
  height: 90px;
  background: radial-gradient(circle at 35% 35%, #c0392b, #7b0000);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 20px rgba(116,0,1,0.6), inset 0 -3px 8px rgba(0,0,0,0.4);
  border: 3px solid #8b0000;
  position: relative;
}

.wax-seal::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255,200,150,0.3);
  border-radius: 50%;
}

.wax-seal-text {
  font-family: 'Cinzel', serif;
  font-size: 0.55rem;
  color: rgba(255,220,180,0.9);
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.1em;
  line-height: 1.3;
}

.seal-label {
  font-family: 'Crimson Text', serif;
  font-size: 0.9rem;
  color: #3d2b1a;
}

.sorting-hat-link {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  cursor: pointer;
  transition: var(--transition);
}

.sorting-hat-link:hover { transform: translateY(-3px); }

.hat-icon { font-size: 3rem; filter: drop-shadow(0 3px 6px rgba(0,0,0,0.5)); }

.sorting-hat-link span {
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: #3d2b1a;
  font-weight: 700;
}

/* ==========================================
   HOUSES SECTION
========================================== */
#houses {
  padding: 6rem 2rem;
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(5,5,15,0.5), transparent);
}

.section-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.5rem, 3.5vw, 2.5rem);
  color: var(--gold);
  text-align: center;
  margin-bottom: 1rem;
  text-shadow: var(--shadow-gold);
}

.section-subtitle {
  text-align: center;
  color: var(--parchment-dark);
  font-size: 1rem;
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.houses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.house-card {
  background: var(--dark-card);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.house-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.house-card.gryffindor::before { background: linear-gradient(90deg, #740001, #d3a625); }
.house-card.ravenclaw::before { background: linear-gradient(90deg, #0e1a40, #946b2d); }
.house-card.hufflepuff::before { background: linear-gradient(90deg, #ecb939, #000); }
.house-card.slytherin::before { background: linear-gradient(90deg, #1a472a, #aaaaaa); }

.house-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.house-card.gryffindor:hover { box-shadow: 0 20px 50px rgba(116,0,1,0.3); }
.house-card.ravenclaw:hover { box-shadow: 0 20px 50px rgba(14,26,64,0.4); }
.house-card.hufflepuff:hover { box-shadow: 0 20px 50px rgba(236,185,57,0.3); }
.house-card.slytherin:hover { box-shadow: 0 20px 50px rgba(26,71,42,0.3); }

.house-crest {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5));
}

.house-card h3 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.house-card.gryffindor h3 { color: #d3a625; }
.house-card.ravenclaw h3 { color: #946b2d; }
.house-card.hufflepuff h3 { color: #ecb939; }
.house-card.slytherin h3 { color: #aaaaaa; }

.house-card p { font-size: 0.9rem; color: var(--parchment-dark); line-height: 1.7; margin-bottom: 1.2rem; }

.house-traits {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.trait-badge {
  background: rgba(240,192,64,0.15);
  border: 1px solid rgba(240,192,64,0.3);
  color: var(--gold-light);
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-family: 'Cinzel', serif;
}

.house-meta {
  font-size: 0.8rem;
  color: var(--silver);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.house-meta span { color: var(--gold-light); font-weight: 600; }

.house-motto {
  font-style: italic;
  font-size: 0.8rem;
  color: var(--parchment-dark);
  margin-top: 0.5rem;
  opacity: 0.8;
}

/* ==========================================
   QUIZ SECTION
========================================== */
#quiz {
  padding: 6rem 2rem;
  position: relative;
  z-index: 1;
}

.quiz-container {
  max-width: 750px;
  margin: 0 auto;
}

.quiz-parchment {
  background: url('images/background-paper.png') center/cover no-repeat, #ddc898;
  border-radius: 8px;
  padding: 3rem;
  box-shadow: var(--shadow-dark), inset 0 0 60px rgba(139,90,43,0.1), 0 0 0 2px rgba(180,130,60,0.35);
  position: relative;
  isolation: isolate;
}

.quiz-parchment::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,252,240,0.4) 0%, rgba(215,185,130,0.2) 100%);
  border-radius: 8px;
  pointer-events: none;
  z-index: 0;
}

#quiz-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.5rem;
  color: #2a1a0a;
  text-align: center;
  margin-bottom: 0.5rem;
}

#quiz-subtitle {
  font-family: 'Crimson Text', serif;
  text-align: center;
  color: #5c3a1e;
  font-size: 1rem;
  margin-bottom: 2rem;
}

.progress-bar-container {
  background: rgba(90,60,30,0.2);
  border-radius: 10px;
  height: 6px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #740001, var(--gold));
  border-radius: 10px;
  transition: width 0.5s ease;
}

.question-num {
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  color: #7a5c35;
  text-align: center;
  margin-bottom: 1rem;
  letter-spacing: 0.1em;
}

#question-text {
  font-family: 'Cinzel', serif;
  font-size: 1.15rem;
  color: #2a1a0a;
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.answers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.answer-btn {
  background: rgba(90,60,20,0.15);
  border: 2px solid rgba(139,90,43,0.4);
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  font-family: 'Crimson Text', serif;
  font-size: 0.95rem;
  color: #3d2b1a;
  text-align: center;
  transition: var(--transition);
  line-height: 1.4;
}

.answer-btn:hover {
  background: rgba(116,0,1,0.2);
  border-color: #740001;
  color: #1a0a00;
  transform: translateY(-2px);
}

.answer-btn.selected {
  background: rgba(116,0,1,0.3);
  border-color: #740001;
  color: #1a0a00;
}

.quiz-nav {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
}

.magic-btn {
  background: linear-gradient(135deg, #740001, #ae0001);
  color: #ffd966;
  border: 2px solid rgba(240,192,64,0.4);
  padding: 0.8rem 2rem;
  border-radius: 6px;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.08em;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
  box-shadow: 0 4px 15px rgba(116,0,1,0.4);
}

.magic-btn:hover {
  background: linear-gradient(135deg, #ae0001, #740001);
  box-shadow: 0 6px 20px rgba(116,0,1,0.5);
  transform: translateY(-2px);
}

.magic-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================
   QUIZ RESULT
========================================== */
#quiz-result {
  text-align: center;
  padding: 1rem 0;
  position: relative;
  z-index: 1;
}

.result-house-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: 2.5rem;
  margin: 1rem 0;
}

.result-crest { font-size: 5rem; display: block; margin: 0.5rem auto; animation: floatCrest 3s ease-in-out infinite; }

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

.result-description {
  font-family: 'Crimson Text', serif;
  font-size: 1.1rem;
  color: #3d2b1a;
  max-width: 500px;
  margin: 1rem auto 1.5rem;
  line-height: 1.7;
}

.retry-btn {
  background: transparent;
  border: 2px solid rgba(90,60,20,0.5);
  color: #5c3a1e;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 0.5rem;
}

.retry-btn:hover { background: rgba(90,60,20,0.15); border-color: rgba(90,60,20,0.8); }

/* ==========================================
   SPELLS SECTION
========================================== */
#spells {
  padding: 6rem 2rem;
  position: relative;
  z-index: 1;
}

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

.spell-card {
  background: rgba(10,10,25,0.8);
  border: 1px solid rgba(240,192,64,0.2);
  border-radius: 10px;
  padding: 1.5rem;
  transition: var(--transition);
  backdrop-filter: blur(6px);
}

.spell-card:hover {
  border-color: rgba(240,192,64,0.5);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.4), 0 0 20px rgba(240,192,64,0.1);
}

.spell-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1rem;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.spell-type {
  font-size: 0.72rem;
  color: var(--silver);
  font-family: 'Cinzel', serif;
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}

.spell-card p { font-size: 0.9rem; color: var(--parchment-dark); }

.spell-icon { font-size: 1.5rem; float: right; margin-left: 1rem; }

/* ==========================================
   MAGICAL CREATURES SECTION
========================================== */
#creatures {
  padding: 6rem 2rem;
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, transparent, rgba(10,10,25,0.6), transparent);
}

.creatures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.creature-card {
  background: rgba(10,10,25,0.85);
  border: 1px solid rgba(240,192,64,0.15);
  border-radius: 12px;
  padding: 1.8rem 1.2rem;
  text-align: center;
  transition: var(--transition);
  backdrop-filter: blur(8px);
}

.creature-card:hover {
  transform: translateY(-5px) scale(1.02);
  border-color: rgba(240,192,64,0.4);
  box-shadow: 0 15px 40px rgba(0,0,0,0.5);
}

.creature-icon { font-size: 2.8rem; display: block; margin-bottom: 0.8rem; }

.creature-card h4 {
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.creature-card p { font-size: 0.82rem; color: var(--parchment-dark); }

.danger-badge {
  display: inline-block;
  margin-top: 0.7rem;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.7rem;
  font-family: 'Cinzel', serif;
}

.danger-1 { background: rgba(0,100,0,0.3); border: 1px solid rgba(0,200,0,0.3); color: #7fff7f; }
.danger-2 { background: rgba(100,100,0,0.3); border: 1px solid rgba(200,200,0,0.3); color: #ffff7f; }
.danger-3 { background: rgba(100,0,0,0.3); border: 1px solid rgba(200,0,0,0.3); color: #ff7f7f; }

/* ==========================================
   QUOTES / PROPHECIES SECTION
========================================== */
#prophecies {
  padding: 6rem 2rem;
  position: relative;
  z-index: 1;
}

.prophecy-carousel {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.prophecy-card {
  background: url('images/background-paper.png') center/cover no-repeat, #ddc898;
  padding: 3rem 3.5rem;
  border-radius: 6px;
  position: relative;
  display: none;
  box-shadow: var(--shadow-dark), 0 0 0 2px rgba(180,130,60,0.3);
  isolation: isolate;
}

.prophecy-card.active { display: block; animation: fadeInProphecy 0.5s ease; }

@keyframes fadeInProphecy {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.prophecy-card::before {
  content: '"';
  font-family: 'Cinzel Decorative', serif;
  font-size: 8rem;
  color: rgba(90,60,20,0.2);
  position: absolute;
  top: -1rem;
  left: 1.5rem;
  line-height: 1;
}

.prophecy-text {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: #2a1a0a;
  line-height: 1.8;
  font-style: italic;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
}

.prophecy-author {
  font-family: 'Crimson Text', serif;
  font-size: 0.9rem;
  color: #7a5c35;
  font-style: normal;
}

.prophecy-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.prophecy-btn {
  background: rgba(240,192,64,0.15);
  border: 1px solid rgba(240,192,64,0.4);
  color: var(--gold);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.prophecy-btn:hover {
  background: rgba(240,192,64,0.3);
  transform: scale(1.1);
}

.prophecy-dots {
  display: flex;
  gap: 0.5rem;
}

.prophecy-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(240,192,64,0.3);
  cursor: pointer;
  transition: var(--transition);
}

.prophecy-dot.active { background: var(--gold); }

/* ==========================================
   CHAT / SORTING HAT AI SECTION
========================================== */
#sorting-hat-chat {
  padding: 6rem 2rem;
  position: relative;
  z-index: 1;
}

.chat-container {
  max-width: 720px;
  margin: 0 auto;
}

.chat-parchment {
  background: url('images/background-paper.png') center/cover no-repeat, #ddc898;
  border-radius: 8px;
  padding: 2.5rem;
  box-shadow: var(--shadow-dark), 0 0 0 2px rgba(180,130,60,0.3);
  position: relative;
  isolation: isolate;
}

.chat-parchment::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,252,240,0.4) 0%, rgba(215,185,130,0.2) 100%);
  border-radius: 8px;
  pointer-events: none;
  z-index: 0;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(90,60,20,0.3);
  position: relative;
  z-index: 1;
}

.chat-hat { font-size: 2.5rem; }

.chat-header-text h3 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1rem;
  color: #2a1a0a;
}

.chat-header-text p { font-size: 0.8rem; color: #7a5c35; }

.chat-status {
  width: 10px; height: 10px;
  background: #22c55e;
  border-radius: 50%;
  margin-left: auto;
  box-shadow: 0 0 8px rgba(34,197,94,0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.chat-messages {
  height: 300px;
  overflow-y: auto;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-right: 0.5rem;
  position: relative;
  z-index: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(90,60,20,0.4) transparent;
}

.chat-message {
  display: flex;
  gap: 0.8rem;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.chat-message.hat-msg { align-items: flex-start; }
.chat-message.user-msg { flex-direction: row-reverse; }

.msg-avatar { font-size: 1.5rem; flex-shrink: 0; }

.msg-bubble {
  max-width: 75%;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  font-family: 'Crimson Text', serif;
  font-size: 0.95rem;
  line-height: 1.6;
}

.hat-msg .msg-bubble {
  background: rgba(90,60,20,0.2);
  border: 1px solid rgba(90,60,20,0.3);
  color: #2a1a0a;
  border-top-left-radius: 2px;
}

.user-msg .msg-bubble {
  background: rgba(116,0,1,0.25);
  border: 1px solid rgba(116,0,1,0.4);
  color: #2a1a0a;
  border-top-right-radius: 2px;
}

.chat-input-area {
  display: flex;
  gap: 0.7rem;
  position: relative;
  z-index: 1;
}

.chat-input {
  flex: 1;
  background: rgba(245,230,200,0.6);
  border: 2px solid rgba(90,60,20,0.3);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font-family: 'Crimson Text', serif;
  font-size: 0.95rem;
  color: #2a1a0a;
  outline: none;
  transition: var(--transition);
}

.chat-input:focus { border-color: rgba(90,60,20,0.6); background: rgba(245,230,200,0.8); }
.chat-input::placeholder { color: rgba(90,60,20,0.5); }

.chat-send-btn {
  background: linear-gradient(135deg, #740001, #ae0001);
  color: var(--gold-light);
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1.2rem;
  cursor: pointer;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  transition: var(--transition);
}

.chat-send-btn:hover {
  background: linear-gradient(135deg, #ae0001, #740001);
  transform: scale(1.05);
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 0.5rem;
  align-items: center;
}

.typing-dot {
  width: 6px; height: 6px;
  background: rgba(90,60,20,0.5);
  border-radius: 50%;
  animation: typingBounce 1.2s infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-6px); }
}

/* ==========================================
   BLOG / POSTS
========================================== */
#blog {
  padding: 7rem 2rem 6rem;
  position: relative;
  z-index: 1;
}

/* Decorative quill/ink divider above blog */
#blog .section-title::before {
  content: '✦ ✦ ✦';
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.6em;
  color: var(--gold-dark);
  margin-bottom: 1rem;
  opacity: 0.7;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.2rem;
  max-width: 1150px;
  margin: 0 auto;
}

/* Featured first card spans full width on larger screens */
@media (min-width: 900px) {
  .blog-card:first-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 380px 1fr;
  }
  .blog-card:first-child .blog-card-thumb {
    height: 100%;
    min-height: 240px;
  }
}

.blog-card {
  background: linear-gradient(160deg, rgba(18,14,8,0.97) 0%, rgba(12,10,20,0.97) 100%);
  border: 1px solid rgba(180,130,60,0.2);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  position: relative;
}

/* Subtle top glow line */
.blog-card::before {
  content: '';
  position: absolute;
  top: 0; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(240,192,64,0.5), transparent);
  pointer-events: none;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.7), 0 0 30px rgba(240,192,64,0.08);
  border-color: rgba(240,192,64,0.4);
}

.blog-card-thumb {
  height: 200px;
  background: linear-gradient(135deg, rgba(116,0,1,0.7) 0%, rgba(14,26,64,0.8) 60%, rgba(26,71,42,0.6) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

/* House crest watermark on thumbs with no image */
.blog-card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(10,10,20,0.7) 100%);
  pointer-events: none;
}

.blog-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  filter: brightness(0.9);
}

.blog-card:hover .blog-card-thumb img {
  transform: scale(1.05);
  filter: brightness(1);
}

.blog-card-icon {
  font-size: 4rem;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.6));
  transition: transform 0.3s ease;
  position: relative;
  z-index: 1;
}

.blog-card:hover .blog-card-icon {
  transform: scale(1.15) translateY(-4px);
}

.blog-card-body {
  padding: 1.6rem 1.8rem 1.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.blog-category {
  font-family: 'Cinzel', serif;
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.blog-category::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 1px;
  background: var(--gold-dark);
}

.blog-card h4 {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: var(--parchment);
  line-height: 1.45;
  margin: 0;
}

.blog-card h4 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.25s ease;
}

.blog-card h4 a:hover {
  color: var(--gold-light);
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.blog-date {
  font-size: 0.7rem;
  color: rgba(212, 184, 150, 0.55);
  font-style: italic;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.blog-date::before {
  content: '🕯';
  font-size: 0.65rem;
  opacity: 0.7;
}

.blog-reading-time {
  font-size: 0.68rem;
  color: rgba(212, 184, 150, 0.45);
  font-style: italic;
}

.blog-excerpt {
  font-size: 0.86rem;
  color: rgba(212, 184, 150, 0.8);
  line-height: 1.7;
  margin: 0;
  flex-grow: 1;
}

.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(180,130,60,0.12);
}

.read-more {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.06em;
  transition: gap 0.25s ease, color 0.25s ease;
}

.read-more::after {
  content: '→';
  transition: transform 0.25s ease;
}

.read-more:hover {
  color: var(--gold-light);
  gap: 0.7rem;
}

.read-more:hover::after {
  transform: translateX(3px);
}

/* House badge on card */
.blog-house-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  background: rgba(240,192,64,0.1);
  border: 1px solid rgba(240,192,64,0.2);
}

/* "View all" section */
.blog-view-all {
  text-align: center;
  margin-top: 3.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.blog-view-all-sub {
  font-family: 'Crimson Text', serif;
  font-size: 0.9rem;
  color: rgba(212,184,150,0.5);
  font-style: italic;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dark-bg);
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
  padding: 0.9rem 2.8rem;
  border-radius: 40px;
  text-decoration: none;
  letter-spacing: 0.1em;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 20px rgba(240,192,64,0.25), inset 0 1px 0 rgba(255,255,255,0.3);
}

.btn-gold:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(240,192,64,0.45), inset 0 1px 0 rgba(255,255,255,0.3);
  color: var(--dark-bg);
}

.btn-gold::before {
  content: '🪄';
  font-size: 0.85rem;
}


/* ==========================================
   FOOTER
========================================== */
#site-footer {
  background: rgba(5,5,15,0.95);
  border-top: 1px solid rgba(240,192,64,0.2);
  padding: 4rem 2rem 2rem;
  position: relative;
  z-index: 1;
  text-align: center;
}

.footer-logo {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 1rem;
  text-shadow: var(--shadow-gold);
}

.footer-tagline { color: var(--silver); font-style: italic; margin-bottom: 2rem; font-size: 0.9rem; }

.footer-houses {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  font-size: 2rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.footer-links a {
  color: var(--parchment-dark);
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  transition: var(--transition);
}

.footer-links a:hover { color: var(--gold); }

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 1.5rem;
  margin-top: 1.5rem;
}

/* ==========================================
   SCROLL TO TOP
========================================== */
#scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, #740001, #ae0001);
  border: 1px solid rgba(240,192,64,0.4);
  border-radius: 50%;
  color: var(--gold-light);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  opacity: 0;
  pointer-events: none;
  z-index: 999;
}

#scroll-top.visible { opacity: 1; pointer-events: all; }
#scroll-top:hover { transform: scale(1.1) translateY(-2px); box-shadow: 0 5px 20px rgba(116,0,1,0.5); }

/* ==========================================
   FLOATING LANTERNS ANIMATION
========================================== */
.lanterns-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.lantern {
  position: absolute;
  width: 12px; height: 16px;
  background: radial-gradient(circle at 50% 30%, #ffd700, #ff8c00, rgba(255,100,0,0.3));
  border-radius: 50% 50% 40% 40%;
  animation: floatLantern linear infinite;
  opacity: 0;
  box-shadow: 0 0 15px rgba(255,165,0,0.6), 0 0 30px rgba(255,165,0,0.2);
}

@keyframes floatLantern {
  0% { transform: translateY(110vh) translateX(0) rotate(0deg); opacity: 0; }
  10% { opacity: 0.8; }
  90% { opacity: 0.6; }
  100% { transform: translateY(-10vh) translateX(calc(var(--drift) * 1px)) rotate(var(--rot)); opacity: 0; }
}

/* ==========================================
   SINGLE POST
========================================== */
.single-post-main {
  padding: 90px 2rem 5rem;
  max-width: 860px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.single-post-header {
  text-align: center;
  padding: 3rem 1rem 2rem;
}

.single-post-meta-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.single-post-category {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
}

.single-post-sep { color: rgba(212,184,150,0.3); font-size: 0.8rem; }

.single-post-date, .single-post-reading {
  font-size: 0.72rem;
  color: rgba(212,184,150,0.55);
  font-style: italic;
}

.single-post-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  color: var(--parchment);
  line-height: 1.3;
  text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.single-post-featured-img {
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
  max-height: 420px;
}

.single-post-featured-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-post-parchment {
  min-height: auto !important;
  padding: 3.5rem 4rem !important;
}

.single-post-content {
  font-family: 'Crimson Text', serif;
  font-size: 1.1rem;
  color: #3d2b1a;
  line-height: 1.85;
  position: relative;
  z-index: 1;
}

.single-post-content h2, .single-post-content h3 {
  font-family: 'Cinzel', serif;
  color: #2a1a0a;
  margin: 2rem 0 0.8rem;
}

.single-post-content p { margin-bottom: 1.2rem; }

.single-post-content a { color: var(--red-house); text-decoration: underline; }

.single-post-content blockquote {
  border-left: 3px solid var(--gold-dark);
  padding: 0.8rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(139,90,43,0.08);
  border-radius: 0 4px 4px 0;
  font-style: italic;
  color: #5a3d20;
}

.single-post-tags {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(139,90,43,0.2);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.post-tag {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: #5a3d20;
  background: rgba(139,90,43,0.12);
  border: 1px solid rgba(139,90,43,0.25);
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  text-decoration: none;
  text-transform: uppercase;
  transition: var(--transition);
}

.post-tag:hover { background: rgba(139,90,43,0.22); color: #3d2b1a; }

.single-post-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1.5rem;
  align-items: center;
  margin-top: 3rem;
  padding-top: 2rem;
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-decoration: none;
  padding: 1rem 1.2rem;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(240,192,64,0.1);
  transition: var(--transition);
}

.post-nav-link:hover {
  background: rgba(255,255,255,0.07);
  border-color: rgba(240,192,64,0.25);
}

.post-nav-next { text-align: right; }

.post-nav-label {
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
}

.post-nav-title {
  font-size: 0.82rem;
  color: var(--parchment-dark);
  line-height: 1.4;
}

.post-nav-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  color: rgba(212,184,150,0.6);
  font-family: 'Cinzel', serif;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.post-nav-home:hover { color: var(--gold); }

/* ==========================================
   RESPONSIVE
========================================== */
@media (max-width: 768px) {
  .main-nav { display: none; flex-direction: column; position: absolute; top: 58px; left: 0; right: 0; background: rgba(4,5,14,0.98); padding: 1rem 0; }
  .main-nav.open { display: flex; }
  .hamburger { display: flex; }
  .answers-grid { grid-template-columns: 1fr; }
  .parchment-card, .quiz-parchment, .chat-parchment { padding: 2rem 1.5rem; }
  .prophecy-card { padding: 2rem 1.5rem; }
  .footer-houses { gap: 1rem; }
  #site-header { padding: 0 1rem; }
  #wand-cursor, .sparkle { display: none !important; }
  * { cursor: auto !important; }
}

@media (max-width: 480px) {
  .houses-grid, .spells-grid, .creatures-grid, .blog-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.4rem; }
  .blog-card:first-child { grid-column: auto; display: block; }
  .single-post-parchment { padding: 2rem 1.5rem !important; }
  .single-post-nav { grid-template-columns: 1fr; }
  .post-nav-home { display: none; }
}

/* ==========================================
   HIDDEN / UTILITY
========================================== */
.hidden { display: none !important; }
.text-center { text-align: center; }
[data-lang] { display: none; }
[data-lang].active { display: block; }
[data-lang-inline] { display: none; }
[data-lang-inline].active { display: inline; }

/* ==========================================
   IMPROVED HEADER v2
========================================== */
.site-header-v2 {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 2rem;
  height: 70px;
  background: linear-gradient(135deg, rgba(4,5,14,0.97) 0%, rgba(20,10,40,0.97) 100%);
  border-bottom: 1px solid rgba(212,175,55,0.25);
  box-shadow: 0 2px 30px rgba(0,0,0,0.6), 0 1px 0 rgba(212,175,55,0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
  overflow: visible;
}

.site-header-v2 .site-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  flex-shrink: 0;
  margin-right: 2rem;
}

.site-header-v2 .logo-hat-img { width: 38px; height: auto; }

.site-header-v2 .logo-text {
  font-family: 'MedievalSharp', 'Cinzel Decorative', Georgia, serif;
  color: #d4af37;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-shadow: 0 0 12px rgba(212,175,55,0.5);
}

.site-header-v2 nav { flex: 1; }

.site-header-v2 .main-nav {
  display: flex;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.25rem;
}

.site-header-v2 .main-nav li a {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.85rem;
  color: rgba(245,230,180,0.85);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  border-radius: 8px;
  letter-spacing: 0.02em;
  transition: all 0.25s ease;
  position: relative;
  white-space: nowrap;
}

.site-header-v2 .main-nav li a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 60%;
  height: 1.5px;
  background: #d4af37;
  border-radius: 2px;
  transition: transform 0.25s ease;
}

.site-header-v2 .main-nav li a:hover,
.site-header-v2 .main-nav li a.active-page {
  color: #ffd700;
  background: rgba(212,175,55,0.1);
}

.site-header-v2 .main-nav li a:hover::after,
.site-header-v2 .main-nav li a.active-page::after {
  transform: translateX(-50%) scaleX(1);
}

/* Patronus nav highlight */
.site-header-v2 .main-nav .nav-item-patronus:hover {
  color: #c8a0ff !important;
  background: rgba(200,160,255,0.1) !important;
}
.site-header-v2 .main-nav .nav-item-patronus:hover::after {
  background: #c8a0ff;
}

/* Ollivanders nav highlight */
.site-header-v2 .main-nav .nav-item-ollivander:hover {
  color: #80e0ff !important;
  background: rgba(128,224,255,0.1) !important;
}
.site-header-v2 .main-nav .nav-item-ollivander:hover::after {
  background: #80e0ff;
}

.site-header-v2 .nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.8;
}

/* Header right / lang switcher */
.site-header-v2 .header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  margin-left: 1rem;
}

.site-header-v2 .lang-globe-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  background: rgba(212,175,55,0.12);
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 20px;
  color: #d4af37;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.03em;
}

.site-header-v2 .lang-globe-btn:hover {
  background: rgba(212,175,55,0.22);
  border-color: rgba(212,175,55,0.6);
  box-shadow: 0 0 12px rgba(212,175,55,0.25);
}

/* ==========================================
   PAGE HERO (Patronus / Ollivanders)
========================================== */
.page-hero {
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  padding: 4rem 2rem 3rem;
}

.patronus-hero {
  background: linear-gradient(180deg, rgba(80,0,120,0.6) 0%, rgba(4,5,14,0.95) 100%);
}

.ollivanders-hero {
  background: linear-gradient(180deg, rgba(0,60,100,0.6) 0%, rgba(4,5,14,0.95) 100%);
}

.page-hero-inner { max-width: 760px; width: 100%; }

.page-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.82rem;
  color: rgba(245,230,180,0.55);
}
.page-breadcrumb a { color: rgba(245,230,180,0.6); text-decoration: none; }
.page-breadcrumb a:hover { color: #d4af37; }
.breadcrumb-sep { color: rgba(245,230,180,0.35); }

.page-hero-title {
  font-family: 'MedievalSharp', 'Cinzel Decorative', Georgia, serif;
  font-size: 2.4rem;
  color: #ffd700;
  text-shadow: 0 0 30px rgba(212,175,55,0.5), 0 2px 8px rgba(0,0,0,0.8);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.patronus-icon, .ollivanders-icon {
  font-size: 2rem;
  filter: drop-shadow(0 0 12px rgba(212,175,55,0.6));
}

.page-hero-subtitle {
  color: rgba(245,230,180,0.75);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 600px;
  margin: 0 auto;
  font-style: italic;
}

/* ==========================================
   STANDALONE QUIZ SECTION
========================================== */
.standalone-quiz-section {
  padding: 3rem 1.5rem 4rem;
  max-width: 900px;
  margin: 0 auto;
}

.parchment-wide {
  background: rgba(20,12,5,0.92);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 16px;
  padding: 3rem 2.5rem;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.04);
}

.quiz-screen { display: none; }
.quiz-screen.active { display: block; }

/* Intro screens */
.spell-cast-visual {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
}

.spell-orb {
  font-size: 4rem;
  text-align: center;
  line-height: 100px;
  animation: orb-pulse 2s ease-in-out infinite;
}

@keyframes orb-pulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 15px rgba(212,175,55,0.5)); }
  50% { transform: scale(1.15); filter: drop-shadow(0 0 30px rgba(212,175,55,0.9)); }
}

.intro-text {
  color: rgba(245,230,180,0.8);
  font-size: 1rem;
  line-height: 1.75;
  text-align: center;
  max-width: 580px;
  margin: 0 auto 1.5rem;
}

.patronus-examples {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem auto 2rem;
}

.patronus-sample {
  font-size: 2rem;
  animation: float-patronus 3s ease-in-out infinite;
  display: inline-block;
}
.patronus-sample:nth-child(2) { animation-delay: 0.4s; }
.patronus-sample:nth-child(3) { animation-delay: 0.8s; }
.patronus-sample:nth-child(4) { animation-delay: 1.2s; }
.patronus-sample:nth-child(5) { animation-delay: 1.6s; }
.patronus-sample:nth-child(6) { animation-delay: 2.0s; }
.patronus-sample:nth-child(7) { animation-delay: 2.4s; }
.patronus-sample:nth-child(8) { animation-delay: 2.8s; }

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

.large-btn { font-size: 1rem; padding: 0.85rem 2.5rem; display: block; margin: 0 auto; }

/* Ollivanders shop visual */
.shop-visual { text-align: center; margin-bottom: 1.5rem; }
.wand-boxes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.wand-box {
  font-size: 2rem;
  padding: 0.5rem;
  background: rgba(212,175,55,0.08);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 6px;
  animation: float-patronus 3s ease-in-out infinite;
}
.wand-box:nth-child(2) { animation-delay: 0.5s; }
.wand-box:nth-child(3) { animation-delay: 1s; }
.wand-box:nth-child(4) { animation-delay: 1.5s; }
.wand-box:nth-child(5) { animation-delay: 2s; }
.wand-box:nth-child(6) { animation-delay: 2.5s; }

.wand-components-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem auto;
  flex-wrap: wrap;
}

.component-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 20px;
  color: #d4af37;
  font-size: 0.88rem;
  font-weight: 600;
}
.comp-icon { font-size: 1.1rem; }
.comp-plus { color: rgba(212,175,55,0.5); font-size: 1.3rem; font-weight: 300; }

/* Quiz question styling */
.quiz-question-text {
  font-family: 'MedievalSharp', 'Cinzel Decorative', Georgia, serif;
  color: #ffd700;
  font-size: 1.35rem;
  text-align: center;
  margin: 1.5rem 0;
  line-height: 1.5;
}

/* Result screens */
.result-spell-effect, .wand-reveal-animation {
  text-align: center;
  margin-bottom: 1rem;
}

.patronus-burst {
  font-size: 5rem;
  display: inline-block;
  transition: transform 0.5s cubic-bezier(0.17, 0.89, 0.32, 1.5);
}
.patronus-burst.bursting {
  animation: burst-in 0.6s cubic-bezier(0.17, 0.89, 0.32, 1.5) forwards;
}
@keyframes burst-in {
  0% { transform: scale(0) rotate(-20deg); opacity: 0; }
  60% { transform: scale(1.3) rotate(5deg); opacity: 1; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}

.wand-glow {
  font-size: 4rem;
  display: inline-block;
  transition: all 0.5s;
}
.wand-glow.glowing {
  animation: wand-glow-anim 1.5s ease-in-out infinite alternate;
}
@keyframes wand-glow-anim {
  0% { filter: drop-shadow(0 0 10px rgba(128,224,255,0.5)); transform: rotate(-5deg) scale(1); }
  100% { filter: drop-shadow(0 0 30px rgba(128,224,255,1)); transform: rotate(5deg) scale(1.1); }
}

.result-incantation {
  text-align: center;
  color: #c8a0ff;
  font-style: italic;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.patronus-result-animal {
  font-size: 6rem;
  text-align: center;
  margin: 0.5rem 0;
  filter: drop-shadow(0 0 20px rgba(200,160,255,0.7));
}

.result-title {
  font-family: 'MedievalSharp', 'Cinzel Decorative', Georgia, serif;
  color: #ffd700;
  font-size: 2.2rem;
  text-align: center;
  margin: 0.5rem 0 1rem;
}

.result-description {
  color: rgba(245,230,180,0.85);
  text-align: center;
  line-height: 1.75;
  max-width: 580px;
  margin: 0 auto 1.5rem;
  font-size: 1rem;
}

.result-traits-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 2rem;
}

.result-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* Wand specs card */
.wand-specs-card {
  background: rgba(212,175,55,0.07);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  max-width: 480px;
  margin: 1rem auto 1.5rem;
}

.wand-spec-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(212,175,55,0.1);
  gap: 1rem;
}
.wand-spec-row:last-child { border-bottom: none; }

.spec-label {
  color: rgba(245,230,180,0.6);
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.spec-value {
  color: #ffd700;
  font-family: 'MedievalSharp', 'Cinzel Decorative', Georgia, serif;
  font-size: 1rem;
  text-align: right;
}

/* Page info section */
.page-info-section {
  padding: 3rem 1.5rem 5rem;
  max-width: 960px;
  margin: 0 auto;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.info-card {
  background: rgba(20,12,5,0.85);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.info-card:hover {
  border-color: rgba(212,175,55,0.4);
  box-shadow: 0 4px 20px rgba(212,175,55,0.1);
}
.info-icon { font-size: 2.2rem; display: block; margin-bottom: 0.8rem; }
.info-card h3 {
  font-family: 'MedievalSharp', 'Cinzel Decorative', Georgia, serif;
  color: #d4af37;
  font-size: 1.1rem;
  margin-bottom: 0.7rem;
}
.info-card p { color: rgba(245,230,180,0.75); font-size: 0.9rem; line-height: 1.65; }

/* Ollivanders section tint */
.ollivanders-section .parchment-wide {
  border-color: rgba(128,224,255,0.2);
}

/* ==========================================
   RESPONSIVE — new pages
========================================== */
@media (max-width: 768px) {
  .page-hero-title { font-size: 1.7rem; }
  .parchment-wide { padding: 2rem 1.5rem; }
  .wand-specs-card { padding: 1.25rem 1.25rem; }
  .result-actions { flex-direction: column; align-items: center; }
}

@media (max-width: 900px) {
  .site-header-v2 .hamburger { display: flex; }
}

@media (min-width: 901px) {
  .site-header-v2 .hamburger { display: none; }
}

/* ==========================================
   V3 UPGRADES — FONDO MÁS OSCURO
========================================== */
body {
  background: #020408 url('images/hogwarts-bg.avif') center top / cover no-repeat fixed;
}

body::before {
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,0.6) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 10%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 80%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 10% 60%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 50%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 35% 15%, rgba(255,255,255,0.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 70%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(2px 2px at 15% 85%, rgba(255,215,0,0.25) 0%, transparent 100%),
    radial-gradient(2px 2px at 65% 25%, rgba(255,215,0,0.2) 0%, transparent 100%),
    radial-gradient(1px 1px at 45% 45%, rgba(255,255,255,0.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 5% 20%, rgba(255,255,255,0.35) 0%, transparent 100%),
    radial-gradient(1px 1px at 95% 75%, rgba(255,255,255,0.35) 0%, transparent 100%),
    radial-gradient(2px 2px at 30% 55%, rgba(200,160,255,0.15) 0%, transparent 100%),
    radial-gradient(2px 2px at 75% 40%, rgba(200,160,255,0.1) 0%, transparent 100%);
  background-size: 400px 400px, 300px 300px, 500px 500px, 350px 350px, 250px 250px, 450px 450px, 200px 200px, 600px 600px, 380px 380px, 320px 320px, 280px 280px, 420px 420px, 550px 550px, 360px 360px;
  /* extra dark overlay for deeper night feel */
  background-color: rgba(0,0,0,0.45);
  background-blend-mode: normal;
}

/* Dark overlay on sections */
#houses, #spells, #creatures, #blog {
  background: linear-gradient(180deg, rgba(0,0,0,0.3), rgba(2,4,8,0.5), rgba(0,0,0,0.3));
}

/* ==========================================
   V3 UPGRADES — LANG SWITCHER
========================================== */
.lang-switcher-v3 {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(212,175,55,0.08);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 24px;
  padding: 3px 6px;
}

.lang-pill-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  border-radius: 18px;
  padding: 5px 10px;
  cursor: pointer;
  transition: all 0.2s;
  color: rgba(212,175,55,0.6);
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.lang-pill-btn .lang-flag {
  font-size: 1rem;
  line-height: 1;
}

.lang-pill-btn .lang-pill-label {
  display: inline;
}

.lang-pill-btn.lang-active {
  background: linear-gradient(135deg, rgba(212,175,55,0.25), rgba(212,175,55,0.15));
  color: #ffd700;
  box-shadow: 0 0 10px rgba(212,175,55,0.2);
}

.lang-pill-btn:hover:not(.lang-active) {
  color: rgba(212,175,55,0.9);
  background: rgba(212,175,55,0.08);
}

.lang-divider {
  color: rgba(212,175,55,0.2);
  font-size: 0.7rem;
  user-select: none;
}

/* ==========================================
   V3 UPGRADES — HOUSE CARDS (redesign)
========================================== */
.house-card {
  background: linear-gradient(160deg, rgba(8,8,20,0.92) 0%, rgba(15,12,30,0.88) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 2.2rem 1.8rem 1.8rem;
  text-align: center;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
}

/* Glow from bottom on each house */
.house-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 40%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: 0 0 16px 16px;
}

.house-card.gryffindor::after { background: radial-gradient(ellipse at 50% 100%, rgba(116,0,1,0.35) 0%, transparent 70%); }
.house-card.ravenclaw::after  { background: radial-gradient(ellipse at 50% 100%, rgba(14,26,64,0.45) 0%, transparent 70%); }
.house-card.hufflepuff::after { background: radial-gradient(ellipse at 50% 100%, rgba(236,185,57,0.25) 0%, transparent 70%); }
.house-card.slytherin::after  { background: radial-gradient(ellipse at 50% 100%, rgba(26,71,42,0.4) 0%, transparent 70%); }

.house-card:hover::after { opacity: 1; }

.house-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  border-radius: 16px 16px 0 0;
}

.house-card.gryffindor::before { background: linear-gradient(90deg, #740001, #d3a625, #740001); }
.house-card.ravenclaw::before  { background: linear-gradient(90deg, #0e1a40, #946b2d, #0e1a40); }
.house-card.hufflepuff::before { background: linear-gradient(90deg, #ecb939, #2c2c00, #ecb939); }
.house-card.slytherin::before  { background: linear-gradient(90deg, #1a472a, #aaaaaa, #1a472a); }

.house-card.gryffindor { border-color: rgba(116,0,1,0.3); }
.house-card.ravenclaw  { border-color: rgba(14,26,64,0.4); }
.house-card.hufflepuff { border-color: rgba(236,185,57,0.2); }
.house-card.slytherin  { border-color: rgba(26,71,42,0.35); }

.house-card:hover {
  transform: translateY(-10px) scale(1.02);
}

.house-card.gryffindor:hover { box-shadow: 0 24px 60px rgba(116,0,1,0.4), 0 0 0 1px rgba(211,166,37,0.4); border-color: rgba(211,166,37,0.5); }
.house-card.ravenclaw:hover  { box-shadow: 0 24px 60px rgba(14,26,64,0.5), 0 0 0 1px rgba(148,107,45,0.4); border-color: rgba(148,107,45,0.5); }
.house-card.hufflepuff:hover { box-shadow: 0 24px 60px rgba(236,185,57,0.35), 0 0 0 1px rgba(236,185,57,0.5); border-color: rgba(236,185,57,0.5); }
.house-card.slytherin:hover  { box-shadow: 0 24px 60px rgba(26,71,42,0.4), 0 0 0 1px rgba(170,170,170,0.4); border-color: rgba(170,170,170,0.4); }

.house-crest {
  font-size: 4rem;
  margin-bottom: 1rem;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.7));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.house-card:hover .house-crest {
  transform: scale(1.15) translateY(-4px);
  filter: drop-shadow(0 8px 20px rgba(212,175,55,0.5));
}

.house-card h3 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.15rem;
  margin-bottom: 1rem;
  letter-spacing: 0.08em;
}

.house-card.gryffindor h3 { color: #e8b942; text-shadow: 0 0 12px rgba(232,185,66,0.4); }
.house-card.ravenclaw h3  { color: #b08d57; text-shadow: 0 0 12px rgba(176,141,87,0.4); }
.house-card.hufflepuff h3 { color: #f0c040; text-shadow: 0 0 12px rgba(240,192,64,0.4); }
.house-card.slytherin h3  { color: #c0c0c0; text-shadow: 0 0 12px rgba(192,192,192,0.35); }

.house-card p {
  font-size: 0.88rem;
  color: rgba(212,184,150,0.8);
  line-height: 1.75;
  margin-bottom: 1.2rem;
}

.trait-badge {
  background: rgba(240,192,64,0.1);
  border: 1px solid rgba(240,192,64,0.25);
  color: var(--gold-light);
  padding: 0.22rem 0.7rem;
  border-radius: 20px;
  font-size: 0.68rem;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.05em;
  transition: background 0.2s;
}

.house-card:hover .trait-badge {
  background: rgba(240,192,64,0.18);
}

.house-meta {
  font-size: 0.78rem;
  color: rgba(180,160,130,0.7);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding-top: 1rem;
  margin-top: 0.5rem;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.03em;
}

.house-meta span { color: var(--gold-light); font-weight: 700; }

.house-motto {
  font-style: italic;
  font-size: 0.82rem;
  color: rgba(212,184,150,0.55);
  margin-top: 0.7rem;
  letter-spacing: 0.03em;
}

/* ==========================================
   V3 UPGRADES — PAGE HERO (Patronus/Ollivanders/Sorting)
========================================== */
.page-hero {
  min-height: 340px;
  padding: 5rem 2rem 3.5rem;
}

.patronus-hero {
  background:
    linear-gradient(180deg, rgba(60,0,100,0.7) 0%, rgba(4,2,12,0.97) 100%),
    radial-gradient(ellipse at 50% 0%, rgba(180,80,255,0.2) 0%, transparent 60%);
}

.ollivanders-hero {
  background:
    linear-gradient(180deg, rgba(0,40,80,0.75) 0%, rgba(2,4,12,0.97) 100%),
    radial-gradient(ellipse at 50% 0%, rgba(0,160,255,0.15) 0%, transparent 60%);
}

.sorting-hero {
  background:
    linear-gradient(180deg, rgba(80,20,0,0.7) 0%, rgba(4,2,10,0.97) 100%),
    radial-gradient(ellipse at 50% 0%, rgba(255,120,0,0.15) 0%, transparent 60%);
  position: relative;
  overflow: hidden;
}

.sorting-hat-floating {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 6rem;
  opacity: 0.12;
  animation: hat-sway 6s ease-in-out infinite;
  pointer-events: none;
  filter: blur(2px);
}

@keyframes hat-sway {
  0%, 100% { transform: translateX(-50%) rotate(-5deg) translateY(0); }
  50% { transform: translateX(-50%) rotate(5deg) translateY(-10px); }
}

.sorting-hat-hero-title { flex-direction: column; gap: 0.2rem; }

.page-hero-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
}

/* ==========================================
   V3 UPGRADES — PATRONUS QUIZ DESIGN
========================================== */
.parchment-wide {
  background: rgba(6,4,16,0.94);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  box-shadow:
    0 16px 60px rgba(0,0,0,0.75),
    inset 0 1px 0 rgba(255,255,255,0.04),
    inset 0 0 60px rgba(212,175,55,0.02);
}

.spell-orb {
  filter: drop-shadow(0 0 20px rgba(180,80,255,0.7));
}

@keyframes orb-pulse {
  0%, 100% { transform: scale(1) rotate(-5deg); filter: drop-shadow(0 0 15px rgba(180,80,255,0.5)); }
  50% { transform: scale(1.2) rotate(5deg); filter: drop-shadow(0 0 35px rgba(200,120,255,1)); }
}

.patronus-examples .patronus-sample {
  display: inline-block;
  font-size: 2.2rem;
  margin: 0.3rem;
  animation: float-patronus 3s ease-in-out infinite;
  filter: drop-shadow(0 2px 8px rgba(180,80,255,0.4));
}

.patronus-examples .patronus-sample:nth-child(2n) { animation-delay: 0.4s; }
.patronus-examples .patronus-sample:nth-child(3n) { animation-delay: 0.8s; }
.patronus-examples .patronus-sample:nth-child(4n) { animation-delay: 1.2s; }

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

/* Patronus result section */
.patronus-burst {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(200,160,255,0.4) 0%, transparent 70%);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: burst-glow 2s ease-in-out infinite;
}

@keyframes burst-glow {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
}

.patronus-result-animal { font-size: 5rem; text-align: center; margin: 0.5rem 0; animation: float-patronus 3s ease-in-out infinite; }

/* Quiz answer buttons redesign */
.answer-btn {
  background: rgba(212,175,55,0.05);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  cursor: pointer;
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  color: rgba(245,230,180,0.85);
  text-align: left;
  transition: all 0.25s ease;
  line-height: 1.45;
  position: relative;
  overflow: hidden;
}

.answer-btn::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gold);
  transform: scaleY(0);
  transition: transform 0.25s ease;
  border-radius: 0 2px 2px 0;
}

.answer-btn:hover {
  background: rgba(212,175,55,0.12);
  border-color: rgba(212,175,55,0.45);
  color: #ffd700;
  transform: translateX(4px);
}

.answer-btn:hover::before { transform: scaleY(1); }

.answer-btn.selected {
  background: rgba(212,175,55,0.18);
  border-color: rgba(212,175,55,0.6);
  color: #ffd700;
  box-shadow: 0 0 20px rgba(212,175,55,0.15);
}

.answer-btn.selected::before { transform: scaleY(1); }

/* ==========================================
   V3 UPGRADES — OLLIVANDERS DESIGN
========================================== */
.wand-boxes {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0.5rem auto;
}

.wand-box {
  font-size: 2rem;
  background: rgba(0,128,200,0.08);
  border: 1px solid rgba(0,128,200,0.2);
  border-radius: 8px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: wand-float 2.5s ease-in-out infinite;
  filter: drop-shadow(0 2px 8px rgba(0,180,255,0.3));
}

.wand-box:nth-child(2n) { animation-delay: 0.4s; }
.wand-box:nth-child(3n) { animation-delay: 0.8s; }
.wand-box:nth-child(4n) { animation-delay: 1.2s; }
.wand-box:nth-child(5n) { animation-delay: 1.6s; }
.wand-box:nth-child(6n) { animation-delay: 2s; }

@keyframes wand-float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-6px) rotate(3deg); }
}

.component-pill {
  background: rgba(0,128,200,0.1);
  border: 1px solid rgba(0,128,200,0.3);
  border-radius: 30px;
  padding: 0.6rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  color: rgba(128,224,255,0.85);
  letter-spacing: 0.05em;
  transition: all 0.25s;
}

.component-pill:hover {
  background: rgba(0,128,200,0.2);
  border-color: rgba(0,180,255,0.5);
  color: #80e0ff;
}

.comp-icon { font-size: 1.3rem; }

.ollivanders-section .parchment-wide {
  border-color: rgba(0,160,255,0.2);
  box-shadow: 0 16px 60px rgba(0,0,0,0.75), 0 0 80px rgba(0,100,200,0.06);
}

/* Wand reveal animation */
.wand-glow {
  font-size: 4.5rem;
  display: block;
  text-align: center;
  animation: wand-spin 0.8s ease-out, wand-float 3s ease-in-out infinite 0.8s;
  filter: drop-shadow(0 0 20px rgba(0,180,255,0.7));
}

/* Wand specs card */
.wand-specs-card {
  background: rgba(0,40,80,0.4);
  border: 1px solid rgba(0,160,255,0.2);
  border-radius: 14px;
  padding: 1.5rem 2rem;
  margin: 1.5rem auto;
  max-width: 480px;
}

/* ==========================================
   V3 UPGRADES — SORTING HAT PAGE
========================================== */
.sorting-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, rgba(10,8,30,0.9), rgba(20,10,45,0.95));
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 14px;
  padding: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4), 0 0 40px rgba(212,175,55,0.05);
}

.sorting-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(212,175,55,0.75);
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  letter-spacing: 0.05em;
  text-shadow: 0 0 8px rgba(212,175,55,0.15);
}

.sorting-tab:hover {
  color: #ffd700;
  background: rgba(212,175,55,0.08);
  text-shadow: 0 0 14px rgba(212,175,55,0.5);
  border-color: rgba(212,175,55,0.15);
}

.sorting-tab.active {
  background: linear-gradient(135deg, rgba(116,0,1,0.55), rgba(180,0,30,0.4));
  color: #fff8e1;
  border-color: rgba(212,175,55,0.35);
  box-shadow: 0 0 18px rgba(180,0,30,0.25), 0 0 8px rgba(212,175,55,0.15), inset 0 1px 0 rgba(255,255,255,0.08);
  text-shadow: 0 0 10px rgba(255,200,50,0.5);
}

.sorting-tab-content { display: none; }
.sorting-tab-content.active { display: block; }

/* Hat intro visual */
.hat-intro-visual {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1.5rem;
}

.hat-big-icon {
  font-size: 5rem;
  text-align: center;
  line-height: 120px;
  animation: hat-bounce 2s ease-in-out infinite;
  filter: drop-shadow(0 4px 16px rgba(212,175,55,0.5));
}

@keyframes hat-bounce {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-8px) rotate(3deg); }
}

.hat-sparkles span {
  position: absolute;
  color: #ffd700;
  font-size: 0.8rem;
  animation: sparkle-out 1.8s ease-in-out infinite;
  opacity: 0;
}
.hat-sparkles .hs1 { top: 5px; left: 10px; animation-delay: 0s; }
.hat-sparkles .hs2 { top: 0; right: 15px; animation-delay: 0.3s; }
.hat-sparkles .hs3 { bottom: 10px; left: 5px; animation-delay: 0.6s; }
.hat-sparkles .hs4 { bottom: 5px; right: 10px; animation-delay: 0.9s; }
.hat-sparkles .hs5 { top: 30px; right: 0; animation-delay: 1.2s; }

@keyframes sparkle-out {
  0% { opacity: 0; transform: scale(0.5) translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: scale(1.5) translateY(-15px); }
}

.houses-preview-mini {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0 2rem;
}

.house-mini {
  font-size: 2.5rem;
  display: inline-block;
  cursor: default;
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5)) grayscale(0.2);
}

.house-mini:hover {
  transform: scale(1.3) translateY(-5px);
  filter: drop-shadow(0 6px 16px rgba(212,175,55,0.5));
}

.hat-result-burst {
  font-size: 4rem;
  text-align: center;
  margin: 0 auto 1rem;
  animation: hat-bounce 2s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(212,175,55,0.6));
  display: block;
}

@keyframes burst-expand {
  0% { transform: scale(1); }
  50% { transform: scale(1.4) rotate(15deg); }
  100% { transform: scale(1) rotate(0deg); }
}

.hat-result-burst.burst-active {
  animation: burst-expand 0.8s ease-out, hat-bounce 2s ease-in-out infinite 0.8s;
}

/* Sorting chat full-size */
.sorting-chat {
  min-height: 380px;
}

/* ==========================================
   V3 UPGRADES — MAGIC BTN IMPROVED
========================================== */
.magic-btn {
  background: linear-gradient(135deg, rgba(212,175,55,0.2) 0%, rgba(180,130,30,0.15) 100%);
  border: 1px solid rgba(212,175,55,0.5);
  border-radius: 30px;
  padding: 0.85rem 2.2rem;
  color: #ffd700;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.1em;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(212,175,55,0.15);
}

.magic-btn:hover {
  background: linear-gradient(135deg, rgba(212,175,55,0.35) 0%, rgba(180,130,30,0.25) 100%);
  box-shadow: 0 8px 30px rgba(212,175,55,0.35);
  transform: translateY(-2px);
  border-color: rgba(212,175,55,0.8);
}

.magic-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.magic-btn.large-btn {
  padding: 1.1rem 3rem;
  font-size: 0.95rem;
  border-radius: 40px;
}

/* ==========================================
   V3 UPGRADES — RESULT STYLES
========================================== */
.result-house-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: 2.2rem;
  text-align: center;
  margin: 0.5rem 0;
  background: linear-gradient(135deg, #ffd700, #ffaa00, #ffd700);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  filter: drop-shadow(0 0 20px rgba(212,175,55,0.5));
}

.result-description {
  text-align: center;
  color: rgba(245,230,180,0.85);
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 520px;
  margin: 1rem auto;
  font-style: italic;
}

.result-incantation {
  text-align: center;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  color: rgba(212,175,55,0.7);
  margin-bottom: 0.5rem;
}

.result-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

/* ==========================================
   V3 RESPONSIVE
========================================== */
@media (max-width: 600px) {
  /* V4: lang-pill-label is always shown (overridden in v4 section) */
  .sorting-tab span:last-child { display: none; }
  .sorting-tab { font-size: 0.75rem; }
  .houses-preview-mini { gap: 1rem; }
  .house-mini { font-size: 2rem; }
}


/* ==========================================
   V4 UPGRADES — COMPLETE REDESIGN
========================================== */

/* --- V4: HEADER MOBILE FIX --- */
/* ==========================================
   MOBILE HEADER — CORRECCIÓN COMPLETA
   Menú hamburger + lang switcher visibles
========================================== */
@media (max-width: 900px) {
  /* Header: relative para que el menú absolute salga de él */
  .site-header-v2 {
    padding: 0 0.9rem;
    height: 60px;
    gap: 0.5rem;
    overflow: visible;
    position: relative;
    z-index: 1000;
  }

  /* Logo compacto */
  .site-logo {
    max-width: 150px;
    min-width: 0;
    flex-shrink: 1;
  }
  .logo-hat-img {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
  }
  .logo-text {
    font-size: 0.62rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Nav wrapper: no ocupa espacio en el header, el ul sale del flujo */
  .site-header-v2 nav {
    position: static;
    flex: 0 0 auto;
    min-width: 0;
    width: 0;
    overflow: visible;
  }

  /* Menú desplegable: absolute desde el borde inferior del header */
  .site-header-v2 .main-nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    height: calc(100vh - 60px);
    background: rgba(4, 5, 14, 0.99);
    padding: 1.5rem 1rem 2rem;
    border-top: 1px solid rgba(212,175,55,0.25);
    overflow-y: auto;
    z-index: 9999;
    gap: 0.5rem;
  }

  .site-header-v2 .main-nav.open {
    display: flex !important;
  }

  .site-header-v2 .main-nav li a {
    padding: 0.9rem 1.2rem;
    border-radius: 10px;
    font-size: 0.92rem;
    border: 1px solid rgba(212,175,55,0.15);
    background: rgba(212,175,55,0.04);
    justify-content: flex-start;
    gap: 0.7rem;
    width: 100%;
    box-sizing: border-box;
  }

  .site-header-v2 .main-nav li a:hover {
    background: rgba(212,175,55,0.12);
    border-color: rgba(212,175,55,0.3);
  }

  .nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  /* Hamburger visible */
  .site-header-v2 .hamburger {
    display: flex;
    flex-shrink: 0;
  }

  /* Lang switcher: siempre visible, compacto pero completo */
  .header-right {
    flex-shrink: 0;
    margin-left: auto;
  }

  .lang-switcher-v3 {
    padding: 3px 6px;
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: nowrap;
    white-space: nowrap;
  }

  .lang-pill-btn {
    padding: 5px 8px;
    gap: 3px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }

  .lang-pill-btn .lang-pill-label {
    display: inline !important;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .lang-pill-btn .lang-flag {
    font-size: 0.9rem;
  }

  .lang-divider {
    font-size: 0.65rem;
    flex-shrink: 0;
    opacity: 0.5;
  }
}

@media (max-width: 400px) {
  .lang-pill-btn .lang-pill-label {
    font-size: 0.62rem;
  }
  .lang-pill-btn {
    padding: 4px 6px;
  }
}

/* --- V4: HERO SECTION IMPROVEMENTS --- */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem 4rem;
  position: relative;
}

#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 40%, rgba(212,175,55,0.08) 0%, transparent 65%),
              radial-gradient(ellipse at 20% 80%, rgba(116,0,1,0.12) 0%, transparent 50%),
              radial-gradient(ellipse at 80% 20%, rgba(14,26,64,0.15) 0%, transparent 50%);
  pointer-events: none;
}

.hero-inner {
  max-width: 750px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.parchment-card {
  background: url('images/background-paper.webp') center center no-repeat;
  background-size: 100% 100%;
  border-radius: 0;
  padding: 6rem 5rem;
  min-height: 650px;
  box-shadow: none;
  position: relative;
  text-align: center;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
}

.parchment-card::before {
  display:none;
}

.hero-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  color: #2a1a0a;
  line-height: 1.3;
  margin-bottom: 1.2rem;
  text-shadow: 1px 1px 0 rgba(255,255,255,0.5);
}

.hero-text {
  color: #3d2b1a;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

/* WAX SEAL BUTTON */
.wax-seal-btn {
  background: none;
  border: none;
  cursor: pointer;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  transition: transform 0.3s ease;
}
.wax-seal-btn:hover { transform: scale(1.05); }

.wax-seal {
  width: 90px;
  height: 90px;
  background: radial-gradient(circle at 35% 35%, #b30000, #740001, #4a0000);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(116,0,1,0.6), inset 0 2px 4px rgba(255,100,100,0.2);
  position: relative;
  transition: box-shadow 0.3s;
}
.wax-seal-btn:hover .wax-seal {
  box-shadow: 0 6px 30px rgba(116,0,1,0.8), 0 0 40px rgba(212,175,55,0.3), inset 0 2px 4px rgba(255,100,100,0.2);
}
.wax-seal::before {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 50%;
  border: 1px solid rgba(255,150,150,0.3);
}
.wax-seal-text {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  font-weight: 700;
  color: #ffd700;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-align: center;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.seal-label {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  color: #5a3a1a;
  letter-spacing: 0.06em;
}

/* Sorting hat link button */
.sorting-hat-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  color: #5a3a1a;
  text-decoration: none;
  padding: 0.5rem 1.2rem;
  border: 1px dashed rgba(139,105,20,0.4);
  border-radius: 30px;
  transition: all 0.3s;
}
.sorting-hat-link:hover {
  color: #2a1a0a;
  border-color: rgba(139,105,20,0.7);
  background: rgba(139,105,20,0.08);
}
.hat-icon { font-size: 1.2rem; }

@media (max-width: 600px) {
  .parchment-card { padding: 2.5rem 1.5rem; }
  #hero { padding-top: 5rem; }
}

/* --- V4: HOUSES SECTION --- */
#houses {
  padding: 5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.houses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}

/* --- V4: SECTION TITLES --- */
.section-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  color: var(--gold);
  text-align: center;
  margin-bottom: 0.75rem;
  text-shadow: 0 0 30px rgba(212,175,55,0.4);
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0.7rem auto 0;
}

.section-subtitle {
  text-align: center;
  color: rgba(245,230,200,0.7);
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* --- V4: BLOG — EPIC REDESIGN --- */
#blog {
  padding: 5rem 1.5rem;
  max-width: 1300px;
  margin: 0 auto;
  position: relative;
}

#blog::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 100vw;
  height: 100%;
  background: linear-gradient(180deg,
    rgba(0,0,0,0) 0%,
    rgba(212,175,55,0.03) 30%,
    rgba(212,175,55,0.05) 50%,
    rgba(0,0,0,0) 100%);
  pointer-events: none;
  z-index: -1;
}

/* Blog section header: "The Daily Prophet" styled headline */
#blog .section-title {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  letter-spacing: 0.05em;
}

#blog .section-subtitle {
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(212,175,55,0.6);
  font-family: 'Cinzel', serif;
}

/* New blog grid: 3 col desktop, featured-first layout */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.8rem;
  margin-top: 2.5rem;
}

/* First card is FEATURED — spans 2 cols */
.blog-card:first-child {
  grid-column: 1 / 3;
  grid-row: 1;
  flex-direction: row;
  display: flex;
}

.blog-card:first-child .blog-card-thumb {
  flex: 0 0 50%;
  min-height: 280px;
  border-radius: 16px 0 0 16px;
}

.blog-card:first-child .blog-card-body {
  flex: 1;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.blog-card:first-child h4 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.blog-card:first-child .blog-excerpt {
  font-size: 1rem;
  line-height: 1.65;
  -webkit-line-clamp: 5;
}

/* ALL blog cards base */
.blog-card {
  background: linear-gradient(160deg, rgba(8,8,22,0.95) 0%, rgba(18,14,36,0.92) 100%);
  border: 1px solid rgba(212,175,55,0.12);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.35s ease, box-shadow 0.35s ease, border-color 0.35s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.blog-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(212,175,55,0.04) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  transition: opacity 0.35s;
  opacity: 0;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow:
    0 20px 60px rgba(0,0,0,0.7),
    0 0 0 1px rgba(212,175,55,0.25),
    0 0 40px rgba(212,175,55,0.08);
  border-color: rgba(212,175,55,0.28);
}
.blog-card:hover::before { opacity: 1; }

/* Thumbnail */
.blog-card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(20,10,40,0.9) 0%, rgba(10,5,25,0.95) 100%);
  position: relative;
  border-radius: 16px 16px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

.blog-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  position: absolute;
  inset: 0;
}

.blog-card:hover .blog-card-thumb img {
  transform: scale(1.06);
}

/* Icon placeholder with gradient bg */
.blog-card-icon {
  font-size: 3.5rem;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 20px rgba(212,175,55,0.4));
  display: block;
  text-align: center;
  animation: float-icon 4s ease-in-out infinite;
}

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

/* Icon bg gradient per house */
.blog-card:nth-child(1) .blog-card-thumb { background: linear-gradient(135deg, #1a0000 0%, #3d0000 50%, #1a0000 100%); }
.blog-card:nth-child(2) .blog-card-thumb { background: linear-gradient(135deg, #050a1a 0%, #0e1a40 50%, #050a1a 100%); }
.blog-card:nth-child(3) .blog-card-thumb { background: linear-gradient(135deg, #0a1a0a 0%, #1a472a 50%, #0a1a0a 100%); }
.blog-card:nth-child(4) .blog-card-thumb { background: linear-gradient(135deg, #1a1200 0%, #3a2e00 50%, #1a1200 100%); }
.blog-card:nth-child(5) .blog-card-thumb { background: linear-gradient(135deg, #100010 0%, #2a0a3a 50%, #100010 100%); }
.blog-card:nth-child(6) .blog-card-thumb { background: linear-gradient(135deg, #001a1a 0%, #0a3040 50%, #001a1a 100%); }

/* Overlay shimmer on thumb */
.blog-card-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,0.7) 100%);
  z-index: 1;
}

/* Card body */
.blog-card-body {
  padding: 1.5rem 1.4rem 1.3rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* Category badge */
.blog-category {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  opacity: 0.8;
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.blog-category::before {
  content: '';
  width: 20px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
  display: inline-block;
}

/* Title */
.blog-card-body h4 {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--parchment);
  line-height: 1.45;
  margin-bottom: 0.7rem;
  transition: color 0.2s;
}

.blog-card-body h4 a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-card:hover .blog-card-body h4 a {
  color: var(--gold-light);
}

/* Meta: date + reading time */
.blog-meta {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.blog-date {
  font-size: 0.78rem;
  color: rgba(245,230,200,0.45);
  font-style: italic;
}

.blog-reading-time {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  color: var(--gold);
  opacity: 0.6;
  background: rgba(212,175,55,0.08);
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid rgba(212,175,55,0.15);
  white-space: nowrap;
}

/* Excerpt */
.blog-excerpt {
  font-size: 0.9rem;
  color: rgba(245,230,200,0.6);
  line-height: 1.6;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 1rem;
}

/* Footer: read more + badge */
.blog-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(212,175,55,0.1);
  margin-top: auto;
}

.read-more {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  color: var(--gold);
  text-decoration: none;
  letter-spacing: 0.08em;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.read-more::after {
  content: '→';
  transition: transform 0.2s;
}

.read-more:hover {
  color: var(--gold-light);
  text-shadow: 0 0 12px rgba(212,175,55,0.5);
}

.read-more:hover::after {
  transform: translateX(4px);
}

.blog-house-badge {
  font-size: 1.2rem;
  filter: drop-shadow(0 0 8px rgba(212,175,55,0.3));
}

/* View all CTA */
.blog-view-all {
  text-align: center;
  margin-top: 3rem;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, rgba(212,175,55,0.15), rgba(212,175,55,0.08));
  border: 1px solid rgba(212,175,55,0.4);
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  padding: 0.85rem 2.2rem;
  border-radius: 40px;
  text-decoration: none;
  transition: all 0.3s;
}

.btn-gold:hover {
  background: linear-gradient(135deg, rgba(212,175,55,0.25), rgba(212,175,55,0.15));
  box-shadow: 0 0 30px rgba(212,175,55,0.2), 0 0 0 1px rgba(212,175,55,0.5);
  transform: translateY(-2px);
}

.blog-view-all-sub {
  font-style: italic;
  color: rgba(212,175,55,0.4);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.06em;
}

/* Blog responsive */
@media (max-width: 900px) {
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .blog-card:first-child {
    grid-column: 1 / -1;
    flex-direction: column;
  }
  .blog-card:first-child .blog-card-thumb {
    flex: 0 0 auto;
    min-height: 200px;
    border-radius: 16px 16px 0 0;
  }
  .blog-card:first-child .blog-card-body {
    padding: 1.5rem 1.4rem;
  }
}

@media (max-width: 580px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
  .blog-card:first-child {
    grid-column: auto;
  }
}


/* =============================================================================
   V4 REDESIGN: SORTING HAT · PATRONUS · OLLIVANDERS — DARK MAGIC STYLE
   Complete visual overhaul: deep dark, golden glows, cinematic feel
============================================================================= */

/* ── Hero sections ─────────────────────────────────────────────────────────── */
.page-hero {
  min-height: 42vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7rem 1.5rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.sorting-hero {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212,175,55,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(116,0,1,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 60%, rgba(30,10,60,0.3) 0%, transparent 50%);
}

.patronus-hero {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(120,180,255,0.1) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(180,80,255,0.08) 0%, transparent 50%);
}

.ollivanders-hero {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(180,130,50,0.12) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 70%, rgba(80,50,20,0.2) 0%, transparent 50%);
}

.sorting-hat-floating {
  font-size: 12rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%);
  z-index: 0;
  opacity: 0.06;
  animation: hat-bg-float 8s ease-in-out infinite;
  pointer-events: none;
  filter: drop-shadow(0 0 80px rgba(212,175,55,0.2));
}

@keyframes hat-bg-float {
  0%, 100% { transform: translate(-50%, -60%) rotate(-3deg) scale(1); }
  50% { transform: translate(-50%, -65%) rotate(3deg) scale(1.05); }
}

.page-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 700px;
  width: 100%;
}

.page-breadcrumb {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: rgba(212,175,55,0.45);
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.page-breadcrumb a {
  color: rgba(212,175,55,0.5);
  text-decoration: none;
  transition: color 0.2s;
}
.page-breadcrumb a:hover { color: var(--gold); }
.breadcrumb-sep { margin: 0 0.5rem; opacity: 0.4; }

.page-hero-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.8rem, 5vw, 3rem);
  color: var(--gold);
  text-shadow:
    0 0 60px rgba(212,175,55,0.5),
    0 0 120px rgba(212,175,55,0.2),
    0 2px 4px rgba(0,0,0,0.9);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.sorting-hat-hero-title { letter-spacing: 0.04em; }

.patronus-icon {
  display: inline-block;
  animation: patronus-pulse 2s ease-in-out infinite;
}
@keyframes patronus-pulse {
  0%, 100% { filter: drop-shadow(0 0 10px rgba(150,200,255,0.4)); }
  50% { filter: drop-shadow(0 0 30px rgba(150,200,255,0.9)); }
}

.page-hero-subtitle {
  font-family: 'Crimson Text', serif;
  font-size: 1.05rem;
  color: rgba(245,230,200,0.65);
  line-height: 1.75;
  font-style: italic;
  max-width: 560px;
  margin: 0 auto;
}

/* ── Quiz container layout ──────────────────────────────────────────────────── */
.standalone-quiz-section {
  padding: 2rem 1.5rem 6rem;
  max-width: 820px;
  margin: 0 auto;
}

.ollivanders-section {
  max-width: 860px;
}

/* ── THE MAGIC CARD — main quiz container ────────────────────────────────── */
.parchment-wide {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212,175,55,0.06) 0%, transparent 50%),
    linear-gradient(175deg, rgba(8,5,18,0.98) 0%, rgba(12,6,24,0.98) 100%);
  border: 1px solid rgba(212,175,55,0.22);
  border-radius: 24px;
  padding: 3rem 2.5rem;
  box-shadow:
    0 0 0 1px rgba(212,175,55,0.06),
    0 0 60px rgba(212,175,55,0.05),
    0 30px 80px rgba(0,0,0,0.8),
    inset 0 1px 0 rgba(255,255,255,0.05);
  color: rgba(245,225,175,0.9);
  position: relative;
  overflow: hidden;
}

.parchment-wide::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.4), transparent);
  pointer-events: none;
}

/* ── TABS (Sorting Hat) ─────────────────────────────────────────────────────── */
.sorting-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  background: linear-gradient(135deg, rgba(8,6,25,0.92), rgba(18,8,38,0.95));
  padding: 0.4rem;
  border-radius: 18px;
  border: 1px solid rgba(212,175,55,0.25);
  box-shadow: 0 4px 24px rgba(0,0,0,0.5), 0 0 50px rgba(212,175,55,0.04);
}

.sorting-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.2rem;
  border-radius: 14px;
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  border: 1px solid transparent;
  cursor: pointer;
  background: transparent;
  color: rgba(212,175,55,0.75);
  transition: all 0.3s;
  text-transform: uppercase;
  text-shadow: 0 0 8px rgba(212,175,55,0.15);
}

.sorting-tab:hover {
  color: #ffd700;
  background: rgba(212,175,55,0.07);
  text-shadow: 0 0 14px rgba(212,175,55,0.5);
  border-color: rgba(212,175,55,0.12);
}

.sorting-tab.active {
  background: linear-gradient(135deg, rgba(116,0,1,0.6), rgba(160,0,20,0.45));
  color: #fff8e1;
  border: 1px solid rgba(212,175,55,0.35);
  box-shadow: 0 0 22px rgba(180,0,30,0.3), 0 0 10px rgba(212,175,55,0.15), inset 0 1px 0 rgba(255,255,255,0.1);
  text-shadow: 0 0 12px rgba(255,200,50,0.55);
}

.sorting-tab-content { display: none; }
.sorting-tab-content.active { display: block; }

/* ── INTRO SCREENS ─────────────────────────────────────────────────────────── */
.quiz-screen { display: none; }
.quiz-screen.active { display: block; }

/* Hat intro */
.hat-intro-visual {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.hat-big-icon {
  font-size: 5.5rem;
  display: block;
  text-align: center;
  animation: hat-float 5s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(212,175,55,0.5));
}

@keyframes hat-float {
  0%, 100% { transform: translateY(0) rotate(-4deg); }
  50%       { transform: translateY(-12px) rotate(4deg); }
}

.hat-sparkles {
  position: absolute;
  inset: -15px;
  pointer-events: none;
}
.hat-sparkles span {
  position: absolute;
  color: var(--gold);
  font-size: 0.85rem;
  animation: sparkle-twinkle 2.5s ease-in-out infinite;
}
.hs1 { top: 5%;  left: 50%;   animation-delay: 0s; }
.hs2 { top: 50%; right: 0;    animation-delay: 0.5s; }
.hs3 { bottom: 0; left: 50%;  animation-delay: 1s; }
.hs4 { top: 50%; left: 0;     animation-delay: 1.5s; }
.hs5 { top: 15%; right: 15%;  animation-delay: 2s; }

@keyframes sparkle-twinkle {
  0%, 100% { opacity: 0.2; transform: scale(0.7) rotate(0deg); }
  50%       { opacity: 1;   transform: scale(1.3) rotate(20deg); }
}

/* Spell cast visual (patronus) */
.spell-cast-visual {
  position: relative;
  width: 110px;
  height: 110px;
  margin: 0 auto 1.5rem;
}

.spell-orb {
  font-size: 4.5rem;
  text-align: center;
  line-height: 110px;
  display: block;
  animation: orb-pulse 2.5s ease-in-out infinite;
  filter: drop-shadow(0 0 25px rgba(150,200,255,0.7));
}

@keyframes orb-pulse {
  0%, 100% { transform: scale(1) rotate(-5deg);   filter: drop-shadow(0 0 15px rgba(150,200,255,0.5)); }
  50%       { transform: scale(1.2) rotate(5deg);  filter: drop-shadow(0 0 40px rgba(150,200,255,0.9)); }
}

/* Wand shop visual (ollivanders) */
.shop-visual { text-align: center; margin-bottom: 1.5rem; }
.wand-boxes {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.wand-box {
  font-size: 2rem;
  padding: 0.6rem;
  background: rgba(212,175,55,0.06);
  border: 1px solid rgba(212,175,55,0.18);
  border-radius: 8px;
  animation: hat-float 3s ease-in-out infinite;
  filter: drop-shadow(0 2px 8px rgba(212,175,55,0.2));
}
.wand-box:nth-child(2) { animation-delay: 0.5s; }
.wand-box:nth-child(3) { animation-delay: 1s; }
.wand-box:nth-child(4) { animation-delay: 1.5s; }
.wand-box:nth-child(5) { animation-delay: 2s; }
.wand-box:nth-child(6) { animation-delay: 2.5s; }

/* Intro titles & text */
.section-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.2rem, 3vw, 1.6rem);
  color: var(--gold);
  text-align: center;
  margin-bottom: 1rem;
  text-shadow: 0 0 30px rgba(212,175,55,0.3);
  position: relative;
}
.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.5), transparent);
  margin: 0.75rem auto 0;
}

.intro-text {
  color: rgba(245,225,175,0.7);
  font-family: 'Crimson Text', serif;
  font-size: 1.05rem;
  line-height: 1.8;
  text-align: center;
  max-width: 540px;
  margin: 0 auto 1.5rem;
}

.houses-preview-mini {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 1.5rem 0 2rem;
}
.house-mini {
  font-size: 2.5rem;
  display: inline-block;
  cursor: default;
  transition: transform 0.3s, filter 0.3s;
  filter: drop-shadow(0 0 8px rgba(212,175,55,0.2));
}
.house-mini:hover {
  transform: scale(1.25) translateY(-6px);
  filter: drop-shadow(0 0 20px rgba(212,175,55,0.5));
}

.patronus-examples {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.2rem auto 2rem;
}
.patronus-sample {
  font-size: 2.2rem;
  display: inline-block;
  animation: float-patronus 3.5s ease-in-out infinite;
  filter: drop-shadow(0 2px 10px rgba(150,200,255,0.3));
}
.patronus-sample:nth-child(2) { animation-delay: 0.4s; }
.patronus-sample:nth-child(3) { animation-delay: 0.8s; }
.patronus-sample:nth-child(4) { animation-delay: 1.2s; }
.patronus-sample:nth-child(5) { animation-delay: 1.6s; }
.patronus-sample:nth-child(6) { animation-delay: 2.0s; }
.patronus-sample:nth-child(7) { animation-delay: 2.4s; }
.patronus-sample:nth-child(8) { animation-delay: 2.8s; }

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

.wand-components-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem auto 2rem;
  flex-wrap: wrap;
}
.component-pill {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1.1rem;
  background: rgba(212,175,55,0.08);
  border: 1px solid rgba(212,175,55,0.25);
  border-radius: 20px;
  color: rgba(212,175,55,0.9);
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
}
.comp-icon { font-size: 1rem; }
.comp-plus { color: rgba(212,175,55,0.35); font-size: 1.2rem; }

/* ── MAGIC BUTTONS ─────────────────────────────────────────────────────────── */
.magic-btn {
  background: linear-gradient(135deg, #740001, #9a0002, #5a0000);
  border: 1px solid rgba(212,175,55,0.4);
  color: #ffd700;
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  padding: 0.85rem 2rem;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(116,0,1,0.45), inset 0 1px 0 rgba(255,255,255,0.08);
  text-transform: uppercase;
}

.magic-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.06), transparent);
  transition: left 0.5s;
}
.magic-btn:hover::after { left: 100%; }

.magic-btn:hover {
  background: linear-gradient(135deg, #9a0002, #b00003, #740001);
  box-shadow: 0 6px 35px rgba(116,0,1,0.65), 0 0 20px rgba(212,175,55,0.15);
  transform: translateY(-2px);
}

.magic-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.large-btn {
  font-size: 0.95rem;
  padding: 1rem 2.8rem;
  display: block;
  margin: 0 auto;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  border: 1px solid rgba(212,175,55,0.35);
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  padding: 0.85rem 1.8rem;
  border-radius: 30px;
  text-decoration: none;
  transition: all 0.25s;
  cursor: pointer;
  text-transform: uppercase;
}
.btn-gold:hover {
  border-color: rgba(212,175,55,0.65);
  background: rgba(212,175,55,0.07);
  color: #ffd700;
  transform: translateY(-2px);
}

/* ── PROGRESS BAR ──────────────────────────────────────────────────────────── */
.progress-bar-container {
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  height: 4px;
  margin-bottom: 2rem;
  overflow: hidden;
  position: relative;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #740001, var(--gold), #ffd700);
  border-radius: 10px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(212,175,55,0.4);
}

/* ── QUESTION COUNTER & TEXT ───────────────────────────────────────────────── */
.question-num {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  color: rgba(212,175,55,0.45);
  text-align: center;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.quiz-question-text,
#page-quiz-question,
#patronus-question-text,
#wand-question-text {
  font-family: 'Cinzel', serif !important;
  font-size: clamp(1rem, 2.5vw, 1.3rem) !important;
  color: rgba(255,240,200,0.95) !important;
  text-align: center !important;
  margin: 0.5rem 0 2rem !important;
  line-height: 1.6 !important;
  text-shadow: 0 0 20px rgba(212,175,55,0.2) !important;
  letter-spacing: 0.02em !important;
}

/* ── ANSWER BUTTONS — THE STAR OF THE SHOW ─────────────────────────────────── */
.answers-grid,
#page-quiz-answers,
#patronus-answers,
#wand-answers {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 0.75rem !important;
  margin: 0 0 2rem !important;
}

/* Base answer button */
.parchment-wide .answer-btn,
.standalone-quiz-section .answer-btn {
  position: relative !important;
  background: rgba(255,255,255,0.03) !important;
  border: 1px solid rgba(212,175,55,0.16) !important;
  border-radius: 14px !important;
  padding: 1rem 1.2rem 1rem 3.2rem !important;
  cursor: pointer !important;
  font-family: 'Crimson Text', serif !important;
  font-size: 1.05rem !important;
  color: rgba(245,225,175,0.78) !important;
  text-align: left !important;
  line-height: 1.5 !important;
  min-height: 62px !important;
  display: flex !important;
  align-items: center !important;
  overflow: hidden !important;
  transition: border-color 0.2s, background 0.2s, transform 0.2s, color 0.2s, box-shadow 0.2s !important;
}

/* Radio dot */
.parchment-wide .answer-btn::before,
.standalone-quiz-section .answer-btn::before {
  content: '' !important;
  position: absolute !important;
  left: 1.1rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 15px !important;
  height: 15px !important;
  border-radius: 50% !important;
  border: 2px solid rgba(212,175,55,0.3) !important;
  background: transparent !important;
  transition: all 0.2s !important;
  flex-shrink: 0 !important;
  z-index: 1 !important;
}

/* Shimmer overlay */
.parchment-wide .answer-btn::after,
.standalone-quiz-section .answer-btn::after {
  content: '' !important;
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(135deg, rgba(212,175,55,0.04) 0%, transparent 70%) !important;
  border-radius: 14px !important;
  opacity: 0 !important;
  transition: opacity 0.2s !important;
  pointer-events: none !important;
}

/* Hover state */
.parchment-wide .answer-btn:hover,
.standalone-quiz-section .answer-btn:hover {
  border-color: rgba(212,175,55,0.45) !important;
  background: rgba(212,175,55,0.07) !important;
  color: rgba(255,240,200,0.95) !important;
  transform: translateX(5px) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3), -4px 0 0 rgba(212,175,55,0.2) !important;
}
.parchment-wide .answer-btn:hover::after,
.standalone-quiz-section .answer-btn:hover::after { opacity: 1 !important; }
.parchment-wide .answer-btn:hover::before,
.standalone-quiz-section .answer-btn:hover::before { border-color: rgba(212,175,55,0.6) !important; }

/* Selected state */
.parchment-wide .answer-btn.selected,
.standalone-quiz-section .answer-btn.selected {
  border-color: rgba(212,175,55,0.7) !important;
  background: rgba(212,175,55,0.1) !important;
  color: #fde99a !important;
  transform: translateX(5px) !important;
  box-shadow:
    0 0 0 1px rgba(212,175,55,0.18),
    0 6px 25px rgba(212,175,55,0.12),
    -4px 0 0 rgba(212,175,55,0.4) !important;
}
.parchment-wide .answer-btn.selected::before,
.standalone-quiz-section .answer-btn.selected::before {
  background: radial-gradient(circle, #ffd700, #d4af37) !important;
  border-color: #d4af37 !important;
  box-shadow: 0 0 10px rgba(212,175,55,0.6) !important;
}
.parchment-wide .answer-btn.selected::after,
.standalone-quiz-section .answer-btn.selected::after { opacity: 1 !important; }

/* ── QUIZ NAV ───────────────────────────────────────────────────────────────── */
.quiz-nav {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

/* ── RESULT SCREENS ─────────────────────────────────────────────────────────── */
#quiz-result-screen,
#patronus-result,
#wand-result {
  text-align: center;
  padding: 1.5rem 1rem 2rem;
}

.hat-result-burst {
  font-size: 5rem;
  display: block;
  text-align: center;
  margin-bottom: 0.5rem;
  animation: hat-float 4s ease-in-out infinite;
  filter: drop-shadow(0 0 30px rgba(212,175,55,0.5));
}

@keyframes burst-in {
  0%   { transform: scale(0) rotate(-30deg); opacity: 0; }
  60%  { transform: scale(1.4) rotate(5deg);  opacity: 1; }
  100% { transform: scale(1) rotate(0);       opacity: 1; }
}
.hat-result-burst.burst-active { animation: burst-in 0.7s cubic-bezier(0.17, 0.89, 0.32, 1.5) forwards; }

.result-incantation {
  font-family: 'Cinzel', serif;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: rgba(212,175,55,0.55);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.result-house-name,
.result-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.6rem, 5vw, 2.4rem);
  color: var(--gold);
  text-shadow: 0 0 40px rgba(212,175,55,0.4);
  margin-bottom: 1rem;
}

.result-description {
  font-family: 'Crimson Text', serif;
  font-size: 1.1rem;
  color: rgba(245,225,175,0.75);
  line-height: 1.75;
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

.result-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.retry-btn {
  background: rgba(212,175,55,0.08);
  color: var(--gold);
  border: 1px solid rgba(212,175,55,0.3);
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  padding: 0.75rem 1.75rem;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s;
  text-transform: uppercase;
}
.retry-btn:hover {
  background: rgba(212,175,55,0.15);
  border-color: rgba(212,175,55,0.5);
  transform: translateY(-2px);
}

/* Patronus result specific */
.patronus-result-animal {
  font-size: 5rem;
  display: block;
  text-align: center;
  margin: 0.5rem 0;
  animation: hat-float 3s ease-in-out infinite;
  filter: drop-shadow(0 0 25px rgba(150,200,255,0.5));
}

.result-traits-box {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin: 1.25rem auto;
  max-width: 420px;
}
.result-traits-box span {
  padding: 0.35rem 0.9rem;
  background: rgba(150,200,255,0.08);
  border: 1px solid rgba(150,200,255,0.2);
  border-radius: 20px;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  color: rgba(180,220,255,0.75);
  letter-spacing: 0.06em;
}

/* Wand result specific */
.wand-reveal-animation {
  text-align: center;
  margin-bottom: 1rem;
}
.wand-glow-icon {
  font-size: 4.5rem;
  display: inline-block;
  filter: drop-shadow(0 0 20px rgba(212,175,55,0.4));
  transition: all 0.6s;
}
.wand-glow-icon.glowing {
  animation: wand-glow-pulse 1.5s ease-in-out infinite;
}
@keyframes wand-glow-pulse {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(212,175,55,0.4)); transform: scale(1) rotate(-5deg); }
  50%       { filter: drop-shadow(0 0 60px rgba(212,175,55,0.9)); transform: scale(1.15) rotate(5deg); }
}

.wand-result-card {
  background: rgba(212,175,55,0.05);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 16px;
  padding: 1.5rem;
  margin: 1.5rem auto;
  max-width: 420px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.wand-stat {
  text-align: center;
}
.wand-stat-label {
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: rgba(212,175,55,0.45);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.3rem;
}
.wand-stat-value {
  font-family: 'Crimson Text', serif;
  font-size: 1.05rem;
  color: rgba(245,225,175,0.9);
}

/* ── CHAT (Sorting Hat) ─────────────────────────────────────────────────────── */
.chat-parchment,
.sorting-chat {
  background: transparent;
  border-radius: 16px;
  overflow: hidden;
}

.chat-messages {
  min-height: 320px;
  max-height: 420px;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(212,175,55,0.2) transparent;
}

.chat-message {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  animation: chat-slide-in 0.3s ease;
}
@keyframes chat-slide-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.chat-message.user-msg { flex-direction: row-reverse; }

.chat-avatar {
  font-size: 1.6rem;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.chat-bubble {
  background: rgba(212,175,55,0.07);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 14px 14px 14px 2px;
  padding: 0.75rem 1.1rem;
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  color: rgba(245,225,175,0.85);
  line-height: 1.6;
  max-width: 75%;
}

.user-bubble {
  background: rgba(116,0,1,0.2);
  border-color: rgba(116,0,1,0.3);
  border-radius: 14px 14px 2px 14px;
  color: rgba(245,225,175,0.9);
}

.chat-input-area {
  display: flex;
  gap: 0.75rem;
  padding: 1rem 1.5rem 1.2rem;
  border-top: 1px solid rgba(212,175,55,0.1);
  background: rgba(0,0,0,0.2);
}

.chat-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(212,175,55,0.2);
  border-radius: 12px;
  padding: 0.7rem 1rem;
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  color: rgba(245,225,175,0.9);
  outline: none;
  transition: border-color 0.2s;
}
.chat-input:focus { border-color: rgba(212,175,55,0.5); }
.chat-input::placeholder { color: rgba(245,225,175,0.3); font-style: italic; }

.chat-send-btn {
  background: linear-gradient(135deg, #740001, #8b0000);
  color: #ffd700;
  border: none;
  border-radius: 12px;
  padding: 0.7rem 1.3rem;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  text-transform: uppercase;
}
.chat-send-btn:hover {
  background: linear-gradient(135deg, #8b0000, #a00000);
  box-shadow: 0 4px 15px rgba(116,0,1,0.4);
  transform: translateY(-1px);
}

.typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  padding: 0.2rem 0;
}
.typing-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(212,175,55,0.4);
  animation: typing-bounce 1.4s ease-in-out infinite;
  display: inline-block;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
  0%, 80%, 100% { transform: scale(0.8); opacity: 0.4; }
  40%            { transform: scale(1.2); opacity: 1; }
}

/* ── INFO SECTIONS (below quiz) ─────────────────────────────────────────────── */
.patronus-info-section,
.wand-info-section {
  margin-top: 4rem;
}

.patronus-info-cards,
.wand-components-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.patronus-info-card,
.wand-component-card {
  background: rgba(212,175,55,0.04);
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 14px;
  padding: 1.5rem 1.25rem;
  text-align: center;
  transition: border-color 0.3s, transform 0.3s;
}
.patronus-info-card:hover,
.wand-component-card:hover {
  border-color: rgba(212,175,55,0.3);
  transform: translateY(-3px);
}

.info-card-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 0 10px rgba(212,175,55,0.2));
}
.info-card-title {
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  color: rgba(212,175,55,0.85);
  margin-bottom: 0.6rem;
  display: block;
}
.info-card-text {
  font-family: 'Crimson Text', serif;
  font-size: 0.95rem;
  color: rgba(245,225,175,0.6);
  line-height: 1.65;
}

/* ── MOBILE RESPONSIVE ──────────────────────────────────────────────────────── */
@media (max-width: 680px) {
  .parchment-wide { padding: 2rem 1.25rem; border-radius: 18px; }

  .answers-grid,
  #page-quiz-answers,
  #patronus-answers,
  #wand-answers { grid-template-columns: 1fr !important; }

  .parchment-wide .answer-btn,
  .standalone-quiz-section .answer-btn {
    transform: none !important;
    min-height: 54px !important;
  }
  .parchment-wide .answer-btn:hover,
  .standalone-quiz-section .answer-btn:hover,
  .parchment-wide .answer-btn.selected,
  .standalone-quiz-section .answer-btn.selected {
    transform: none !important;
  }

  .sorting-tab span:last-child { display: none; }
  .sorting-tab { font-size: 0.72rem; }

  .patronus-info-cards,
  .wand-components-grid { grid-template-columns: 1fr; }

  .wand-result-card { grid-template-columns: 1fr 1fr; }

  .result-actions { flex-direction: column; align-items: center; }
}

/* --- V4: SPELLS SECTION --- */
#spells {
  padding: 5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.spells-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.4rem;
  margin-top: 2.5rem;
}

.spell-card {
  background: linear-gradient(160deg, rgba(8,8,22,0.95) 0%, rgba(18,14,36,0.92) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  position: relative;
  overflow: hidden;
}

.spell-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.spell-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0,0,0,0.6), 0 0 30px rgba(212,175,55,0.08);
  border-color: rgba(212,175,55,0.2);
}

.spell-card:hover::before { opacity: 1; }

.spell-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.75rem;
  filter: drop-shadow(0 0 12px rgba(212,175,55,0.3));
}

.spell-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.05rem;
  color: var(--gold);
  margin-bottom: 0.3rem;
}

.spell-type {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  color: rgba(212,175,55,0.5);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.spell-card p {
  font-size: 0.9rem;
  color: rgba(245,230,200,0.65);
  line-height: 1.6;
}

/* --- V4: CREATURES SECTION --- */
#creatures {
  padding: 5rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.creatures-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  margin-top: 2.5rem;
}

.creature-card {
  background: linear-gradient(160deg, rgba(8,8,22,0.95) 0%, rgba(18,14,36,0.92) 100%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 1.5rem 1.2rem;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
  position: relative;
}

.creature-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 40px rgba(0,0,0,0.6);
}

.creature-icon {
  font-size: 2.8rem;
  display: block;
  margin-bottom: 0.7rem;
  animation: float-icon 4s ease-in-out infinite;
}

.creature-card:nth-child(even) .creature-icon {
  animation-delay: -2s;
}

.creature-card h4 {
  font-family: 'Cinzel', serif;
  font-size: 0.88rem;
  color: var(--parchment);
  margin-bottom: 0.5rem;
}

.creature-card p {
  font-size: 0.85rem;
  color: rgba(245,230,200,0.6);
  line-height: 1.5;
  margin-bottom: 0.75rem;
}

.danger-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.68rem;
  font-family: 'Cinzel', serif;
  letter-spacing: 0.06em;
}

.danger-1 { background: rgba(74,222,128,0.15); color: #4ade80; border: 1px solid rgba(74,222,128,0.3); }
.danger-2 { background: rgba(251,191,36,0.15); color: #fbbf24; border: 1px solid rgba(251,191,36,0.3); }
.danger-3 { background: rgba(239,68,68,0.15); color: #ef4444; border: 1px solid rgba(239,68,68,0.3); }

/* --- V4: PROPHECIES --- */
#prophecies {
  padding: 5rem 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.prophecy-carousel {
  margin-top: 2.5rem;
  position: relative;
}

.prophecy-card {
  display: none;
  background: linear-gradient(160deg, rgba(245,230,200,0.97), rgba(215,190,150,0.97));
  border-radius: 20px;
  padding: 3rem 3.5rem;
  text-align: center;
  position: relative;
  box-shadow: 0 0 0 1px rgba(212,175,55,0.3), 0 20px 60px rgba(0,0,0,0.5);
}

.prophecy-card.active { display: block; }

.prophecy-card::before {
  content: '"';
  position: absolute;
  top: 1rem; left: 1.5rem;
  font-family: 'Cinzel Decorative', serif;
  font-size: 5rem;
  color: rgba(139,105,20,0.15);
  line-height: 1;
}

.prophecy-text {
  font-family: 'Crimson Text', serif;
  font-size: 1.2rem;
  font-style: italic;
  color: #2a1a0a;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.prophecy-author {
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  color: #5a3a1a;
  letter-spacing: 0.08em;
}

.prophecy-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.prophecy-btn {
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.3);
  color: var(--gold);
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
  transition: all 0.2s;
}

.prophecy-btn:hover {
  background: rgba(212,175,55,0.2);
  box-shadow: 0 0 15px rgba(212,175,55,0.2);
}

.prophecy-dots { display: flex; gap: 0.4rem; align-items: center; }

.prophecy-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(212,175,55,0.25);
  cursor: pointer;
  transition: all 0.2s;
}
.prophecy-dot.active { background: var(--gold); width: 18px; border-radius: 3px; }

/* --- V4: QUIZ SECTION (HOME) --- */
#quiz {
  padding: 5rem 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}

.quiz-container { width: 100%; }

.quiz-parchment {
  background: linear-gradient(160deg, rgba(245,230,200,0.97), rgba(215,190,150,0.97));
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow: 0 0 0 1px rgba(212,175,55,0.35), 0 30px 80px rgba(0,0,0,0.6);
  color: #2a1a0a;
}

.progress-bar-container {
  height: 6px;
  background: rgba(139,105,20,0.2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #740001, var(--gold));
  border-radius: 3px;
  transition: width 0.5s ease;
}

.question-num {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  color: rgba(90,58,26,0.7);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

#question-text, #quiz-title {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: #2a1a0a;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.quiz-nav {
  margin-top: 1.25rem;
  text-align: right;
}

/* --- V4: SCROLL TO TOP --- */
#scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, rgba(212,175,55,0.2), rgba(212,175,55,0.1));
  border: 1px solid rgba(212,175,55,0.35);
  color: var(--gold);
  border-radius: 50%;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.3s;
  z-index: 500;
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
}
#scroll-top:hover {
  background: rgba(212,175,55,0.25);
  box-shadow: 0 0 20px rgba(212,175,55,0.3);
  transform: translateY(-3px);
}

/* --- V4: FOOTER --- */
#site-footer {
  background: linear-gradient(180deg, rgba(2,4,8,0) 0%, rgba(2,4,8,0.98) 100%);
  border-top: 1px solid rgba(212,175,55,0.15);
  padding: 3.5rem 2rem 2rem;
  text-align: center;
}

.footer-logo {
  font-family: 'Cinzel Decorative', serif;
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 1rem;
}

.footer-tagline {
  font-style: italic;
  color: rgba(245,230,200,0.4);
  font-size: 0.9rem;
  max-width: 500px;
  margin: 0 auto 1.5rem;
}

.footer-houses {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  filter: drop-shadow(0 0 10px rgba(212,175,55,0.2));
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem 1rem;
  margin-bottom: 2rem;
}

.footer-links a {
  color: rgba(212,175,55,0.5);
  text-decoration: none;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  transition: color 0.2s;
}
.footer-links a:hover { color: var(--gold); }

.footer-copy {
  font-size: 0.78rem;
  color: rgba(245,230,200,0.25);
  line-height: 1.6;
  max-width: 600px;
  margin: 0 auto;
}

/* --- V4: SINGLE POST --- */
.single-post-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 7rem 1.5rem 4rem;
}

.single-post-header {
  text-align: center;
  padding: 2rem 0 2.5rem;
}

.single-post-meta-top {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: rgba(212,175,55,0.6);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.single-post-category {
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.single-post-sep {
  color: rgba(212,175,55,0.3);
}

.single-post-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  color: var(--gold);
  text-shadow: 0 0 40px rgba(212,175,55,0.3);
  line-height: 1.3;
}

.single-post-featured-img {
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 2rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.7);
}

.single-post-featured-img img {
  width: 100%;
  height: auto;
  display: block;
}

.single-post-parchment {
  background: linear-gradient(160deg, rgba(245,230,200,0.97), rgba(215,190,150,0.97));
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 0 0 1px rgba(212,175,55,0.35), 0 20px 60px rgba(0,0,0,0.5);
  color: #2a1a0a;
  margin-bottom: 2rem;
}

.single-post-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.single-post-content h2,
.single-post-content h3 {
  font-family: 'Cinzel', serif;
  color: #2a1a0a;
  margin: 1.5rem 0 0.75rem;
}

.single-post-content p { margin-bottom: 1rem; }

.single-post-content a {
  color: #740001;
  text-decoration: underline;
}

.single-post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(139,105,20,0.2);
}

.post-tag {
  background: rgba(139,105,20,0.1);
  border: 1px solid rgba(139,105,20,0.3);
  color: #5a3a1a;
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.2s;
}
.post-tag:hover {
  background: rgba(139,105,20,0.2);
  border-color: rgba(139,105,20,0.5);
}

.single-post-nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 1rem;
  align-items: center;
}

.post-nav-link {
  text-decoration: none;
  padding: 1rem 1.2rem;
  border: 1px solid rgba(212,175,55,0.15);
  border-radius: 12px;
  background: rgba(8,8,22,0.8);
  transition: all 0.2s;
}

.post-nav-link:hover {
  border-color: rgba(212,175,55,0.3);
  background: rgba(8,8,22,0.95);
}

.post-nav-label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  color: rgba(212,175,55,0.5);
  margin-bottom: 0.3rem;
}

.post-nav-title {
  display: block;
  font-size: 0.88rem;
  color: var(--parchment);
  font-family: 'Cinzel', serif;
  line-height: 1.3;
}

.post-nav-next { text-align: right; }

.post-nav-home {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  color: rgba(212,175,55,0.5);
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  transition: color 0.2s;
}
.post-nav-home:hover { color: var(--gold); }

/* --- V4: MISC IMPROVEMENTS --- */
/* Smooth section transitions */
section {
  position: relative;
  z-index: 1;
}

/* Lanterns */
.lanterns-container {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

/* Trait badges */
.trait-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-family: 'Cinzel', serif;
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  background: rgba(212,175,55,0.1);
  border: 1px solid rgba(212,175,55,0.2);
  color: rgba(212,175,55,0.8);
  margin: 2px;
}

.house-traits { margin: 0.75rem 0; }

.house-meta {
  font-size: 0.8rem;
  color: rgba(245,230,200,0.45);
  margin: 0.5rem 0;
}

.house-meta span {
  color: rgba(245,230,200,0.7);
}

.house-motto {
  font-style: italic;
  color: rgba(245,230,200,0.5);
  font-size: 0.88rem;
  margin-top: 0.5rem;
}

/* Intro text on quiz pages */
.intro-text {
  font-size: 1rem;
  color: #3d2b1a;
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

/* Result actions */
.result-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* Progress bar on sorting hat page */
#page-quiz-progress {
  /* same as .progress-bar-fill */
}

/* Typing indicator */
.typing-dots {
  display: flex;
  gap: 4px;
  padding: 0.75rem 1rem;
}
.typing-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(139,105,20,0.4);
  animation: typing-bounce 1.4s ease-in-out infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-8px); opacity: 1; }
}


/* ==========================================
   V4 FIX — SORTING HAT PAGE STYLES
   (parchment context = dark text on light bg)
========================================== */

/* The parchment-wide wraps the entire quiz/chat */
.parchment-wide .sorting-tabs {
  background: linear-gradient(135deg, rgba(10,8,30,0.85), rgba(20,10,40,0.9));
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 0 30px rgba(212,175,55,0.08), inset 0 1px 0 rgba(255,255,255,0.05);
}

.parchment-wide .sorting-tab {
  color: rgba(212,175,55,0.7);
  font-size: 0.85rem;
  text-shadow: 0 0 8px rgba(212,175,55,0.2);
  letter-spacing: 0.06em;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.parchment-wide .sorting-tab:hover {
  color: #ffd700;
  background: rgba(212,175,55,0.08);
  text-shadow: 0 0 12px rgba(212,175,55,0.5);
}

.parchment-wide .sorting-tab.active {
  background: linear-gradient(135deg, rgba(116,0,1,0.6), rgba(180,0,30,0.4));
  color: #fff8e1;
  border-color: rgba(212,175,55,0.4);
  box-shadow: 0 0 20px rgba(180,0,30,0.3), 0 0 8px rgba(212,175,55,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
  text-shadow: 0 0 10px rgba(255,200,50,0.6);
}

/* Quiz screens */
.sorting-tab-content { display: none; }
.sorting-tab-content.active { display: block; }

/* Intro screen */
#quiz-intro-screen {
  text-align: center;
  padding: 2rem 1rem;
}

#quiz-intro-screen .section-title {
  color: #2a1a0a;
  text-shadow: none;
  font-size: 1.5rem;
}
#quiz-intro-screen .section-title::after {
  background: linear-gradient(90deg, transparent, rgba(139,105,20,0.5), transparent);
}

/* Question screen */
#quiz-questions-screen {
  padding: 1rem 0;
}

#page-quiz-counter {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  color: rgba(90,58,26,0.7);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: block;
}

#page-quiz-question {
  font-family: 'Cinzel', serif;
  font-size: 1.1rem;
  color: #2a1a0a;
  line-height: 1.5;
  margin: 0.75rem 0 1.25rem;
}

/* Answer buttons — on parchment (light bg) */
#page-quiz-answers .answer-btn,
.parchment-wide .answer-btn {
  background: rgba(255,255,255,0.55);
  border: 1.5px solid rgba(139,105,20,0.25);
  color: #3d2b1a;
  border-radius: 12px;
  padding: 0.85rem 1rem 0.85rem 1.2rem;
  cursor: pointer;
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  text-align: left;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
  width: 100%;
  display: block;
}

#page-quiz-answers .answer-btn::before,
.parchment-wide .answer-btn::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: rgba(116,0,1,0.12);
  transition: width 0.25s;
  border-radius: 12px 0 0 12px;
}

#page-quiz-answers .answer-btn:hover,
.parchment-wide .answer-btn:hover {
  border-color: rgba(139,105,20,0.5);
  background: rgba(255,255,255,0.8);
  transform: translateX(4px);
}

#page-quiz-answers .answer-btn:hover::before,
.parchment-wide .answer-btn:hover::before { width: 4px; }

#page-quiz-answers .answer-btn.selected,
.parchment-wide .answer-btn.selected {
  background: rgba(116,0,1,0.1);
  border-color: #740001;
  font-weight: 600;
}
#page-quiz-answers .answer-btn.selected::before,
.parchment-wide .answer-btn.selected::before { width: 4px; background: #740001; }

/* Answers grid on parchment */
.parchment-wide .answers-grid,
#page-quiz-answers {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}

@media (max-width: 580px) {
  .parchment-wide .answers-grid,
  #page-quiz-answers { grid-template-columns: 1fr; }
}

/* Next button on parchment */
.parchment-wide .magic-btn {
  background: linear-gradient(135deg, #740001, #8b0000);
  color: #ffd700;
  border: 1px solid rgba(212,175,55,0.4);
  font-family: 'Cinzel', serif;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  padding: 0.75rem 1.75rem;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(116,0,1,0.35);
}

.parchment-wide .magic-btn:hover {
  background: linear-gradient(135deg, #8b0000, #a00000);
  box-shadow: 0 6px 25px rgba(116,0,1,0.5);
  transform: translateY(-2px);
}

.parchment-wide .magic-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.parchment-wide .large-btn {
  padding: 1rem 2.5rem;
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

/* Progress bar on parchment */
.parchment-wide .progress-bar-container {
  background: rgba(139,105,20,0.18);
}

.parchment-wide .progress-bar-fill {
  background: linear-gradient(90deg, #740001, #d4a017);
}

/* Quiz nav */
.parchment-wide .quiz-nav {
  text-align: right;
  margin-top: 1rem;
}

/* Result screen */
#quiz-result-screen {
  text-align: center;
  padding: 2rem 1rem;
}

.hat-result-burst {
  font-size: 4rem;
  display: block;
  margin-bottom: 0.5rem;
  animation: hat-float 4s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(212,175,55,0.5));
}

.hat-result-burst.burst-active {
  animation: burst-scale 0.5s ease-out forwards;
}

@keyframes burst-scale {
  0% { transform: scale(1); }
  50% { transform: scale(1.6) rotate(-10deg); }
  100% { transform: scale(1); }
}

.result-incantation {
  font-family: 'Cinzel Decorative', serif;
  font-size: 0.9rem;
  color: rgba(90,58,26,0.7);
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  font-style: italic;
}

.parchment-wide .result-house-name {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  color: #2a1a0a;
  margin: 0.5rem 0 0.75rem;
}

.parchment-wide .result-description {
  font-size: 1rem;
  color: #3d2b1a;
  line-height: 1.7;
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

.parchment-wide .result-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.parchment-wide .retry-btn {
  background: #2a1a0a;
  color: var(--gold);
  border: 1px solid rgba(212,175,55,0.4);
  font-family: 'Cinzel', serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 0.7rem 1.75rem;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s;
}

.parchment-wide .btn-gold {
  font-size: 0.78rem;
  padding: 0.7rem 1.75rem;
}

/* =====================
   CHAT on sorting hat page (inside parchment)
===================== */
.sorting-chat {
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0;
  border: none;
}

.parchment-wide .chat-messages {
  padding: 1rem;
  max-height: 340px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: rgba(255,255,255,0.3);
  border-radius: 12px;
  border: 1px solid rgba(139,105,20,0.2);
  margin-bottom: 1rem;
}

/* Chat bubbles on parchment */
.parchment-wide .chat-bubble,
.sorting-chat .chat-bubble {
  background: rgba(255,255,255,0.7);
  padding: 0.7rem 1rem;
  border-radius: 4px 14px 14px 14px;
  font-size: 0.95rem;
  color: #2a1a0a;
  line-height: 1.6;
  max-width: 80%;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.parchment-wide .user-bubble,
.sorting-chat .user-bubble {
  background: rgba(116,0,1,0.1);
  border-radius: 14px 4px 14px 14px;
  margin-left: auto;
}

.parchment-wide .chat-message {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.parchment-wide .user-msg {
  flex-direction: row-reverse;
}

.chat-avatar {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Chat input on parchment */
.parchment-wide .chat-input-area {
  display: flex;
  gap: 0.6rem;
  padding: 0;
  background: transparent;
  border: none;
}

.parchment-wide .chat-input {
  flex: 1;
  background: rgba(255,255,255,0.65);
  border: 1.5px solid rgba(139,105,20,0.3);
  border-radius: 30px;
  padding: 0.65rem 1.2rem;
  font-family: 'Crimson Text', serif;
  font-size: 0.95rem;
  color: #2a1a0a;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.parchment-wide .chat-input:focus {
  border-color: rgba(116,0,1,0.5);
  background: rgba(255,255,255,0.85);
}

.parchment-wide .chat-input::placeholder {
  color: rgba(60,35,10,0.4);
  font-style: italic;
}

.parchment-wide .chat-send-btn {
  background: linear-gradient(135deg, #740001, #8b0000);
  color: #ffd700;
  border: none;
  border-radius: 30px;
  padding: 0.65rem 1.3rem;
  font-family: 'Cinzel', serif;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.parchment-wide .chat-send-btn:hover {
  background: linear-gradient(135deg, #8b0000, #a00000);
  box-shadow: 0 4px 15px rgba(116,0,1,0.4);
}

/* Typing dots on parchment */
.parchment-wide .typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.parchment-wide .typing-dots span {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(90,58,26,0.4);
  animation: typing-bounce 1.4s ease-in-out infinite;
  display: inline-block;
}

/* =====================
   HOME: hide quiz section
   (quiz is now on dedicated page)
===================== */
#quiz {
  /* Keep it for anchor fallback but visually clean */
  display: none;
}


/* =====================================================================
   HOME: QUIZ TEASER CARD (replaces embedded quiz)
===================================================================== */
#quiz {
  padding: 5rem 2rem 6rem;
  position: relative;
  z-index: 1;
  display: block !important;
}

.quiz-teaser-card {
  position: relative;
  max-width: 680px;
  margin: 0 auto;
  background: linear-gradient(160deg, rgba(20,10,5,0.97) 0%, rgba(30,15,5,0.95) 100%);
  border: 1px solid rgba(212,175,55,0.3);
  border-radius: 20px;
  padding: 3.5rem 3rem;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(212,175,55,0.08),
    0 20px 60px rgba(0,0,0,0.7),
    0 0 80px rgba(116,0,1,0.12),
    inset 0 1px 0 rgba(212,175,55,0.15);
  overflow: hidden;
}

.quiz-teaser-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% -10%, rgba(212,175,55,0.07) 0%, transparent 60%);
  pointer-events: none;
}

.quiz-teaser-hat {
  font-size: 5rem;
  display: block;
  margin: 0 auto 0.5rem;
  animation: teaser-hat-float 4s ease-in-out infinite;
  filter: drop-shadow(0 0 20px rgba(212,175,55,0.4));
  position: relative;
  z-index: 1;
}

@keyframes teaser-hat-float {
  0%, 100% { transform: translateY(0) rotate(-3deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

.quiz-teaser-sparkles {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
  color: rgba(212,175,55,0.5);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  position: relative;
  z-index: 1;
}

.quiz-teaser-sparkles span {
  animation: teaser-sparkle 2s ease-in-out infinite;
  display: inline-block;
}
.quiz-teaser-sparkles span:nth-child(1) { animation-delay: 0s; }
.quiz-teaser-sparkles span:nth-child(2) { animation-delay: 0.4s; }
.quiz-teaser-sparkles span:nth-child(3) { animation-delay: 0.8s; }
.quiz-teaser-sparkles span:nth-child(4) { animation-delay: 1.2s; }
.quiz-teaser-sparkles span:nth-child(5) { animation-delay: 1.6s; }
@keyframes teaser-sparkle {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
}

.quiz-teaser-title {
  font-family: 'Cinzel Decorative', serif;
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  color: var(--gold);
  margin-bottom: 1rem;
  text-shadow: 0 0 30px rgba(212,175,55,0.3);
  line-height: 1.3;
  position: relative;
  z-index: 1;
}

.quiz-teaser-desc {
  color: rgba(245,230,180,0.65);
  font-family: 'Crimson Text', serif;
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 500px;
  margin: 0 auto 2rem;
  position: relative;
  z-index: 1;
}

.quiz-teaser-houses {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 2.5rem;
  position: relative;
  z-index: 1;
}

.quiz-teaser-house {
  font-size: 2.2rem;
  display: inline-block;
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: default;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}
.quiz-teaser-house:hover {
  transform: scale(1.25) translateY(-4px);
  filter: drop-shadow(0 4px 16px rgba(212,175,55,0.5));
}

.quiz-teaser-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

a.quiz-teaser-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-size: 0.92rem;
  padding: 0.9rem 2.2rem;
}

.quiz-teaser-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  background: transparent;
  border: 1px solid rgba(212,175,55,0.35);
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  padding: 0.9rem 2rem;
  border-radius: 30px;
  transition: all 0.25s ease;
}
.quiz-teaser-btn-secondary:hover {
  border-color: rgba(212,175,55,0.7);
  background: rgba(212,175,55,0.07);
  color: #ffd700;
  transform: translateY(-2px);
}

/* =====================================================================
   REDESIGNED QUIZ ANSWER BUTTONS — all quiz pages
===================================================================== */
.answers-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  margin: 1.5rem 0;
}

/* Dark quiz pages (sorting hat, patronus, ollivanders) */
.standalone-quiz-section .answer-btn,
#page-quiz-answers .answer-btn,
#patronus-answers .answer-btn,
#ollivanders-answers .answer-btn,
.parchment-wide .answer-btn {
  position: relative;
  background: rgba(212,175,55,0.04) !important;
  border: 1px solid rgba(212,175,55,0.22) !important;
  border-radius: 12px !important;
  padding: 0.9rem 1.2rem 0.9rem 3rem !important;
  cursor: pointer;
  font-family: 'Crimson Text', serif !important;
  font-size: 1rem !important;
  color: rgba(245,225,175,0.82) !important;
  text-align: left !important;
  transition: all 0.2s ease !important;
  line-height: 1.45 !important;
  overflow: hidden;
  min-height: 56px;
  display: flex !important;
  align-items: center !important;
  transform: none !important;
}

.standalone-quiz-section .answer-btn::before,
#page-quiz-answers .answer-btn::before,
.parchment-wide .answer-btn::before {
  content: '' !important;
  position: absolute !important;
  left: 1rem !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  width: 14px !important;
  height: 14px !important;
  border-radius: 50% !important;
  border: 2px solid rgba(212,175,55,0.35) !important;
  background: transparent !important;
  transition: all 0.2s ease !important;
}

.standalone-quiz-section .answer-btn:hover,
#page-quiz-answers .answer-btn:hover,
.parchment-wide .answer-btn:hover {
  border-color: rgba(212,175,55,0.55) !important;
  background: rgba(212,175,55,0.09) !important;
  color: #fde99a !important;
  transform: translateX(5px) !important;
  box-shadow: 0 4px 18px rgba(0,0,0,0.3) !important;
}

.standalone-quiz-section .answer-btn:hover::before,
#page-quiz-answers .answer-btn:hover::before,
.parchment-wide .answer-btn:hover::before {
  border-color: rgba(212,175,55,0.65) !important;
}

.standalone-quiz-section .answer-btn.selected,
#page-quiz-answers .answer-btn.selected,
.parchment-wide .answer-btn.selected {
  border-color: #d4af37 !important;
  background: rgba(212,175,55,0.13) !important;
  color: #fde99a !important;
  box-shadow: 0 0 0 1px rgba(212,175,55,0.2), 0 4px 20px rgba(212,175,55,0.12) !important;
  transform: translateX(5px) !important;
}

.standalone-quiz-section .answer-btn.selected::before,
#page-quiz-answers .answer-btn.selected::before,
.parchment-wide .answer-btn.selected::before {
  background: #d4af37 !important;
  border-color: #d4af37 !important;
  box-shadow: 0 0 8px rgba(212,175,55,0.5) !important;
}

@media (max-width: 640px) {
  .answers-grid { grid-template-columns: 1fr !important; }
  .quiz-teaser-card { padding: 2.5rem 1.5rem; }
  .quiz-teaser-actions { flex-direction: column; align-items: center; }
  .standalone-quiz-section .answer-btn,
  #page-quiz-answers .answer-btn,
  .parchment-wide .answer-btn { transform: none !important; }
  .standalone-quiz-section .answer-btn:hover,
  #page-quiz-answers .answer-btn:hover,
  .parchment-wide .answer-btn:hover,
  .standalone-quiz-section .answer-btn.selected,
  #page-quiz-answers .answer-btn.selected,
  .parchment-wide .answer-btn.selected { transform: none !important; }
}

/* ==========================================
   COOKIE CONSENT BANNER
========================================== */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  justify-content: center;
  padding: 1rem;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,0.15));
  pointer-events: none;
  animation: cookieFadeIn 0.5s ease forwards;
}

@keyframes cookieFadeIn {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

@keyframes cookieFadeOut {
  from { transform: translateY(0);    opacity: 1; }
  to   { transform: translateY(100%); opacity: 0; }
}

.cookie-inner {
  pointer-events: all;
  display: flex;
  align-items: center;
  gap: 1rem;
  background: linear-gradient(135deg, rgba(8,6,22,0.97) 0%, rgba(20,10,42,0.97) 100%);
  border: 1px solid rgba(212,175,55,0.35);
  border-radius: 18px;
  padding: 1rem 1.4rem;
  max-width: 860px;
  width: 100%;
  box-shadow: 0 -4px 40px rgba(0,0,0,0.5), 0 0 30px rgba(212,175,55,0.06), inset 0 1px 0 rgba(255,255,255,0.04);
  backdrop-filter: blur(16px);
}

.cookie-icon {
  font-size: 2rem;
  flex-shrink: 0;
  filter: drop-shadow(0 0 8px rgba(212,175,55,0.4));
  animation: hat-float 3s ease-in-out infinite;
}

.cookie-text {
  flex: 1;
  min-width: 0;
}

.cookie-title {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: 0.9rem;
  color: #ffd700;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
  text-shadow: 0 0 10px rgba(212,175,55,0.4);
}

.cookie-text p {
  margin: 0;
  font-family: 'Crimson Text', serif;
  font-size: 0.88rem;
  color: rgba(245,230,200,0.8);
  line-height: 1.5;
}

.cookie-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cookie-btn {
  font-family: 'Cinzel', serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  border-radius: 10px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  border: 1px solid transparent;
}

.cookie-btn-accept {
  background: linear-gradient(135deg, #8b0000, #c0392b);
  color: #fff8e1;
  border-color: rgba(212,175,55,0.3);
  box-shadow: 0 0 14px rgba(180,0,30,0.3);
}

.cookie-btn-accept:hover {
  background: linear-gradient(135deg, #a00000, #e74c3c);
  box-shadow: 0 0 20px rgba(180,0,30,0.5);
  transform: translateY(-1px);
}

.cookie-btn-reject {
  background: transparent;
  color: rgba(212,175,55,0.7);
  border-color: rgba(212,175,55,0.2);
}

.cookie-btn-reject:hover {
  background: rgba(212,175,55,0.08);
  color: #ffd700;
  border-color: rgba(212,175,55,0.4);
}

@media (max-width: 600px) {
  .cookie-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem;
  }
  .cookie-actions {
    flex-direction: row;
    width: 100%;
  }
  .cookie-btn {
    flex: 1;
    text-align: center;
  }
  .cookie-icon {
    display: none;
  }
}
