@import url('https://fonts.googleapis.com/css2?family=Libre+Franklin:wght@300;400;500;600;700&family=Merriweather:wght@400;700&display=swap');

:root {
  --primary-color: #1a1a2e;
  --secondary-color: #16213e;
  --accent-color: #0f4c75;
  --light-accent: #3282b8;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-light: #6a6a6a;
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border-color: #e0e0e0;
  --success-color: #28a745;
  --warning-color: #ffc107;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Libre Franklin', sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-white);
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Merriweather', serif;
  line-height: 1.3;
  margin-bottom: 1rem;
  font-weight: 700;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
  margin-bottom: 1rem;
  line-height: 1.7;
}

a {
  text-decoration: none;
  color: var(--accent-color);
  transition: color 0.3s ease;
}

a:hover {
  color: var(--light-accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Header Styles */
header {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.header-top {
  background-color: var(--primary-color);
  color: white;
  padding: 0.5rem 0;
}

.header-top .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.header-top a {
  color: white;
  margin-left: 1rem;
}

.header-main {
  padding: 1rem 0;
}

.header-main .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color);
  font-family: 'Merriweather', serif;
}

.logo span {
  color: var(--accent-color);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

nav a {
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease;
}

nav a:hover,
nav a.active {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--primary-color);
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, var(--accent-color) 100%);
  color: white;
  padding: 4rem 0;
  text-align: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  color: white;
}

.hero p {
  font-size: 1.2rem;
  max-width: 700px;
  margin: 0 auto 2rem;
  color: rgba(255,255,255,0.95);
}

.hero .btn {
  display: inline-block;
  margin: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--accent-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--light-accent);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(15, 76, 117, 0.3);
}

.btn-secondary {
  background-color: white;
  color: var(--accent-color);
  border: 2px solid var(--accent-color);
}

.btn-secondary:hover {
  background-color: var(--accent-color);
  color: white;
}

/* Section Styles */
section {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title h2 {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.section-title p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto;
}

.section-alt {
  background-color: var(--bg-light);
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Card Styles */
.card {
  background-color: var(--bg-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--primary-color);
}

.card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.card-excerpt {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.card-link {
  color: var(--accent-color);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

/* Article Styles */
.article-header {
  padding: 3rem 0;
  background-color: var(--bg-light);
}

.article-title {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.article-meta {
  display: flex;
  gap: 1.5rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.article-content {
  padding: 3rem 0;
}

.article-content img {
  margin: 2rem 0;
  border-radius: 8px;
}

.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.article-content h3 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--secondary-color);
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.article-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
}

.article-content blockquote {
  border-left: 4px solid var(--accent-color);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-secondary);
}

/* Feature Section */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.feature {
  text-align: center;
  padding: 2rem;
}

.feature-icon {
  width: 80px;
  height: 80px;
  background-color: var(--accent-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  font-weight: 700;
}

.feature h3 {
  margin-bottom: 1rem;
  color: var(--primary-color);
}

/* Quiz Styles */
.quiz-container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 3rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.quiz-progress {
  width: 100%;
  height: 8px;
  background-color: var(--bg-light);
  border-radius: 4px;
  margin-bottom: 2rem;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.quiz-question {
  display: none;
}

.quiz-question.active {
  display: block;
}

.quiz-question h3 {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: var(--primary-color);
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.quiz-option {
  padding: 1.25rem;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: white;
  text-align: left;
  font-size: 1rem;
}

.quiz-option:hover {
  border-color: var(--accent-color);
  background-color: var(--bg-light);
}

.quiz-option.selected {
  border-color: var(--accent-color);
  background-color: rgba(15, 76, 117, 0.1);
}

.quiz-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  justify-content: space-between;
}

.quiz-result {
  display: none;
  text-align: center;
  padding: 2rem;
}

.quiz-result.active {
  display: block;
}

.quiz-score {
  font-size: 3rem;
  color: var(--accent-color);
  font-weight: 700;
  margin: 1rem 0;
}

/* Contact Form */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent-color);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: white;
  padding: 3rem 0 1rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: white;
  font-size: 1.1rem;
}

.footer-section ul {
  list-style: none;
}

.footer-section ul li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: rgba(255,255,255,0.8);
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
  color: rgba(255,255,255,0.7);
  font-size: 0.9rem;
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 1rem 0;
  background-color: var(--bg-light);
}

.breadcrumbs ul {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.breadcrumbs li::after {
  content: '/';
  margin-left: 0.5rem;
  color: var(--text-light);
}

.breadcrumbs li:last-child::after {
  content: '';
}

.breadcrumbs a {
  color: var(--text-secondary);
}

/* Info Box */
.info-box {
  background-color: var(--bg-light);
  border-left: 4px solid var(--accent-color);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 4px;
}

.info-box h4 {
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

th {
  background-color: var(--bg-light);
  font-weight: 600;
  color: var(--primary-color);
}

tr:hover {
  background-color: var(--bg-light);
}

/* Responsive */
@media (max-width: 992px) {
  .grid-3, .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .features {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-content {
    grid-template-columns: repeat(2, 1fr);
  }
  
  nav ul {
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.25rem; }
  
  .hero h1 {
    font-size: 2.2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  nav {
    display: none;
  }
  
  nav.active {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    border-top: 1px solid var(--border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  }
  
  nav.active ul {
    flex-direction: column;
    padding: 1rem;
    gap: 0;
  }
  
  nav.active li {
    width: 100%;
    border-bottom: 1px solid var(--border-color);
  }
  
  nav.active a {
    display: block;
    padding: 1rem;
  }
  
  .mobile-menu-toggle {
    display: block;
  }
  
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .features {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .article-title {
    font-size: 2rem;
  }
  
  .quiz-container {
    padding: 2rem 1rem;
  }
}

@media (max-width: 480px) {
  .container, .container-narrow {
    padding: 0 1rem;
  }
  
  section {
    padding: 2.5rem 0;
  }
  
  .hero {
    padding: 2.5rem 0;
  }
  
  .btn {
    padding: 0.65rem 1.25rem;
    font-size: 0.9rem;
  }
}
