@font-face {
  font-family: 'Sparkling Valentine';
  src: url('fonts/Sparkling Valentine.ttf');
}

@font-face {
  font-family: 'Kelvinch Roman';
  src: url('fonts/Kelvinch-Roman.woff');
}

:root {
  --sky: #67a9d3;
  --sea: #0d5c7c;
  --white: #ffffff;
  --paper: #f3efe9;
  --ink: #2f2b2a;
  --muted: #7a7772;
  --pink: #7a8b6a;
  --blue: #4aa3c7;
  --sand: #e1d3c6;
  --shadow: 0 20px 40px rgba(32, 45, 55, 0.18);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

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

.hero {
  position: relative;
  min-height: 88vh;
  background: url("/images/background2.webp") center/cover no-repeat;
  display: grid;
  place-items: center;
  padding: 3rem 1.5rem 6rem;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(9, 69, 98, 0.1), rgba(255, 255, 255, 0));
}

.hero__badge {
  position: relative;
  background: rgba(255, 255, 255, 0.92);
  padding: 2rem 2.75rem 1.75rem;
  border-radius: 18px;
  text-align: center;
  box-shadow: var(--shadow);
  max-width: 400px;
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.lang-switcher {
  display: inline-flex;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.lang-switcher a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  text-decoration: none;
  font-family: "Montserrat", sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5c6f7a;
  border: 1px solid rgba(92, 111, 122, 0.35);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.lang-switcher a.active {
  background: #5c6f7a;
  color: #fff;
  border-color: #5c6f7a;
}

.flag {
  width: 14px;
  height: 10px;
  border-radius: 2px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  display: inline-block;
  flex-shrink: 0;
}

.flag--fr {
  background: linear-gradient(
    90deg,
    #0055a4 0 33.33%,
    #ffffff 33.33% 66.66%,
    #ef4135 66.66% 100%
  );
}

.flag--it {
  background: linear-gradient(
    90deg,
    #009246 0 33.33%,
    #ffffff 33.33% 66.66%,
    #ce2b37 66.66% 100%
  );
}

.badge__names {
  font-family: "Sparkling Valentine", cursive;
  font-size: 2.4rem;
  margin: 0;
  color: #5b6a75;
}

.badge__small {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-family: "Montserrat", sans-serif;
  font-size: 0.65rem;
  margin: 0.75rem 0 0.25rem;
  color: var(--muted);
}

.badge__title {
  font-family: "Kelvinch Roman", serif;
  font-size: 2.1rem;
  margin: 0;
  letter-spacing: 0.08em;
}

.badge__date,
.badge__place {
  margin: 0.25rem 0;
  font-family: "Kelvinch Roman", serif;
  color: var(--muted);
}

.badge__countdown {
  margin: 1.2rem auto 0;
  padding: 0.6rem 1rem;
  background: #d8b19a;
  color: var(--white);
  width: fit-content;
  border-radius: 8px;
  text-transform: uppercase;
  font-family: "Montserrat", sans-serif;
  letter-spacing: 0.14em;
  font-size: 0.6rem;
}

.countdown__number {
  font-family: "Kelvinch Roman", serif;
  font-size: 1.6rem;
  display: block;
  letter-spacing: 0.1em;
}

.section {
  padding: 4.5rem 6vw;
  background: var(--paper);
}

.section__title {
  text-align: center;
  margin-bottom: 2rem;
}

.section__title h2 {
  font-family: "Kelvinch Roman", serif;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  margin: 0;
  color: #3b5160;
}

.section__subtitle {
  font-family: "Sparkling Valentine", cursive;
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  margin: 0.6rem 0 0;
  color: #7f9aa7;
}

.about {
  background:
    linear-gradient(180deg, rgba(239, 231, 221, 0.92) 0%, rgba(247, 242, 236, 0.9) 70%),
    url("/images/background-alberobello.webp") center / cover no-repeat;
  position: relative;
  padding: 3.5rem 3vw;
}

.about::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(120, 110, 100, 0.08) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.7;
  pointer-events: none;
}

.about__content {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.about__text p {
  margin-top: 0;
  color: #5c5953;
}

.about__map {
  background: transparent;
  margin: 0;
  padding: 0;
}

.map-stage {
  position: relative;
  width: min(100%, 760px);
  margin-inline: auto;
}

.map-stage__base {
  width: 100%;
}

.map-marker {
  position: absolute;
  transform: translate(-50%, -50%);
  cursor: pointer;
  overflow: visible;
  outline: none;
  z-index: 1;
}

.map-marker__dot {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: #7a8b6a;
  border: 2px solid #fff;
  box-shadow: 0 8px 16px rgba(20, 20, 20, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease;
  display: block;
}

.map-marker__dot::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 1px solid rgba(230, 80, 120, 0.5);
}

.map-marker__dot--airport {
  width: 20px;
  height: 20px;
  background: #1e6280;
  display: grid;
  place-items: center;
}

.map-marker__dot--airport::before {
  content: "✈";
  color: #fff;
  font-size: 10px;
  line-height: 1;
}

.map-marker__dot--church {
  width: 20px;
  height: 20px;
  background: #7a5f4c;
  display: grid;
  place-items: center;
}

.map-marker__dot--church::before {
  content: "✝";
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.map-marker__dot--restaurant {
  width: 20px;
  height: 20px;
  background: #8a3e2f;
  display: grid;
  place-items: center;
}

.map-marker__dot--restaurant::before {
  content: "🍴";
  color: #fff;
  font-size: 10px;
  line-height: 1;
}

.map-marker__card {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 6px) scale(0.9);
  width: 132px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 16px 32px rgba(20, 20, 20, 0.24);
  border: 1px solid rgba(25, 30, 35, 0.12);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
  z-index: 20;
}

.map-marker__name {
  display: block;
  padding: 0.45rem 0.55rem 0.5rem;
  font-family: "Montserrat", sans-serif;
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #425562;
  text-align: center;
  text-decoration: none;
}

.map-marker__name:hover,
.map-marker__name:focus-visible {
  color: #1e6280;
  text-decoration: underline;
}

.map-marker__image {
  width: 100%;
  height: 72px;
  object-fit: cover;
  object-position: 50% 50%;
  display: block;
}

.map-marker:hover .map-marker__dot,
.map-marker:focus-visible .map-marker__dot {
  transform: scale(1.38);
  box-shadow: 0 14px 24px rgba(20, 20, 20, 0.34);
}

.map-marker:hover .map-marker__card,
.map-marker:focus-visible .map-marker__card {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0) scale(1);
}

.map-marker:hover,
.map-marker:focus-visible {
  z-index: 50;
}

.map__legend {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-top: 0.75rem;
  color: var(--muted);
}

.stay {
  background:
    linear-gradient(180deg, rgba(223, 238, 241, 0.9) 0%, rgba(238, 247, 247, 0.9) 70%),
    url("/images/background-polignano.jpeg") center / cover no-repeat;
}

.stay__intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 2.5rem;
  color: #4d5c64;
}

.stay__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 2rem;
  max-width: 820px;
  margin: 0 auto;
}

.stay__list article {
  background: rgba(255, 255, 255, 0.8);
  padding: 1.5rem;
  border-radius: 18px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.6);
}

.stay__list h3 {
  margin-top: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-family: "Kelvinch Roman", serif;
  font-size: 0.9rem;
}

.tips {
  background:
    linear-gradient(180deg, rgba(237, 231, 221, 0.9) 0%, rgba(246, 241, 233, 0.9) 70%),
    url("/images/background.jpg") center / cover no-repeat;
}

.day {
  background:
    linear-gradient(180deg, rgba(242, 240, 236, 0.92) 0%, rgba(247, 243, 239, 0.9) 100%),
    url("/images/background-alberobello.webp") center / cover no-repeat;
  position: relative;
}

.day__timeline {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr);
  gap: 2rem 4.5rem;
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  align-items: start;
}

.day__timeline-mobile {
  display: none;
  max-width: 640px;
  margin: 0 auto;
}

.day__timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 72px;
  background:
    url("/images/olive-branch-repeated.png") center 0 / 72px auto repeat-y,
    url("/images/olive-branch-repeated.png") center 88px / 72px auto repeat-y;
  transform: translateX(-50%);
  opacity: 0.95;
}

.day__left,
.day__right {
  display: grid;
  gap: 1.8rem;
}

.day__left {
  justify-items: end;
}

.day__right {
  justify-items: start;
}

.day__right {
  padding-top: 2.4rem;
}

.timeline-card {
  position: relative;
  background: #f7f7f7;
  padding: 1.6rem 1.75rem;
  border-radius: 2px;
  box-shadow: 0 14px 24px rgba(30, 38, 44, 0.2);
  border-top: 5px solid #7a8b6a;
  text-align: center;
  width: min(100%, 440px);
}

.timeline-card::before {
  content: "";
  position: absolute;
  top: 45px;
  width: 44px;
  height: 1px;
  background: #b8d3cd;
}

.day__left .timeline-card::before {
  right: -44px;
}

.day__right .timeline-card::before {
  left: -44px;
}

.timeline-card h3 {
  margin: 0 0 0.25rem;
  font-family: "Kelvinch Roman", serif;
  letter-spacing: 0.04em;
  font-size: clamp(1.8rem, 3.2vw, 2.8rem);
  color: #505057;
}

.timeline-card__image {
  width: 100%;
  margin: 0 0 1rem;
  height: 170px;
  object-fit: cover;
  object-position: center;
}

.timeline-card .card__title {
  font-family: "Montserrat", sans-serif;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 1.05rem;
  color: #84afa8;
  margin: 0.25rem 0 0.8rem;
  font-weight: 600;
}

.timeline-card p {
  margin: 0;
  color: #67666a;
  font-size: 1.02rem;
}

.timeline-card.featured {
  border-top-color: #7a8b6a;
  padding: 0 0 1.6rem;
  overflow: hidden;
  min-height: 360px;
}

.timeline-card.featured h3,
.timeline-card.featured .card__title,
.timeline-card.featured p,
.timeline-card.featured .card__footer {
  margin-left: 1.75rem;
  margin-right: 1.75rem;
}

.timeline-card.small {
  border-top-color: #d9c3a8;
  background: #fcfbf9;
}

.card__address {
  margin-top: 0.6rem;
  font-family: "Montserrat", sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.01em;
  color: #7a7772;
}

.timeline-card--left-last {
  margin-top: 3.5rem;
}

.card__footer {
  margin-top: 1.25rem;
  display: inline-block;
  background: #7a8b6a;
  color: #fff;
  padding: 0.5rem 1.35rem;
  position: relative;
  font-family: "Montserrat", sans-serif;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
}

.card__footer::before,
.card__footer::after {
  content: "";
  position: absolute;
  top: 100%;
  border-top: 8px solid #5f6d53;
  border-bottom: 8px solid transparent;
}

.card__footer::before {
  left: 0;
  border-left: 8px solid transparent;
}

.card__footer::after {
  right: 0;
  border-right: 8px solid transparent;
}

.footer {
  text-align: center;
  padding: 2.5rem 1.5rem 3.5rem;
  background: #e9e2da;
  font-family: "Kelvinch Roman", serif;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 0.7rem;
  color: #6b6a65;
}

@media (max-width: 900px) {
  .day__timeline {
    display: none;
  }

  .day__timeline-mobile {
    display: grid;
    gap: 1.25rem;
  }

  .timeline-card {
    margin-left: 0;
    text-align: center;
    transform: none;
    width: 100%;
  }

  .timeline-card--left-last {
    margin-top: 0;
  }

  .timeline-card::before {
    display: none;
  }
}

@media (max-width: 700px) {
  .stay__list {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 75vh;
  }

  .hero__badge {
    max-width: 300px;
    padding: 1.5rem 1.75rem;
  }

  .section {
    padding: 3.5rem 1.5rem;
  }

  .about {
    padding: 3rem 0.8rem;
  }

  .map-marker__card {
    width: 120px;
  }

  .map-marker__image {
    height: 64px;
  }
}
