/*
Theme Name: Stravos Platanos
Theme URI: https://stravos-platanos.gr
Author: Stravos Platanos
Description: One-page bilingual (EN/EL) rental property listing theme with editable photos, repeatable content lists, an enquiry form that emails the host, and an availability calendar managed from wp-admin.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: stavros-platanos
*/

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #faf8f4;
  color: #17150f;
  font-family: Karla, system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: #4a5b4c; }
a:hover { color: #2f3a30; }

input, textarea, button { font-family: Karla, system-ui, sans-serif; }
input::placeholder, textarea::placeholder { color: #8f8a80; }

* { box-sizing: border-box; }

img { max-width: 100%; display: block; }

/* ---------- Header ---------- */

.sp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px clamp(20px, 4vw, 48px);
  border-bottom: 1px solid rgba(23, 21, 15, .1);
}

.sp-brand {
  font: 500 clamp(11px, 1.2vw, 12px)/1 Karla, sans-serif;
  letter-spacing: .17em;
  text-transform: uppercase;
}

.sp-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
}

.sp-nav a {
  font: 400 13px/1 Karla, sans-serif;
  color: #6f6a60;
  text-decoration: none;
}
.sp-nav a:hover { color: #17150f; }

.sp-lang-switch {
  display: flex;
  border: 1px solid rgba(23, 21, 15, .18);
  border-radius: 999px;
  overflow: hidden;
  font: 500 10px/1 Karla, sans-serif;
  letter-spacing: .08em;
}

.sp-lang-pill {
  padding: 7px 10px;
  cursor: pointer;
  background: transparent;
  color: #6f6a60;
  border: none;
  font: 500 10px/1 Karla, sans-serif;
  letter-spacing: .08em;
  -webkit-appearance: none;
  appearance: none;
}

html[data-sp-lang="en"] .sp-lang-pill[data-lang="en"],
html[data-sp-lang="el"] .sp-lang-pill[data-lang="el"] {
  background: #17150f;
  color: #faf8f4;
}

/* Language toggle: visibility is decided entirely by the <html
   data-sp-lang="en|el"> attribute — set server-side, and overridden
   synchronously in <head> (before any body content parses) from a
   visitor's saved choice. See header.php + assets/js/frontend.js. */
[data-i18n] { display: none; }
.sp-columns[data-i18n] { display: none; } /* beats its own display:flex below */

html[data-sp-lang="en"] [data-i18n="en"] { display: inline; }
html[data-sp-lang="el"] [data-i18n="el"] { display: inline; }
html[data-sp-lang="en"] .sp-columns[data-i18n="en"] { display: flex; }
html[data-sp-lang="el"] .sp-columns[data-i18n="el"] { display: flex; }

/* ---------- Layout shell ---------- */

.sp-shell { max-width: 1280px; margin: 0 auto; }

.sp-hero-wrap { padding: 8px; }

.sp-hero {
  position: relative;
  display: block;
  width: 100%;
  height: clamp(380px, 44vw, 560px);
  border-radius: 4px;
  overflow: hidden;
  background: #eae6dd;
}
.sp-hero img { width: 100%; height: 100%; object-fit: cover; }

.sp-gallery-wrap { padding: 0 8px; }

.sp-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
  gap: 8px;
}

.sp-gallery-item {
  position: relative;
  height: clamp(150px, 20vw, 220px);
  border-radius: 4px;
  overflow: hidden;
  background: #eae6dd;
}
.sp-gallery-item img { width: 100%; height: 100%; object-fit: cover; }

.sp-gallery-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 12px 10px;
  background: linear-gradient(transparent, rgba(0, 0, 0, .6));
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .15s ease, transform .15s ease;
  pointer-events: none;
}
.sp-caption-parent:hover .sp-gallery-caption,
.sp-caption-parent:focus-within .sp-gallery-caption {
  opacity: 1;
  transform: translateY(0);
}
.sp-gallery-caption span {
  font: 400 12px/1.3 Karla, sans-serif;
  color: #faf8f4;
}

.sp-photo-caption {
  margin: 10px 0 0;
  font: 400 12px/1 Karla, sans-serif;
  color: #6f6a60;
}

.sp-gallery-viewall {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sp-gallery-viewall:hover { color: #17150f; }

/* ---------- Gallery modal ---------- */

body.sp-modal-open { overflow: hidden; }

.sp-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: clamp(16px, 4vw, 48px);
}
.sp-gallery-modal:not([hidden]) { display: flex; }

.sp-gallery-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(23, 21, 15, .78);
}

.sp-gallery-modal-panel {
  position: relative;
  width: 100%;
  max-width: 1000px;
  max-height: 100%;
  overflow-y: auto;
  background: #faf8f4;
  border-radius: 8px;
  padding: clamp(20px, 3vw, 32px);
}

.sp-gallery-modal-close {
  position: sticky;
  top: 0;
  float: right;
  margin: -4px -4px 12px 12px;
  padding: 8px 14px;
  background: #17150f;
  color: #faf8f4;
  border: none;
  border-radius: 999px;
  font: 500 12px/1 Karla, sans-serif;
  cursor: pointer;
}
.sp-gallery-modal-close:hover { background: #3a483c; }

.sp-gallery-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 24px;
  row-gap: 32px;
  clear: both;
}

.sp-gallery-modal-figure { margin: 0; }

.sp-gallery-modal-figure img {
  width: 100%;
  height: clamp(180px, 22vw, 260px);
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.sp-gallery-modal-section {
  grid-column: 1 / -1;
}

.sp-gallery-modal-section-title {
  margin: 0 0 12px;
  font: 400 19px/1.3 Newsreader, serif;
  color: #17150f;
}

.sp-gallery-modal-section-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  column-gap: 24px;
  row-gap: 32px;
}

/* Must come after both grids' base rules above — same specificity, so an
   unconditional rule appearing later in the file would otherwise win the
   cascade over these at any viewport width, regardless of the media query. */
@media (max-width: 720px) {
  .sp-gallery-modal-grid,
  .sp-gallery-modal-section-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 460px) {
  .sp-gallery-modal-grid,
  .sp-gallery-modal-section-grid {
    grid-template-columns: 1fr;
  }
}

/* Empty image placeholder (front end never shows a broken <img>) */
.sp-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(45deg, #eae6dd, #eae6dd 10px, #f2efe8 10px, #f2efe8 20px);
  color: #9a958b;
  font: 400 12px/1.4 Karla, sans-serif;
  text-align: center;
  padding: 10px;
}

.sp-columns {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(32px, 5vw, 72px);
  padding: clamp(24px, 3vw, 34px) clamp(20px, 4vw, 48px) clamp(40px, 5vw, 56px);
  align-items: flex-start;
}

.sp-main { flex: 3 1 460px; min-width: 0; }

.sp-title {
  margin: 0;
  font: 300 clamp(34px, 4.6vw, 52px)/1.05 Newsreader, serif;
  letter-spacing: -.015em;
  max-width: 15em;
  text-wrap: pretty;
}

.sp-location {
  margin: 12px 0 0;
  font: 400 clamp(13px, 1.3vw, 15px)/1.5 Karla, sans-serif;
  color: #6f6a60;
}

.sp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.sp-tag {
  font: 400 13px/1 Karla, sans-serif;
  padding: 9px 14px;
  border: 1px solid rgba(23, 21, 15, .16);
  border-radius: 999px;
}

.sp-cta {
  display: block;
  margin-top: 22px;
  max-width: 320px;
  text-align: center;
  padding: 15px 20px;
  background: #4a5b4c;
  color: #faf8f4;
  border-radius: 6px;
  font: 500 14px/1 Karla, sans-serif;
  text-decoration: none;
}
.sp-cta:hover { background: #3a483c; color: #faf8f4; }

.sp-story {
  margin-top: clamp(30px, 3.5vw, 36px);
  padding-top: clamp(26px, 3vw, 32px);
  border-top: 1px solid rgba(23, 21, 15, .12);
}

.sp-quote {
  margin: 0;
  font: 300 clamp(18px, 2vw, 22px)/1.5 Newsreader, serif;
  max-width: 26em;
  text-wrap: pretty;
}

.sp-paragraphs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 22px 28px;
  margin-top: 20px;
}

.sp-paragraphs p {
  margin: 0;
  font: 400 14px/1.7 Karla, sans-serif;
  color: #4b473f;
  text-wrap: pretty;
}

.sp-signoff {
  margin: 18px 0 0;
  font: 400 italic 14px/1.6 Karla, sans-serif;
  color: #6f6a60;
}

.sp-section {
  margin-top: clamp(34px, 4vw, 44px);
  padding-top: clamp(26px, 3vw, 32px);
  border-top: 1px solid rgba(23, 21, 15, .12);
}

.sp-section-title {
  margin: 0 0 16px;
  font: 500 11px/1 Karla, sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #6f6a60;
}

.sp-section-heading {
  margin: 0 0 20px;
  font: 300 clamp(23px, 2.5vw, 30px)/1.15 Newsreader, serif;
  letter-spacing: -.012em;
  color: #17150f;
}

.sp-amenities-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px 32px;
}

@media (max-width: 480px) {
  .sp-amenities-grid {
    grid-template-columns: 1fr;
  }
}

.sp-amenity-category {
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(23, 21, 15, .14);
  font: 600 12px/1.2 Karla, sans-serif;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: #6f6a60;
}

.sp-amenity-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.sp-amenity-list li {
  display: flex;
  gap: 10px;
  align-items: baseline;
  font: 400 15px/1.5 Karla, sans-serif;
  color: #3a362f;
}

.sp-amenity-list li::before {
  content: "\00b7";
  flex: none;
  color: #a39d91;
}

.sp-amenities-note {
  margin: 20px 0 0;
  font: 400 12.5px/1.6 Karla, sans-serif;
  color: #8a8478;
}

.sp-nearby-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 0 32px;
}

.sp-nearby-item {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(23, 21, 15, .1);
}

.sp-nearby-name { font: 400 13.5px/1.3 Karla, sans-serif; }
.sp-nearby-distance {
  font: 400 13px/1.3 Karla, sans-serif;
  color: #6f6a60;
  white-space: nowrap;
}

.sp-rooms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 24px 32px;
}

.sp-room-name {
  margin: 0 0 6px;
  font: 400 16px/1.3 Newsreader, serif;
}

.sp-room-text {
  margin: 0;
  font: 400 13.5px/1.7 Karla, sans-serif;
  color: #4b473f;
  text-wrap: pretty;
}

.sp-history-paragraphs p {
  margin: 0 0 16px;
  font: 400 14px/1.75 Karla, sans-serif;
  color: #4b473f;
  max-width: 62em;
  text-wrap: pretty;
}

.sp-history-paragraphs p:last-child { margin-bottom: 0; }

.sp-testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}

.sp-testimonial {
  background: #f2efe8;
  border-radius: 6px;
  padding: 20px 22px;
}

.sp-testimonial-quote {
  margin: 0;
  font: 300 clamp(15px, 1.6vw, 17px)/1.5 Newsreader, serif;
  text-wrap: pretty;
}

.sp-testimonial-author {
  margin: 12px 0 0;
  font: 400 12px/1 Karla, sans-serif;
  color: #6f6a60;
}

/* ---------- Sidebar: contact form + calendar ---------- */

.sp-sidebar {
  flex: 1 1 340px;
  min-width: 0;
  position: sticky;
  top: 16px;
  scroll-margin-top: 12px;
}

.sp-contact-card {
  background: #f2efe8;
  border: 1px solid rgba(23, 21, 15, .1);
  border-radius: 8px;
  padding: clamp(22px, 2.5vw, 26px) clamp(20px, 2.2vw, 24px);
}

.sp-contact-title {
  margin: 0;
  font: 300 clamp(24px, 2.6vw, 27px)/1.15 Newsreader, serif;
}

.sp-contact-subtitle {
  margin: 8px 0 20px;
  font: 400 13px/1.55 Karla, sans-serif;
  color: #6f6a60;
}

.sp-form { display: flex; flex-direction: column; gap: 10px; }

.sp-form input, .sp-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  border: 1px solid rgba(23, 21, 15, .18);
  border-radius: 5px;
  background: #faf8f4;
  font: 400 15px/1 Karla, sans-serif;
  color: #17150f;
}

.sp-form textarea { font: 400 15px/1.4 Karla, sans-serif; resize: vertical; }

.sp-form-row-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sp-date-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.sp-date-label {
  font: 400 11px/1 Karla, sans-serif;
  color: #8f8a80;
}

.sp-date-field input[type="date"] {
  color-scheme: light;
}

.sp-form button {
  padding: 16px 20px;
  background: #4a5b4c;
  color: #faf8f4;
  border: none;
  border-radius: 5px;
  font: 500 14px/1 Karla, sans-serif;
  cursor: pointer;
}
.sp-form button:hover { background: #3a483c; }

.sp-honeypot { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.sp-form-error {
  margin: 0 0 10px;
  padding: 10px 12px;
  background: #f6e4e1;
  color: #7a3b34;
  border-radius: 5px;
  font: 400 13px/1.4 Karla, sans-serif;
}

.sp-ota-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 16px;
  font: 400 12px/1 Karla, sans-serif;
}

.sp-ota-links a {
  color: #6f6a60;
  text-decoration: none;
  border-bottom: 1px solid rgba(23, 21, 15, .25);
  padding-bottom: 2px;
}

.sp-thanks { padding: 10px 0; }
.sp-thanks p {
  margin: 0;
  font: 300 22px/1.35 Newsreader, serif;
}

.sp-calendar-card {
  margin-top: 16px;
  padding: 22px 24px;
  border: 1px solid rgba(23, 21, 15, .12);
  border-radius: 8px;
}

.sp-calendar-month + .sp-calendar-month { margin-top: 22px; }

.sp-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.sp-cal-weekday {
  font: 500 10px/1 Karla, sans-serif;
  color: #9a958b;
  text-align: center;
  padding-bottom: 4px;
}

.sp-cal-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font: 400 12px/1 Karla, sans-serif;
}

.sp-cal-legend {
  display: flex;
  gap: 14px;
  margin-top: 12px;
  font: 400 11px/1 Karla, sans-serif;
  color: #6f6a60;
}

.sp-cal-legend span { display: flex; align-items: center; gap: 6px; }

.sp-cal-swatch {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  display: inline-block;
}

/* ---------- Footer ---------- */

.sp-footer {
  padding: 26px clamp(20px, 4vw, 48px);
  background: #17150f;
  color: #a9a49a;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font: 400 12px/1.7 Karla, sans-serif;
}

.sp-footer a { color: #a9a49a; }

@media (max-width: 640px) {
  .sp-sidebar { position: static; top: auto; }
}
