/*
Theme Name: Thomas Apartments Dassia
Theme URI: https://thomasapartments.gr
Author: Thomas Apartments
Description: Custom, fast & clean WordPress theme for Thomas Apartments in Dassia, Corfu. Includes built-in WP Admin panel for managing room galleries, grounds & pool gallery, seasonal prices, hero slides, logo, and booking requests.
Version: 1.4.0
Text Domain: thomas-apartments
*/

:root {
  --primary: #1e3a4c;
  --primary-dark: #132734;
  --accent: #c59b5f;
  --accent-hover: #b0864b;
  --bg-light: #f8f7f4;
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --white: #ffffff;
  --border: #e5e7eb;
  --radius: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--text-dark); background-color: var(--white); line-height: 1.6; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
.container { max-width: 1220px; margin: 0 auto; padding: 0 24px; }

.site-header { position: sticky; top: 0; z-index: 900; background: rgba(255, 255, 255, 0.96); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; flex-direction: column; }
.brand-row { display: flex; align-items: center; gap: 10px; }
.brand-logo-img { max-height: 46px; width: auto; object-fit: contain; border-radius: 4px; }
.brand-title { font-size: 1.25rem; font-weight: 800; letter-spacing: 0.06em; color: var(--primary); text-transform: uppercase; }
.brand-sub { font-size: 0.75rem; color: var(--accent); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.main-nav { display: flex; align-items: center; gap: 24px; }
.main-nav a { font-size: 0.9rem; font-weight: 600; color: var(--text-dark); transition: color 0.2s; }
.main-nav a:hover { color: var(--accent); }
.lang-switch { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.lang-btn { border: none; background: transparent; padding: 5px 10px; font-size: 0.8rem; font-weight: 700; cursor: pointer; color: var(--text-muted); }
.lang-btn.active { background: var(--primary); color: var(--white); }
.mobile-menu-btn { display: none; background: none; border: 1px solid var(--border); padding: 8px 12px; border-radius: 6px; font-size: 1.2rem; cursor: pointer; }

.hero-wrapper { position: relative; background: var(--primary-dark); }
.hero { position: relative; min-height: 620px; display: flex; align-items: center; overflow: hidden; background: var(--primary-dark); }
.hero-slides { position: absolute; inset: 0; z-index: 1; }
.hero-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity 1.1s ease-in-out, transform 6s ease; transform: scale(1.04); }
.hero-slide.active { opacity: 1; transform: scale(1); }
.hero-overlay { position: absolute; inset: 0; z-index: 2; background: linear-gradient(90deg, rgba(19, 39, 52, 0.78) 0%, rgba(19, 39, 52, 0.35) 60%, rgba(19, 39, 52, 0.52) 100%); }
.hero-inner-grid { position: relative; z-index: 3; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 40px; align-items: center; padding: 60px 24px; max-width: 1220px; margin: 0 auto; width: 100%; }
.hero-text { color: var(--white); }
.hero-badge { display: inline-block; background: rgba(197, 155, 95, 0.25); border: 1px solid var(--accent); color: #f3d9b1; padding: 6px 14px; border-radius: 30px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 18px; }
.hero-text h1 { font-size: clamp(2rem, 3.8vw, 3.2rem); font-weight: 800; line-height: 1.15; margin-bottom: 16px; text-shadow: 0 2px 12px rgba(0,0,0,0.35); }
.hero-text p { font-size: 1.05rem; color: rgba(255, 255, 255, 0.92); max-width: 540px; margin-bottom: 24px; text-shadow: 0 1px 8px rgba(0,0,0,0.35); }
.hero-dots { display: flex; gap: 8px; }
.hero-dot { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.45); border: none; cursor: pointer; }
.hero-dot.active { background: var(--accent); width: 26px; border-radius: 10px; }

.hero-booking-card { background: rgba(255, 255, 255, 0.98); border-radius: var(--radius); padding: 28px; box-shadow: 0 20px 45px rgba(0, 0, 0, 0.25); }
.hero-booking-card h2 { font-size: 1.2rem; color: var(--primary); margin-bottom: 16px; text-align: center; text-transform: uppercase; letter-spacing: 0.04em; }
.booking-grid-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.form-group label { font-size: 0.78rem; font-weight: 700; color: var(--primary); text-transform: uppercase; letter-spacing: 0.03em; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 12px; border: 1px solid #d1d5db; border-radius: 7px; font-size: 0.92rem; font-family: inherit; color: var(--text-dark); background: var(--white); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.nights-summary { background: var(--bg-light); border-radius: 7px; padding: 10px 12px; font-size: 0.88rem; color: var(--primary); font-weight: 600; display: flex; justify-content: space-between; margin-bottom: 14px; }
.price-breakdown-box { background: #f3f6f8; border: 1px solid var(--border); border-radius: 7px; padding: 10px 12px; margin-bottom: 12px; font-size: 0.82rem; color: #374151; }
.price-breakdown-row { display: flex; justify-content: space-between; padding: 2px 0; }
.btn-primary { display: inline-flex; align-items: center; justify-content: center; width: 100%; padding: 13px 20px; background: var(--accent); color: var(--white); border: none; border-radius: 7px; font-size: 0.95rem; font-weight: 700; cursor: pointer; transition: background 0.2s, transform 0.1s; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { display: inline-flex; align-items: center; justify-content: center; padding: 10px 16px; border: 1.5px solid var(--primary); color: var(--primary); background: transparent; border-radius: 7px; font-size: 0.88rem; font-weight: 700; cursor: pointer; transition: all 0.2s; }
.btn-outline:hover { background: var(--primary); color: var(--white); }

.section { padding: 76px 0; }
.section-alt { background: var(--bg-light); }
.section-header { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-header h2 { font-size: 2rem; font-weight: 800; color: var(--primary); margin-bottom: 10px; }
.section-header p { color: var(--text-muted); font-size: 1rem; }

.apartments-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 26px; }
.apt-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04); transition: transform 0.25s, box-shadow 0.25s; display: flex; flex-direction: column; cursor: pointer; }
.apt-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.apt-img-wrap { position: relative; height: 215px; overflow: hidden; background: #e5e7eb; }
.apt-img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.apt-card:hover .apt-img-wrap img { transform: scale(1.06); }
.apt-photo-count { position: absolute; bottom: 10px; right: 10px; background: rgba(19, 39, 52, 0.82); color: var(--white); font-size: 0.75rem; font-weight: 600; padding: 4px 10px; border-radius: 20px; }
.apt-price-badge { position: absolute; top: 12px; left: 12px; background: var(--white); color: var(--primary); font-size: 0.85rem; font-weight: 800; padding: 5px 11px; border-radius: 6px; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }
.apt-body { padding: 20px; display: flex; flex-direction: column; flex: 1; }
.apt-title { font-size: 1.15rem; font-weight: 800; color: var(--primary); margin-bottom: 6px; }
.apt-meta { font-size: 0.82rem; color: var(--text-muted); margin-bottom: 10px; display: flex; gap: 12px; flex-wrap: wrap; }
.apt-desc { font-size: 0.9rem; color: #4b5563; margin-bottom: 16px; flex: 1; }
.apt-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--border); gap: 10px; }
.apt-total-est { font-size: 0.82rem; color: var(--accent-hover); font-weight: 700; }

.grounds-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.grounds-item { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: #e5e7eb; cursor: pointer; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06); }
.grounds-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.grounds-item:hover img { transform: scale(1.05); }
.grounds-zoom-badge { position: absolute; bottom: 10px; right: 10px; background: rgba(19, 39, 52, 0.8); color: var(--white); font-size: 0.76rem; font-weight: 600; padding: 4px 10px; border-radius: 20px; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 24px; }
.info-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.info-card h3 { font-size: 1.05rem; color: var(--primary); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.info-card ul { list-style: none; font-size: 0.92rem; color: #4b5563; }
.info-card li { padding: 5px 0; border-bottom: 1px dashed #eee; }
.info-card li:last-child { border-bottom: none; }

.contact-map-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: stretch; }
.contact-box { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; box-shadow: 0 4px 16px rgba(0,0,0,0.04); }
.contact-details-list { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.map-box { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); min-height: 420px; }
.map-box iframe { width: 100%; height: 100%; min-height: 420px; border: 0; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  max-height: 100dvh;
  background: rgba(15, 23, 42, 0.85);
  z-index: 1200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: max(12px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-backdrop.open { display: flex; }
.modal-window {
  background: var(--white);
  border-radius: 14px;
  width: 100%;
  max-width: 960px;
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  margin: auto;
}
.modal-close { position: absolute; top: 14px; right: 16px; z-index: 10; width: 38px; height: 38px; border-radius: 50%; border: none; background: rgba(19, 39, 52, 0.88); color: var(--white); font-size: 1.3rem; cursor: pointer; }

.gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 520px;
  background: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
}
.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255, 255, 255, 0.92); border: none; width: 42px; height: 42px; border-radius: 50%; font-size: 1.2rem; font-weight: bold; cursor: pointer; color: var(--primary); box-shadow: 0 2px 10px rgba(0,0,0,0.25); }
.gallery-prev { left: 14px; }
.gallery-next { right: 14px; }
.gallery-thumbs { display: flex; gap: 8px; padding: 12px 24px; background: #f3f4f6; overflow-x: auto; }
.gallery-thumb { width: 78px; height: 54px; object-fit: cover; border-radius: 6px; cursor: pointer; opacity: 0.6; border: 2px solid transparent; flex-shrink: 0; }
.gallery-thumb.active { opacity: 1; border-color: var(--accent); }
.modal-content-body { padding: 26px 30px 32px; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 28px; }
.amenities-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.amenity-tag { background: var(--bg-light); border: 1px solid var(--border); padding: 5px 11px; border-radius: 20px; font-size: 0.82rem; font-weight: 600; color: var(--primary); }
.modal-booking-box { background: var(--bg-light); padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); }
.form-status { margin-top: 12px; padding: 10px 12px; border-radius: 6px; font-size: 0.88rem; font-weight: 600; display: none; }
.form-status.success { display: block; background: #dcfce7; color: #166534; }
.form-status.error { display: block; background: #fee2e2; color: #991b1b; }

.lightbox-window {
  background: #0f172a;
  border-radius: 12px;
  width: 100%;
  max-width: 1020px;
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 60px rgba(0,0,0,0.5);
}
.lightbox-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 75dvh;
  background: #090d16;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-stage img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.lightbox-counter {
  text-align: center;
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  padding: 10px;
  background: #0f172a;
}

.site-footer { background: var(--primary-dark); color: rgba(255, 255, 255, 0.8); padding: 40px 0 24px; font-size: 0.9rem; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.footer-copy { text-align: center; padding-top: 18px; font-size: 0.82rem; color: rgba(255, 255, 255, 0.55); }

@media (max-width: 1024px) {
  .hero {
    min-height: clamp(320px, 56vw, 480px);
    align-items: flex-end;
  }
  .hero-overlay {
    background: linear-gradient(180deg, rgba(19, 39, 52, 0.12) 0%, rgba(19, 39, 52, 0.25) 55%, rgba(19, 39, 52, 0.78) 100%);
  }
  .hero-inner-grid {
    display: block;
    padding: 0;
  }
  .hero-text {
    padding: 28px 24px 24px;
    max-width: 100%;
  }
  .hero-text h1 {
    font-size: clamp(1.55rem, 4.6vw, 2.2rem);
    margin-bottom: 8px;
  }
  .hero-text p {
    font-size: 0.92rem;
    margin-bottom: 14px;
  }
  .hero-badge {
    font-size: 0.72rem;
    padding: 4px 11px;
    margin-bottom: 10px;
  }
  .hero-booking-slot {
    background: var(--bg-light);
    padding: 22px 20px 28px;
    border-bottom: 1px solid var(--border);
  }
  .hero-booking-card {
    max-width: 680px;
    margin: 0 auto;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border);
  }
  .modal-content-body {
    grid-template-columns: 1fr;
    padding: 20px 20px 26px;
    gap: 20px;
  }
  .gallery-main {
    aspect-ratio: 16 / 10;
    max-height: 440px;
  }
}

@media (max-width: 900px) {
  .contact-map-grid { grid-template-columns: 1fr; }
  .main-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; background: var(--white); flex-direction: column; padding: 20px; border-bottom: 1px solid var(--border); }
  .main-nav.open { display: flex; }
  .mobile-menu-btn { display: block; }
  .modal-backdrop {
    align-items: flex-start;
    padding-top: max(14px, env(safe-area-inset-top));
    padding-bottom: max(14px, env(safe-area-inset-bottom));
  }
  .modal-window {
    max-width: 100%;
    border-radius: 12px;
    max-height: calc(100dvh - 28px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  }
  .modal-booking-box {
    padding: 14px;
  }
  .gallery-main {
    aspect-ratio: 4 / 3;
    max-height: 320px;
  }
  .gallery-thumbs { padding: 10px 14px; }
  .booking-grid-mini {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .form-group input, .form-group select, .form-group textarea {
    font-size: 16px;
  }
}
