/*
Theme Name: Dimou Wine
Theme URI: https://dimou-wine.eu
Author: ElecTech.gr
Author URI: https://electech.gr
Description: Premium one-page WordPress theme for Dimou Winery, with section galleries, wine presentations, WPForms Lite support and Google Maps integration.
Version: 1.2.0
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: dimou-wine
*/

:root {
  --wine: #641d2d;
  --wine-deep: #3c101b;
  --olive: #43513b;
  --olive-soft: #68745f;
  --gold: #b79658;
  --cream: #f7f1e6;
  --cream-deep: #eee2cf;
  --paper: #fffdf8;
  --ink: #2c2823;
  --muted: #72695e;
  --line: rgba(87, 66, 43, .18);
  --shadow: 0 24px 70px rgba(56, 29, 19, .13);
  --radius: 22px;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 94px; }
body {
  margin: 0;
  overflow-x: hidden;
  background: var(--paper);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.75;
}
body.admin-bar .site-header { top: 32px; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input, textarea { font: inherit; }
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  clip: auto !important; width: auto; height: auto; margin: 0; padding: 12px 18px;
  top: 10px; left: 10px; z-index: 100000; background: #fff; color: #111;
}
.site-shell { min-height: 100vh; }
.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 1000;
  border-bottom: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.site-header.is-scrolled {
  background: rgba(255, 253, 248, .96);
  border-color: var(--line);
  box-shadow: 0 8px 36px rgba(45, 31, 21, .08);
  backdrop-filter: blur(14px);
}
.header-inner { min-height: 132px; display: flex; align-items: center; justify-content: space-between; gap: 28px; transition: min-height .3s ease; }
.site-header.is-scrolled .header-inner { min-height: 96px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.is-scrolled .brand { color: var(--wine-deep); }
.brand-mark {
  width: 42px; aspect-ratio: 1; display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,.7); border-radius: 50%;
  font-family: Georgia, serif; font-size: 23px; line-height: 1;
}
.is-scrolled .brand-mark { border-color: var(--gold); }
.brand-copy { display: grid; line-height: 1.12; }
.brand-name { font-family: Georgia, "Times New Roman", serif; font-size: 19px; letter-spacing: .02em; }
.brand-tagline { margin-top: 4px; font-size: 10px; text-transform: uppercase; letter-spacing: .19em; opacity: .78; }
.custom-logo-link { display: inline-flex; align-items: center; flex: 0 0 auto; }
.custom-logo-link img { width: auto; max-width: min(420px, 34vw); max-height: 116px; transition: max-height .3s ease; }
.site-header.is-scrolled .custom-logo-link img { max-height: 78px; }
.main-nav ul { display: flex; align-items: center; gap: 21px; margin: 0; padding: 0; list-style: none; }
.main-nav a {
  position: relative; color: rgba(255,255,255,.92); text-decoration: none;
  font-size: 12px; font-weight: 650; letter-spacing: .055em; text-transform: uppercase;
}
.is-scrolled .main-nav a { color: var(--ink); }
.main-nav a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -8px; height: 1px;
  background: var(--gold); transition: right .25s ease;
}
.main-nav a:hover::after, .main-nav a:focus-visible::after, .main-nav a.is-active::after { right: 0; }
.menu-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.5);
  border-radius: 50%; background: transparent; color: #fff; cursor: pointer;
}
.is-scrolled .menu-toggle { color: var(--wine-deep); border-color: var(--line); }
.menu-toggle span, .menu-toggle::before, .menu-toggle::after {
  content: ""; display: block; width: 18px; height: 1px; margin: 5px auto; background: currentColor;
  transition: transform .25s ease, opacity .25s ease;
}
.menu-open .menu-toggle span { opacity: 0; }
.menu-open .menu-toggle::before { transform: translateY(6px) rotate(45deg); }
.menu-open .menu-toggle::after { transform: translateY(-6px) rotate(-45deg); }

/* Shared sections */
.section { position: relative; padding: 112px 0; scroll-margin-top: 82px; }
.section-wash { background: var(--cream); }
.section-dark { background: var(--olive); color: #fff; }
.section-header { max-width: 820px; margin-bottom: 54px; }
.section-header.center { margin-inline: auto; text-align: center; }
.eyebrow {
  margin: 0 0 16px; color: var(--gold); font-size: 12px; font-weight: 750;
  letter-spacing: .22em; text-transform: uppercase;
}
h1, h2, h3, h4 { margin-top: 0; font-family: Georgia, "Times New Roman", serif; font-weight: 400; line-height: 1.1; }
.section-title { margin-bottom: 22px; color: var(--wine-deep); font-size: clamp(38px, 5vw, 66px); letter-spacing: -.025em; }
.section-dark .section-title { color: #fff; }
.section-copy { max-width: 760px; color: var(--muted); font-size: 18px; }
.section-dark .section-copy { color: rgba(255,255,255,.78); }
.section-copy p:first-child { margin-top: 0; }
.section-copy p:last-child { margin-bottom: 0; }
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(46px, 7vw, 92px); align-items: center; }
.split.reverse > :first-child { order: 2; }
.split.reverse > :last-child { order: 1; }
.rule { width: 64px; height: 1px; margin: 25px 0; background: var(--gold); }
.button-row { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 32px; }
.button {
  display: inline-flex; min-height: 50px; align-items: center; justify-content: center; padding: 12px 25px;
  border: 1px solid var(--wine); border-radius: 999px; background: var(--wine); color: #fff;
  text-decoration: none; font-size: 13px; font-weight: 750; letter-spacing: .06em; text-transform: uppercase;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.button:hover, .button:focus-visible { transform: translateY(-2px); background: var(--wine-deep); }
.button-outline { border-color: rgba(255,255,255,.7); background: transparent; color: #fff; }
.button-outline:hover, .button-outline:focus-visible { background: #fff; color: var(--wine-deep); }

/* Hero */
.hero { min-height: 100svh; display: grid; place-items: end start; overflow: hidden; background: var(--wine-deep); color: #fff; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(29,8,13,.84) 0%, rgba(29,8,13,.57) 48%, rgba(29,8,13,.22) 100%),
              linear-gradient(0deg, rgba(22,8,9,.58), transparent 54%);
}
.hero.has-hero-image::before {
  background: linear-gradient(90deg, rgba(29,8,13,.5) 0%, rgba(29,8,13,.2) 52%, rgba(29,8,13,.04) 100%),
              linear-gradient(0deg, rgba(22,8,9,.26), transparent 48%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: .48; pointer-events: none;
  background: radial-gradient(circle at 80% 18%, rgba(183,150,88,.22), transparent 27%),
              linear-gradient(135deg, #4d1725, #293729);
}
.hero.has-hero-image::after { opacity: .08; }
.hero .carousel { position: absolute; inset: 0; z-index: 0; border-radius: 0; }
.hero .carousel-viewport, .hero .carousel-track, .hero .carousel-slide { height: 100%; }
.hero .carousel-slide { flex-basis: 100%; }
.hero .carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-content { position: relative; z-index: 2; max-width: 830px; padding: 190px 0 105px; }
.hero-kicker { margin: 0 0 22px; color: #e0c899; font-size: 13px; font-weight: 750; letter-spacing: .25em; text-transform: uppercase; }
.hero-title { max-width: 820px; margin-bottom: 25px; font-size: clamp(50px, 7.4vw, 98px); letter-spacing: -.04em; text-wrap: balance; }
.hero-copy { max-width: 680px; margin: 0; color: rgba(255,255,255,.86); font-size: clamp(17px, 2vw, 21px); }

/* Carousels */
.carousel { --carousel-items: 3; position: relative; min-width: 0; overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); }
.carousel-viewport { overflow: hidden; }
.carousel-track { display: flex; transition: transform .55s cubic-bezier(.22,.75,.18,1); will-change: transform; }
.carousel-slide { position: relative; flex: 0 0 calc(100% / var(--carousel-items)); min-width: 0; min-height: 350px; aspect-ratio: 1 / 1; overflow: hidden; background: var(--cream-deep); }
.carousel.is-hero .carousel-slide { min-height: 0; }
.carousel-slide::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); pointer-events: none; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s ease; }
.carousel-slide:hover img { transform: scale(1.035); }
.carousel-slide figcaption {
  position: absolute; inset: auto 0 0; padding: 28px 16px 14px; color: #fff; font-size: 13px;
  background: linear-gradient(transparent, rgba(18,10,7,.72));
}
.carousel-lightbox { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.carousel-controls { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.carousel-arrow, .carousel-pause {
  display: grid; width: 50px; height: 50px; place-items: center; border: 1px solid rgba(255,255,255,.75);
  border-radius: 50%; background: rgba(255,255,255,.9); box-shadow: 0 8px 24px rgba(25,12,8,.24); color: var(--wine-deep); cursor: pointer;
  pointer-events: auto; transition: background .2s ease, color .2s ease, opacity .2s ease, transform .2s ease;
}
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); }
.carousel-prev { left: 16px; }
.carousel-next { right: 16px; }
.carousel-arrow:hover { transform: translateY(-50%) scale(1.06); }
.carousel-arrow:hover, .carousel-pause:hover { background: var(--wine); color: #fff; }
.carousel-arrow:disabled { opacity: .35; cursor: default; }
.carousel-dots { position: absolute; left: 50%; bottom: 14px; display: flex; justify-content: center; gap: 7px; padding: 8px 11px; border-radius: 999px; background: rgba(255,255,255,.82); box-shadow: 0 5px 18px rgba(25,12,8,.16); pointer-events: auto; transform: translateX(-50%); }
.carousel-dot { width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%; background: rgba(100,29,45,.24); cursor: pointer; }
.carousel-dot.is-active { background: var(--wine); transform: scale(1.35); }
.carousel-pause { position: absolute; right: 16px; bottom: 14px; width: 38px; height: 38px; }
.single-image .carousel-controls, .all-visible .carousel-controls { display: none; }
.section-gallery { margin-top: 42px; }
.feature-image { aspect-ratio: 5 / 4; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); background: var(--cream-deep); }
.feature-image img { width: 100%; height: 100%; object-fit: cover; }
.empty-art {
  display: grid; min-height: 430px; place-items: center; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(145deg, #5e1729 0%, #7c3341 42%, #3f4c38 100%); box-shadow: var(--shadow);
}
.empty-art::before { content: "Π"; color: rgba(255,255,255,.12); font-family: Georgia, serif; font-size: 240px; line-height: 1; }

/* Wines */
.wine-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 48px; }
.wine-card { position: relative; overflow: hidden; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 18px 55px rgba(58,35,24,.08); }
.wine-media { position: relative; aspect-ratio: 4 / 4.8; overflow: hidden; background: linear-gradient(145deg, #efe5d6, #faf7f0); }
.wine-media img { width: 100%; height: 100%; object-fit: cover; }
.wine-placeholder { display: grid; width: 100%; height: 100%; place-items: center; color: rgba(100,29,45,.14); font-family: Georgia, serif; font-size: 160px; }
.wine-type { position: absolute; top: 17px; left: 17px; padding: 7px 12px; border-radius: 999px; background: rgba(255,255,255,.9); color: var(--wine); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.wine-content { padding: 27px; }
.wine-title { margin-bottom: 8px; color: var(--wine-deep); font-size: 31px; }
.wine-varieties { margin: 0 0 16px; color: var(--gold); font-size: 12px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; }
.wine-summary { margin: 0; color: var(--muted); font-size: 15px; }
.wine-details { margin-top: 22px; border-top: 1px solid var(--line); }
.wine-details summary { padding: 18px 0 0; color: var(--wine); font-size: 12px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; cursor: pointer; }
.wine-meta { display: grid; gap: 12px; margin: 18px 0 0; }
.wine-meta-row { display: grid; grid-template-columns: 112px 1fr; gap: 12px; font-size: 13px; line-height: 1.5; }
.wine-meta-row dt { color: var(--muted); font-weight: 700; }
.wine-meta-row dd { margin: 0; }
.wine-card .carousel { margin: 0 22px 22px; border-radius: 14px; box-shadow: none; }
.wine-card .carousel-slide { aspect-ratio: 1 / 1; }

/* Winery process */
.process { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin: 55px 0; }
.process-step { position: relative; padding: 28px 16px; text-align: center; }
.process-step:not(:last-child)::after { content: "→"; position: absolute; top: 42px; right: -8px; color: var(--gold); font-size: 21px; }
.process-number { display: grid; width: 48px; height: 48px; margin: 0 auto 14px; place-items: center; border: 1px solid rgba(255,255,255,.38); border-radius: 50%; color: #e0c899; font-family: Georgia, serif; font-size: 18px; }
.process-label { font-size: 13px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }

/* Visits */
.visit-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 32px 0; }
.visit-fact { padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.58); }
.visit-fact small { display: block; margin-bottom: 5px; color: var(--gold); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.visit-fact span { color: var(--wine-deep); font-family: Georgia, serif; font-size: 18px; }

/* Finale */
.finale { min-height: 620px; display: grid; place-items: center; overflow: hidden; background: var(--wine-deep); color: #fff; text-align: center; }
.finale::before { content: ""; position: absolute; inset: 0; z-index: 1; background: rgba(39,12,18,.7); }
.finale .carousel { position: absolute; inset: 0; z-index: 0; border-radius: 0; box-shadow: none; }
.finale .carousel-viewport, .finale .carousel-track, .finale .carousel-slide { height: 100%; }
.finale .carousel-slide { flex-basis: 100%; }
.finale .carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.finale .carousel-controls { display: none; }
.finale-content { position: relative; z-index: 2; max-width: 880px; }
.finale-title { margin-bottom: 24px; font-size: clamp(42px, 6vw, 76px); }
.finale-copy { max-width: 680px; margin-inline: auto; color: rgba(255,255,255,.82); font-size: 19px; }
.finale .button-row { justify-content: center; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: 38px; align-items: stretch; }
.contact-grid.contact-only { grid-template-columns: minmax(0, 760px); }
.contact-card { padding: clamp(28px, 4vw, 48px); border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 18px 60px rgba(58,35,24,.07); }
.contact-details { display: grid; gap: 18px; margin: 30px 0 0; }
.contact-item { display: grid; grid-template-columns: 32px 1fr; gap: 13px; align-items: start; }
.contact-icon { color: var(--gold); font-family: Georgia, serif; font-size: 19px; }
.contact-item strong { display: block; margin-bottom: 2px; color: var(--wine-deep); font-size: 13px; }
.contact-item a { color: var(--muted); text-decoration: none; }
.social-links { display: flex; gap: 10px; margin-top: 24px; }
.social-links a { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--wine); text-decoration: none; font-size: 12px; font-weight: 750; }
.form-map { display: grid; gap: 24px; }
.form-wrap, .map-wrap { min-height: 280px; overflow: hidden; border-radius: var(--radius); background: #fff; box-shadow: 0 18px 60px rgba(58,35,24,.08); }
.form-wrap { padding: clamp(25px, 4vw, 42px); }
.map-wrap iframe { display: block; width: 100% !important; height: 100% !important; min-height: 360px; border: 0; }
.admin-placeholder { display: grid; min-height: 180px; place-items: center; padding: 24px; border: 1px dashed var(--gold); color: var(--muted); text-align: center; }
.wpforms-container { margin: 0 !important; }
.wpforms-container .wpforms-field { padding: 8px 0 !important; }
.wpforms-container input, .wpforms-container textarea, .wpforms-container select {
  max-width: 100% !important; border: 1px solid var(--line) !important; border-radius: 10px !important; background: var(--paper) !important;
}
.wpforms-container button[type=submit] { border: 0 !important; border-radius: 999px !important; background: var(--wine) !important; color: #fff !important; font-weight: 700 !important; }

/* Footer */
.site-footer { padding: 24px 0; background: #1f1815; color: rgba(255,255,255,.7); font-size: 13px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.footer-site, .footer-credit { display: flex; align-items: center; gap: 6px; }
.site-footer a { color: #fff; font-weight: 700; text-decoration: none; }
.site-footer a:hover { color: #e0c899; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 5000; display: none; grid-template-columns: 72px minmax(0, 1fr) 72px; place-items: center; gap: 18px; padding: 28px; background: rgba(14,10,8,.94); }
.lightbox.is-open { display: grid; }
.lightbox-stage { display: grid; min-width: 0; max-width: min(1200px, 100%); place-items: center; }
.lightbox img { max-width: 100%; max-height: 84vh; object-fit: contain; }
.lightbox-close { position: absolute; top: 20px; right: 20px; width: 46px; height: 46px; border: 1px solid rgba(255,255,255,.45); border-radius: 50%; background: transparent; color: #fff; font-size: 27px; cursor: pointer; }
.lightbox-caption { margin-top: 12px; color: rgba(255,255,255,.8); text-align: center; }
.lightbox-arrow { display: grid; width: 58px; height: 58px; place-items: center; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; background: rgba(255,255,255,.1); color: #fff; font-size: 25px; cursor: pointer; transition: background .2s ease, transform .2s ease, opacity .2s ease; }
.lightbox-arrow:hover, .lightbox-arrow:focus-visible { background: var(--wine); transform: scale(1.06); }
.lightbox-arrow[hidden] { display: none; }

@media (max-width: 1100px) {
  .menu-toggle { display: block; }
  .main-nav {
    position: absolute; top: calc(100% + 1px); left: 0; right: 0; display: grid;
    max-height: 0; overflow: hidden; background: rgba(255,253,248,.98); transition: max-height .35s ease;
  }
  .menu-open .main-nav { max-height: 640px; box-shadow: 0 18px 40px rgba(45,31,21,.12); }
  .main-nav ul { display: grid; gap: 0; padding: 18px max(20px, calc((100vw - var(--container))/2)); }
  .main-nav a { display: block; padding: 10px 0; color: var(--ink); }
  .main-nav a::after { display: none; }
  .wine-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .custom-logo-link img { max-width: min(360px, 58vw); max-height: 94px; }
}

@media (max-width: 820px) {
  body.admin-bar .site-header { top: 46px; }
  .section { padding: 82px 0; }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .split.reverse > :first-child, .split.reverse > :last-child { order: initial; }
  .process { grid-template-columns: 1fr; max-width: 420px; margin-inline: auto; }
  .process-step { display: grid; grid-template-columns: 48px 1fr; gap: 18px; align-items: center; text-align: left; }
  .process-step:not(:last-child)::after { content: "↓"; top: auto; right: auto; bottom: -10px; left: 35px; }
  .process-number { margin: 0; }
  .visit-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .container { width: min(calc(100% - 28px), var(--container)); }
  .header-inner { min-height: 98px; }
  .site-header.is-scrolled .header-inner { min-height: 78px; }
  .custom-logo-link img { max-width: min(260px, 68vw); max-height: 84px; }
  .site-header.is-scrolled .custom-logo-link img { max-height: 64px; }
  .brand-tagline { display: none; }
  .hero-content { padding: 145px 0 92px; }
  .hero-title { font-size: clamp(46px, 15vw, 66px); }
  .hero::before { background: linear-gradient(0deg, rgba(29,8,13,.86), rgba(29,8,13,.43)); }
  .hero.has-hero-image::before { background: linear-gradient(0deg, rgba(29,8,13,.58), rgba(29,8,13,.15)); }
  .section-header { margin-bottom: 38px; }
  .section-title { font-size: 41px; }
  .wine-grid { grid-template-columns: 1fr; }
  .wine-media { aspect-ratio: 5 / 4.6; }
  .visit-facts { grid-template-columns: 1fr; }
  .finale { min-height: 560px; }
  .contact-card { padding: 26px 22px; }
  .map-wrap iframe { min-height: 300px; }
  .carousel-arrow { width: 44px; height: 44px; }
  .carousel-prev { left: 9px; }
  .carousel-next { right: 9px; }
  .carousel-slide { min-height: 350px; }
  .carousel.is-hero .carousel-slide { min-height: 0; }
  .carousel-pause { right: 9px; bottom: 9px; }
  .carousel-dots { bottom: 9px; max-width: calc(100% - 110px); }
  .lightbox { grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 5px; padding: 62px 8px 24px; }
  .lightbox-arrow { width: 44px; height: 44px; font-size: 20px; }
  .lightbox-close { top: 10px; right: 10px; }
  .footer-inner { flex-direction: column; gap: 8px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
