```css
/* ============================================================
   style.css – Hrvatska i njezino okružje | Geografija 6. razred
   ============================================================ */

/* ── RESET & BASE ────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --primary:    #1565C0;
  --primary-lt: #E3F2FD;
  --secondary:  #2E7D32;
  --accent:     #E65100;
  --bg:         #F8F9FA;
  --bg-alt:     #EEF2FF;
  --text:       #212121;
  --text-muted: #616161;
  --radius:     12px;
  --shadow:     0 4px 20px rgba(0,0,0,.10);
  --transition: .3s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
}

a  { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── HEADER / NAV ────────────────────────────────────────── */
header {
  background: linear-gradient(135deg, #0D47A1 0%, #1565C0 50%, #1976D2 100%);
  color: #fff;
  padding: 1.4rem 2rem .8rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.header-flag { font-size: 2.4rem; }
header h1   { font-size: 1.5rem; font-weight: 700; }
.subtitle   { font-size: .85rem; opacity: .85; }

nav {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: .6rem auto 0;
}

nav a {
  color: #fff;
  padding: .3rem .75rem;
  border-radius: 20px;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .3px;
  transition: background var(--transition);
}
nav a:hover { background: rgba(255,255,255,.2); }

/* ── SECTIONS ────────────────────────────────────────────── */
.section     { padding: 4rem 1.5rem; }
.section-alt { background: var(--bg-alt); }

.container {
  max-width: 1100px;
  margin: 0 auto;
}

.section-title {
  font-size: 1.9rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 3px solid var(--primary);
}

.section-intro {
  color: var(--text-muted);
  max-width: 760px;
  margin-bottom: 2.2rem;
  font-size: 1.02rem;
}

/* ── UVOD ────────────────────────────────────────────────── */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.intro-text p { margin-bottom: 1rem; font-size: 1.05rem; }

.learning-goals {
  background: var(--primary-lt);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  margin-top: 1.2rem;
}

.learning-goals h3 { color: var(--primary); margin-bottom: .6rem; }

.learning-goals li {
  padding: .35rem 0 .35rem 1.6rem;
  position: relative;
}
.learning-goals li::before {
  content: '✅';
  position: absolute;
  left: 0;
  font-size: .9rem;
}

/* ── SLIKA + LIGHTBOX TRIGGER ────────────────────────────── */
.intro-image-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
}

.image-trigger-wrap {
  position: relative;
  width: 100%;
  max-width: 480px;
  cursor: zoom-in;
}

.intro-image {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  object-fit: cover;
  display: block;
  transition: transform var(--transition), box-shadow var(--transition),
              filter var(--transition);
}

.image-trigger-wrap:hover .intro-image {
  transform: scale(1.02);
  box-shadow: 0 10px 32px rgba(0,0,0,.22);
  filter: brightness(1.04);
}

/* Zoom hint natpis */
.zoom-hint {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,.62);
  color: #fff;
  font-size: .78rem;
  font-weight: 600;
  padding: .3rem .85rem;
  border-radius: 20px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity var(--transition);
  pointer-events: none;
}

.image-trigger-wrap:hover .zoom-hint { opacity: 1; }

/* Placeholder kad slika nije pronađena */
.img-placeholder {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 480px;
  min-height: 260px;
  background: linear-gradient(135deg, #E3F2FD, #BBDEFB);
  border: 3px dashed #90CAF9;
  border-radius: var(--radius);
  text-align: center;
  color: #1565C0;
  gap: .5rem;
  padding: 1.5rem;
}

.img-placeholder span  { font-size: 3.5rem; }
.img-placeholder p     { font-weight: 700; }
.img-placeholder small { opacity: .75; }

.lb-placeholder-btn {
  margin-top: .5rem;
  padding: .45rem 1.1rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: .85rem;
  font-weight: 600;
  transition: background var(--transition);
}
.lb-placeholder-btn:hover { background: #0D47A1; }

.img-caption {
  font-size: .82rem;
  color: var(--text-muted);
  font-style: italic;
  text-align: center;
}

/* ── GEOGRAFSKI POLOŽAJ – CARDS ──────────────────────────── */
.position-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.4rem;
}

.position-card {
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}
.position-card:hover { transform: translateY(-4px); }

.pos-icon { font-size: 2.2rem; margin-bottom: .6rem; }
.position-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .5rem;
}
.position-card ul li {
  padding-left: 1.1rem;
  position: relative;
  margin-bottom: .25rem;
  font-size: .95rem;
}
.position-card ul li::before {
  content: '▶';
  position: absolute;
  left: 0;
  font-size: .6rem;
  top: .42rem;
  color: #555;
}

.card-blue   { background: #E3F2FD; border-top: 4px solid #1565C0; }
.card-green  { background: #E8F5E9; border-top: 4px solid #2E7D32; }
.card-red    { background: #FFEBEE; border-top: 4px solid #C62828; }
.card-yellow { background: #FFFDE7; border-top: 4px solid #F9A825; }

/* ── TABS ────────────────────────────────────────────────── */
.tabs {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.tab-btn {
  padding: .55rem 1.3rem;
  border: 2px solid #ddd;
  border-radius: 30px;
  background: #fff;
  cursor: pointer;
  font-size: .9rem;
  font-weight: 600;
  transition: all var(--transition);
  color: var(--text);
}
.tab-btn:hover  { border-color: var(--primary); color: var(--primary); }
.tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.tab-content        { display: none; }
.tab-content.active { display: block; animation: fadeIn .4s ease; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

/* ── KULTURNI KRUGOVI – CIRCLE CARDS ────────────────────── */
.circle-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}

.circle-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 1.6rem;
  color: #fff;
}

.circle-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  flex-shrink: 0;
}

.circle-header h3 { font-size: 1.15rem; font-weight: 700; }

.circle-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.2rem;
  padding: 1.6rem;
  background: #fff;
}

.circle-info h4 {
  font-size: .9rem;
  font-weight: 700;
  margin-bottom: .3rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.circle-info p { font-size: .96rem; }

.example-box {
  grid-column: 1 / -1;
  background: #F5F5F5;
  border-radius: 8px;
  padding: .9rem 1.2rem;
  font-size: .94rem;
}

.circle-blue   .circle-header { background: linear-gradient(90deg, #1565C0, #1976D2); }
.circle-teal   .circle-header { background: linear-gradient(90deg, #00695C, #00897B); }
.circle-orange .circle-header { background: linear-gradient(90deg, #BF360C, #E64A19); }

/* ── VENN DIJAGRAM ───────────────────────────────────────── */
.circles-visual { margin-top: 2.5rem; text-align: center; }

.visual-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.venn-container {
  position: relative;
  width: 360px;
  height: 320px;
  margin: 0 auto;
}

.venn-circle {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 700;
  text-align: center;
  color: #fff;
  padding: 1rem;
  mix-blend-mode: multiply;
  transition: transform var(--transition);
}
.venn-circle:hover { transform: scale(1.05); }

.venn-a { background: rgba(21,101,192,.72);  top: 0;    left: 0; }
.venn-b { background: rgba(0,105,92,.72);    top: 0;    right: 0; }
.venn-c {
  background: rgba(191,54,12,.72);
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}
.venn-c:hover { transform: translateX(-50%) scale(1.05); }

.venn-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -42%);
  background: rgba(255,255,255,.92);
  border-radius: 50%;
  width: 70px;
  height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 2px 10px rgba(0,0,0,.2);
  z-index: 10;
}
.venn-center small { font-size: .6rem; color: var(--text-muted); }

/* ── TIMELINE – LENTA VREMENA ────────────────────────────── */
.timeline {
  position: relative;
  padding: 1.5rem 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, #1565C0, #E65100);
  transform: translateX(-50%);
  border-radius: 2px;
}

.timeline-item {
  position: relative;
  width: 46%;
  margin-bottom: 2.5rem;
  animation: fadeIn .5s ease;
}

.timeline-item.left  { left: 0;   text-align: right; }
.timeline-item.right { left: 54%; text-align: left;  }

.timeline-dot {
  position: absolute;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  top: 1.2rem;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px currentColor;
  z-index: 2;
}

.timeline-item.left  .timeline-dot { right: -12.5%; }
.timeline-item.right .timeline-dot { left:  -12.5%; }

.dot-blue   { background: #1565C0; color: #1565C0; }
.dot-green  { background: #2E7D32; color: #2E7D32; }
.dot-red    { background: #C62828; color: #C62828; }
.dot-purple { background: #6A1B9A; color: #6A1B9A; }
.dot-orange { background: #E65100; color: #E65100; }
.dot-teal   { background: #00695C; color: #00695C; }
.dot-star   { background: #003399; color: #003399; }

.timeline-content {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.timeline-content:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,.15);
}

.timeline-date {
  font-size: .8rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: .4rem;
}

.timeline-content h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .45rem;
  color: var(--text);
}

.timeline-content p { font-size: .93rem; color: var(--text-muted); }

.timeline-badge {
  display: inline-block;
  margin-top: .6rem;
  padding: .25rem .75rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .4px;
}

.badge-blue   { background: #E3F2FD; color: #1565C0; }
.badge-green  { background: #E8F5E9; color: #2E7D32; }
.badge-red    { background: #FFEBEE; color: #C62828; }
.badge-purple { background: #F3E5F5; color: #6A1B9A; }
.badge-orange { background: #FBE9E7; color: #BF360C; }
.badge-teal   { background: #E0F2F1; color: #00695C; }
.badge-star   { background: #E8EAF6; color: #1A237E; }

/* ── FLASHCARDS ──────────────────────────────────────────── */
.flashcard-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.fc-btn {
  padding: .55rem 1.4rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: .92rem;
  font-weight: 600;
  transition: background var(--transition), transform var(--transition);
}
.fc-btn:hover    { background: #0D47A1; transform: scale(1.04); }
.fc-btn:disabled { background: #90CAF9; cursor: not-allowed; transform: none; }

#fc-counter {
  font-weight: 700;
  font-size: 1rem;
  color: var(--primary);
  min-width: 60px;
  text-align: center;
}

.flashcard-wrapper {
  perspective: 1200px;
  max-width: 640px;
  margin: 0 auto;
  cursor: pointer;
}

.flashcard {
  width: 100%;
  height: 260px;
  position: relative;
}

.flashcard-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.4,0,.2,1);
}

.flashcard.flipped .flashcard-inner {
  transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: var(--shadow);
}

.flashcard-front {
  background: linear-gradient(135deg, #1565C0 0%, #1976D2 100%);
  color: #fff;
}

.flashcard-back {
  background: linear-gradient(135deg, #2E7D32 0%, #388E3C 100%);
  color: #fff;
  transform: rotateY(180deg);
}

.fc-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: .8;
  margin-bottom: .8rem;
}

.fc-question {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.4;
}

.fc-hint {
  margin-top: 1.2rem;
  font-size: .8rem;
  opacity: .75;
  font-style: italic;
}

.fc-answer {
  font-size: 1.05rem;
  line-height: 1.6;
  white-space: pre-line;
}

.fc-progress {
  max-width: 640px;
  margin: 1rem auto 0;
  height: 6px;
  background: #ddd;
  border-radius: 3px;
  overflow: hidden;
}

.fc-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #42A5F5);
  border-radius: 3px;
  transition: width .4s ease;
}

/* ── KVIZ ────────────────────────────────────────────────── */
.quiz-header { margin-bottom: 1.5rem; }

#quiz-progress-text {
  display: block;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: .5rem;
}

.quiz-progress-bar-wrap {
  height: 8px;
  background: #ddd;
  border-radius: 4px;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #1565C0, #42A5F5);
  border-radius: 4px;
  transition: width .4s ease;
}

.quiz-question-box {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

#quiz-question {
  font-size: 1.22rem;
  font-weight: 700;
  margin-bottom: 1.4rem;
  color: var(--text);
  line-height: 1.4;
}

.quiz-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .9rem;
}

.quiz-option {
  padding: .85rem 1.1rem;
  border: 2px solid #ddd;
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  font-size: .96rem;
  font-weight: 500;
  text-align: left;
  transition: all var(--transition);
  line-height: 1.35;
  color: var(--text);
}
.quiz-option:hover:not(:disabled) {
  border-color: var(--primary);
  background: var(--primary-lt);
  transform: translateY(-2px);
}
.quiz-option.correct {
  background: #E8F5E9;
  border-color: #2E7D32;
  color: #1B5E20;
  font-weight: 700;
}
.quiz-option.incorrect {
  background: #FFEBEE;
  border-color: #C62828;
  color: #B71C1C;
}
.quiz-option:disabled { cursor: not-allowed; }

.quiz-feedback {
  margin-top: 1.2rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .96rem;
  line-height: 1.5;
}
.quiz-feedback.correct-fb {
  background: #E8F5E9;
  color: #1B5E20;
  border-left: 4px solid #2E7D32;
}
.quiz-feedback.incorrect-fb {
  background: #FFEBEE;
  color: #B71C1C;
  border-left: 4px solid #C62828;
}

.quiz-next-btn {
  margin-top: 1.2rem;
  padding: .65rem 1.6rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 700;
  transition: background var(--transition), transform var(--transition);
  display: block;
}
.quiz-next-btn:hover { background: #0D47A1; transform: scale(1.03); }

/* Rezultati kviza */
.quiz-result {
  text-align: center;
  background: #fff;
  border-radius: var(--radius);
  padding: 3rem 2rem;
  box-shadow: var(--shadow);
}

.result-icon  { font-size: 4rem; margin-bottom: 1rem; }

.quiz-result h3 {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: .6rem;
}

.quiz-result p {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}

.result-score {
  font-size: 2.4rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 1.5rem;
}

.quiz-restart-btn {
  padding: .75rem 2rem;
  background: linear-gradient(135deg, var(--primary), #1976D2);
  color: #fff;
  border: none;
  border-radius: 30px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 700;
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: 0 4px 14px rgba(21,101,192,.35);
}
.quiz-restart-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(21,101,192,.45);
}

/* ── LIGHTBOX ────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.88);
  cursor: zoom-out;
}

.lightbox-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  padding: 1.5rem;
  max-width: 95vw;
  max-height: 95vh;
  animation: lbZoomIn .35s cubic-bezier(.4,0,.2,1);
}

@keyframes lbZoomIn {
  from { transform: scale(.82); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.lightbox-img {
  max-width:  90vw;
  max-height: 82vh;
  border-radius: var(--radius);
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
  object-fit: contain;
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-caption {
  color: rgba(255,255,255,.85);
  font-size: .88rem;
  font-style: italic;
  text-align: center;
  max-width: 600px;
}

.lightbox-close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  border: 2px solid rgba(255,255,255,.4);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
  backdrop-filter: blur(4px);
  line-height: 1;
}
.lightbox-close:hover {
  background: rgba(255,255,255,.3);
  transform: scale(1.12) rotate(90deg);
}

/* ── UTILITY ─────────────────────────────────────────────── */
.hidden { display: none !important; }

/* ── FOOTER ──────────────────────────────────────────────── */
footer {
  background: linear-gradient(135deg, #0D47A1, #1565C0);
  color: #fff;
  text-align: center;
  padding: 2rem 1.5rem;
}

footer p     { margin-bottom: .3rem; font-size: .92rem; }
footer small { opacity: .75; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 900px) {
  .intro-grid { grid-template-columns: 1fr; }
  .intro-image-box { order: -1; }

  .timeline::before { left: 18px; }

  .timeline-item {
    width: 88%;
    left: 44px !important;
    text-align: left !important;
    margin-bottom: 2rem;
  }