/*
Theme Name: Perigiali Villas
Theme URI: https://perigialivillas.com
Author: Perigiali Villas
Description: Μονοσέλιδο site με ενότητες από ACF (Theme Settings). Χωρίς εξάρτηση από άλλο θέμα.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: perigialivillas
*/

:root {
  --pv-bg: #f8fafc;
  --pv-surface: #ffffff;
  --pv-text: #334155;
  --pv-heading: #0f172a;
  --pv-accent: #0d9488;
  --pv-accent-hover: #0f766e;
  --pv-radius: 16px;
  --pv-header-h: 72px;
  --pv-max: 1120px;
  --pv-font: "DM Sans", system-ui, sans-serif;
  --pv-display: "Fraunces", Georgia, serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--pv-font);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--pv-text);
  background: var(--pv-bg);
}

a {
  color: var(--pv-accent);
  text-decoration: none;
}
a:hover {
  color: var(--pv-accent-hover);
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--pv-header-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
}
.header-inner {
  max-width: var(--pv-max);
  margin: 0 auto;
  padding: 0 1.25rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  font-family: var(--pv-display);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--pv-heading);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.logo img {
  max-height: 48px;
  width: auto;
  display: block;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--pv-heading);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  align-items: center;
}
.site-nav a {
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--pv-heading);
}
.site-nav a:hover {
  color: var(--pv-accent);
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
  }
  .site-nav {
    position: fixed;
    top: var(--pv-header-h);
    left: 0;
    right: 0;
    background: #fff;
    padding: 1rem 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
    transform: translateY(-120%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.2s;
  }
  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
}

/* Single-page sections */
.pv-main {
  padding-top: var(--pv-header-h);
}
.pv-section {
  padding: clamp(3rem, 8vw, 5rem) 1.25rem;
}
.pv-section--hero {
  position: relative;
  overflow: hidden;
  min-height: min(88vh, 900px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  padding: calc(var(--pv-header-h) + 2rem) 1.25rem 4rem;
}
.pv-hero-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.pv-hero-slide {
  position: absolute;
  inset: 0;
  background-image: var(--pv-slide-img);
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.pv-hero-slide.is-active {
  opacity: 1;
}
.pv-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    rgba(15, 23, 42, 0.45) 0%,
    rgba(15, 23, 42, 0.65) 100%
  );
  pointer-events: none;
}
.pv-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 720px;
}
.pv-hero-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 2rem;
}
.pv-hero-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(248, 250, 252, 0.35);
  cursor: pointer;
  transition: background 0.25s ease, transform 0.2s ease;
}
.pv-hero-dots button[aria-selected="true"] {
  background: #fff;
  transform: scale(1.15);
}
.pv-eyebrow {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.95;
  margin: 0 0 1rem;
}
.pv-hero-inner h1 {
  font-family: var(--pv-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 1rem;
}
.pv-lead {
  font-size: 1.1rem;
  opacity: 0.95;
  margin: 0 0 1.75rem;
}
.pv-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: 999px;
  background: var(--pv-accent);
  color: #fff !important;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s;
}
.pv-btn:hover {
  background: var(--pv-accent-hover);
  color: #fff !important;
}

.pv-section--surface {
  background: var(--pv-surface);
}
.pv-container {
  max-width: var(--pv-max);
  margin: 0 auto;
}
.pv-section-title {
  font-family: var(--pv-display);
  font-size: clamp(1.65rem, 3vw, 2.25rem);
  color: var(--pv-heading);
  margin: 0 0 1rem;
}
.pv-prose {
  max-width: 720px;
}
.pv-prose p {
  margin: 0 0 1rem;
}
.pv-prose h2,
.pv-prose h3 {
  font-family: var(--pv-display);
  color: var(--pv-heading);
  margin: 1.5rem 0 0.75rem;
}

.pv-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  max-width: var(--pv-max);
  margin: 0 auto;
}
.pv-split-media {
  border-radius: var(--pv-radius);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
}
.pv-split-media img {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}
.pv-split--reverse .pv-split-media {
  order: 2;
}
.pv-split--reverse .pv-split-text {
  order: 1;
}
@media (max-width: 768px) {
  .pv-split {
    grid-template-columns: 1fr;
  }
  .pv-split--reverse .pv-split-media {
    order: -1;
  }
}

.pv-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.75rem;
}
.pv-gallery-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

.pv-cta-band {
  background: linear-gradient(135deg, var(--pv-accent) 0%, #115e59 100%);
  color: #fff;
  text-align: center;
}
.pv-cta-band h2 {
  font-family: var(--pv-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.75rem;
}
.pv-cta-band p {
  margin: 0 0 1.25rem;
  opacity: 0.95;
}
.pv-cta-band .pv-btn {
  background: #fff;
  color: var(--pv-heading) !important;
}
.pv-cta-band .pv-btn:hover {
  background: #f1f5f9;
  color: var(--pv-heading) !important;
}

/* Villas — cards + modal */
.pv-section-title--center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.pv-section-sub {
  text-align: center;
  max-width: 560px;
  margin: -0.5rem auto 2.5rem;
  color: var(--pv-text);
  opacity: 0.92;
}
.pv-villa-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(1.25rem, 3vw, 2rem);
  max-width: var(--pv-max);
  margin: 0 auto;
}
.pv-villa-card {
  background: var(--pv-surface);
  border-radius: var(--pv-radius);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
  text-align: left;
  display: flex;
  flex-direction: column;
}
.pv-villa-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #e2e8f0;
}
.pv-villa-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pv-villa-card__body {
  padding: 1.25rem 1.35rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.pv-villa-card__title {
  font-family: var(--pv-display);
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
  color: var(--pv-heading);
}
.pv-villa-card__excerpt {
  margin: 0 0 1rem;
  font-size: 0.98rem;
  flex: 1;
}
.pv-text-btn {
  align-self: flex-start;
  padding: 0;
  border: none;
  background: none;
  font-family: var(--pv-font);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pv-accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}
.pv-text-btn:hover {
  color: var(--pv-accent-hover);
}

.pv-villa-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-sizing: border-box;
}
.pv-villa-modal[hidden] {
  display: none !important;
}
.pv-villa-modal.is-open {
  display: flex !important;
}
body.pv-modal-open {
  overflow: hidden;
}
.pv-villa-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
}
.pv-villa-modal__dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  background: var(--pv-surface);
  border-radius: var(--pv-radius);
  box-shadow: 0 32px 64px rgba(15, 23, 42, 0.2);
  padding: 1.5rem 1.5rem 2rem;
}
.pv-villa-modal__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--pv-heading);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background 0.2s;
}
.pv-villa-modal__close:hover {
  background: rgba(15, 23, 42, 0.12);
}
.pv-villa-modal__panel[hidden] {
  display: none !important;
}
.pv-villa-modal__heading {
  font-family: var(--pv-display);
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  margin: 0 2.5rem 1rem 0;
  color: var(--pv-heading);
  padding-right: 0.5rem;
}
.pv-villa-modal__prose {
  margin-top: 1.25rem;
  color: var(--pv-text);
}
.pv-villa-modal__prose p:first-child {
  margin-top: 0;
}

.pv-villa-carousel {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #e2e8f0;
}
.pv-villa-carousel__slides {
  position: relative;
  aspect-ratio: 16 / 10;
}
.pv-villa-carousel__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.45s ease;
}
.pv-villa-carousel__slide.is-active {
  opacity: 1;
  z-index: 1;
}
.pv-villa-carousel__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pv-villa-carousel__prev,
.pv-villa-carousel__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--pv-heading);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.12);
  transition: background 0.2s;
}
.pv-villa-carousel__prev:hover,
.pv-villa-carousel__next:hover {
  background: #fff;
}
.pv-villa-carousel__prev {
  left: 0.5rem;
}
.pv-villa-carousel__next {
  right: 0.5rem;
}
.pv-villa-carousel__dots {
  position: absolute;
  bottom: 0.65rem;
  left: 0;
  right: 0;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}
.pv-villa-carousel__dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.pv-villa-carousel__dots button[aria-selected="true"] {
  background: #fff;
  transform: scale(1.15);
}

.site-footer {
  padding: 2rem 1.25rem;
  background: var(--pv-heading);
  color: rgba(248, 250, 252, 0.85);
  font-size: 0.9rem;
  text-align: center;
}
.site-footer a {
  color: #99f6e4;
}
