/* =========================================================
   Alcam Holiday Home – static rebuild of the Avada/WordPress site
   ========================================================= */
/* Self-hosted fonts (latin subset) – no requests to Google */
@font-face {
  font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/montserrat-400-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Playfair Display"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../assets/fonts/playfair-display-400-latin.woff2") format("woff2");
}

:root {
  --maroon-dark: #45152a;   /* headings, subtitles  rgb(69,21,42)  */
  --maroon:      #8a1c47;   /* brand accent         rgb(138,28,71) */
  --body-text:   #4a4e57;   /* paragraph text       rgb(74,78,87)  */
  --white:       #ffffff;
  --font-head: "Playfair Display", Georgia, serif;
  --font-body: "Montserrat", Arial, sans-serif;
  --container: 1248px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.8;          /* 25.2px */
  color: var(--body-text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
p { margin: 0 0 20px; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--maroon); outline-offset: 3px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 30px; }

/* ---------- Section title (subtitle + big serif heading) ---------- */
.section-title { text-align: center; margin-bottom: 20px; }
.section-title .subtitle {
  font-size: 17px; line-height: 1.8; letter-spacing: 2px;
  color: var(--maroon-dark); text-transform: uppercase; margin: 0;
}
.section-title .title {
  font-family: var(--font-head); font-weight: 400;
  font-size: 60px; line-height: 1; color: var(--maroon-dark);
  margin: 0;
}

/* ---------- HERO ---------- */
.hero {
  /* dark wash keeps the white text readable whatever part of the photo it sits on */
  background:
    linear-gradient(rgba(20, 10, 15, .30), rgba(20, 10, 15, .15)),
    url("../assets/img/hero-1920.jpg") center top / cover no-repeat;
  /* WebP where supported; browsers without image-set type() keep the JPEG above */
  background-image:
    linear-gradient(rgba(20, 10, 15, .30), rgba(20, 10, 15, .15)),
    image-set(url("../assets/img/hero-1920.webp") type("image/webp"), url("../assets/img/hero-1920.jpg") type("image/jpeg"));
  padding: 210px 30px;
  text-align: center;
  color: var(--white);
  text-shadow: 0 1px 12px rgba(0, 0, 0, .35);
}
@media (max-width: 1024px) {
  .hero {
    background-image:
      linear-gradient(rgba(20, 10, 15, .30), rgba(20, 10, 15, .15)),
      url("../assets/img/hero-1024.jpg");
    background-image:
      linear-gradient(rgba(20, 10, 15, .30), rgba(20, 10, 15, .15)),
      image-set(url("../assets/img/hero-1024.webp") type("image/webp"), url("../assets/img/hero-1024.jpg") type("image/jpeg"));
  }
}
.hero-sub {
  font-size: 21px; line-height: 1.8; letter-spacing: 2px; margin: 0 0 20px;
}
.hero-title {
  font-family: var(--font-head); font-weight: 400;
  font-size: 100px; line-height: 1; margin: 0;
}

/* ---------- ABOUT ---------- */
.about {
  padding: 90px 0 420px;
  background:
    linear-gradient(180deg, #fff 0%, rgba(255,255,255,0) 64%),
    url("../assets/img/alcam-painting-1920.jpg") center bottom / cover no-repeat;
  /* WebP where supported; browsers without image-set type() keep the JPEG above */
  background-image:
    linear-gradient(180deg, #fff 0%, rgba(255,255,255,0) 64%),
    image-set(url("../assets/img/alcam-painting-1920.webp") type("image/webp"), url("../assets/img/alcam-painting-1920.jpg") type("image/jpeg"));
}
@media (max-width: 1000px) {
  .about {
    background-image:
      linear-gradient(180deg, #fff 0%, rgba(255,255,255,0) 64%),
      url("../assets/img/alcam-painting-1000.jpg");
    background-image:
      linear-gradient(180deg, #fff 0%, rgba(255,255,255,0) 64%),
      image-set(url("../assets/img/alcam-painting-1000.webp") type("image/webp"), url("../assets/img/alcam-painting-1000.jpg") type("image/jpeg"));
  }
}
.about-text { max-width: 784px; margin: 30px auto 0; text-align: center; }
.video { max-width: 720px; margin: 0 auto; }
.video iframe { display: block; width: 100%; aspect-ratio: 720 / 410; height: auto; border: 0; }

/* ---------- GALLERY (masonry like Avada grid / isotope) ---------- */
.gallery-section { padding: 160px 30px 0; }
.gallery-block + .gallery-block { margin-top: 110px; }
.gallery-block .section-title { margin-bottom: 15px; }

.gallery { position: relative; margin: 0 -5px; }
.gallery-item { margin: 0; padding: 5px; }
.gallery-item a { display: block; cursor: zoom-in; overflow: hidden; }
.gallery-item img { width: 100%; height: auto; transition: opacity .3s; }
.gallery-item a:hover img { opacity: .9; }
/* fallback before JS lays out masonry: simple CSS columns */
.gallery:not(.is-laid-out) { column-count: 3; column-gap: 0; }
.gallery:not(.is-laid-out) .gallery-item { break-inside: avoid; }
.gallery.is-laid-out .gallery-item { position: absolute; }

/* ---------- COTTAGE ---------- */
.cottage { padding: 160px 0 0; }
.cottage-text { text-align: center; margin: 30px 0 0; }
.cottage .gallery { max-width: 1210px; margin: 0 auto; }

/* ---------- DIRECTIONS ---------- */
.directions { padding: 160px 30px 0; }
.address { font-style: normal; text-align: center; margin: 10px 0 0; }
.address a { color: var(--maroon); font-weight: 400; }
.map iframe { display: block; width: 100%; height: 550px; border: 0; margin-top: 30px; }

/* ---------- THINGS TO DO ---------- */
.todo { padding: 120px 0; }
.todo-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  column-gap: 48px; row-gap: 40px; margin-top: 30px; padding: 0 16px;
}
.todo-card { text-align: center; }
.todo-card img { width: 100%; aspect-ratio: 368 / 228; object-fit: cover; margin-bottom: 20px; }
.todo-card h3 {
  font-family: var(--font-head); font-weight: 400; font-size: 24px;
  line-height: 1; color: var(--maroon-dark); margin: 0 0 12px;
}
.todo-card p { margin: 0; }

/* ---------- CONTACT / FOOTER ---------- */
.contact {
  padding: 90px 0;
  /* plain maroon with a faint mountain ridge echoing the logo
     (replaces the theme demo's grape-pattern image) */
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1600 200' preserveAspectRatio='none'%3E%3Cpath d='M0 200V150L180 70l120 60 170-110 190 120 110-50 210 90 160-100 180 80 130-40 150 70v60z' fill='%23fff' fill-opacity='.05'/%3E%3C/svg%3E") center bottom / 100% 200px no-repeat,
    linear-gradient(180deg, #7a0f3b 0%, #5c0c2d 100%);
  color: var(--white); text-align: center;
}
.contact-logo { display: inline-block; margin-bottom: 70px; }
.contact-logo img { width: 389px; max-width: 100%; }
.contact-lines p {
  font-family: var(--font-head); font-size: 48px; line-height: 1; margin: 0 0 48px;
}
.contact-lines p:last-child { margin-bottom: 0; }
.contact-lines a { text-decoration: none; color: var(--white); }
.contact-lines a:hover { opacity: .85; }
.copyright { font-size: 12px; margin: 80px 0 0; }
.copyright a { color: var(--white); }
.contact :focus-visible { outline-color: var(--white); }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed; right: 75px; bottom: 0; width: 42px; height: 30px;
  display: grid; place-items: center; background: #333; color: #fff;
  border-radius: 4px 4px 0 0; opacity: 0; pointer-events: none; transition: opacity .3s;
  z-index: 50;
}
.to-top.show { opacity: .9; pointer-events: auto; }

/* =========================================================
   LIGHTBOX (rebuild of Avada iLightbox "light" skin)
   ========================================================= */
.lb { position: fixed; inset: 0; z-index: 1000; display: none; font-family: var(--font-body); }
.lb.open { display: block; }
.lb-overlay { position: absolute; inset: 0; background: rgba(255,255,255,.92); animation: lbFade .25s ease; }
@keyframes lbFade { from { opacity: 0 } to { opacity: 1 } }

.lb-toolbar { position: absolute; top: 12px; left: 12px; display: flex; gap: 6px; z-index: 3; }
.lb-btn {
  width: 30px; height: 30px; border: 0; background: transparent; color: #333;
  cursor: pointer; display: grid; place-items: center; padding: 0;
}
.lb-btn:hover { color: var(--maroon); }
.lb-btn[hidden] { display: none; }
.lb-btn svg { width: 18px; height: 18px; }

.lb-stage {
  position: absolute; top: 60px; bottom: 60px; left: 60px; right: 160px;
  display: flex; align-items: center; justify-content: center;
}
.lb-figure {
  margin: 0; position: relative; max-width: 100%; max-height: 100%;
  border: 2px solid #fff; box-shadow: 0 0 30px rgba(0,0,0,.25); background: #fff;
}
.lb-figure img {
  display: block; max-width: calc(100vw - 230px); max-height: calc(100vh - 124px);
  width: auto; height: auto; animation: lbImg .3s ease;
}
@keyframes lbImg { from { opacity: 0; transform: scale(.98) } to { opacity: 1; transform: none } }
.lb-counter { position: absolute; bottom: 18px; left: 18px; font-size: 12px; color: #666; letter-spacing: 1px; z-index: 3; }

.lb-prev, .lb-next {
  position: absolute; left: 50%; transform: translateX(-50%); z-index: 3;
  width: 120px; height: 40px; border: 0; background: transparent; color: #707070; cursor: pointer;
}
.lb-prev { top: 14px; } .lb-next { bottom: 10px; }
.lb-prev:hover, .lb-next:hover { color: #222; }
.lb-prev svg, .lb-next svg { width: 64px; height: 28px; }

.lb-thumbs {
  position: absolute; top: 0; right: 0; bottom: 0; width: 130px; padding: 12px;
  overflow-y: auto; display: flex; flex-direction: column; gap: 8px; z-index: 2;
  scrollbar-width: thin;
}
.lb-thumbs button {
  flex: 0 0 auto; width: 104px; height: 70px; padding: 0; border: 2px solid #fff;
  background: #eee; cursor: pointer; opacity: .55; box-shadow: 0 0 6px rgba(0,0,0,.15);
  transition: opacity .2s;
}
.lb-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumbs button:hover, .lb-thumbs button.active { opacity: 1; }
body.lb-lock { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* =========================================================
   RESPONSIVE (Avada breakpoints 1024 / 800 / 640)
   ========================================================= */
@media (max-width: 1024px) {
  .hero-title { font-size: 72px; }
  .section-title .title { font-size: 48px; }
  .contact-lines p { font-size: 38px; }
}
@media (max-width: 800px) {
  .hero { padding: 140px 20px; }
  .hero-title { font-size: 52px; }
  .hero-sub { font-size: 16px; }
  .section-title .title { font-size: 40px; }
  .about { padding-bottom: 260px; }
  .gallery-section, .cottage, .directions { padding-top: 100px; }
  .gallery:not(.is-laid-out) { column-count: 2; }
  .todo-grid { grid-template-columns: repeat(2, 1fr); column-gap: 24px; }
  .contact-lines p { font-size: 28px; margin-bottom: 28px; }
  .lb-stage { left: 10px; right: 10px; top: 56px; bottom: 100px; }
  .lb-figure img { max-width: calc(100vw - 24px); max-height: calc(100vh - 170px); }
  .lb-thumbs { top: auto; left: 0; width: auto; height: 90px; flex-direction: row; overflow-x: auto; overflow-y: hidden; }
  .lb-thumbs button { width: 90px; height: 62px; }
  .lb-next { bottom: 92px; }
  .lb-counter { bottom: auto; left: auto; top: 20px; right: 16px; }
  .to-top { right: 20px; }
}
@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .gallery-section, .directions { padding-left: 15px; padding-right: 15px; }
  .hero-title { font-size: 42px; }
  .section-title .title { font-size: 34px; }
  .section-title .subtitle { font-size: 14px; }
  .gallery:not(.is-laid-out) { column-count: 1; }
  .todo-grid { grid-template-columns: 1fr; }
  .map iframe { height: 400px; }
  .contact-lines p { font-size: 22px; }
  .contact-logo { margin-bottom: 40px; }
}
