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

/* =====================
   Design System (Cores)
===================== */
:root {
  /* Primary */
  --color-primary: #2c5f7c;
  --color-primary-dark: #1f1f1f;
  --color-primary-hover: #444;

  /* Text */
  --color-text-main: #333;
  --color-text-light: #666;
  --color-text-inverse: #ffffff;

  /* Backgrounds */
  --color-bg-main: #f5f5f5;
  --color-bg-card: #ffffff;

  /* Links */
  --color-link: #0066cc;
  --color-link-hover: #004499;

  /* Borders & accents */
  --color-accent: #ffd700;
  --color-border: #cccccc;
  --color-border-dark: #555;

  /* Shadows */
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* =====================
   Base
===================== */
body {
  font-family: 'Roboto', Arial, sans-serif;
  background-color: var(--color-bg-main);
  line-height: 1.6;
  font-size: 20px;
  color: var(--color-text-main);
}

/* =====================
   Header & Nav
===================== */
header {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  padding: 20px;
  text-align: center;
}

#course-title {
  display: block;
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 10px;
}

nav {
  background-color: var(--color-primary-dark);
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
}

nav a {
  color: var(--color-text-inverse);
  text-decoration: none;
  padding: 15px 20px;
  display: block;
  flex: 1;
  text-align: center;
  transition: background-color 0.3s;
}

nav a:hover,
nav a:focus {
  background-color: var(--color-primary-hover);
}

/* =====================
   Main
===================== */
main {
  max-width: 1200px;
  margin: 60px auto;
  padding: 0 20px;
}

main > h1 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 30px;
  color: var(--color-text-main);
}

.content-wrapper {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}

/* =====================
   Cards
===================== */
.card {
  background-color: var(--color-bg-card);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translate(-3px);
  box-shadow: var(--shadow-card-hover);
}

.card h2 {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  padding: 15px;
  text-align: center;
  font-size: 1.2rem;
  margin: 0;
  font-weight: normal;
}

/* =====================
   About
===================== */
.about-card .about-content {
  padding: 25px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.text-content {
  flex: 1;
}

.text-content p {
  max-width: 65ch;
  text-align: left;
}

.about-content img {
  width: 150px;
  height: auto;
  border: 3px solid var(--color-primary);
  border-radius: 4px;
  flex-shrink: 0;
}

/* =====================
   Country
===================== */
.country {
  padding: 25px;
  padding-top: 20px;
}

.country h3 {
  text-align: center;
  color: var(--color-primary);
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.country-content {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: 15px;
}

.country-content figure {
  text-align: center;
  margin: 0;
  flex-shrink: 0;
}

.country-content figure img {
  width: 130px;
  height: auto;
  border: 1px solid var(--color-border);
  display: block;
  margin-bottom: 8px;
}

.country-content figcaption {
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-text-light);
}

.country-content p {
  flex: 1;
  max-width: 65ch;
  text-align: left;
}

/* =====================
   Resources
===================== */
.resources-card {
  display: flex;
  flex-direction: column;
}

.resources-card ul {
  padding-left: 40px;
  list-style-position: inside;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}

.resources-card li {
  margin-bottom: 12px;
}

.resources-card li:last-child {
  margin-bottom: 0;
}

.resources-card a {
  color: var(--color-link);
  text-decoration: underline;
  transition: color 0.2s;
}

.resources-card a:hover,
.resources-card a:focus {
  color: var(--color-link-hover);
}

/* =====================
   Footer
===================== */
footer {
  background-color: var(--color-primary);
  color: var(--color-text-inverse);
  text-align: center;
  padding: 20px;
  margin-top: 40px;
}

footer p {
  margin: 5px 0;
}

#lastModified {
  font-size: 0.9rem;
  color: var(--color-accent);
}

/* =====================
   Responsive
===================== */
@media (max-width: 900px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }

  nav a {
    border-bottom: 1px solid var(--color-border-dark);
  }

  nav a:last-child {
    border-bottom: none;
  }

  .about-card .about-content {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .about-card .text-content p {
    text-align: center;
  }

  .country-content {
    flex-direction: column;
    text-align: center;
  }

  .country-content p {
    text-align: center;
  }

  main > h1 {
    font-size: 1.5rem;
  }
}
