/* Global */
:root{
  --bg: #efcae2;
  --header: #9fb878;
  --footer: #e9e9e9;
  --card: #fff7fb;
  --red-card: #9fb878;
  --text: #1f1b1d;
  --muted: #5b4a52;
  --white-muted: #e3e3e3;
  --border: rgba(31,27,29,.15);
  --shadow: 0 10px 30px rgba(0,0,0,.18);
  --radius: 18px;
  --max: 1100px;
}

@font-face {
  font-family: 'Rolie Twily';
  src: url('../fonts/rolie_twily/Rolie\ Twily.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Noto Serif';
  src: url('../fonts/Noto_Serif/NotoSerif-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Noto Serif';
  src: url('../fonts/Noto_Serif/NotoSerif-Bold.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
}

*{ box-sizing: border-box; }
html,body{ height: 100%; }
body{
  margin: 0;
  font-family: "Noto Serif", serif;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  display: grid;
  grid-template-rows: auto 1fr auto;
}

img,svg{ max-width: 100%; display: block; }
a{ color: var(--text); }

.container{
  margin: 0 auto;
  padding: 0 18px;
}

/* Header */
.siteHeader{
  background: var(--header);
  border-bottom: 1px solid var(--border);
}
.headerInner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0px 5px;
}
.brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brandLogo{
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
}
.brandName{
  font-size: 35px;
  letter-spacing: .08em;
  font-family: 'Rolie Twily', sans-serif;
  padding-top: 8px;
  color: white;
}

.navWrap{
  display: flex;
  align-items: center;
  gap: 10px;
}
.menuToggle{
  display: none;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.55);
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
}
.siteNav{
  display: flex;
  gap: 14px;
  align-items: center;
}
.siteNav a{
  text-decoration: none;
  padding: 8px 10px;
  border-radius: 12px;
  font-weight: 650;
  color: white;
}
.siteNav a:hover,
.siteNav a:focus-visible{
  outline: none;
  background: rgba(255,255,255,.25);
}
.siteNav a[aria-current="page"]{
  background: rgba(255,255,255,.45);
  box-shadow: 0 6px 18px rgba(0,0,0,.10);
}

/* Language */
.lang{
  position: relative;
  display: inline-flex;
  align-items: center;
}
.langButton{
  border: 1px solid var(--border);
  background: rgba(255,255,255,.55);
  padding: 8px 10px;
  border-radius: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.langCaret{
  width: 10px;
  height: 10px;
  opacity: .7;
}
.langMenu{
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 180px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 8px;
  display: none;
  z-index: 50;
}
.langMenu[aria-hidden="false"]{ display: block; }
.langMenu button{
  width: 100%;
  text-align: left;
  padding: 10px 10px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-weight: 650;
}
.langMenu button:hover,
.langMenu button:focus-visible{
  outline: none;
  background: rgba(182,10,10,.10);
}

/* Main layout */
main{ padding: 26px 0; }
.card{
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.subcard{
  background: var(--red-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  color: white;
}
.subcard p{
  color: white;
}

.subsubcard{
  background: #a7be82;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  color: white;
}

.stack{ display: grid; gap: 18px; }
.twoCol{
  display: grid;
  gap: 18px;
  grid-template-columns: 1fr 1fr;
}
.kicker{ color: var(--muted); font-weight: 700; letter-spacing: .02em; }
h1,h2,h3{ margin: 0 0 10px; line-height: 1.15; }
p{ margin: 0 0 12px; color: var(--text); }
.muted{ color: var(--muted); }
.white-muted{ color: var(--white-muted); }

/* Carousel */
.carousel{
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: #fff;
  display: flex;
}
.carouselViewport{
  position: relative;
  overflow: hidden;
}
.carouselTrack{
  display: flex;
  transition: transform 400ms ease;
  will-change: transform;
}
.slide{
  flex: 0 0 33.3333%;
  min-width: 33.3333%;
  padding: 10px;
  display: grid;
  place-items: center;
}
.slide figure{
  margin: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.slideImg{
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  display: grid;
  place-items: cover;
}
.slideImg img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.carouselControlPrev{
  margin: 10px 10px 10px 0px;
}
.carouselControlNext{
  margin: 10px 0px 10px 10px;
}
.btn{
  border: 1px solid var(--border);
  background: white;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-family: 'Noto Serif';
}
.btn:hover,
.btn:focus-visible{
  outline: none;
  box-shadow: 0 0 0 3px rgba(182,10,10,.18);
}
.dots{
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}
.dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.14);
  cursor: pointer;
}
.dot[aria-current="true"]{
  background: rgba(182,10,10,.85);
}

@media (prefers-reduced-motion: reduce){
  .carouselTrack{ transition: none; }
}

/* Maps */
.mapEmbed{
  display: flex;
  align-items: center;
  height: 400px;
  gap: 18px;
}
.mapEmbed iframe{
  border-radius: var(--radius);
  height: stretch;
  width: stretch;
}
.mapEmbed img{
  border-radius: var(--radius);
  max-height: 400px;
}
.mapEmbed p{
  max-width: 40%;
  padding: 20px;
}

@media (max-width: 1500px) {
  .mapEmbed iframe{
    inset: 0;
    width: 100%;
  }
  .mapEmbed img{
    display: none;
  }
  .mapEmbed p{
    display: none;
  }
}

/* Forms */
form{ display: grid; gap: 12px; }
.fieldRow{
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}
label{ font-weight: 750; }
input,select,textarea{
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  padding: 10px 12px;
  font: inherit;
  background: white;
}
textarea{ min-height: 120px; resize: vertical; }
.help{ color: var(--muted); font-size: .95rem; margin-top: -6px; }
.formActions{ display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* Footer */
.siteFooter{
  background: var(--footer);
  border-top: 1px solid var(--border);
}
.footerInner{
  padding: 22px 15px;
  display: grid;
  gap: 18px;
  grid-template-columns: 1.2fr 1fr 1fr;
}
.footerTitle{ font-weight: 900; letter-spacing: .06em; }
.footerLinks{ display: grid; gap: 8px; }
.footerLinks a{ text-decoration: none; color: var(--text); }
.footerLinks a:hover,
.footerLinks a:focus-visible{ outline: none; text-decoration: underline; }
.copyright{
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: .95rem;
  text-align: center;
}

/* Responsive nav */
@media (max-width: 900px){
  .menuToggle{ display: inline-flex; }
  .siteNav{
    position: absolute;
    right: 18px;
    top: 64px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    background: var(--red-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 8px;
    box-shadow: var(--shadow);
    min-width: min(320px, calc(100vw - 36px));
    z-index: 60;
  }
  .siteNav[data-open="true"]{ display: flex; }
  .siteNav a{ padding: 10px 12px; }
  .navWrap{ position: relative; }
  .twoCol{ grid-template-columns: 1fr; }
  .footerInner{ grid-template-columns: 1fr; }
  .fieldRow{ grid-template-columns: 1fr; }
}

.spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: #333;
  animation: spin 0.8s linear infinite;
  margin-right: 0.5rem;
  vertical-align: middle;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.footerMessage {
  padding-right: 50px;
}

.landing {
  background-image: url(../img/bg.jpeg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 800px;
  margin: 0px 5px;
  margin-bottom: 18px;
}

.landingColor {
  color: white;
}

.carta-nav {
  display: flex;
  gap: 1rem;
  border-bottom: 1px solid #ddd;
}
.carta-nav a {
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: #333;
  border-bottom: 2px solid transparent;
}
.carta-nav a.active {
  border-bottom-color: #c96;
  color: #c96;
}     