
/* =========================================================
   THE GLOBAL GAZE — PORTUGAL
   Complete country page stylesheet
   ========================================================= */

* {
  box-sizing: border-box;
}

:root {
  --bg: #f6f2eb;
  --surface: #ffffff;
  --surface-soft: #fbf8f3;
  --text: #1c1b19;
  --muted: #6d675f;
  --accent: #8f6d48;
  --border: rgba(28, 27, 25, 0.09);
  --shadow: 0 22px 44px rgba(0, 0, 0, 0.08);
  --shadow-soft: 0 12px 28px rgba(0, 0, 0, 0.05);
  --max-width: 1240px;
  --content-width: 920px;
  --radius: 24px;
  --radius-sm: 16px;
  --transition: 0.28s ease;
}

/* =========================================================
   GENERAL
   ========================================================= */

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =========================================================
   HEADER AND NAVIGATION
   ========================================================= */

.site-header {
  position: absolute;
  inset: 0 0 auto 0;
  width: 100%;
  z-index: 40;
}

.navbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 34px 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links li {
  list-style: none;
}

.nav-links a {
  color: #ffffff;
  font-size: 0.98rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  opacity: 0.92;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.36);
  transition: opacity var(--transition);
}

.nav-links a:hover {
  opacity: 0.72;
}

.menu-btn {
  display: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  padding: 12px 18px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.42);
  color: #ffffff;
  font: inherit;
  cursor: pointer;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.16);
  transition:
    background var(--transition),
    transform var(--transition);
}

.menu-btn:hover {
  background: rgba(17, 17, 17, 0.56);
  transform: translateY(-1px);
}

/* =========================================================
   COUNTRY HERO
   ========================================================= */

.country-hero {
  min-height: 86vh;
  display: flex;
  align-items: center;
  background:
    linear-gradient(
      to right,
      rgba(10, 12, 16, 0.34) 0%,
      rgba(10, 12, 16, 0.18) 24%,
      rgba(10, 12, 16, 0.08) 52%,
      rgba(10, 12, 16, 0.03) 100%
    ),
    url("../images/europe/portugal/portugal-hero.jpg")
      center 40% / cover no-repeat;
}

.country-hero-overlay {
  width: 100%;
}

.country-hero-content {
  display: flex;
  justify-content: flex-start;
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding-top: 132px;
  padding-bottom: 84px;
}

.hero-title-block {
  max-width: 500px;
  padding: 22px 24px 24px;
  border-radius: 24px;
  background: rgba(14, 15, 18, 0.1);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.eyebrow {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.94);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.country-hero-content h1 {
  margin: 0;
  color: #ffffff;
  font-size: clamp(2.8rem, 6vw, 5rem);
  line-height: 0.94;
  letter-spacing: -0.06em;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.22);
}

.country-intro {
  max-width: 470px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.96);
  font-size: clamp(0.96rem, 1.45vw, 1.08rem);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.16);
}

/* =========================================================
   SHARED SECTIONS
   ========================================================= */

main section:not(.country-hero) {
  position: relative;
  width: min(calc(100% - 40px), var(--max-width));
  margin: 0 auto;
  padding: 96px 0 0;
}

main section:not(.country-hero)::before {
  content: "";
  display: block;
  width: 100%;
  max-width: 260px;
  height: 1px;
  margin: 0 auto 30px;
  background:
    linear-gradient(
      to right,
      transparent,
      rgba(28, 27, 25, 0.16),
      transparent
    );
}

.section-heading {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
  scroll-margin-top: 40px;
}

.section-heading h2,
.section-heading h3 {
  margin: 0;
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.section-heading h2 {
  font-size: clamp(2.3rem, 5vw, 4.2rem);
}

.section-heading h3 {
  font-size: clamp(1.9rem, 3.8vw, 2.9rem);
}

.section-heading p {
  max-width: 660px;
  margin: 18px auto 0;
  color: var(--muted);
  font-size: 1.03rem;
}

/* =========================================================
   AT A GLANCE
   ========================================================= */

.country-glance {
  max-width: var(--content-width);
}

.glance-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 46px;
}

.glance-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.glance-card h3 {
  margin: 0 0 10px;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
}

.glance-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.99rem;
}

/* =========================================================
   GALLERY INTRODUCTION
   ========================================================= */

.country-gallery-intro {
  max-width: 800px;
}

/* =========================================================
   PHOTO SEQUENCE
   ========================================================= */

.photo-sequence {
  max-width: var(--content-width);
}

.photo-sequence > .section-heading {
  margin-top: 88px;
  padding-top: 10px;
}

.photo-sequence > .section-heading:first-child {
  margin-top: 0;
  padding-top: 0;
}

.photo-sequence > .photo-frame,
.photo-sequence > .photo-pair,
.photo-sequence > .photo-grid-two,
.photo-sequence > .photo-grid-three,
.photo-sequence > .photo-feature-split,
.photo-sequence > .photo-feature-split-reverse {
  margin-top: 34px;
}

/* =========================================================
   PHOTO CARDS
   ========================================================= */

.photo-frame {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.photo-frame img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  object-position: center;
}

.photo-frame figcaption {
  flex: 0 0 auto;
  padding: 18px 20px 20px;
  border-top: 1px solid rgba(28, 27, 25, 0.08);
  background: rgba(255, 255, 255, 0.97);
  color: var(--muted);
  font-size: 0.97rem;
}

.photo-frame figcaption strong {
  display: block;
  margin-bottom: 6px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.5;
}

/* =========================================================
   STANDARD PHOTOGRAPH FORMATS
   ========================================================= */

/* Full-width landscape photographs */

.photo-frame-hero img,
.photo-frame-wide img,
.photo-frame-full img {
  aspect-ratio: 16 / 9;
}

.photo-frame-full {
  width: 100%;
}

/* Portrait photographs */

.photo-frame-vertical img {
  aspect-ratio: 3 / 5;
  object-fit: cover;
  object-position: center;
}

/*
  Long photographs.

  On desktop, these photographs have a minimum
  height so they remain noticeably longer than
  ordinary photographs placed alongside them.
*/

.photo-frame-tall {
  height: 100%;
}

.photo-frame-tall img {
  flex: 1 1 auto;
  min-height: 620px;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
}

/*
  Panorama photographs.

  Unlike ordinary hero photographs, panoramas
  retain their original proportions.

  This prevents excessive cropping and avoids
  blank space beneath the image.
*/

.photo-frame-panorama img {
  display: block;
  flex: none;
  width: 100%;
  height: auto;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
}

/* =========================================================
   STANDARD PHOTO GRIDS
   ========================================================= */

.photo-pair,
.photo-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.photo-grid-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.photo-pair > .photo-frame,
.photo-grid-two > .photo-frame,
.photo-grid-three > .photo-frame {
  height: 100%;
}

/* =========================================================
   LARGE PHOTO BESIDE TWO STACKED PHOTOS
   ========================================================= */

/*
  Used for sections such as:

  Lisbon
  Portuguese Food
  Other Places in Portugal

  The large photograph sits on the left.

  Two smaller photographs are stacked
  vertically on the right.
*/

.photo-feature-split {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 24px;
  align-items: stretch;
}

/* Optional reverse layout */

.photo-feature-split-reverse {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  gap: 24px;
  align-items: stretch;
}

.photo-feature-split-reverse .photo-feature-stack {
  order: 1;
}

.photo-feature-split-reverse > .photo-frame-tall {
  order: 2;
}

/* Right-hand column containing two photos */

.photo-feature-stack {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 24px;
  min-width: 0;
}

.photo-feature-stack .photo-frame {
  height: 100%;
}

.photo-feature-stack .photo-frame img {
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center;
}

/* =========================================================
   PORTUGAL GALLERY IMAGE POSITIONING
   ========================================================= */

/*
  The following rules improve the framing
  of selected photographs.

  They do not change the general gallery layout.
*/

/* Açores */

img[src*="acores-sete-cidades-lagoa-verde"],
img[src*="acores-sete-cidades-rua-da-igreja"] {
  object-position: center;
}

img[src*="acores-sete-cidades-igreja-sao-nicolau"] {
  object-position: center top;
}

img[src*="acores-monte-palace-abandoned-hotel"] {
  object-position: center;
}

/* Azeitão and Arrábida */

img[src*="azeitao-casa-museu"],
img[src*="azeitao-vila-nogueira"] {
  object-position: center;
}

img[src*="arrabida-lapa-de-santa-margarida"] {
  object-position: center;
}

/* Berlengas */

img[src*="berlengas-forte-sao-joao-baptista"],
img[src*="berlengas-crystal-clear-water"],
img[src*="berlengas-turquoise-cove"] {
  object-position: center;
}

/* Braga */

img[src*="braga-bom-jesus-do-monte"],
img[src*="braga-sanctuary-of-our-lady-of-sameiro"] {
  object-position: center;
}

img[src*="braga-baroque-stairway"] {
  object-position: center;
}

/* Évora */

img[src*="evora-capela-dos-ossos"] {
  object-position: center;
}

/* Lisbon */

img[src*="lisbon-sunset-view"],
img[src*="lisbon-oceanario"],
img[src*="lisbon-praca-do-comercio"] {
  object-position: center;
}

img[src*="lisbon-view-over-rua-augusta"] {
  object-position: center;
}

/* Portuguese Food */

img[src*="portuguese-food-francesinha"] {
  object-position: center 52%;
}

img[src*="portuguese-food-vinho-verde-tinto"] {
  object-position: center;
}

img[src*="portuguese-food-pasteis-de-belem"] {
  object-position: center 48%;
}

img[src*="portuguese-food-chanfana"] {
  object-position: center;
}

/* Monsanto */

img[src*="monsanto-castle"],
img[src*="house-between-granite-boulders"],
img[src*="traditional-stone-house-monsanto"] {
  object-position: center;
}

/* Sintra */

img[src*="sintra-pena-palace"],
img[src*="sintra-quinta-da-regaleira"],
img[src*="sintra-castelo-dos-mouros"] {
  object-position: center;
}

/* Rio Caldo */

img[src*="rio-caldo"] {
  object-position: center;
}

/* Serra da Estrela */

img[src*="serra-da-estrela-snow"] {
  object-position: center;
}

img[src*="serra-da-estrela-nossa-senhora"] {
  object-position: center;
}

/* Other Places in Portugal */

img[src*="santarem-convento-sao-francisco"] {
  object-position: center top;
}

img[src*="aveiro-canal-boat"] {
  object-position: center;
}

img[src*="bucaco-palace"] {
  object-position: center;
}

/* =========================================================
   TRAVEL NOTES
   ========================================================= */

.country-notes {
  max-width: var(--content-width);
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 46px;
}

.note-card {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.note-card h3 {
  margin: 0 0 10px;
  font-size: 1.14rem;
  letter-spacing: -0.02em;
}

.note-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {
  margin-top: 98px;
  padding: 42px 20px 46px;
  background: #111111;
  color: rgba(255, 255, 255, 0.86);
  text-align: center;
}

.footer-contact {
  margin-bottom: 32px;
}

.footer-label {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer-contact p,
.footer-meta p {
  margin: 8px 0;
}

.footer-meta {
  font-size: 0.95rem;
}

.site-footer a {
  color: #ffffff;
  text-decoration: underline;
}

/* =========================================================
   FLOATING SECTION NAVIGATION
   ========================================================= */

.floating-section-nav {
  position: fixed;
  right: 18px;
  bottom: 82px;
  z-index: 70;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.section-nav-toggle {
  width: 52px;
  height: 52px;
  margin: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.92);
  color: #ffffff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  transition:
    transform 0.25s ease,
    background 0.25s ease,
    opacity 0.25s ease;
}

.section-nav-toggle:hover {
  transform: translateY(-2px);
  background: #111111;
}

.section-nav-toggle.active {
  background: #111111;
}

.section-nav-menu {
  display: none;
  min-width: 220px;
  max-height: 70vh;
  margin-bottom: 0;
  padding: 10px;
  overflow-y: auto;
  border-radius: 16px;
  background: rgba(20, 20, 20, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
}

.section-nav-menu.show {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-nav-label {
  display: block;
  margin: 8px 4px 2px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.section-nav-label:first-child {
  margin-top: 2px;
}

.section-nav-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  font-size: 0.95rem;
  line-height: 1.4;
  transition:
    background 0.25s ease,
    opacity 0.25s ease;
}

.section-nav-menu a:hover,
.section-nav-menu a:focus {
  background: rgba(255, 255, 255, 0.12);
  opacity: 1;
}

/* =========================================================
   BACK TO TOP
   ========================================================= */

.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 70;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.92);
  color: #ffffff;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0.25s ease,
    transform 0.25s ease,
    background 0.25s ease;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-2px);
  background: #111111;
}

/* =========================================================
   RESPONSIVE — TABLETS
   ========================================================= */

@media (max-width: 1024px) {

  .country-hero-content {
    padding-top: 126px;
    padding-bottom: 76px;
  }

  .hero-title-block {
    max-width: 500px;
    padding: 20px 22px 22px;
  }

  .glance-grid,
  .notes-grid {
    grid-template-columns: 1fr;
  }

  .photo-grid-three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /*
    The main gallery layouts become single-column
    on tablets.

    Within split layouts, the two smaller photographs
    may remain side by side at this width.
  */

  .photo-pair,
  .photo-feature-split,
  .photo-feature-split-reverse {
    grid-template-columns: 1fr;
  }

  .photo-feature-split-reverse .photo-feature-stack,
  .photo-feature-split-reverse > .photo-frame-tall {
    order: initial;
  }

  .photo-feature-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: auto;
  }

  /*
    Remove the fixed desktop heights.

    The cards will adjust to the photograph
    and the caption, avoiding unnecessary
    blank space.
  */

  .photo-frame,
  .photo-frame-tall,
  .photo-frame-vertical,
  .photo-feature-stack .photo-frame,
  .photo-feature-split > .photo-frame-tall,
  .photo-feature-split-reverse > .photo-frame-tall {
    height: auto;
    min-height: 0;
  }

  /*
    Preserve portrait photographs.

    A 3:5 ratio means the image remains
    noticeably taller than it is wide.
  */

  .photo-frame-tall img,
  .photo-frame-vertical img {
    flex: none;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 5;
    object-fit: cover;
    object-position: center;
  }

  /*
    Smaller photographs in the stacked layout
    retain their landscape proportions.
  */

  .photo-feature-stack .photo-frame img {
    flex: none;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 11;
    object-fit: cover;
    object-position: center;
  }

  /*
    Full-width photographs remain landscape.
  */

  .photo-frame-hero img,
  .photo-frame-wide img,
  .photo-frame-full img {
    aspect-ratio: 16 / 9;
  }

  /*
    Panoramas retain natural proportions
    and are displayed without cropping.
  */

  .photo-frame-panorama img {
    flex: none;
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center;
  }

}

/* =========================================================
   RESPONSIVE — MOBILE
   ========================================================= */

@media (max-width: 768px) {

  /* Navigation */

  .navbar {
    justify-content: center;
    padding: 22px 0;
  }

  .menu-btn {
    display: inline-flex;
    position: absolute;
    right: 0;
    top: 36px;
    z-index: 60;
    transform: none;
    background: rgba(17, 17, 17, 0.58);
  }

  .menu-btn:hover {
    transform: none;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    z-index: 50;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    margin: 0;
    padding: 20px;
    border-radius: 18px;
    background: rgba(20, 20, 20, 0.94);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
    color: #ffffff;
    text-shadow: none;
  }

  /* Portugal Hero */

  .country-hero {
    min-height: 72vh;
    background:
      linear-gradient(
        to top,
        rgba(10, 12, 16, 0.34) 0%,
        rgba(10, 12, 16, 0.16) 46%,
        rgba(10, 12, 16, 0.08) 100%
      ),
      url("../images/europe/portugal/portugal-hero.jpg")
        center 40% / cover no-repeat;
  }

  .country-hero-content {
    align-items: flex-end;
    justify-content: flex-start;
    padding-top: 118px;
    padding-bottom: 54px;
  }

  .hero-title-block {
    max-width: 420px;
    padding: 18px 18px 20px;
    border-radius: 22px;
    background: rgba(14, 15, 18, 0.16);
    backdrop-filter: blur(1.5px);
    -webkit-backdrop-filter: blur(1.5px);
  }

  .country-hero-content h1 {
    font-size: clamp(2.5rem, 10vw, 4.2rem);
    line-height: 0.95;
  }

  .country-intro {
    max-width: 100%;
    margin-top: 14px;
    font-size: 0.94rem;
  }

  /* General Section Spacing */

  main section:not(.country-hero) {
    padding-top: 76px;
  }

  .photo-sequence > .section-heading {
    margin-top: 70px;
  }

  /*
    All gallery grids become single-column
    on mobile.

    The photographs retain their individual
    proportions.
  */

  .photo-pair,
  .photo-grid-two,
  .photo-grid-three,
  .photo-feature-stack,
  .photo-feature-split,
  .photo-feature-split-reverse {
    grid-template-columns: 1fr;
  }

  .photo-feature-stack {
    grid-template-rows: auto;
  }

  /*
    Cards use their natural heights.

    This prevents large white areas between
    photographs and captions.
  */

  .photo-frame,
  .photo-frame-hero,
  .photo-frame-wide,
  .photo-frame-full,
  .photo-frame-tall,
  .photo-frame-vertical,
  .photo-frame-panorama,
  .photo-pair > .photo-frame,
  .photo-grid-two > .photo-frame,
  .photo-grid-three > .photo-frame,
  .photo-feature-stack .photo-frame {
    height: auto;
    min-height: 0;
  }

  /*
    STANDARD PHOTOGRAPHS

    Maintain the desktop landscape ratio.
  */

  .photo-frame img {
    flex: none;
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 11;
    object-fit: cover;
    object-position: center;
  }

  /*
    HERO PHOTOGRAPHS

    Full-width landscape photographs use 16:9.
  */

  .photo-frame-hero img,
  .photo-frame-wide img,
  .photo-frame-full img {
    aspect-ratio: 16 / 9;
  }

  /*
    LONG PHOTOGRAPHS

    These MUST remain portrait.

    Applies to:
    - Braga portraits
    - Açores church and hotel
    - Évora Chapel of Bones
    - Lisbon long street view
    - Portuguese food long photographs
    - Other Places long photograph
    - Any future photo-frame-tall image
  */

  .photo-frame-tall img,
  .photo-frame-vertical img {
    flex: none;
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 3 / 5;
    object-fit: cover;
    object-position: center;
  }

  /*
    SPLIT GALLERY PHOTOGRAPHS

    When the left portrait photograph and
    the right-hand stack become a vertical
    arrangement, the portrait remains long.

    The smaller photographs remain landscape.
  */

  .photo-feature-stack .photo-frame img {
    flex: none;
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: 16 / 11;
    object-fit: cover;
    object-position: center;
  }

  /*
    PANORAMIC PHOTOGRAPHS

    Use the original aspect ratio so the
    full photograph remains visible.

    Important for:
    - Açores Sete Cidades panorama
    - Nazaré beach panorama
    - Other panoramic photographs
  */

  .photo-frame-panorama img {
    flex: none;
    display: block;
    width: 100%;
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    object-fit: contain;
    object-position: center;
  }

  .photo-frame-panorama figcaption {
    height: auto;
    min-height: 0;
  }

  /* Floating Navigation */

  .floating-section-nav {
    right: 18px;
    bottom: 82px;
  }

  .section-nav-menu {
    min-width: 200px;
  }

}

/* =========================================================
   RESPONSIVE — SMALL MOBILE PHONES
   ========================================================= */

@media (max-width: 560px) {

  /* Hero */

  .country-hero {
    min-height: 74vh;
    background:
      linear-gradient(
        to top,
        rgba(10, 12, 16, 0.4) 0%,
        rgba(10, 12, 16, 0.18) 48%,
        rgba(10, 12, 16, 0.08) 100%
      ),
      url("../images/europe/portugal/portugal-hero.jpg")
        center 42% / cover no-repeat;
  }

  .country-hero-content {
    width: min(calc(100% - 28px), var(--max-width));
    padding-top: 112px;
    padding-bottom: 48px;
  }

  .hero-title-block {
    max-width: 100%;
    padding: 16px 16px 18px;
    border-radius: 20px;
    background: rgba(14, 15, 18, 0.2);
  }

  .eyebrow {
    margin-bottom: 12px;
    font-size: 0.78rem;
  }

  .country-hero-content h1 {
    font-size: clamp(2.35rem, 12vw, 3.8rem);
  }

  .country-intro {
    max-width: 100%;
    font-size: 0.92rem;
  }

  /* Navigation */

  .menu-btn {
    top: 34px;
    padding: 10px 16px;
    background: rgba(17, 17, 17, 0.68);
    font-size: 0.95rem;
  }

  .nav-links {
    top: 72px;
    gap: 12px;
    padding: 18px;
  }

  /* Main Sections */

  main section:not(.country-hero) {
    width: min(calc(100% - 28px), var(--max-width));
  }

  /* Gallery Spacing */

  .photo-sequence > .photo-frame,
  .photo-sequence > .photo-pair,
  .photo-sequence > .photo-grid-two,
  .photo-sequence > .photo-grid-three,
  .photo-sequence > .photo-feature-split,
  .photo-sequence > .photo-feature-split-reverse {
    margin-top: 26px;
  }

  .photo-pair,
  .photo-grid-two,
  .photo-grid-three,
  .photo-feature-stack,
  .photo-feature-split,
  .photo-feature-split-reverse {
    gap: 20px;
  }

  .photo-frame,
  .photo-frame-hero,
  .photo-frame-wide,
  .photo-frame-full,
  .photo-frame-tall,
  .photo-frame-vertical,
  .photo-frame-panorama {
    height: auto;
    min-height: 0;
    border-radius: 20px;
  }

  /* Captions */

  .photo-frame figcaption {
    height: auto;
    min-height: 0;
    padding: 16px 18px 18px;
    font-size: 0.94rem;
  }

  .photo-frame figcaption strong {
    font-size: 0.98rem;
  }

  /* Cards */

  .glance-card,
  .note-card {
    padding: 22px 20px;
  }

  /*
    PHOTO DIMENSIONS

    Important:

    Do not override image aspect ratios
    at this smaller breakpoint.

    The 768px rules already preserve:

    Standard photographs: 16 / 11
    Hero photographs:     16 / 9
    Long photographs:     3 / 5
    Panoramas:            Natural image ratio

    This ensures long photographs stay long
    even on smaller mobile phones.
  */

  /* Floating Navigation */

  .floating-section-nav {
    right: 14px;
    bottom: 72px;
  }

  .section-nav-toggle {
    width: 48px;
    height: 48px;
    font-size: 1.05rem;
  }

  .section-nav-menu {
    min-width: 210px;
    max-height: 64vh;
    margin-bottom: 10px;
    padding: 8px;
  }

  .section-nav-label {
    font-size: 0.72rem;
  }

  .section-nav-menu a {
    padding: 11px 12px;
    border-radius: 10px;
    font-size: 0.94rem;
  }

  /* Back to Top */

  .back-to-top {
    right: 14px;
    bottom: 14px;
    width: 48px;
    height: 48px;
  }

}
