@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,900;1,9..144,900&family=Open+Sans:wght@400;600;700&display=swap');

/* Skip-to-content link (accessibility) */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: var(--yellow);
  color: var(--brown);
  padding: 12px 18px;
  font-weight: 600;
  text-decoration: none;
  z-index: 1000;
  border-radius: 0 0 6px 0;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

:root {
  --blue:    #1E22AA;
  --blue-dk: #0F25A2;
  --yellow:  #FFC400;
  --cream:   #F9F4F0;
  --white:   #FFFFFF;
  --brown:   #7D4917;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: 'Open Sans', sans-serif;
  background: var(--blue);
  color: #111;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--blue);
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===========================
   HEADER
=========================== */
.site-header {
  flex-shrink: 0;
  padding: 16px 5%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  height: 48px;
  width: auto;
}

/* ===========================
   TOP LAYOUT — two columns, full width
   Hero left, sidebar right.
=========================== */
.top-layout {
  flex: 1;
  min-height: 0;
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  align-items: stretch;
  max-height: calc(100vh - 80px);
}

/* ----- LEFT COLUMN: hero image ----- */
.hero-cta-group {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--blue);
}

.stage {
  width: 100%;
  height: 100%;
  line-height: 0;
  overflow: hidden;
}

.stage picture {
  display: block;
  width: 100%;
  height: 100%;
}

.stage .hero {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

/* ----- RIGHT COLUMN: sidebar ----- */
.country-sidebar {
  display: flex;
  flex-direction: column;
  background: var(--cream);
  height: 100%;
  overflow: hidden;
}

/* Yellow bar header */
.blueoverlay {
  background: var(--yellow);
  text-align: center;
  padding: 22px 20px;
  flex-shrink: 0;
}

.blueoverlay h1 {
  margin: 0;
  color: var(--brown);
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 900;
  font-size: 1.6rem;
  line-height: 1.05;
  text-transform: uppercase;
}

.blueoverlay p {
  margin: 8px 0 0;
  color: var(--brown);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  font-weight: 600;
  text-transform: uppercase;
}

/* Country list */
.country-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
  padding: 22px 28px;
  margin: 0 auto;
  width: fit-content;
  overflow-y: auto;
}

.country-item {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
  transition: transform 0.15s ease;
}

.country-item:hover { transform: translateX(4px); }
.country-item:hover .country-name { color: var(--blue-dk); }

.country-item:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
  border-radius: 10px;
}

.countryflag {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(0,0,0,0.1);
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.country-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brown);
  text-transform: uppercase;
  transition: color 0.15s;
}

/* ===========================
   FOOTER
=========================== */
footer {
  flex-shrink: 0;
  margin-top: 0;
}

#f2 {
  background: var(--blue);
  padding: 20px 0;
  border-top: 4px solid var(--yellow);
}

#f2 .footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}

.footer-logo {
  height: 36px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.85;
}

#footerp {
  margin: 0;
  font-size: 0.85rem;
  font-weight: 400;
  line-height: 1.3;
  text-align: right;
  color: rgba(255,255,255,0.65);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

#footerp a {
  color: var(--yellow);
  font-weight: 600;
}

.footer-copy {
  font-size: 0.78rem;
}

#f3 {
  background: var(--blue-dk);
  padding: 10px 0;
  text-align: center;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  letter-spacing: 0.04em;
}

#f3 p { margin: 0; }

/* ===========================
   WIDE DESKTOP (1400px+)
   Sidebar gets wider, countries go 2-column
=========================== */
@media (min-width: 1400px) {
  .top-layout {
    grid-template-columns: minmax(0, 1fr) 580px;
  }

  .blueoverlay h1 { font-size: 1.85rem; }
  .blueoverlay p  { font-size: 1rem; }

  .country-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 24px;
    align-items: start;
    padding: 28px 32px;
  }

  .countryflag { width: 52px; height: 52px; }
  .country-name { font-size: 1.2rem; }
}

/* ===========================
   MOBILE (768px and below)
=========================== */
@media (max-width: 768px) {
  html, body {
    height: auto;
    overflow: visible;
  }

  body { background: var(--cream); }

  .site-header {
    padding: 14px 20px 10px;
    justify-content: flex-start;
  }

  .logo { height: 36px; }

  .top-layout {
    grid-template-columns: 1fr;
    max-height: none;
    height: auto;
  }

  .hero-cta-group {
    height: auto;
    overflow: visible;
  }

  .stage {
    height: auto;
  }

  .stage .hero {
    height: auto;
    object-fit: initial;
  }

  .country-sidebar {
    height: auto;
    overflow: visible;
  }

  .blueoverlay {
    padding: 18px 20px;
  }

  .blueoverlay h1 { font-size: 1.4rem; }
  .blueoverlay p  { font-size: 0.9rem; }

  .country-list {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    padding: 22px 24px 28px;
    overflow: visible;
    width: fit-content;
    margin: 0 auto;
  }

  .countryflag { width: 50px; height: 50px; }
  .country-name { font-size: 1.2rem; }

  #f2 { padding: 16px 0; }
  #f2 .footer-row { padding: 0 20px; }
  #footerp { font-size: 0.75rem; }
  .footer-logo { height: 30px; }
}

@media (max-width: 400px) {
  .countryflag { width: 42px; height: 42px; }
  .country-name { font-size: 1.05rem; }
}
