/* ==========================================================================
   Pius Place Hotel – Pattaya, Thailand
   One stylesheet for the whole site.

   Replaces: style.css, layout.css, jquery.lightbox-0.5.css, ie_style.css,
             Contact Us/form.css and the inline <style> blocks.
   No IE hacks, no jQuery-dependent rules, responsive down to ~320px.
   ========================================================================== */

:root {
  color-scheme: light;

  --ink:         #3b2a1e;
  --ink-soft:    #6b5644;
  --accent:      #c1272d;
  --accent-dark: #ac0000;
  --panel:       rgba(255, 255, 255, .9);
  --band:        #2b1e15;
  --box:         #1d110b;
  --box-ink:     #d9c6b3;
  --line:        rgba(59, 42, 30, .2);
  --radius:      4px;
  --shadow:      0 1px 3px rgba(45, 30, 15, .18);

  --font-body:   Tahoma, Geneva, Verdana, sans-serif;
  --font-title:  "Trebuchet MS", "Segoe UI", Arial, Helvetica, sans-serif;
}

/* ---------------------------------------------------------------- reset -- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background-color: #f7ea7e;
  background-image: url(../../images/body-bg.gif);
  background-repeat: repeat;
  background-position: center top;
  color: var(--ink);
  font: 1rem/1.65 var(--font-body);
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
}

a { color: var(--accent-dark); }
a:hover { color: #7d0000; }

:focus-visible {
  outline: 3px solid #8a5a00;
  outline-offset: 2px;
}

/* ----------------------------------------------------------- typography -- */

h1,
h2,
h3 {
  margin: 0 0 .55em;
  font-family: var(--font-title);
  font-weight: 400;
  line-height: 1.2;
  color: var(--accent);
}

h1 { font-size: clamp(1.6rem, 3.6vw, 2.15rem); }
h2 { font-size: clamp(1.2rem, 2.6vw, 1.55rem); }
h3 { margin-top: 1.6em; font-size: 1.1rem; }

p { margin: 0 0 1em; }

/* ------------------------------------------------------------ utilities -- */

#main {
  max-width: 990px;
  margin: 0 auto;
  padding: 0 10px 44px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  position: static;
  display: inline-block;
  margin: 8px;
  padding: 8px 14px;
  background: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* -------------------------------------------------- masthead (logo area) -- */

.masthead {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 32px;
  padding: 24px 34px 18px;
  background: var(--panel);
}

.brand {
  display: block;
  text-decoration: none;
}

.brand-kicker {
  display: block;
  font: 700 .78rem/1 var(--font-title);
  letter-spacing: .38em;
  text-transform: uppercase;
  color: #b39a86;
}

.brand-name {
  display: block;
  margin: 6px 0 4px;
  font: 400 clamp(2rem, 5.4vw, 2.9rem)/1.02 var(--font-title);
  letter-spacing: -.02em;
  text-transform: uppercase;
  color: #c30000;
}

.brand:hover .brand-name { color: #950000; }

.brand-country {
  display: block;
  font: 700 .78rem/1 var(--font-title);
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #ad0000;
}

.phones {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  font: 400 clamp(1rem, 2.3vw, 1.28rem)/1.25 var(--font-title);
  letter-spacing: -.01em;
  text-align: right;
}

.phones a {
  color: #c30000;
  text-decoration: none;
}

.phones a:hover { text-decoration: underline; }

/* ---------------------------------------------------- photo hero + nav -- */

.hero {
  position: relative;
  padding: 12px;
  background: var(--band);
  box-shadow: var(--shadow);
}

.hero-photo {
  display: block;
  width: 100%;
}

.main-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 3px;
  margin: 10px 0 0;
}

.main-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 6px 8px;
  border-radius: 3px;
  background: #f7f2e8;
  color: #2b1e15;
  font: 700 .82rem/1.15 var(--font-title);
  letter-spacing: .05em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color .15s ease, color .15s ease;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a[aria-current="page"] {
  background-color: var(--accent-dark);
  background-image: url(../../images/nav-bg2.png);
  background-position: center;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  color: #fff;
}

/* From tablet width upwards the buttons sit on the lower edge of the photo,
   exactly as in the original design. Narrower screens show them below it. */
@media (min-width: 761px) {
  .main-nav {
    position: absolute;
    right: 12px;
    bottom: 12px;
    left: 12px;
    margin: 0;
  }
}

/* ------------------------------------------------------- content panel --- */

.panel {
  padding: 0 26px 26px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.strip { padding: 14px 0 4px; }

.thumbs {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0 0 6px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  list-style: none;
}

.thumbs li {
  flex: 0 0 auto;
  scroll-snap-align: start;
}

.thumbs a { display: block; }

.thumbs img {
  display: block;
  width: 149px;
  height: 96px;
}

/* --------------------------------------------------- two column layout --- */

.layout {
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  gap: 30px;
  padding-top: 20px;
}

@media (max-width: 820px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .prose { order: 1; }
  .box { order: 2; }
}

/* -------------------------------------------------------- dark side box -- */

.box {
  align-self: start;
  padding: 22px 24px 26px;
  border-radius: 3px;
  background: var(--box);
  color: var(--box-ink);
}

.box h2 {
  margin-bottom: 1em;
  font-size: 1.3rem;
  color: #c1272d;
}

.img-list {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  font-size: .95rem;
  line-height: 1.45;
  list-style: none;
}

.img-list li {
  display: grid;
  grid-template-columns: 67px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.img-list a { display: block; line-height: 0; }

.img-list img {
  display: block;
  width: 67px;
  height: 51px;
}

/* ------------------------------------------------------------ main text -- */

.prose { min-width: 0; }

.prose--wide { padding-top: 22px; }

.lead {
  font-size: 1.06rem;
  color: var(--accent);
}

.features {
  margin: 0 0 1.3em;
  padding-left: 1.35em;
  line-height: 1.85;
}

.features li::marker { color: var(--accent); }

.frame-img {
  float: right;
  width: 228px;
  margin: .2em 0 1em 1.6em;
  border-radius: 3px;
  box-shadow: 0 2px 10px rgba(45, 30, 15, .22);
}

@media (max-width: 560px) {
  .frame-img {
    float: none;
    width: 100%;
    margin: 0 0 1em;
  }
}

.callout {
  margin-top: 1.4em;
  padding: 16px 18px;
  border-left: 4px solid var(--accent);
  border-radius: 3px;
  background: rgba(193, 39, 45, .08);
}

/* --------------------------------------------------------- room cards --- */

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 0 0 1.6em;
}

.room-card {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fffdf9;
}

.room-card h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.room-card ul {
  margin: 0;
  padding-left: 1.2em;
  line-height: 1.8;
}

/* ------------------------------------------------------------ gallery --- */

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin: 0 0 1.5em;
  padding: 0;
  list-style: none;
}

.gallery a {
  display: block;
  overflow: hidden;
  border-radius: 3px;
}

.gallery img {
  display: block;
  width: 100%;
}

/* ------------------------------------------------- location / contact --- */

.map {
  position: relative;
  aspect-ratio: 16 / 10;
  margin: 0 0 1.4em;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #e9e2d4;
}

.map iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.details {
  margin: 0 0 1.4em;
}

.details dt {
  margin-top: .9em;
  font-family: var(--font-title);
  font-weight: 700;
  color: var(--accent-dark);
}

.details dd { margin: 0; }

.details address { font-style: normal; }

/* ------------------------------------------------------------- forms --- */

.booking-form {
  max-width: 660px;
  margin-top: 1.2em;
}

.booking-form fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.booking-form legend {
  padding: 0 0 .9em;
  font: 700 1.05rem var(--font-title);
  color: var(--accent-dark);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-weight: 700;
  font-size: .95rem;
}

.field .req { color: var(--accent); }

.field input,
.field select,
.field textarea {
  width: 100%;
  max-width: 430px;
  padding: 10px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  border: 1px solid #b9a897;
  border-radius: 3px;
}

.field textarea {
  max-width: 660px;
  min-height: 128px;
  resize: vertical;
}

.field input:hover,
.field select:hover,
.field textarea:hover { border-color: #8a7358; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: #8a7358;
  outline: 2px solid #c9a227;
  outline-offset: 1px;
}

.field--invalid input,
.field--invalid select,
.field--invalid textarea {
  border-color: #b3261e;
  background: #fff7f6;
}

.field-error {
  margin: 0;
  font-size: .9rem;
  font-weight: 700;
  color: #a1140c;
}

.field-hint {
  margin: 0;
  font-size: .85rem;
  color: var(--ink-soft);
}

.form-alert {
  margin: 0 0 20px;
  padding: 14px 18px;
  border-left: 4px solid #b3261e;
  border-radius: 3px;
  background: #fff2f0;
}

.form-alert p {
  margin: 0 0 .4em;
  font-weight: 700;
}

.form-alert ul {
  margin: 0;
  padding-left: 1.2em;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

.btn {
  display: inline-block;
  padding: 12px 26px;
  border: 0;
  border-radius: 3px;
  background: var(--accent);
  color: #fff;
  font: 700 .92rem/1.2 var(--font-title);
  letter-spacing: .06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.btn:hover {
  background: #8f1a1f;
  color: #fff;
}

.btn--ghost {
  background: #efe7da;
  color: var(--ink);
}

.btn--ghost:hover {
  background: #e2d6c3;
  color: var(--ink);
}

.notice {
  margin: 0 0 22px;
  padding: 20px 22px;
  border-left: 4px solid #2e7d32;
  border-radius: 3px;
  background: #eef7ee;
}

.notice h2 {
  margin-top: 0;
  font-size: 1.3rem;
  color: #2e7d32;
}

/* Anti-spam field: hidden from people, tempting for bots. */
.honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ------------------------------------------------------------ footer --- */

#footer { margin-top: 24px; }

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 0;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.footer-nav li {
  display: flex;
  align-items: center;
}

.footer-nav li + li::before {
  content: "|";
  margin: 0 16px;
  color: #a99276;
}

.footer-nav a {
  color: var(--accent);
  text-decoration: none;
}

.footer-nav a:hover { text-decoration: underline; }

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  font-size: .85rem;
  color: #6b5644;
}

.footer-meta p { margin: 0; }

/* ---------------------------------------------------------- lightbox --- */

.lightbox {
  max-width: min(96vw, 1100px);
  max-height: 94vh;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: #14100c;
  color: #f0e5d8;
  box-shadow: 0 12px 44px rgba(0, 0, 0, .55);
}

.lightbox::backdrop { background: rgba(20, 12, 8, .9); }

.lightbox-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
}

.lightbox-bar--bottom { justify-content: center; }

.lightbox-count {
  font-size: .85rem;
  letter-spacing: .04em;
  color: #c9b8a5;
}

.lightbox-btn {
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 3px;
  background: rgba(255, 255, 255, .08);
  color: #fff;
  font: 700 .85rem var(--font-body);
  cursor: pointer;
}

.lightbox-btn:hover { background: rgba(255, 255, 255, .2); }

.lightbox-btn:disabled {
  opacity: .35;
  cursor: default;
}

.lightbox-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(94vh - 150px);
  margin: 0 auto;
  background: #000;
}

.lightbox-cap {
  margin: 0;
  padding: 10px 16px 0;
  font-size: .88rem;
  color: #d9c6b3;
  text-align: center;
}

/* ------------------------------------------------- print / motion pref -- */

@media print {
  body { background: #fff; }

  .hero-photo,
  .main-nav,
  .strip,
  .skip-link,
  .footer-nav { display: none; }

  #main { max-width: none; }

  .panel {
    background: #fff;
    box-shadow: none;
  }

  a[href^="http"]::after { content: " (" attr(href) ")"; }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
