:root {
  --bg: #f4f8ff;
  --bg-elevated: #ffffff;
  --accent: rgba(34, 110, 147, 1);
  --accent-soft: rgba(31, 100, 255, 0.1);
  --text: rgba(34, 110, 147, 1);
  --muted: #4c6b99;
  --border: #d6e2ff;
  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-pill: 999px;
  --shadow-soft: 0 16px 42px rgba(26, 74, 169, 0.15);
  --container-width: 1120px;
  --page-gutter: clamp(1.25rem, 4vw, 2rem);
  --transition-fast: 180ms ease-out;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: linear-gradient(180deg, #f8fbff 0%, #eef4ff 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  scroll-margin-top: 200px;
}

a {
  color: inherit;
  text-decoration: none;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 10px;
}

img {
  max-width: 100%;
  display: block;
  border-radius: var(--radius-md);
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding-inline: var(--page-gutter);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(18px);
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.8), transparent);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
  padding-block: 18px 14px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-img {
  height: 72px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  border-radius: 0;
}

.nav {
  display: flex;
  gap: 20px;
  font-size: 0.95rem;
}

.nav a {
  position: relative;
  padding: 6px 0;
  color: var(--muted);
  transition: color var(--transition-fast);
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #72a2ff);
  transition: width var(--transition-fast);
}

.nav a:hover {
  color: var(--text);
}

.nav a:hover::after {
  width: 100%;
}

/* Main layout */

.site-main {
  padding: 32px 0 64px;
}

/* Hero */

.hero {
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0 0 40px;
  border-radius: 28px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.hero-image {
  width: 100%;
  height: clamp(220px, 42vw, 480px);
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  display: block;
}

.hero-content {
  padding-block: 32px 40px;
  background: radial-gradient(circle at top left, #f9fcff, #ebf3ff 45%, #e2edff);
}

.hero-text {

  padding: 20px;
}

.hero h1 {
  font-size: clamp(2.7rem, 4vw, 3.3rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin: 0 0 14px;
}

.hero p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1.05rem;
}

.kicker {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  color: var(--accent);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 34px;
  border-radius: var(--radius-pill);
  border: 1px solid #1a5aed;
  background: var(--accent);
  font-weight: 700;
  color: #fff;
  font-size: 1.5 rem;
  letter-spacing: 0.02em;
  box-shadow: 0 14px 28px rgba(31, 100, 255, 0.35);
  cursor: pointer;
  transition: transform 130ms ease-out, box-shadow 130ms ease-out,
    filter 130ms ease-out;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 16px 30px rgba(31, 100, 255, 0.42);
}

/* Grid cards */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 22px;
}

.section-block,
.hero {
  margin: 36px 0;
  scroll-margin-top: 110px;
}

.section-block h2 {
  margin: 0 0 16px;
  font-size: 1.8rem;
}

.card {
  padding: 22px 20px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #ffffff, #f4f8ff);
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(26, 74, 169, 0.1);
}

.card h2 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.card h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
}

.card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.card p:last-child {
  margin-bottom: 0;
}

#contatti a {
  color: var(--accent);
  text-decoration: underline;
}

.preview-button {
  position: relative;
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.preview-button::after {
  content: "🔍";
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 1rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18);
}

.preview-button img {
  display: block;
}

.button-center {
  text-align: center;
}

.contact-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}

.contact-info,
.contact-map {
  min-height: 320px;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
}

@media (min-width: 840px) {
  .contact-grid {
    grid-template-columns: minmax(240px, 1fr) minmax(320px, 1.5fr);
    align-items: stretch;
  }
}

.card-image {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border: 1px solid var(--border);
  margin-bottom: 14px;
}

.section-media {
  width: 100%;
  max-width: 520px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(26, 74, 169, 0.12);
}

.section-media-wide {
  max-width: 100%;
  margin-bottom: 18px;
}

/* Gallery */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  margin-top: 18px;
}

.gallery figure {
  margin: 0;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: radial-gradient(circle at top, #1b1b1b, #050505);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

.gallery figcaption {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Contatti */

.contacts-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 30px;
  margin-top: 14px;
}

.contact-form {
  display: grid;
  gap: 14px;
  padding: 18px 18px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(155deg, #151515, #070707);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7);
}

.contact-form label {
  display: grid;
  gap: 6px;
  font-size: 0.9rem;
}

.contact-form input,
.contact-form textarea {
  padding: 9px 11px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #050505;
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(224, 161, 90, 0.4);
}

.form-note {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.room-carousel-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.82);
  z-index: 1000;
}

.room-carousel-overlay.hidden {
  display: none;
}

.room-carousel {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(1100px, 96vw);
  max-height: 92vh;
  overflow: hidden;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(18px);
}

.carousel-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 1.4rem;
  cursor: pointer;
}

.carousel-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  max-height: 100%;
}

.carousel-image-frame {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  min-height: 320px;
  max-height: calc(92vh - 120px);
}

.carousel-image-frame img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-lg);
  background: #0f172a;
}

.carousel-nav {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 1.6rem;
  cursor: pointer;
  transition: transform 130ms ease, background-color 130ms ease;
}

.carousel-nav:hover,
.carousel-close:hover {
  transform: scale(1.05);
  background: rgba(255, 255, 255, 0.24);
}

.carousel-counter {
  z-index: 1000;
  display: block;
  position: absolute;
  color: white;
  font-weight: bold;
  bottom: 12px;
  padding: 1px 5px 4px;
  background: rgba(34, 110, 147, 1);
  border-radius: 10px;
}

@media (max-width: 760px) {
  .carousel-content {
    flex-direction: column;
  }

  .carousel-nav {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 26px 0 30px;
  background: radial-gradient(circle at bottom, #eef4ff, #f8fbff);
}

.footer-inner {
  display: flex;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
}

/* Responsive */

@media (max-width: 900px) {
  .hero-content {
    padding-block: 24px 28px;
  }

  .hero-image {
    height: clamp(180px, 38vw, 280px);
  }

  .contacts-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .header-inner {
    flex-wrap: wrap;
    gap: 10px;
  }

  .nav {
    font-size: 0.85rem;
    gap: 12px;
  }

  .logo-img {
    height: 56px;
    max-width: 150px;
  }
}

