/* Villa Gisolfi — page content (hero, sections, cards, galleries) */

.vg-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.vg-hero__bg-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.vg-hero__bg-wrap img {
  position: absolute;
  top: -6%;
  left: 0;
  width: 100%;
  height: 112%;
  object-fit: cover;
}
.vg-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 32, 46, 0.25) 0%, rgba(22, 32, 46, 0.55) 100%);
}
.vg-hero__content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.vg-hero__h1 {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
}
.vg-hero__logo {
  width: min(620px, 78vw);
  height: auto;
  margin-bottom: var(--space-md);
}
.vg-hero .vg-eyebrow {
  color: var(--color-bg);
  opacity: 0.95;
  font-size: 0.85rem;
}
.vg-hero__subhead {
  color: var(--color-bg);
  opacity: 0.95;
  max-width: 100%;
  white-space: nowrap;
  font-size: clamp(0.6rem, 2.3vw, 0.95rem);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-top: var(--space-2xs);
}
.vg-hero__actions {
  position: absolute;
  left: 50%;
  bottom: var(--space-2xl);
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
}
.vg-btn--ghost {
  background: transparent !important;
  border: 1px solid var(--color-bg) !important;
  color: var(--color-bg) !important;
}
.vg-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12) !important;
}

/* Secondary-page header — shorter than the home hero, title instead of the
   wordmark, used at the top of every inner page for a consistent identity. */
.vg-page-hero {
  position: relative;
  min-height: 58vh;
  min-height: 58dvh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.vg-page-hero__bg-wrap {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.vg-page-hero__bg-wrap img {
  position: absolute;
  top: -6%;
  left: 0;
  width: 100%;
  height: 112%;
  object-fit: cover;
}
.vg-page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 32, 46, 0.32) 0%, rgba(22, 32, 46, 0.6) 100%);
}
.vg-page-hero__content {
  position: relative;
  z-index: 2;
  max-width: 46rem;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-md);
}
.vg-page-hero .vg-eyebrow {
  color: var(--color-bg);
  opacity: 0.95;
}
.vg-page-hero h1 {
  color: var(--color-bg);
  margin-top: var(--space-xs);
}
.vg-page-hero__subhead {
  color: var(--color-bg);
  opacity: 0.92;
  max-width: 46ch;
  margin: var(--space-sm) auto 0;
  font-size: 1.05rem;
}

/* Sections */
.vg-section {
  padding: var(--space-2xl) var(--space-md);
}
.vg-section__inner {
  max-width: var(--container-max);
  margin: 0 auto;
}
.vg-section--muted {
  background: var(--color-muted);
}
/* Full-bleed navy band — the accent counterweight to the ivory canvas */
.vg-section--accent {
  background: var(--color-accent);
  color: var(--color-bg);
}
.vg-section--accent-gradient {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-accent-press) 0%, var(--color-accent) 100%);
  color: var(--color-bg);
}
.vg-section--accent-gradient > * {
  position: relative;
  z-index: 1;
}
.vg-section--accent h2,
.vg-section--accent p,
.vg-section--accent-gradient h2,
.vg-section--accent-gradient p {
  color: var(--color-bg);
}
.vg-section--accent .vg-eyebrow,
.vg-section--accent-gradient .vg-eyebrow {
  color: var(--color-bg);
}
.vg-section--accent .vg-eyebrow-row::after,
.vg-section--accent-gradient .vg-eyebrow-row::after {
  background: rgba(255, 255, 255, 0.28);
}
.vg-section--accent .vg-link-arrow,
.vg-section--accent-gradient .vg-link-arrow {
  color: var(--color-bg);
}
.vg-section--accent .vg-link-arrow:hover,
.vg-section--accent-gradient .vg-link-arrow:hover {
  color: rgba(255, 255, 255, 0.75);
}

/* Edge-to-edge section — no centered max-width container, just a responsive gutter */
.vg-section--bleed {
  padding-left: clamp(1rem, 4vw, 3rem);
  padding-right: clamp(1rem, 4vw, 3rem);
}
.vg-section--bleed .vg-section__inner {
  max-width: none;
}

/* Two-column heading | paragraph, no image */
.vg-split-text {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: start;
}
.vg-split-text h2 {
  text-transform: uppercase;
  line-height: 1.2;
}
.vg-split-text p {
  color: var(--color-ink-soft);
  font-size: 1.0625rem;
}
@media (max-width: 780px) {
  .vg-split-text {
    grid-template-columns: 1fr;
  }
}

.vg-intro {
  max-width: 62ch;
}
.vg-intro p {
  font-size: 1.125rem;
  color: var(--color-ink-soft);
}
.vg-center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

/* Tiles — image with the caption set below it, not overlaid (MIRA-style) */
.vg-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
}
.vg-tile,
.vg-tile:hover,
.vg-tile:focus-visible {
  display: block;
  text-decoration: none;
  color: inherit;
}
.vg-tile img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
  transition: transform 600ms var(--ease-standard);
}
.vg-tile:hover img {
  transform: scale(1.03);
}
.vg-tile__label {
  margin-top: var(--space-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2xs);
}
.vg-tile__title {
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 600;
  color: inherit;
}
.vg-tile__title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 400ms var(--ease-standard);
}
.vg-tile:hover .vg-tile__title::after {
  transform: scaleX(1);
}
.vg-tile__arrow {
  transition: transform 250ms var(--ease-standard);
  color: inherit;
}
.vg-tile:hover .vg-tile__arrow {
  transform: translateX(4px);
}
@media (max-width: 960px) {
  .vg-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .vg-tiles {
    grid-template-columns: 1fr;
  }
}

/* Stats */
.vg-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-lg) 0;
}
.vg-stat__num {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.75rem;
  color: var(--color-accent);
  line-height: 1;
}
.vg-stat__label {
  margin-top: var(--space-2xs);
  font-size: 0.82rem;
  color: var(--color-ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
/* On a navy band (e.g. La Villa's "in numeri") the default ink/accent tones
   are unreadable — swap to ivory/white so the numbers stay legible. */
.vg-section--accent .vg-stats,
.vg-section--accent-gradient .vg-stats {
  border-color: rgba(255, 255, 255, 0.25);
}
.vg-section--accent .vg-stat__num,
.vg-section--accent-gradient .vg-stat__num {
  color: var(--color-bg);
}
.vg-section--accent .vg-stat__label,
.vg-section--accent-gradient .vg-stat__label {
  color: rgba(255, 255, 255, 0.75);
}
@media (max-width: 720px) {
  .vg-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Cards grid */
.vg-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-xl);
}
.vg-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.vg-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 600ms var(--ease-standard);
}
.vg-card:hover img {
  transform: scale(1.05);
}
.vg-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 32, 46, 0) 40%, rgba(22, 32, 46, 0.85) 100%);
}
.vg-card__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: var(--space-sm);
  z-index: 2;
  color: var(--color-bg);
}
.vg-card__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.3rem;
  margin: 0;
  color: var(--color-bg);
}
.vg-card__text {
  font-size: 0.85rem;
  opacity: 0.92;
  margin: 0.25em 0 0;
}
@media (max-width: 960px) {
  .vg-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .vg-cards {
    grid-template-columns: 1fr;
  }
}

/* Gallery strip */
/* Gallery carousel — large photos, native scroll-snap (no JS required to
   swipe/scroll; prev/next buttons are a progressive-enhancement layer). */
.vg-carousel {
  display: flex;
  gap: var(--space-md);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  margin-top: var(--space-xl);
  padding-bottom: var(--space-2xs);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.vg-carousel::-webkit-scrollbar {
  display: none;
}
.vg-carousel__item {
  flex: 0 0 auto;
  width: min(680px, 82vw);
  scroll-snap-align: start;
}
.vg-carousel__item img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
  transition: transform 700ms var(--ease-standard);
}
.vg-carousel__item:hover img {
  transform: scale(1.02);
}
.vg-carousel-controls {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2xs);
  margin-top: var(--space-sm);
}
.vg-carousel-btn {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 250ms var(--ease-standard), color 250ms var(--ease-standard), border-color 250ms var(--ease-standard);
}
.vg-carousel-btn:hover,
.vg-carousel-btn:focus-visible {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
}
.vg-carousel-btn svg {
  width: 18px;
  height: 18px;
}
@media (max-width: 600px) {
  .vg-carousel-controls {
    display: none;
  }
}

/* Split (image + text) */
.vg-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}
.vg-split img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3;
}
@media (max-width: 780px) {
  .vg-split {
    grid-template-columns: 1fr;
  }
}
.vg-split--reverse .vg-split__img {
  order: 2;
}

/* Amenities checklist */
.vg-checklist {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm) var(--space-lg);
  margin-top: var(--space-xl);
}
.vg-checklist li {
  display: flex;
  align-items: baseline;
  gap: 0.6em;
  padding: var(--space-2xs) 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.98rem;
}
.vg-checklist li::before {
  content: "";
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  transform: translateY(-2px);
}
@media (max-width: 860px) {
  .vg-checklist {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 560px) {
  .vg-checklist {
    grid-template-columns: 1fr;
  }
}

/* Note callout — used for the honest accessibility/legal disclosures */
.vg-note {
  margin-top: var(--space-xl);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-ink-soft);
  font-size: 0.95rem;
  max-width: 62ch;
}
.vg-note strong {
  color: var(--color-ink);
}

/* CTA band */
.vg-cta-band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--color-accent-press) 0%, var(--color-accent) 100%);
  color: var(--color-bg);
  padding: var(--space-2xl) var(--space-md);
}
.vg-cta-band__inner {
  position: relative;
  z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}
.vg-cta-band__img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-lg);
  display: block;
}
.vg-cta-band h2 {
  color: var(--color-bg);
}
.vg-cta-band p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 46ch;
  margin: var(--space-2xs) 0 var(--space-lg);
}
.vg-cta-band .vg-btn {
  background: var(--color-bg) !important;
  color: var(--color-accent) !important;
}
.vg-cta-band .vg-btn:hover {
  background: #fff !important;
}
@media (max-width: 780px) {
  .vg-cta-band__inner {
    grid-template-columns: 1fr;
  }
  .vg-cta-band__img {
    order: -1;
  }
}

/* Arrow link */
.vg-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-weight: 600;
  text-decoration: none;
}
.vg-link-arrow::after {
  content: "→";
  transition: transform 250ms var(--ease-standard);
}
.vg-link-arrow:hover::after {
  transform: translateX(4px);
}

/* Photo grid + lightbox (Galleria) */
.vg-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}
.vg-photo-grid button {
  all: unset;
  cursor: pointer;
  display: block;
}
.vg-photo-grid img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
  transition: transform 500ms var(--ease-standard);
}
.vg-photo-grid button:hover img,
.vg-photo-grid button:focus-visible img {
  transform: scale(1.04);
}
@media (max-width: 960px) {
  .vg-photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 600px) {
  .vg-photo-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.vg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(22, 32, 46, 0.94);
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms var(--ease-standard);
}
.vg-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.vg-lightbox img {
  max-width: 88vw;
  max-height: 82vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.vg-lightbox-close,
.vg-lightbox-prev,
.vg-lightbox-next {
  position: absolute;
  width: 52px;
  height: 52px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 250ms var(--ease-standard);
}
.vg-lightbox-close svg,
.vg-lightbox-prev svg,
.vg-lightbox-next svg {
  width: 22px;
  height: 22px;
}
.vg-lightbox-close:hover,
.vg-lightbox-close:focus-visible,
.vg-lightbox-prev:focus-visible,
.vg-lightbox-next:focus-visible,
.vg-lightbox-prev:hover,
.vg-lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
}
.vg-lightbox-close {
  top: var(--space-md);
  right: var(--space-md);
}
.vg-lightbox-prev {
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
}
.vg-lightbox-next {
  right: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
}
@media (max-width: 600px) {
  .vg-lightbox-close,
  .vg-lightbox-prev,
  .vg-lightbox-next {
    width: 44px;
    height: 44px;
  }
}

/* Three short evocative text cards (La Zona) */
.vg-info-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}
.vg-info-grid h3 {
  margin-bottom: var(--space-2xs);
}
.vg-info-grid p {
  color: var(--color-ink-soft);
}
@media (max-width: 860px) {
  .vg-info-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }
}

/* Map embed */
.vg-map {
  margin-top: var(--space-xl);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 16 / 8;
}
.vg-map iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
@media (max-width: 700px) {
  .vg-map {
    aspect-ratio: 4 / 5;
  }
}

/* Contact Form 7 — restyled to match the rest of the site */
.vg-form {
  max-width: 640px;
  margin-top: var(--space-xl);
}
.vg-form .wpcf7-form p {
  margin: 0 0 var(--space-md);
}
.vg-form label {
  display: block;
  margin-bottom: var(--space-2xs);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-ink-soft);
}
.vg-form input[type="text"],
.vg-form input[type="email"],
.vg-form input[type="tel"],
.vg-form input[type="date"],
.vg-form input[type="number"],
.vg-form textarea {
  width: 100%;
  padding: 0.85em 1.1em;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-ink);
  transition: border-color 250ms var(--ease-standard);
}
.vg-form input:focus,
.vg-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}
.vg-form textarea {
  min-height: 140px;
  resize: vertical;
}
.vg-form ::placeholder {
  color: var(--color-ink-soft);
  opacity: 0.75;
}
.vg-form .wpcf7-form p:has(input[name="checkin"]) {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}
.vg-form .wpcf7-form p:has(input[name="checkin"]) .wpcf7-form-control-wrap {
  flex: 1 1 200px;
}
.vg-form .wpcf7-acceptance .wpcf7-list-item {
  margin: 0;
}
.vg-form .wpcf7-acceptance label {
  display: flex;
  align-items: flex-start;
  gap: 0.6em;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-ink-soft);
}
.vg-form .wpcf7-acceptance input[type="checkbox"] {
  margin-top: 0.3em;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: var(--color-accent);
}
.vg-form input[type="submit"] {
  background: var(--color-accent);
  color: var(--color-on-accent);
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.95em 2.2em;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 350ms var(--ease-standard), transform 450ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 350ms var(--ease-standard);
}
.vg-form input[type="submit"]:hover {
  background: var(--color-accent-press);
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 14px 30px rgba(29, 73, 152, 0.35);
}
.vg-form .wpcf7-not-valid-tip {
  display: block;
  color: #b3261e;
  font-size: 0.82rem;
  margin-top: 0.35em;
}
.vg-form .wpcf7-response-output {
  margin-top: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  font-size: 0.9rem;
}
.vg-form form.invalid .wpcf7-response-output {
  border-color: #b3261e;
  color: #b3261e;
}
.vg-form form.sent .wpcf7-response-output {
  border-color: #2e7d32;
  color: #2e7d32;
}
.vg-form .wpcf7-spinner {
  margin-left: 0.6em;
}
