@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700;900&family=DM+Sans:wght@300;400;500&display=swap');


/* =============================================================================
   DESIGN TOKENS
   ============================================================================= */

:root {
  /* Colours */
  --green-dark:  #1a3a2a;
  --green-mid:   #2d6a4f;
  --green-light: #52b788;
  --green-pale:  #b7e4c7;
  --cream:       #f8f5ee;
  --text:        #1c1c1c;
  --accent:      #e9c46a;
  --red:         #e63946;
  --white:       #ffffff;

  /* Shadows */
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 6px 24px rgba(0, 0, 0, 0.08);

  /* Border radii */
  --radius-sm:   12px;
  --radius-md:   16px;
  --radius-lg:   20px;
  --radius-pill: 100px;
}


/* =============================================================================
  RESET & BASE
   ============================================================================= */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--cream);
  color: var(--text);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main {
  flex: 1;
}
.inner {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 3rem;
  padding-right: 3rem;
}


/* =============================================================================
   TYPOGRAPHY
   ============================================================================= */
.section-label {
  font-size: 0.76rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-light);
  margin-bottom: 0.6rem;
}

.section-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.9rem, 3.5vw, 2.75rem);
  color: var(--green-dark);
  line-height: 1.15;
  margin-bottom: 1.5rem;
}


/* =============================================================================
   COMPONENTS
   ============================================================================= */

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--green-mid);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  padding: 0.85rem 2.25rem;
  border: none;
  border-radius: var(--radius-pill);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(45, 106, 79, 0.28);
  transition: background 0.25s, transform 0.2s, box-shadow 0.25s;
}
.btn-primary:hover {
  background: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(45, 106, 79, 0.38);
}
.btn-primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: transparent;
  color: var(--green-mid);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.75rem 1.75rem;
  border: 1.5px solid var(--green-light);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-outline:hover {
  background: var(--green-pale);
}
.btn-outline:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ── Card ── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ── Animations ── */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.fade-up {
  animation: fadeUp 0.45s ease both;
}


/* =============================================================================
   LAYOUT – NAVIGATION
   ============================================================================= */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(248, 245, 238, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(45, 106, 79, 0.15);
}
nav .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}
.nav-logo img {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 0 5px rgba(45, 106, 79, 0.3));
  object-fit: cover;
}
.nav-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--green-dark);
}
.nav-link {
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--green-mid);
  text-decoration: none;
  padding: 0.5rem 1.25rem;
  border: 1.5px solid var(--green-light);
  border-radius: var(--radius-pill);
  transition: background 0.25s, color 0.25s;
}
.nav-link:hover {
  background: var(--green-mid);
  color: var(--white);
}

/* ── Progress bar (quiz page) ── */

.progress-bar-wrap {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgba(45, 106, 79, 0.1);
}
.progress-bar {
  height: 100%;
  width: 0%;
  background: var(--green-light);
  transition: width 0.4s ease;
}

/* =============================================================================
   LAYOUT – FOOTER
   ============================================================================= */

footer {
  flex-shrink: 0;
  background: var(--green-dark);
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  font-size: 0.84rem;
  line-height: 1.75;
}
footer .inner {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}
footer strong {
  color: var(--green-pale);
}


/* =============================================================================
   INDEX – HERO
   ============================================================================= */

.hero {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 100vh;
  overflow: hidden;
}
.hero .inner {
  position: relative;
  padding-top: 8rem;
  padding-bottom: 5rem;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 40%, #b7e4c740 0%, transparent 60%),
    radial-gradient(ellipse at 10% 80%, #52b78820 0%, transparent 50%);
  pointer-events: none;
}
.hero-ring {
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  width: 540px;
  height: 540px;
  border-radius: 50%;
  border: 54px solid var(--green-pale);
  opacity: 0.3;
  pointer-events: none;
}
.hero-ring::before {
  content: '';
  position: absolute;
  inset: 78px;
  border-radius: 50%;
  border: 34px solid var(--green-light);
  opacity: 0.42;
}

.hero-content {
  max-width: 680px;
}
.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.8rem, 6vw, 4.8rem);
  line-height: 1.06;
  color: var(--green-dark);
  margin-bottom: 1.4rem;
  animation: fadeUp 0.55s ease 0.1s both;
}
.hero-title span {
  display: block;
  color: var(--green-light);
}
.hero-desc {
  font-size: 1.05rem;
  color: #484848;
  line-height: 1.8;
  max-width: 500px;
  margin-bottom: 2.5rem;
  animation: fadeUp 0.55s ease 0.2s both;
}
.hero-cta {
  animation: fadeUp 0.55s ease 0.3s both;
}


/* =============================================================================
   INDEX – ABOUT
   ============================================================================= */

.about {
  padding: 6rem 0;
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
  margin-top: 2.5rem;
}
.about-text p {
  font-size: 0.98rem;
  color: #555;
  line-height: 1.85;
  margin-bottom: 1.2rem;
}
.about-text p strong {
  color: var(--green-dark);
}

.about-cards {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.acard {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--white);
  border-left: 4px solid var(--green-light);
  border-radius: var(--radius-md);
  padding: 1.35rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.acard-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--green-pale);
  border-radius: 10px;
  color: var(--green-dark);
}
.acard h4 {
  font-family: 'Playfair Display', serif;
  font-size: 0.98rem;
  color: var(--green-dark);
  margin-bottom: 0.25rem;
}
.acard p {
  font-size: 0.87rem;
  color: #666;
  line-height: 1.6;
}


/* =============================================================================
   INDEX – CATEGORIES
   ============================================================================= */

.categories {
  padding: 6rem 0;
  background: var(--green-dark);
  color: var(--white);
}
.categories .section-label {
  color: var(--green-pale);
}
.categories .section-title {
  color: var(--white);
}

.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2.5rem;
}
.cat-card {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 2.25rem 1.75rem;
  text-align: center;
  transition: background 0.3s, transform 0.3s;
}
.cat-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-4px);
}
.cat-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  color: var(--green-pale);
}
.cat-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.2rem;
  color: var(--green-pale);
  margin-bottom: 0.7rem;
}
.cat-card p {
  font-size: 0.87rem;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.7;
}


/* =============================================================================
   INDEX – CTA SECTION
   ============================================================================= */

.cta-section {
  padding: 6rem 0;
  text-align: center;
  background: linear-gradient(135deg, #f8f5ee 0%, #e8f5ed 100%);
}
.cta-section .section-title {
  font-size: clamp(1.9rem, 4vw, 3rem);
  margin-bottom: 0.9rem;
}
.cta-section p {
  color: #666;
  max-width: 520px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

/* =============================================================================
   QUIZ – INTRO
   ============================================================================= */

main.quiz-main {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 7rem 1.5rem 4rem;
}

#intro {
  padding: 2rem 0;
  text-align: center;
  animation: fadeUp 0.5s ease both;
}
.intro-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  margin: 0 auto 1.75rem;
  background: var(--green-pale);
  border-radius: 24px;
  color: var(--green-dark);
}
#intro h1 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2rem, 5vw, 2.9rem);
  color: var(--green-dark);
  margin-bottom: 1rem;
}
#intro p {
  font-size: 1rem;
  color: #555;
  max-width: 480px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}


/* =============================================================================
   QUIZ – QUESTION SCREEN
   ============================================================================= */

#quiz-screen {
  display: none;
}

.category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.cat-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--green-pale);
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: var(--radius-pill);
}
.cat-badge .badge-icon {
  display: flex;
  align-items: center;
  width: 18px;
  height: 18px;
}

.q-counter {
  font-size: 0.83rem;
  color: #888;
}

.question-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow-md);
}
.question-text {
  font-family: 'Playfair Display', serif;
  font-size: 1.25rem;
  color: var(--green-dark);
  line-height: 1.55;
  margin-bottom: 1.75rem;
}

.options {
  display: flex;
  gap: 0.9rem;
}
.option-btn {
  flex: 1;
  background: var(--cream);
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  text-align: center;
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.97rem;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s;
}
.option-btn:hover {
  border-color: var(--green-light);
  background: #f0faf4;
}
.option-btn.selected {
  border-color: var(--green-mid);
  background: #e8f5ed;
  color: var(--green-dark);
}

.nav-btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.75rem;
}


/* =============================================================================
   QUIZ – RESULTS
   ============================================================================= */

#results {
  display: none;
}

.overall-score {
  background: var(--green-dark);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  margin-bottom: 2rem;
}

.score-number {
  font-family: 'Playfair Display', serif;
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  color: var(--green-pale);
}

.score-label {
  font-size: 0.87rem;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 0.4rem;
}

/* Category result cards */

.cat-results {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  margin-bottom: 2rem;
}
.cat-result-card {
  padding: 1.4rem 1.5rem;
}
.cat-result-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.cat-result-name {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.97rem;
  font-weight: 500;
}
.cat-result-pct {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-mid);
}

.bar-bg {
  height: 7px;
  background: var(--green-pale);
  border-radius: var(--radius-pill);
}
.bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--green-light), var(--green-mid));
  border-radius: var(--radius-pill);
  transition: width 1s ease 0.2s;
}

.cat-score-detail {
  font-size: 0.78rem;
  color: #999;
  margin-top: 0.4rem;
}

/* Tips */
.tips-section {
  margin-bottom: 2.5rem;
}
.tips-section h3 {
  font-family: 'Playfair Display', serif;
  font-size: 1.35rem;
  color: var(--green-dark);
  margin-bottom: 1.1rem;
}
.tip-card {
  padding: 1.2rem 1.4rem;
  margin-bottom: 0.85rem;
  border-left: 4px solid var(--green-light);
}
.tip-header {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
}
.tip-cat {
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--green-mid);
}
.tip-text {
  font-size: 0.93rem;
  color: #444;
  line-height: 1.65;
}

/* Result action buttons */
.result-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.restart-btn {
  display: block;
  width: 100%;
  background: var(--green-mid);
  color: var(--white);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.97rem;
  font-weight: 500;
  padding: 1rem;
  border: none;
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  transition: background 0.25s;
}
.restart-btn:hover {
  background: var(--green-dark);
}

.print-btn {
  display: block;
  width: 100%;
  background: transparent;
  color: var(--green-mid);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.93rem;
  font-weight: 500;
  padding: 0.9rem;
  border: 1.5px solid var(--green-light);
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  transition: background 0.2s;
}
.print-btn:hover {
  background: var(--green-pale);
}

.back-link {
  display: block;
  padding: 0.5rem;
  text-align: center;
  font-size: 0.87rem;
  color: #999;
  text-decoration: none;
}
.back-link:hover {
  color: var(--green-mid);
}

/* ─── Noscript greška ──────────────────────────────────────────── */
.noscript-error {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 2rem;
  background: #fff8f0;
  text-align: center;
}
.noscript-error svg {
  color: #d97706;
  flex-shrink: 0;
}
.noscript-error h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}
.noscript-error p {
  max-width: 420px;
  color: #555;
  line-height: 1.6;
  margin: 0;
}

/* ─── Cookie banner ────────────────────────────────────────────── */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9000;
  width: min(92vw, 560px);
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 1rem;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  padding: 1.25rem 1.5rem;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.cookie-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.cookie-icon {
  flex-shrink: 0;
  color: var(--green-mid);
  display: flex;
  align-items: center;
}
.cookie-inner p {
  flex: 1;
  margin: 0;
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.5;
  min-width: 200px;
}
.cookie-btn {
  flex-shrink: 0;
  padding: 0.55rem 1.25rem;
  border-radius: var(--radius-sm, 0.5rem);
  border: none;
  background: var(--green-mid, #2d6a4f);
  color: #fff;
  font-size: 0.875rem;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
}
.cookie-btn:hover {
  background: var(--green-dark, #1a3a2a);
}
.cookie-banner.visible {
  display: block;
}
.cookie-banner.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  pointer-events: none;
}
/* =============================================================================
   PRINT STYLES
   ============================================================================= */

@media print {
  .no-print {
    display: none !important;
  }

  body {
    display: block;
    background: white;
    color: black;
    font-size: 11pt;
  }

  main {
    max-width: 100% !important;
  }
  main.quiz-main{
    padding: 1rem 1rem 0 1rem !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
    padding: 1rem !important;
  }

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

  footer {
    background: none !important;
    color: #444;
    border-top: 1px solid #ccc;
  }

  footer .inner{
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }

  .section-title    { font-size: 18pt; }
  .btn-primary,
  .btn-outline      { display: none; }
  #intro,
  #quiz-screen      { display: none !important; }
  #results          { display: block !important; }
  .result-actions,
  .back-link        { display: none !important; }

  .hero             { min-height: unset !important; }
  .hero .inner      { padding-top: 1rem !important; padding-bottom: 1rem !important; }
  .hero-ring,
  .hero-bg          { display: none !important; }

  .cat-grid         { grid-template-columns: repeat(3, 1fr) !important; }

  .categories {
    padding: 1rem 0 !important;
    background: white !important;
    color: black !important;
  }

  .categories .section-title  { color: black !important; }
  .categories .section-label  { color: var(--green-mid) !important; }

  .cat-card {
    background: #f9f9f9 !important;
    border: 1px solid #ccc !important;
    color: black !important;
  }

  .cat-card h3,
  .cat-card p { color: black !important; }

  .cat-results, .tips-section { margin-bottom: 1.5rem !important; }

  .cta-section { display: none !important; }

  .overall-score {
    background: #1a3a2a !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
  }

  .bar-bg,
  .bar-fill {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .option-btn         { background: white !important; border: 1px solid #ccc !important; }
  .option-btn.selected { background: #e8f5ed !important; border-color: var(--green-mid) !important; }
}


/* =============================================================================
   RESPONSIVE
   ============================================================================= */

@media (max-width: 900px) {
  .inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .hero .inner {
    padding-top: 7rem;
    padding-bottom: 4rem;
  }

  .about,
  .categories,
  .cta-section {
    padding: 4rem 0;
  }

  .about-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

  .hero-ring {
    display: none;
  }
}

@media (max-width: 768px) {
  .nav-title {
    font-size: 1.1rem;
  }
}

@media (max-width: 600px) {
  .nav-link {
    display: none;
  }

  main.quiz-main {
    padding-top: 6rem;
  }

  .options {
    flex-direction: column;
  }

  .question-card {
    padding: 1.5rem 1.25rem;
  }
}