/* Dutch Inburgering A2 Study Site - Styles */

:root {
  --primary: #1e3a5f;
  --primary-light: #2c5282;
  --accent: #ed8936;
  --success: #48bb78;
  --warning: #ecc94b;
  --danger: #f56565;
  --bg: #f7fafc;
  --card-bg: #ffffff;
  --text: #2d3748;
  --text-light: #718096;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --radius: 8px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  padding: 0;
  margin: 0;
}

/* Navigation */
.nav {
  background: var(--primary);
  color: white;
  padding: 1rem 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

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

.nav-brand {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  text-decoration: none;
}

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

.nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.nav-links a {
  color: rgba(255,255,255,0.9);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
  background: var(--primary-light);
  color: white;
}

/* Main Content */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem;
}

/* Typography */
h1 {
  font-size: 2.25rem;
  color: var(--primary);
  margin-bottom: 1.5rem;
  border-bottom: 3px solid var(--accent);
  padding-bottom: 0.5rem;
}

h2 {
  font-size: 1.5rem;
  color: var(--primary);
  margin: 2rem 0 1rem;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid var(--border);
}

h3 {
  font-size: 1.25rem;
  color: var(--primary-light);
  margin: 1.5rem 0 0.75rem;
}

p {
  margin-bottom: 1rem;
}

/* Links */
a {
  color: var(--primary-light);
  text-decoration: none;
}

a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* Cards */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

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

.card-link {
  display: block;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid var(--primary);
}

.card-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  text-decoration: none;
}

.card-link h3 {
  margin: 0 0 0.5rem;
  color: var(--primary);
}

.card-link p {
  margin: 0;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.5rem;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

th {
  background: var(--primary);
  color: white;
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
}

td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

tr:last-child td {
  border-bottom: none;
}

tr:nth-child(even) {
  background: var(--bg);
}

/* Code blocks */
pre, code {
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
}

code {
  background: #edf2f7;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-size: 0.9em;
}

pre {
  background: var(--primary);
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1rem 0 1.5rem;
  line-height: 1.8;
}

pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* Lists */
ul, ol {
  margin: 0.5rem 0 1rem 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

/* Checkboxes */
input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.5rem;
  cursor: pointer;
}

.checklist {
  list-style: none;
  margin-left: 0;
}

.checklist li {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  background: var(--card-bg);
  margin-bottom: 0.5rem;
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.checklist li.completed {
  background: #c6f6d5;
  text-decoration: line-through;
  color: var(--text-light);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-light);
  color: white;
  text-decoration: none;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #38a169;
}

.btn-warning {
  background: var(--warning);
  color: var(--text);
}

.btn-danger {
  background: var(--danger);
  color: white;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: white;
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

/* Progress Bar */
.progress-container {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}

.progress-bar {
  height: 1.5rem;
  background: var(--border);
  border-radius: 1rem;
  overflow: hidden;
  margin: 0.5rem 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
  border-radius: 1rem;
  transition: width 0.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.85rem;
}

/* Flashcard Styles */
.flashcard-container {
  perspective: 1000px;
  margin: 2rem 0;
}

.flashcard {
  width: 100%;
  min-height: 300px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s;
  cursor: pointer;
}

.flashcard.flipped {
  transform: rotateY(180deg);
}

.flashcard-front,
.flashcard-back {
  position: absolute;
  width: 100%;
  min-height: 300px;
  backface-visibility: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

.flashcard-front {
  background: var(--primary);
  color: white;
}

.flashcard-back {
  background: var(--card-bg);
  transform: rotateY(180deg);
  border: 3px solid var(--accent);
}

.flashcard-category {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  opacity: 0.8;
  margin-bottom: 1rem;
}

.flashcard-content {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.4;
}

.flashcard-hint {
  font-size: 0.9rem;
  margin-top: 1rem;
  opacity: 0.7;
}

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

.flashcard-counter {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 1rem;
}

/* Quiz Styles */
.quiz-question {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 1.5rem 0;
  box-shadow: var(--shadow);
}

.quiz-question h3 {
  margin-top: 0;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.quiz-option {
  display: block;
  padding: 1rem 1.5rem;
  background: var(--bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.quiz-option:hover {
  border-color: var(--primary);
  background: white;
}

.quiz-option.selected {
  border-color: var(--primary);
  background: #ebf4ff;
}

.quiz-option.correct {
  border-color: var(--success);
  background: #c6f6d5;
}

.quiz-option.incorrect {
  border-color: var(--danger);
  background: #fed7d7;
}

.quiz-feedback {
  padding: 1rem;
  border-radius: var(--radius);
  margin-top: 1rem;
  font-weight: 600;
}

.quiz-feedback.correct {
  background: #c6f6d5;
  color: #276749;
}

.quiz-feedback.incorrect {
  background: #fed7d7;
  color: #c53030;
}

/* Alert/Notice boxes */
.alert {
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin: 1rem 0;
  border-left: 4px solid;
}

.alert-info {
  background: #ebf8ff;
  border-color: #4299e1;
  color: #2b6cb0;
}

.alert-warning {
  background: #fffff0;
  border-color: var(--warning);
  color: #975a16;
}

.alert-success {
  background: #f0fff4;
  border-color: var(--success);
  color: #276749;
}

.alert-danger {
  background: #fff5f5;
  border-color: var(--danger);
  color: #c53030;
}

/* Template Box */
.template-box {
  background: #1a202c;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: var(--radius);
  margin: 1rem 0;
  font-family: 'SF Mono', Monaco, 'Courier New', monospace;
  line-height: 2;
  position: relative;
}

.template-box::before {
  content: 'TEMPLATE';
  position: absolute;
  top: -0.75rem;
  left: 1rem;
  background: var(--accent);
  color: white;
  padding: 0.2rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.template-box .placeholder {
  color: var(--accent);
  font-weight: 600;
}

/* Week/Day schedule */
.week-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.week-header {
  background: var(--primary);
  color: white;
  padding: 1rem 1.5rem;
  font-weight: 700;
}

.week-content {
  padding: 1.5rem;
}

.day-item {
  display: flex;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.day-item:last-child {
  border-bottom: none;
}

.day-number {
  background: var(--primary-light);
  color: white;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.85rem;
  margin-right: 1rem;
  flex-shrink: 0;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.back-link:hover {
  color: var(--primary);
}

/* Horizontal rule */
hr {
  border: none;
  height: 2px;
  background: var(--border);
  margin: 2rem 0;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    width: 100%;
  }

  .container {
    padding: 1rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.25rem;
  }

  .flashcard-content {
    font-size: 1.25rem;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }
}

/* Print styles */
@media print {
  .nav, .btn, .flashcard-controls, .no-print {
    display: none !important;
  }

  body {
    background: white;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  .card, .week-card, table {
    box-shadow: none;
    break-inside: avoid;
  }

  pre {
    background: #f0f0f0;
    color: black;
  }
}

/* Print flashcards layout */
@media print {
  .print-flashcards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .print-card {
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 1rem;
    page-break-inside: avoid;
    min-height: 150px;
  }
}
