:root {
  color-scheme: light;
  
  /* Romanian colours – elegant, NGO */
  --primary-blue: #002B7F;
  --primary-yellow: #FCD116;
  --primary-red: #CE1126;
  
  /* Mostly white background */
  --bg: #FFFFFF;
  --bg-secondary: #FAFAFA;
  --card: #FFFFFF;
  --text: #1A1F2E;
  --text-secondary: #4B5563;
  --text-muted: #6B7280;
  --border: #E5E7EB;
  --border-light: #F3F4F6;
  
  /* Semantic colours */
  --accent: var(--primary-blue);
  --accent-hover: #001F5C;
  --accent-light: rgba(0, 43, 127, 0.08);
  --cta: var(--primary-red);
  --cta-hover: #A00E1F;
  
  /* Shadows – soft */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.04);
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.1);
  
  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 0.75rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Border radius */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  transition: all var(--transition-base);
}

/* Subtle embroidery-inspired divider under header */
.navbar::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--primary-blue) 0,
    var(--primary-blue) 2px,
    transparent 2px,
    transparent 10px
  );
  opacity: 0.2;
  pointer-events: none;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  transition: transform var(--transition-fast);
}

.logo-img {
  height: 3rem;
  width: auto;
  max-width: 150px;
  object-fit: contain;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--primary-blue);
}

.nav-logo:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: color var(--transition-fast);
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-blue);
  transition: width var(--transition-base);
}

.nav-link:hover {
  color: var(--accent);
}

.nav-link:hover::after {
  width: 100%;
}

.admin-link {
  padding: 0.5rem 1rem;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  color: var(--accent);
}

.admin-link::after {
  display: none;
}

/* Hero Section – mostly white, warm and welcoming */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding: 8rem 2rem 4rem;
  background: var(--bg);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse 70% 50% at 20% 30%, rgba(0, 43, 127, 0.04), transparent 50%),
    radial-gradient(ellipse 60% 60% at 80% 70%, rgba(252, 209, 22, 0.03), transparent 50%);
  pointer-events: none;
}

/* Very subtle embroidery-inspired pattern (decorative only) */
.traditional-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 24px,
    rgba(0, 43, 127, 0.03) 24px,
    rgba(0, 43, 127, 0.03) 25px
  );
  pointer-events: none;
}

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

.hero-panel {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-2xl);
  padding: 3rem;
  box-shadow: var(--shadow-lg);
  max-width: 800px;
  animation: fadeInUp 0.8s ease-out;
}

.hero-logo {
  text-align: center;
  margin-bottom: 2rem;
}

.hero-logo-img {
  max-width: min(400px, 60vw);
  height: auto;
  width: 100%;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

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

.eyebrow {
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  font-size: 0.75rem;
  margin: 0 0 1rem 0;
  color: var(--primary-blue);
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--accent-light);
  border-radius: var(--radius-sm);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}

h1 {
  margin: 0 0 1rem 0;
  font-size: clamp(2.25rem, 4.5vw, 3.5rem);
  font-weight: 700;
  color: var(--primary-blue);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.25rem);
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.lead {
  margin: 0 0 2rem 0;
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Buttons – primary blue, CTA red */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  border: none;
  background: var(--primary-blue);
  color: white;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  transition: all var(--transition-base);
  box-shadow: var(--shadow);
}

/* CTA (main action) uses red */
.hero-actions .button:first-child,
.event-detail-registration .button {
  background: var(--cta);
}

.hero-actions .button:first-child:hover,
.event-detail-registration .button:hover {
  background: var(--cta-hover);
}

.button:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.button:active {
  transform: translateY(0);
}

.button.ghost {
  background: transparent;
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
  box-shadow: none;
}

.button.ghost:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}

.button.danger {
  background: var(--primary-red);
}

.button.danger:hover {
  background: var(--cta-hover);
}

/* Hero Actions */
.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

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

.stat {
  padding: 1rem;
  border-radius: var(--radius-md);
  background: var(--accent-light);
  border: 1px solid var(--border-light);
  transition: transform var(--transition-fast);
}

.stat:hover {
  transform: translateY(-2px);
}

.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.stat-value {
  font-weight: 700;
  color: var(--text);
  font-size: 1rem;
}

/* Content */
.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.page-content {
  padding-top: 8rem;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-description {
  font-size: 1.125rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.7;
}

/* Cards */
.card, .panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

/* Panel with editor needs visible overflow for dropdowns */
.panel:has(#editor-container) {
  overflow: visible;
}

.card::before, .panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-blue);
  opacity: 0.4;
  transition: opacity var(--transition-base);
}

.card:hover::before, .panel:hover::before {
  opacity: 1;
}

.card:hover, .panel:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border);
}

.panel.highlight {
  background: var(--bg-secondary);
  border-color: var(--border);
}

/* Grid */
.grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.pillars .card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  width: fit-content;
}

.pillars .card h3 {
  margin-top: 0;
}

.pillars .card .muted {
  margin-top: auto;
}

/* Articles Section */
.articles-section {
  margin-top: 4rem;
}

.articles-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}

.article-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: all var(--transition-base);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out backwards;
}

.article-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--primary-blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.article-card:hover::before {
  transform: scaleX(1);
}

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

.article-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

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

.article-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
  line-height: 1.3;
}

.article-excerpt {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* Rich text content styling */
.article-content,
.rich-text-content {
  color: var(--text);
  line-height: 1.8;
  font-size: 1.0625rem;
}

.article-content h1,
.rich-text-content h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 2rem 0 1rem;
  line-height: 1.3;
  color: var(--text);
}

.article-content h2,
.rich-text-content h2 {
  font-size: 1.875rem;
  font-weight: 700;
  margin: 1.75rem 0 0.875rem;
  line-height: 1.4;
  color: var(--text);
}

.article-content h3,
.rich-text-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 1.5rem 0 0.75rem;
  line-height: 1.4;
  color: var(--text);
}

.article-content p,
.rich-text-content p {
  margin: 1rem 0;
  line-height: 1.8;
}

.article-content ul,
.article-content ol,
.rich-text-content ul,
.rich-text-content ol {
  margin: 1rem 0;
  padding-left: 2rem;
}

.article-content li,
.rich-text-content li {
  margin: 0.5rem 0;
  line-height: 1.8;
}

.article-content img,
.rich-text-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-md);
}

.article-content video,
.rich-text-content video {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-md);
}

.article-content iframe,
.rich-text-content iframe {
  max-width: 100%;
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-md);
}

.article-content a,
.rich-text-content a {
  color: var(--accent);
  text-decoration: underline;
  transition: color var(--transition-fast);
}

.article-content a:hover,
.rich-text-content a:hover {
  color: var(--accent-hover);
}

.article-content strong,
.rich-text-content strong {
  font-weight: 600;
  color: var(--text);
}

.article-content em,
.rich-text-content em {
  font-style: italic;
}

.article-content blockquote,
.rich-text-content blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: var(--text-secondary);
  font-style: italic;
}

.article-content code,
.rich-text-content code {
  background: var(--bg-secondary);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  font-family: 'Courier New', monospace;
  font-size: 0.9em;
}

.article-content pre,
.rich-text-content pre {
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 1.5rem 0;
}

.article-content pre code,
.rich-text-content pre code {
  background: none;
  padding: 0;
}

/* Admin preview styling */
.article-preview {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 0.9rem;
  margin: 0.5rem 0;
}

/* Article detail page styling */
.article-header {
  margin-bottom: 3rem;
}

.article-meta {
  margin-bottom: 1rem;
}

.article-detail-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 2rem 0;
  color: var(--text);
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

@media (max-width: 768px) {
  .article-content {
    padding: 1.5rem;
  }
  
  .article-detail-title {
    font-size: 2rem;
  }
}

.language-switcher {
  display: inline-flex;
  gap: 0.2rem;
  padding: 0.2rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
}
.language-switcher button {
  border: 0;
  border-radius: 999px;
  padding: 0.28rem 0.48rem;
  background: transparent;
  color: var(--text-muted);
  font: 700 0.65rem/1 var(--font-body);
  cursor: pointer;
}
.language-switcher button.active {
  background: var(--primary-blue);
  color: white;
}

[data-language][hidden] {
  display: none !important;
}
.category-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  margin: -1rem 0 2.5rem;
}
.category-filter {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.55rem 1rem;
  background: var(--card);
  color: var(--text-secondary);
  font: 600 0.85rem var(--font-body);
  cursor: pointer;
}
.category-filter.active,
.category-filter:hover {
  border-color: var(--primary-blue);
  background: var(--primary-blue);
  color: white;
}
.article-category {
  display: inline-flex;
  margin-right: 0.65rem;
  color: var(--clay);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.translation-editor {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
}
.translation-editor summary { cursor: pointer; font-weight: 700; color: var(--primary-blue); }
.translation-editor[open] { display: grid; gap: 1rem; }
.category-admin-panel { margin-top: 2rem; }
.category-admin-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  align-items: end;
}
.category-admin-form .actions { grid-column: 1 / -1; }
.category-admin-list { display: grid; gap: 0.65rem; margin-top: 1.5rem; }
.category-admin-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--border);
}
.admin-language-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}
.admin-language-tabs button {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.65rem 1.15rem;
  background: var(--card);
  color: var(--text-secondary);
  font: 700 0.9rem var(--font-body);
  cursor: pointer;
}
.admin-language-tabs button.active {
  border-color: var(--primary-blue);
  background: var(--primary-blue);
  color: white;
}
.translation-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  align-items: start;
}
.translation-input-row > input,
.translation-input-row > textarea { width: 100%; }
.translation-input-row > * { min-width: 0; }
.rich-editor-shell {
  width: 100%;
  min-width: 0;
  overflow: visible;
}
.rich-editor-shell #editor-container {
  min-height: 300px;
  background: white;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  position: relative;
  z-index: 1;
}
.translation-globe { position: relative; }
.translation-globe > summary {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--card);
  cursor: pointer;
  list-style: none;
  font-size: 1.15rem;
  box-shadow: var(--shadow-sm);
}
.translation-globe > summary::-webkit-details-marker { display: none; }
.translation-globe[open] > summary {
  border-color: var(--primary-blue);
  background: var(--accent-light);
}
.translation-popup {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  z-index: 30;
  width: min(440px, 78vw);
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  box-shadow: var(--shadow-xl);
}
.translation-popup textarea { min-height: 90px; }
.translation-popup-wide { width: min(680px, 82vw); }
.homepage-field-group { z-index: auto; }
.homepage-field-group:has(.translation-globe[open]) { z-index: 20; }
.homepage-fields-grid .translatable-admin-field:has(textarea) { grid-column: 1 / -1; }
.category-translation-form { grid-template-columns: minmax(0, 1fr); }
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}
.team-card {
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: var(--card);
  box-shadow: var(--shadow);
}
.team-card-visual {
  width: 100%;
  aspect-ratio: 4 / 3.4;
  overflow: hidden;
  background: var(--bg-secondary);
}
.team-card-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-card-placeholder { display: grid; place-items: center; color: var(--clay); font: 700 5rem var(--font-heading); }
.team-card-content { padding: 1.5rem; }
.team-card-content h2 { margin-bottom: 0.75rem; color: var(--primary-blue); }
.team-role { color: var(--clay); text-transform: uppercase; letter-spacing: 0.1em; font-weight: 700; font-size: 0.72rem; margin-bottom: 0.5rem; }
.team-bio { color: var(--text-secondary); white-space: pre-line; }
.team-admin-preview {
  width: 160px;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  background: var(--bg-secondary);
}

@media (max-width: 768px) {
  .language-switcher { order: -1; }
  .language-switcher button { padding: 0.26rem 0.4rem; }
  .category-admin-form { grid-template-columns: 1fr; }
  .category-admin-form .actions { grid-column: auto; }
}

/* Quill editor styling */
#editor-container .ql-container {
  font-size: 1rem;
  font-family: inherit;
  min-height: 300px;
}

#editor-container .ql-editor {
  min-height: 300px;
}

#editor-container .ql-editor.ql-blank::before {
  color: var(--text-muted);
  font-style: normal;
  right: 15px;
  white-space: normal;
}

.google-signin-loading {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--text-secondary);
  font-weight: 600;
}
.google-signin-spinner {
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid var(--border);
  border-top-color: var(--primary-blue);
  border-radius: 50%;
  animation: zina-spin 0.75s linear infinite;
}
@keyframes zina-spin { to { transform: rotate(360deg); } }

.button.is-pending {
  cursor: wait;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
}
.admin-action-spinner {
  width: 1rem;
  height: 1rem;
  flex: 0 0 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: zina-spin 0.75s linear infinite;
}

#editor-container .ql-toolbar {
  border-top-left-radius: var(--radius-md);
  border-top-right-radius: var(--radius-md);
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

#editor-container .ql-container {
  border-bottom-left-radius: var(--radius-md);
  border-bottom-right-radius: var(--radius-md);
}

/* Fix Quill dropdown visibility - ensure dropdowns are not clipped */
.panel-with-editor {
  overflow: visible !important;
}

/* Ensure Quill dropdowns appear above other elements */
.ql-toolbar .ql-picker-options,
.ql-toolbar .ql-picker-label {
  z-index: 10001;
}

.ql-snow .ql-picker-options {
  z-index: 10001 !important;
  background: white;
  box-shadow: var(--shadow-lg);
}

.ql-snow .ql-picker {
  z-index: 10001;
}

/* Ensure color picker dropdowns are visible */
.ql-snow .ql-picker.ql-expanded .ql-picker-options {
  display: block;
  z-index: 10001 !important;
}

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

.article-read-more {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform var(--transition-fast);
  display: inline-block;
  text-decoration: none;
}

.article-read-more:hover {
  color: var(--accent-hover);
  transform: translateX(4px);
}

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

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  color: var(--text-muted);
  gap: 1rem;
}

.empty-icon {
  font-size: 3rem;
  opacity: 0.5;
}

/* Forms */
form .stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

label {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

label span {
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

input, textarea, select {
  width: 100%;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  border: 2px solid var(--border);
  font-size: 1rem;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
  transition: all var(--transition-fast);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

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

.actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.actions.space-between {
  justify-content: space-between;
}

.muted {
  color: var(--text-muted);
}

/* Footer */
/* Footer – elegant, with subtle embroidery-style top border */
.footer {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  padding: 3rem 2rem;
  text-align: center;
  margin-top: 4rem;
  position: relative;
  border-top: 1px solid var(--border);
}

.footer::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: repeating-linear-gradient(
    90deg,
    var(--primary-blue) 0,
    var(--primary-blue) 3px,
    transparent 3px,
    transparent 12px
  );
  opacity: 0.25;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.footer-content p {
  margin: 0.5rem 0;
  color: var(--primary-blue);
  font-weight: 500;
}

.footer-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 400;
}

.footer-contact-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem 1.25rem;
  margin-top: 1rem;
}

.footer-contact-link {
  color: #f7f1e7;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.footer-contact-text {
  color: #f7f1e7;
  font-weight: 600;
}

.footer-contact-link:hover,
.footer-contact-link:focus-visible {
  color: var(--primary-yellow);
  border-bottom-color: currentColor;
}

/* Responsive Design */
@media (max-width: 968px) {
  .content .grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 768px) {
  .nav-container {
    padding: 1rem;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.875rem;
  }

  .hero {
    min-height: 80vh;
    padding: 6rem 1.5rem 3rem;
  }

  .hero-panel {
    padding: 2rem;
  }

  .hero-logo-img {
    max-width: min(280px, 50vw);
  }

  .logo-img {
    height: 2.5rem;
    max-width: 120px;
  }

  .content {
    padding: 3rem 1.5rem;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .nav-links {
    flex-direction: column;
    gap: 0.5rem;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
    justify-content: center;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F172A;
    --bg-secondary: #1E293B;
    --card: #1E293B;
    --text: #F1F5F9;
    --text-secondary: #CBD5E1;
    --text-muted: #94A3B8;
    --border: #334155;
    --border-light: #1E293B;
    --accent-light: rgba(0, 43, 127, 0.3);
  }

  .navbar {
    background: rgba(30, 41, 59, 0.8);
    border-bottom-color: var(--border);
  }

  .navbar.scrolled {
    background: rgba(30, 41, 59, 0.95);
  }

  .hero-panel {
    background: rgba(30, 41, 59, 0.95);
  }

  input, textarea, select {
    background: var(--bg-secondary);
    border-color: var(--border);
    color: var(--text);
  }

  .card, .panel {
    background: var(--card);
    border-color: var(--border);
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Utility classes */
.hero-small {
  min-height: 40vh;
  padding: 6rem 2rem 3rem;
}

.cards {
  display: grid;
  gap: 1.5rem;
}

.panel h2 {
  margin-top: 0;
}

/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 2rem;
}

.modal-content {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-xl);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal-content h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.modal-content .muted {
  margin-bottom: 1.5rem;
  display: block;
}

/* Error Message */
.error-message {
  background: #FEE2E2;
  color: #991B1B;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  border: 1px solid #FCA5A5;
}

/* Events Section */
.events-section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Events List */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-top: 2rem;
}

.events-section-group {
  min-width: 0;
}

.events-section-group h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: var(--text);
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.upcoming-events-group h2 {
  border-bottom-color: var(--accent);
}

.past-events-group h2 {
  color: var(--text-secondary);
}

.events-group-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.events-group-empty {
  margin: 0;
  padding: 1.25rem;
  color: var(--text-secondary);
  background: var(--card);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}

.event-card {
  display: flex;
  gap: 1.5rem;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all var(--transition-base);
  margin-bottom: 0;
}

.event-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.event-card.past-event {
  opacity: 0.7;
}

.event-card-clickable {
  cursor: pointer;
}

.event-card.highlighted {
  border-color: var(--primary-yellow);
  background: rgba(252, 209, 22, 0.1);
  animation: highlightPulse 1s ease-in-out;
}

@keyframes highlightPulse {
  0%, 100% {
    background: rgba(252, 209, 22, 0.1);
  }
  50% {
    background: rgba(252, 209, 22, 0.2);
  }
}

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  padding: 1rem;
  background: var(--accent-light);
  border-radius: var(--radius-md);
  border: 2px solid var(--accent);
}

.event-day {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.event-month {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 0.25rem;
}

.event-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.event-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.event-description {
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

.event-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.event-time,
.event-location {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.location-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-fast);
  border-bottom: 1px solid transparent;
}

.location-link:hover {
  color: var(--accent-hover);
  border-bottom-color: var(--accent-hover);
  text-decoration: none;
}

.location-link:active {
  color: var(--primary-blue);
}

/* Responsive Events */
@media (max-width: 768px) {
  .event-card {
    flex-direction: column;
    gap: 1rem;
  }

  .event-date {
    flex-direction: row;
    justify-content: flex-start;
    gap: 1rem;
    min-width: auto;
    width: 100%;
  }

  .event-day {
    font-size: 1.5rem;
  }
}

/* Section separator – subtle embroidery-inspired decorative line */
.section-divider {
  display: block;
  border: none;
  height: 0;
  margin: 0;
  padding: 0;
  position: relative;
}

.section-divider::after {
  content: '';
  display: block;
  height: 4px;
  margin: 3rem 2rem 0;
  background: repeating-linear-gradient(
    90deg,
    var(--primary-blue) 0,
    var(--primary-blue) 2px,
    transparent 2px,
    transparent 14px
  );
  opacity: 0.18;
}

/* CTA section (homepage) */
.cta-section {
  margin-top: 0;
}

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

.cta-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-base);
  box-shadow: var(--shadow);
}

.cta-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-blue);
}

.cta-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.cta-card h3 {
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
  color: var(--text);
}

.resources-grid {
  max-width: 760px;
  margin: 0 auto;
}
.resource-card {
  min-height: 320px;
  align-items: flex-start;
}
.resource-card h2 {
  margin: 0.35rem 0 0;
  color: var(--primary-blue);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
}
.resource-card .pill {
  align-self: flex-start;
}

.embedded-game-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.embedded-game-header {
  min-height: 64px;
  padding: 0.65rem clamp(1rem, 3vw, 2rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--white);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  z-index: 1;
}

.embedded-game-main {
  flex: 1;
  min-height: 0;
}

.embedded-game-frame {
  display: block;
  width: 100%;
  height: calc(100vh - 64px);
  border: 0;
  background: var(--cream);
}

.cta-card .muted {
  flex: 1;
  margin-bottom: 1rem;
}

.cta-link {
  font-weight: 600;
  color: var(--primary-blue);
  transition: color var(--transition-fast);
}

.cta-card:hover .cta-link {
  color: var(--accent-hover);
}

.cta-card h3 {
  font-family: var(--font-heading);
}

/* Pagination */
.pagination-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.pagination {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.5rem;
  border-radius: var(--radius-md);
  font-weight: 500;
  text-decoration: none;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  transition: all var(--transition-fast);
}

.pagination a:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  color: var(--accent);
}

.pagination .current {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  cursor: default;
}

.pagination .gap {
  pointer-events: none;
  border: none;
  background: transparent;
}

.pagination-info {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-left: 1rem;
}

/* Event detail page */
.event-detail-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  box-shadow: var(--shadow);
}

.event-detail-header {
  margin-bottom: 1.5rem;
}

.event-detail-date-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 80px;
  padding: 1rem 1.25rem;
  background: var(--accent-light);
  border-radius: var(--radius-md);
  border: 2px solid var(--accent);
  margin-bottom: 1.25rem;
}

.event-detail-day {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.event-detail-month {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.event-detail-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 1rem;
  line-height: 1.3;
}

.event-detail-meta {
  font-size: 1rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.event-detail-meta .location-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.event-detail-meta .location-link:hover {
  text-decoration: underline;
}

.event-detail-description {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 2rem;
  white-space: pre-wrap;
}

.event-detail-registration {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.event-detail-registration .button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* 2026 visual refresh — the warmth of a Romanian home */
:root {
  --primary-blue: #193d58;
  --primary-yellow: #e5ad3d;
  --primary-red: #a84835;
  --bg: #f7f1e7;
  --bg-secondary: #efe5d6;
  --card: #fffdf8;
  --text: #26342f;
  --text-secondary: #59665f;
  --text-muted: #737c75;
  --border: #ded2c2;
  --border-light: #eae1d5;
  --accent: #193d58;
  --accent-hover: #102c41;
  --accent-light: rgba(25, 61, 88, 0.09);
  --cta: #a84835;
  --cta-hover: #873627;
  --forest: #50644f;
  --clay: #a84835;
  --cream: #f7f1e7;
  --shadow: 0 8px 24px rgba(76, 55, 34, 0.07);
  --shadow-md: 0 14px 36px rgba(76, 55, 34, 0.1);
  --shadow-lg: 0 20px 50px rgba(76, 55, 34, 0.12);
  --shadow-xl: 0 28px 64px rgba(76, 55, 34, 0.14);
}

body {
  background:
    radial-gradient(circle at 8% 12%, rgba(229, 173, 61, 0.08), transparent 26rem),
    var(--bg);
}

.navbar,
.navbar.scrolled {
  background: rgba(255, 253, 248, 0.92);
  border-bottom-color: rgba(90, 71, 49, 0.1);
}

.navbar::after {
  height: 4px;
  background: repeating-linear-gradient(90deg, var(--primary-blue) 0 8px, var(--primary-yellow) 8px 13px, var(--primary-red) 13px 21px, transparent 21px 31px);
  opacity: 0.68;
}

.nav-container { max-width: 1320px; padding-block: 0.65rem; }
.logo-img {
  width: clamp(250px, 25vw, 360px);
  height: auto;
  max-width: none;
}
.nav-link { color: #3c4943; }
.admin-link { opacity: 0.58; font-size: 0.8rem; }

.hero {
  min-height: auto;
  padding: 9.5rem 2rem 5.5rem;
  background: transparent;
}

.hero::before {
  background: linear-gradient(135deg, rgba(255, 253, 248, 0.72), transparent 56%);
}

.traditional-pattern {
  inset: auto 0 0;
  height: 42px;
  opacity: 0.32;
  background-color: transparent;
  background-image:
    linear-gradient(45deg, transparent 42%, var(--clay) 43% 48%, transparent 49%),
    linear-gradient(-45deg, transparent 42%, var(--clay) 43% 48%, transparent 49%);
  background-size: 32px 32px;
}

.hero-content {
  max-width: 1320px;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(480px, 1.18fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.hero-panel {
  max-width: none;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.eyebrow {
  padding: 0;
  background: transparent;
  color: var(--clay);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
}

h1 {
  max-width: 680px;
  color: var(--primary-blue);
  font-size: clamp(3.25rem, 6.2vw, 6.2rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin-bottom: 1.6rem;
}

h1 em {
  color: var(--clay);
  font-weight: 500;
}

.lead { max-width: 590px; font-size: 1.16rem; }
.hero-actions { margin-bottom: 2rem; }

.button {
  padding: 0.95rem 1.45rem;
  border-radius: 999px;
  box-shadow: none;
}

.button.ghost { border-width: 1px; background: rgba(255, 253, 248, 0.55); }

.welcome-note {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  max-width: 520px;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.welcome-heart {
  flex: 0 0 auto;
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(168, 72, 53, 0.11);
  color: var(--clay);
}

.hero-visual { position: relative; margin: 0; animation: fadeInUp 0.9s 0.12s ease-out backwards; }
.hero-visual::before {
  content: '';
  position: absolute;
  inset: -14px 20px 32px -14px;
  border: 1px solid rgba(168, 72, 53, 0.35);
  border-radius: 47% 47% 1.4rem 1.4rem;
  z-index: -1;
}
.hero-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 4.35;
  object-fit: cover;
  object-position: 64% center;
  border-radius: 46% 46% 1.25rem 1.25rem;
  box-shadow: var(--shadow-xl);
  transition: opacity 220ms ease;
}
.hero-visual img.hero-image-loading { opacity: 0; }
.hero-visual figcaption {
  width: 78%;
  margin: -1.35rem auto 0;
  position: relative;
  padding: 1rem 1.3rem;
  border-radius: 0.8rem;
  background: var(--card);
  box-shadow: var(--shadow-md);
  color: var(--forest);
  font: italic 500 1rem/1.4 var(--font-heading);
  text-align: center;
}

.content { max-width: 1240px; padding-top: 5.5rem; }
.panel.highlight { background: transparent; }
.panel.highlight,
.cta-section { border: 0; box-shadow: none; padding-left: 0; padding-right: 0; overflow: visible; }
.panel.highlight::before,
.cta-section::before { display: none; }
.panel.highlight:hover,
.cta-section:hover { transform: none; box-shadow: none; }
.section-kicker { color: var(--clay); text-transform: uppercase; letter-spacing: 0.15em; font-weight: 700; font-size: 0.73rem; margin-bottom: 0.8rem; }
.section-header h2 { color: var(--primary-blue); font-size: clamp(2.35rem, 4vw, 4rem); line-height: 1.1; }
.section-description { max-width: 770px; }

.pillars { gap: 1.4rem; }
.pillars .card { min-height: 300px; padding: 2rem; border: 0; box-shadow: none; }
.pillars .card:nth-child(1) { background: #e7ddd0; }
.pillars .card:nth-child(2) { background: #dbe4dd; }
.pillars .card:nth-child(3) { background: #ead8cf; }
.pillars .card::before { display: none; }
.pillar-symbol { font: 600 2.6rem/1 var(--font-heading); color: rgba(25, 61, 88, 0.25); margin-bottom: 2rem; }
.pill { padding: 0; background: none; color: var(--clay); text-transform: uppercase; letter-spacing: 0.11em; font-size: 0.68rem; }
.pillars .card h3 { color: var(--primary-blue); }

.section-divider::after { background: linear-gradient(90deg, transparent, var(--primary-yellow), var(--primary-red), var(--primary-blue), transparent); opacity: 0.5; }
.cta-card { border: 0; background: var(--card); }
.cta-card:hover { border-color: transparent; }
.footer { background: var(--primary-blue); border: 0; }
.footer::before { background: repeating-linear-gradient(90deg, var(--primary-yellow) 0 8px, var(--primary-red) 8px 16px, #f7f1e7 16px 24px, transparent 24px 34px); opacity: 0.75; }
.footer-content p, .footer-subtitle { color: #f7f1e7; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #f7f1e7;
    --bg-secondary: #efe5d6;
    --card: #fffdf8;
    --text: #26342f;
    --text-secondary: #59665f;
    --text-muted: #737c75;
    --border: #ded2c2;
    --border-light: #eae1d5;
    --accent-light: rgba(25, 61, 88, 0.09);
  }
  .navbar, .navbar.scrolled { background: rgba(255, 253, 248, 0.92); }
  .hero-panel, .card, .panel { background-color: var(--card); }
  .hero-panel, .panel.highlight, .cta-section { background: transparent; }
  input, textarea, select { background: var(--card); color: var(--text); }
}

@media (max-width: 968px) {
  .hero-content { grid-template-columns: 1fr 0.9fr; gap: 2.5rem; }
  h1 { font-size: clamp(3rem, 8vw, 4.8rem); }
}

@media (max-width: 768px) {
  .nav-container { align-items: flex-start; }
  .nav-links { gap: 0.7rem; flex-wrap: wrap; justify-content: flex-end; }
  .nav-link:first-child { display: none; }
  .hero { padding: 8.5rem 1.25rem 4.5rem; }
  .hero-content { display: flex; flex-direction: column; }
  .hero-panel { background: transparent; }
  .hero-visual { width: min(100%, 570px); }
  .hero-visual img { aspect-ratio: 4 / 3.7; }
  .content { padding: 4rem 1.25rem; }
}

@media (max-width: 480px) {
  .logo-img { width: 190px; max-width: 48vw; }
  .nav-links { max-width: 235px; }
  .admin-link { display: none; }
  .hero { padding-top: 8rem; }
  h1 { font-size: clamp(2.75rem, 14vw, 4rem); }
  .button { width: 100%; }
  .hero-visual figcaption { width: 92%; }
}

/* Accessible finishing touches */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--primary-yellow);
  outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

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

/* Compact public navigation on phones and small tablets */
.nav-toggle {
  display: none;
}

@media (max-width: 768px) {
  .nav-container {
    min-height: 68px;
    padding: 0.55rem 1rem;
    align-items: center;
    flex-wrap: wrap;
  }

  .logo-img {
    width: min(210px, 62vw);
    max-width: 62vw;
    height: auto;
  }

  .nav-toggle {
    width: 44px;
    height: 44px;
    padding: 10px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: var(--card);
    color: var(--primary-blue);
    cursor: pointer;
  }

  .nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .menu-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .menu-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .navbar .nav-links {
    display: none;
    width: 100%;
    max-width: none;
    padding: 0.75rem 0 0.4rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

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

  .navbar .nav-link,
  .navbar .nav-link:first-child,
  .navbar .admin-link {
    display: block;
    padding: 0.7rem 0.25rem;
    font-size: 0.95rem;
  }

  .navbar .language-switcher {
    align-self: flex-start;
    margin: 0.35rem 0;
  }
}

/* The public admin entry remains in its known position without visual emphasis. */
.nav-link.admin-link,
.nav-link.admin-link:hover,
.nav-link.admin-link:active,
.nav-link.admin-link:visited {
  display: inline-block;
  color: transparent;
  background: transparent;
  opacity: 1;
  user-select: none;
}

.homepage-admin-form { gap: 1.5rem; }
.homepage-field-group { overflow: visible; }
.homepage-fields-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.homepage-fields-grid label:has(textarea) { grid-column: 1 / -1; }
.homepage-image-editor {
  display: grid;
  grid-template-columns: minmax(240px, 0.75fr) minmax(260px, 1fr);
  gap: 1.5rem;
  align-items: center;
  margin-top: 1.25rem;
}
.homepage-image-editor img {
  width: 100%;
  aspect-ratio: 4 / 4.35;
  object-fit: cover;
  object-position: 64% 50%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.homepage-image-controls { align-self: stretch; justify-content: center; }
.homepage-image-controls input[type="range"] { width: 100%; accent-color: var(--terracotta); }
.range-labels { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.82rem; }
.homepage-image-controls .button { align-self: flex-start; }
.homepage-message { min-height: 1.5rem; font-weight: 600; }
.success-message { color: var(--forest); }
.homepage-save-bar {
  position: sticky;
  bottom: 1rem;
  z-index: 10;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
}

@media (max-width: 768px) {
  .homepage-fields-grid,
  .homepage-image-editor { grid-template-columns: 1fr; }
  .homepage-fields-grid label:has(textarea) { grid-column: auto; }
}
