/* 21 Villa Phuket - shared styles. Mobile-first, no dependencies. */
:root {
  --sea: #0f4c5c;
  --sea-dark: #0a3541;
  --sand: #f6f1e7;
  --sky: #a8cfe3;
  --paper: #fffdf8;
  --coral: #d9623b;
  --coral-dark: #b94c28;
  --ink: #1b2a2f;
  --muted: #55666b;
  --line: #e3dccd;
  --radius: 14px;
  --max: 1080px;
  --serif: Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--sea); text-underline-offset: 3px; }
a:hover { color: var(--coral-dark); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--sea-dark); margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 6vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
section { padding: 56px 0; }
.alt { background: var(--sand); }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--coral-dark); margin-bottom: .6em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; }

/* Placeholders: visible on purpose so nothing invented slips into the live site */
.ph { background: #fff3c4; color: #5c4a00; padding: 0 .3em; border-radius: 4px; font-size: .92em; }

/* Buttons */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 999px;
  background: var(--coral); color: #fff; font-weight: 600; text-decoration: none;
  border: 2px solid var(--coral); transition: background .15s;
}
.btn:hover { background: var(--coral-dark); border-color: var(--coral-dark); color: #fff; }
.btn.ghost { background: transparent; color: var(--sea); border-color: var(--sea); }
.btn.ghost:hover { background: var(--sea); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 64px; }
.logo { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; color: var(--sea-dark); text-decoration: none; letter-spacing: .01em; }
.logo span { color: var(--coral); }
.nav { display: none; gap: 24px; align-items: center; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--coral-dark); }
.nav .btn { color: #fff; padding: 8px 18px; }
.menu { position: relative; }
.menu summary { list-style: none; cursor: pointer; padding: 10px; font-weight: 600; color: var(--sea); }
.menu summary::-webkit-details-marker { display: none; }
.menu[open] .menu-list { display: flex; }
.menu-list {
  display: none; flex-direction: column; gap: 4px; position: absolute; right: 0; top: 100%;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px; min-width: 190px; box-shadow: 0 10px 30px rgba(10, 53, 65, .12);
}
.menu-list a { padding: 10px 12px; text-decoration: none; color: var(--ink); border-radius: 8px; }
.menu-list a:hover { background: var(--sand); }
.logo, .nav a { white-space: nowrap; }
@media (min-width: 980px) {
  .nav { display: flex; }
  .menu { display: none; }
}

/* Hero */
.hero { background: var(--sky); color: var(--ink); padding: 64px 0 56px; text-align: center; }
.hero h1 { color: var(--sea-dark); max-width: 16em; margin: 0 auto .5em; text-transform: uppercase; letter-spacing: .02em; }
.hero .lead { color: #2c4a55; margin: 0 auto 1em; }
.hero .eyebrow { color: var(--sea-dark); }
.hero .btn-row { justify-content: center; }
.hero .btn.ghost { color: var(--sea-dark); border-color: var(--sea-dark); }
.hero .btn.ghost:hover { background: var(--sea-dark); color: #fff; }

/* Announcement bar */
.topbar { background: #3f8fc0; color: #fff; text-align: center; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; padding: 8px 12px; }

/* Dropdown in desktop nav */
.has-sub { position: relative; }
.has-sub > a::after { content: " \25BE"; font-size: .8em; }
.sub {
  display: none; position: absolute; left: -12px; top: 100%; min-width: 230px; padding: 8px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(10, 53, 65, .12);
}
.sub a { display: block; padding: 9px 12px; border-radius: 8px; white-space: nowrap; }
.sub a:hover { background: var(--sand); }
.has-sub:hover .sub, .has-sub:focus-within .sub { display: block; }
.menu-list .group { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding: 10px 12px 2px; }

/* Villa tiles (photo cards with overlay text) */
.tiles { display: grid; gap: 18px; margin-top: 36px; text-align: left; }
@media (min-width: 640px) { .tiles { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(4, 1fr); } }
.tile { position: relative; display: block; border-radius: 12px; overflow: hidden; aspect-ratio: 4 / 5; background: #cfd8dc; color: #fff; text-decoration: none; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.tile:hover img { transform: scale(1.04); }
.tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(0, 0, 0, .68), rgba(0, 0, 0, 0) 55%); }
.tile-text { position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 1; display: grid; gap: 2px; }
.tile-text strong { font-family: var(--serif); font-size: 1.1rem; text-transform: uppercase; letter-spacing: .02em; }
.tile-text span { font-size: .9rem; opacity: .92; }
.tile.empty { background: repeating-linear-gradient(45deg, #e9e2d2, #e9e2d2 12px, #f1ebdd 12px, #f1ebdd 24px); color: var(--ink); }
.tile.empty::after { display: none; }

/* Booking bar */
.book-bar { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: 0 10px 30px rgba(10, 53, 65, .08); }
.book-bar h2 { font-size: 1.4rem; margin-bottom: .2em; text-transform: uppercase; letter-spacing: .03em; }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--sea-dark); }
.faq details[open] summary { margin-bottom: 8px; }
.faq p { margin: 0; color: var(--muted); }

.center { text-align: center; }
.center .lead { margin-left: auto; margin-right: auto; }
.upper { text-transform: uppercase; letter-spacing: .03em; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; }

/* Booking widget area */
.search-box {
  background: var(--paper); color: var(--ink); border-radius: var(--radius);
  padding: 20px; margin-top: 32px; box-shadow: 0 14px 40px rgba(0, 0, 0, .18);
}
.search-box h2 { font-size: 1.1rem; font-family: var(--sans); color: var(--sea-dark); }
.widget-slot {
  border: 2px dashed var(--line); border-radius: 10px; padding: 24px; text-align: center; color: var(--muted); font-size: .95rem;
}
.booking-frame { width: 100%; min-height: 900px; border: 0; border-radius: 10px; background: var(--sand); }
.fine-print { font-size: .85rem; color: var(--muted); margin: 8px 0 0; }

/* Availability search form */
.search-form { display: grid; gap: 12px; align-items: end; }
.search-form label { display: grid; gap: 4px; font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--sea-dark); }
.search-form input, .search-form select {
  font: inherit; font-size: 1rem; text-transform: none; letter-spacing: 0; font-weight: 400;
  padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); min-height: 48px; width: 100%;
}
.search-form .btn { min-height: 48px; width: 100%; }
.search-msg { grid-column: 1 / -1; margin: 0; color: #a3341a; font-size: .9rem; min-height: 1.2em; }
@media (min-width: 760px) { .search-form { grid-template-columns: 1fr 1fr 160px auto; } .search-form .btn { width: auto; } }
.search-inline { margin-bottom: 16px; }
.villa-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.villa-tabs .btn[aria-selected="true"] { background: var(--sea); color: #fff; border-color: var(--sea); }
.villa-tabs .btn[disabled] { opacity: .45; cursor: not-allowed; }

/* Cards */
.grid { display: grid; gap: 20px; margin-top: 28px; }
@media (min-width: 640px) { .grid.two { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .grid.three { grid-template-columns: repeat(3, 1fr); } .grid.four { grid-template-columns: repeat(2, 1fr); } }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
}
.card .body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.card .body p { color: var(--muted); }
.card .body .btn { margin-top: auto; align-self: flex-start; }
.photo {
  aspect-ratio: 3 / 2; display: grid; place-items: center; text-align: center; padding: 12px;
  background: repeating-linear-gradient(45deg, #e9e2d2, #e9e2d2 12px, #f1ebdd 12px, #f1ebdd 24px);
  color: var(--muted); font-size: .9rem;
}
.facts { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--muted); font-size: .95rem; }

.photo img { width: 100%; height: 100%; object-fit: cover; }
.photo:has(img) { padding: 0; display: block; }
.gallery { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
.gallery img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; }
.gallery img:first-child { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
@media (min-width: 760px) {
  .gallery { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 170px; }
  .gallery img { height: 100%; aspect-ratio: auto; }
  .gallery img:first-child { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
}

/* Lists */
.checks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 14px; }
.checks li { padding-left: 30px; position: relative; }
.checks li::before { content: ""; position: absolute; left: 0; top: .5em; width: 14px; height: 8px; border-left: 3px solid var(--coral); border-bottom: 3px solid var(--coral); transform: rotate(-45deg); }

/* Two-column feature */
.split { display: grid; gap: 28px; align-items: center; }
@media (min-width: 800px) { .split { grid-template-columns: 1fr 1fr; gap: 48px; } }

/* Forms */
form { display: grid; gap: 16px; margin-top: 24px; }
label { font-weight: 600; font-size: .95rem; display: grid; gap: 6px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="date"], textarea, select {
  font: inherit; padding: 12px 14px; border: 1px solid #cfc7b4; border-radius: 10px; background: #fff; width: 100%;
}
input:focus, textarea:focus, select:focus { outline: 3px solid #9ccbd6; border-color: var(--sea); }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 6px; width: 18px; height: 18px; }

/* Guide / house pages */
.article { padding: 40px 0 64px; }
.article h2 { margin-top: 1.6em; }
.note { border-left: 4px solid var(--coral); background: var(--sand); padding: 14px 18px; border-radius: 0 10px 10px 0; margin: 24px 0; font-size: .95rem; }
.crumbs { font-size: .9rem; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.steps { counter-reset: s; list-style: none; padding: 0; display: grid; gap: 14px; }
.steps li { counter-increment: s; padding-left: 44px; position: relative; }
.steps li::before {
  content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%;
  background: var(--sea); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: .9rem;
}
.sos { display: grid; gap: 10px; margin: 16px 0; }
.sos div { display: flex; justify-content: space-between; gap: 16px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; background: #fff; }

/* Footer */
.site-footer { background: var(--sea-dark); color: #cfe0e3; padding: 44px 0 28px; font-size: .95rem; }
.site-footer a { color: #fff; }
.site-footer h3 { color: #fff; font-family: var(--sans); font-size: 1rem; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.fine { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: .85rem; color: #9fbcc2; }
.site-footer.mini { padding: 24px 0; text-align: center; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
