@font-face {
  font-family: "Mulish";
  src: url("mulish-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Mulish";
  src: url("mulish-latin-700-normal.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

:root {
  --brand-blue: #1976d2;
  --white: #ffffff;
  --off-white: #f7f7f8;
  --black: #010101;

  --font-family: "Mulish", sans-serif;
  --heading-size: 26px;
  --body-text: 18px;
  --link-text: 20px;
  --footer-text: 12px;
  --footer-link-size: 12px;
  --line-height: 1.2;

  --content-width: 326px;
  --content-vertical-padding: 40px;
  --logo-width: 100px;
  --header-height: 69px;

  --card-bg: #ffffff;
  --card-border: #e0e0e0;
  --card-shadow: rgba(0, 0, 0, 0.08);
  --card-hover-shadow: rgba(0, 0, 0, 0.15);
  --cta-hover: #1565c0;
}

body {
  font-family: var(--font-family);
  color: var(--black);
  background: var(--off-white);
  line-height: var(--line-height);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  background: var(--white);
  height: var(--header-height);
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0px 2px 5px 0px rgba(158, 158, 158, 0.3);
}

.header-content {
  width: var(--content-width);
  max-width: calc(100% - 20px);
  display: flex;
  align-items: center;
}

.logo {
  width: var(--logo-width);
  height: auto;
  display: block;
}

.main {
  background: var(--off-white);
  padding: var(--content-vertical-padding) 0;
  display: flex;
  justify-content: center;
  flex: 1;
}

.hero-content {
  width: var(--content-width);
  max-width: calc(100% - 20px);
  text-align: center;
}

.hero-content h1 {
  text-align: center;
}

h1 {
  font-size: var(--heading-size);
  font-weight: 700;
  margin-bottom: 20px;
  line-height: var(--line-height);
}

.body-content {
  font-size: var(--body-text);
  font-weight: 400;
  line-height: var(--line-height);
}

.body-content p {
  margin-bottom: 1.2em;
}

.body-content p:last-child {
  margin-bottom: 0;
}

.link {
  color: var(--brand-blue);
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

.link:hover {
  opacity: 0.8;
}

.footer {
  background: var(--brand-blue);
  padding: 12px 0;
  display: flex;
  justify-content: center;
}

.footer-content {
  width: var(--content-width);
  max-width: calc(100% - 20px);
  text-align: center;
  color: var(--off-white);
}

.footer-content p {
  margin-bottom: 0;
  line-height: var(--line-height);
}

.footer-link {
  color: var(--off-white);
  font-size: var(--footer-link-size);
  text-decoration: underline;
  transition: opacity 0.2s ease;
}

.footer-link:hover {
  opacity: 0.8;
}

.copyright {
  font-size: var(--footer-text);
}

.content-page .hero-content {
  text-align: left;
}

.content-page h2 {
  font-size: 24px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
}

.content-page h3 {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
}

.content-page .body-content {
  font-size: 16px;
}

.content-page .section {
  margin-bottom: 20px;
}

.content-page .section:last-child {
  margin-bottom: 0;
}

.content-page .section p {
  margin-bottom: 12px;
}

.content-page ul {
  list-style-type: disc;
  margin-left: 1.5em;
  margin-bottom: 1em;
}

.content-page li {
  margin-bottom: 0;
  line-height: 1.2;
}

.content-page ul ul {
  margin-top: 0;
}

.content-page em,
.content-page i {
  font-style: italic;
}

.content-page strong,
.content-page b {
  font-weight: 700;
}

/* Sidebar Page Layout */
.sidebar-page .main {
  padding: var(--content-vertical-padding) 20px;
}

.page-container {
  display: flex;
  flex-direction: column;
  max-width: 1200px;
  margin: 0 auto;
  gap: 40px;
}

.sidebar {
  width: 100%;
  flex-shrink: 0;
}

.sidebar-section {
  margin-bottom: 32px;
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-heading {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--black);
}

.sidebar-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-links li {
  margin-bottom: 8px;
}

.sidebar-links li:last-child {
  margin-bottom: 0;
}

.sidebar-links a {
  color: var(--brand-blue);
  text-decoration: none;
  font-size: 16px;
  transition: opacity 0.2s ease;
}

.sidebar-links a:hover {
  opacity: 0.7;
  text-decoration: underline;
}

/* Active sidebar link (current page) */
.sidebar-link-active {
  color: var(--black);
  font-size: 16px;
  font-weight: 700;
  cursor: default;
}

/* Main Content Area */
.main-content {
  flex: 1;
  min-width: 0;
}

/* Logo Link */
.logo-link {
  display: block;
  line-height: 0;
}

/* Country Flags Banner (About Us page) */
.country-flags-banner {
  background: var(--off-white);
  padding: 30px 20px;
  display: flex;
  justify-content: center;
}

.flags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  align-items: center;
  max-width: 1200px;
}

.flag-link {
  display: block;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.flag-link:hover {
  transform: translateY(-4px);
  opacity: 0.8;
}

.flag-image {
  width: 106px;
  height: auto;
  display: block;
  border-radius: 4px;
  box-shadow: 0 2px 4px var(--card-shadow);
}

@media (min-width: 768px) {
  :root {
    --content-width: 716px;
    --logo-width: 100px;
    --footer-link-size: 14px;
  }

  .flag-image {
    width: 132px;
  }

  .flags-container {
    gap: 32px;
  }
}

@media (min-width: 1200px) {
  :root {
    --heading-size: 32px;
    --body-text: 20px;
    --footer-text: 14px;
    --footer-link-size: 14px;

    --content-width: 960px;
    --logo-width: 150px;
  }

  .header {
    box-shadow: none;
  }

  .country-flags-banner {
    padding: 40px 20px;
  }

  .flag-image {
    width: 158px;
  }

  .flags-container {
    gap: 40px;
  }
}

.homepage .hero-content {
  text-align: center;
}

.homepage h1 {
  margin-bottom: 40px;
}

.country-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 48px;
}

.country-card {
  display: block;
  position: relative;
  min-height: 160px;
  text-decoration: none;
  color: var(--black);
  perspective: 1000px;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 160px;
  text-align: center;
  transition: transform 0.6s;
  transform-style: preserve-3d;
}

@media (hover: hover) and (pointer: fine) {
  .country-card:hover .card-inner {
    transform: rotateY(180deg);
  }
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 160px;
  backface-visibility: hidden;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-front {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: 0 2px 4px var(--card-shadow);
  padding: 0;
  overflow: hidden;
}

.card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-back {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: 0 2px 4px var(--card-shadow);
  transform: rotateY(180deg);
  padding: 12px;
  flex-direction: column;
}

.country-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--black);
}

.country-description {
  font-size: 16px;
  line-height: 1.4;
  color: var(--black);
  margin-bottom: 0;
}

@media (hover: none), (pointer: coarse) {
  .card-back {
    display: none;
    position: relative;
    transform: none;
  }
}

.cta-section {
  text-align: center;
  padding: 32px 0;
}

.cta-text {
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 16px;
}

.cta-button {
  display: inline-block;
  background: var(--brand-blue);
  color: var(--white);
  padding: 12px 32px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  transition: background 0.2s ease;
}

.cta-button:hover {
  background: var(--cta-hover);
}

@media (min-width: 768px) {
  .country-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
  }

  .country-card,
  .card-inner,
  .card-front,
  .card-back {
    height: 160px;
  }

  .country-name {
    font-size: 24px;
  }

  .country-description {
    font-size: 16px;
  }
}

@media (min-width: 1200px) {
  .country-cards {
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
  }

  .country-card:nth-child(4) {
    grid-column: 1.5 / span 1;
  }

  .country-card:nth-child(5) {
    grid-column: 2.5 / span 1;
  }

  .country-name {
    font-size: 24px;
  }

  .cta-text {
    font-size: 32px;
  }

  .cta-button {
    font-size: 20px;
    padding: 14px 40px;
  }

  .page-container {
    flex-direction: row;
    gap: 60px;
  }

  .sidebar {
    width: 280px;
  }

  .sidebar-heading {
    font-size: 20px;
  }

  .sidebar-links a {
    font-size: 18px;
  }

  .sidebar-link-active {
    font-size: 18px;
  }
}
