/* ==========================================================
   Hanul și Păstrăvăria Țibău
   ========================================================== */

:root {
  --green: #6cc24a;
  --green-dark: #58a83a;
  --wa: #25d366;
  --wa-dark: #1ebe5a;
  --ink: #233a2c;
  --text: #3b4a40;
  --muted: #6b766f;
  --cream: #f6f1ea;
  --line: #e6dfd3;
  --white: #ffffff;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(35, 58, 44, .08);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Fraunces", Georgia, serif;
  --header-h: 84px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
html, body { overflow-x: clip; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 .5em; }

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  padding: 14px 30px;
  border: 0; border-radius: 999px;
  font: 700 1rem var(--font);
  cursor: pointer;
  transition: background .2s, transform .2s, box-shadow .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--green { background: var(--green); color: #fff; }
.btn--green:hover { background: var(--green-dark); box-shadow: 0 8px 20px rgba(108, 194, 74, .35); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: var(--wa-dark); box-shadow: 0 8px 20px rgba(37, 211, 102, .35); }
.btn--outline { background: transparent; color: var(--ink); border: 2px solid var(--line); }
.btn--outline:hover { border-color: var(--green); color: var(--green-dark); }
.btn--block { width: 100%; }
.btn--lg { padding: 18px 30px; font-size: 1.15rem; font-weight: 600; }
.btn--lg i { font-size: 1.3em; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid #eee;
  transition: box-shadow .2s;
}
.header.scrolled { box-shadow: 0 4px 20px rgba(0, 0, 0, .06); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }

.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.logo__icon { font-size: 2rem; color: var(--ink); transform: rotate(-15deg); }
.logo__text { display: flex; flex-direction: column; line-height: 1.05; }
.logo__text small { font-size: .78rem; font-weight: 700; letter-spacing: .02em; }
.logo__text strong { font-family: var(--serif); font-size: 1.7rem; }
.logo--light, .logo--light .logo__icon { color: #fff; }

.nav { display: flex; gap: 28px; }
.nav a { font-weight: 700; color: var(--ink); font-size: .98rem; transition: color .2s; }
.nav a:hover, .nav a.active { color: var(--green); }

.nav-toggle {
  display: none;
  background: none; border: 0; font-size: 1.6rem; color: var(--ink); cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  display: flex; align-items: center;
  background:
    url("../images/hero.jpg") center / cover no-repeat,
    linear-gradient(135deg, #2f4a37 0%, #4f6f4f 45%, #8aa36d 100%);
  color: #fff;
}
.hero__overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.45) 100%); }
.hero__content { position: relative; text-align: center; padding-top: 40px; padding-bottom: 90px; }
.hero__eyebrow { font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .85rem; margin: 0 0 14px; }
.hero__title { color: #fff; font-family: var(--serif); font-size: clamp(2.2rem, 6vw, 4.2rem); margin-bottom: 14px; text-shadow: 0 2px 20px rgba(0,0,0,.3); }
.hero__subtitle { font-size: clamp(1rem, 2vw, 1.2rem); max-width: 620px; margin: 0 auto 36px; opacity: .95; }

.search {
  display: inline-flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; justify-content: center;
}
.search__field { display: flex; flex-direction: column; text-align: left; }
.search__field label { font-weight: 800; text-transform: uppercase; font-size: .9rem; margin-bottom: 8px; text-shadow: 0 1px 6px rgba(0,0,0,.4); }
.search__field { width: 230px; min-width: 0; }
.search .date-field { border-radius: 4px; }
.search__field input {
  width: 100%; height: 56px; padding: 0 16px;
  border: 0; border-radius: 4px;
  font: 500 1rem var(--font); color: var(--text); background: #fff;
}
.search .date-field__ph { left: 16px; }
.search .btn { height: 56px; }

.hero__scroll {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 1.5rem; animation: bounce 2s infinite;
}
@keyframes bounce { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section--alt { background: var(--cream); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section__eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--green-dark); font-weight: 800; text-transform: uppercase; font-size: .82rem; letter-spacing: .06em;
  margin-bottom: 10px;
}
.section__title { font-family: var(--serif); font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section__lead { color: var(--muted); margin: 0; }

/* ---------- Placeholder for missing images ---------- */
.ph {
  position: relative;
  background: linear-gradient(135deg, #dfe8d6, #c8d8bb);
  min-height: 260px;
}
.ph::after {
  content: "\f03e";
  font: 900 2.4rem "Font Awesome 6 Free";
  color: rgba(35, 58, 44, .3);
  position: absolute; inset: 0; display: grid; place-items: center;
}
.ph img { display: none; }

/* ---------- About ---------- */
.about__grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 64px; align-items: center; }
.about__text p { font-size: 1.05rem; }
.about__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; }
.about__media img { width: 100%; height: 100%; object-fit: cover; }

.features { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 24px; }
.features li { display: flex; align-items: center; gap: 12px; font-weight: 600; color: var(--ink); }
.features i {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%; background: #eef7e9; color: var(--green-dark);
}

/* ---------- Rooms ---------- */
.rooms { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.room {
  background: #fff; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.room:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(35, 58, 44, .12); }
.room__media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.room__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.room:hover .room__media img { transform: scale(1.05); }
.room__badge {
  position: absolute; left: 14px; bottom: 14px; z-index: 1;
  background: rgba(255, 255, 255, .95); color: var(--ink);
  font-size: .78rem; font-weight: 700; padding: 6px 12px; border-radius: 999px;
}
.room__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; padding: 8px 8px 0; }
.room__thumbs img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 8px;
  cursor: pointer; opacity: .65; transition: opacity .2s, box-shadow .2s;
}
.room__thumbs img:hover { opacity: 1; }
.room__thumbs img.active { opacity: 1; box-shadow: 0 0 0 2px var(--green); }
.room__body { padding: 26px 26px 30px; display: flex; flex-direction: column; flex: 1; text-align: center; }
.room__title { font-family: var(--serif); font-size: 1.6rem; }
.room__desc { color: var(--muted); margin: 0 0 16px; }
.room__meta { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.room__meta li { font-size: .85rem; font-weight: 600; background: var(--cream); color: var(--ink); padding: 6px 12px; border-radius: 999px; }
.room__meta i { color: var(--green-dark); margin-right: 4px; }
.room__note { font-size: .85rem; color: var(--muted); font-style: italic; margin: 6px 0 18px; }

.prices { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: auto 0 20px; }
.price { border: 1px solid var(--line); border-radius: 10px; padding: 12px 8px; }
.price span { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); }
.price strong { font-size: 1.35rem; color: var(--ink); }
.price small { font-size: .75rem; font-weight: 500; color: var(--muted); }
.price--spa { border-color: var(--green); background: #f3faef; }

/* ---------- Split (spa / restaurant) ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; }
.split__media img { width: 100%; height: 100%; object-fit: cover; }
.split__text p { font-size: 1.05rem; }

.checklist { list-style: none; padding: 0; margin: 0 0 24px; }
.checklist li { display: flex; align-items: center; gap: 14px; font-size: 1.1rem; font-weight: 700; color: var(--ink); padding: 10px 0; }
.checklist i { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; background: #eef7e9; color: var(--green-dark); font-size: 1.1rem; }

.callout {
  display: flex; gap: 14px; align-items: flex-start;
  background: #fff; border-left: 4px solid var(--green);
  border-radius: 10px; padding: 18px 20px; margin: 0 0 28px;
  box-shadow: var(--shadow);
}
.section--alt .callout { background: #fff; }
.callout i { color: var(--green-dark); font-size: 1.2rem; margin-top: 4px; }
.callout p { margin: 0; font-size: .98rem !important; }
.callout p + p { margin-top: 6px; }
.callout--warn { border-left-color: #e0a43a; }
.callout--warn i { color: #e0a43a; }

/* ---------- Extras ---------- */
.extras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.extra {
  text-align: center; padding: 36px 28px;
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s;
}
.extra:hover { border-color: var(--green); box-shadow: var(--shadow); }
.extra__icon {
  width: 72px; height: 72px; margin: 0 auto 18px;
  display: grid; place-items: center; border-radius: 50%;
  background: #eef7e9; color: var(--green-dark); font-size: 1.8rem;
}
.extra h3 { font-family: var(--serif); font-size: 1.4rem; margin-bottom: 4px; }
.extra__price { color: var(--green-dark); font-weight: 800; margin: 0 0 14px; }
.extra ul { list-style: none; padding: 0; margin: 0; color: var(--muted); }
.extra li { padding: 3px 0; }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.gallery img {
  width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: zoom-in;
  transition: opacity .2s;
}
.gallery img:hover { opacity: .88; }
.gallery__more { text-align: center; margin: 28px 0 0; color: var(--muted); }
.gallery__more a { color: var(--green-dark); font-weight: 700; }

.lightbox {
  position: fixed; inset: 0; z-index: 300;
  background: rgba(0, 0, 0, .9);
  display: grid; place-items: center; padding: 20px;
}
.lightbox img { max-height: 90vh; border-radius: 8px; }
.lightbox button { position: absolute; top: 18px; right: 22px; background: none; border: 0; color: #fff; font-size: 2rem; cursor: pointer; }

/* ---------- Steps & rules ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-bottom: 48px; }
.step { background: var(--cream); border-radius: var(--radius); padding: 32px 28px; position: relative; }
.step__num {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; background: var(--green); color: #fff; font-weight: 800; font-size: 1.1rem;
  margin-bottom: 16px;
}
.step h3 { font-size: 1.15rem; }
.step p { margin: 0; color: var(--muted); }
.step__ex { margin-top: 10px !important; font-size: .9rem; font-style: italic; }

.rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.rule { display: flex; gap: 16px; align-items: flex-start; padding: 18px 20px; border: 1px solid var(--line); border-radius: 12px; }
.rule i { color: var(--green-dark); font-size: 1.2rem; margin-top: 3px; width: 22px; text-align: center; flex: none; }
.rule p { margin: 0; }

/* ---------- Booking form ---------- */
.booking { background: var(--cream); }
.booking__inner { max-width: 760px; }
.booking__title { font-family: var(--serif); font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 6px; }
.booking__lead { color: var(--muted); font-size: 1.1rem; margin: 0 0 32px; }

.form { display: flex; flex-direction: column; gap: 22px; }
.form__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; }
.form__group { display: flex; flex-direction: column; min-width: 0; }
.form__group > label { font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.form input[type="text"],
.form input[type="date"],
.form input[type="number"],
.form select,
.form textarea {
  width: 100%; min-height: 64px; padding: 16px 20px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; color: var(--text);
  font: 500 1.05rem var(--font);
  transition: border-color .2s, box-shadow .2s;
}
.form input, .form select, .form textarea { min-width: 0; max-width: 100%; }
.form textarea { resize: vertical; min-height: 130px; }

/* Date fields: wrapper clips iOS Safari's intrinsic date-input width,
   and provides placeholder + icon (iOS shows an empty box otherwise) */
.date-field { position: relative; width: 100%; min-width: 0; overflow: hidden; border-radius: 12px; }
.date-field input[type="date"] {
  -webkit-appearance: none; appearance: none;
  display: block; width: 100%; min-width: 0; max-width: 100%;
  padding-right: 48px !important;
  text-align: left; line-height: normal;
  cursor: pointer;
}
.date-field input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
.date-field input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute; inset: 0; width: auto; height: auto;
  margin: 0; padding: 0; opacity: 0; cursor: pointer;
}
.date-field:not(.has-value) input[type="date"]:not(:focus)::-webkit-datetime-edit { color: transparent; }
.date-field:not(.has-value) input[type="date"]:not(:focus) { color: transparent; }
.date-field__ph {
  position: absolute; left: 20px; right: 48px; top: 50%; transform: translateY(-50%);
  color: #9a9a95; font-weight: 500; pointer-events: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.date-field.has-value .date-field__ph,
.date-field input:focus ~ .date-field__ph { display: none; }
.date-field > i {
  position: absolute; right: 18px; top: 50%; transform: translateY(-50%);
  color: var(--ink); pointer-events: none; font-size: 1.1rem;
}
.form select {
  appearance: none; -webkit-appearance: none;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23233a2c' stroke-width='1.6'/%3E%3C/svg%3E") no-repeat right 18px center;
  padding-right: 44px; cursor: pointer;
}
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(108, 194, 74, .15);
}
.form input::placeholder, .form textarea::placeholder { color: #9a9a95; }
.form .invalid { border-color: #d9534f !important; }

.options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.option { cursor: pointer; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option span {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  min-height: 64px; padding: 14px 18px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  font-weight: 600; color: var(--ink);
  transition: border-color .2s, background .2s;
}
.option span i { color: var(--green-dark); }
.option em { margin-left: auto; font-style: normal; font-weight: 800; color: var(--green-dark); }
.option input:checked + span { border-color: var(--green); background: #f3faef; box-shadow: 0 0 0 3px rgba(108, 194, 74, .15); }
.option input:focus-visible + span { outline: 2px solid var(--green); }

.check { display: flex; gap: 12px; align-items: center; cursor: pointer; font-weight: 600; color: var(--ink); }
.check input { width: 22px; height: 22px; accent-color: var(--green); flex: none; }

.summary {
  background: #fff; border: 1px dashed var(--green); border-radius: 12px;
  padding: 16px 20px; color: var(--ink); font-weight: 600;
}
.summary small { display: block; color: var(--muted); font-weight: 500; margin-top: 4px; }
.form__error { color: #c0392b; font-weight: 600; margin: 0; }

/* ---------- Contact ---------- */
.contact { display: grid; grid-template-columns: 1fr 1.2fr; gap: 56px; align-items: center; }
.contact__list { list-style: none; padding: 0; margin: 10px 0 28px; }
.contact__list li { display: flex; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact__list li > i { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 50%; background: #eef7e9; color: var(--green-dark); }
.contact__list strong { display: block; color: var(--ink); }
.contact__list a { color: var(--green-dark); font-weight: 700; }
.contact__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.socials { display: flex; gap: 10px; }
.socials a {
  width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 50%; background: var(--ink); color: #fff; transition: background .2s;
}
.socials a:hover { background: var(--green); }
.contact__map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); height: 440px; }
.contact__map iframe { width: 100%; height: 100%; border: 0; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255, 255, 255, .8); padding: 48px 0; text-align: center; }
.footer__inner { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.footer p { margin: 0; }
.footer a { color: #fff; }
.footer__copy { font-size: .85rem; opacity: .7; }

/* ---------- Floating buttons ---------- */
.fab { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 12px; }
.fab__btn {
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; font-size: 1.5rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  transition: transform .2s;
}
.fab__btn:hover { transform: scale(1.08); }
.fab__btn--phone { background: var(--ink); font-size: 1.25rem; }
.fab__btn--wa { background: var(--wa); font-size: 1.9rem; position: relative; }
.fab__btn--wa::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--wa); z-index: -1; animation: pulse 2.2s infinite;
}
@keyframes pulse { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(1.6); opacity: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .nav { gap: 20px; }
  .nav a { font-size: .92rem; }
}

@media (max-width: 960px) {
  :root { --header-h: 72px; }
  .nav-toggle { display: block; }
  .nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: #fff; border-bottom: 1px solid #eee;
    box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
    transform: translateY(-120%); transition: transform .3s;
    z-index: -1;
  }
  .nav.open { transform: translateY(0); }
  .nav a { padding: 16px 20px; border-top: 1px solid #f0f0f0; font-size: 1rem; }

  .rooms, .extras, .steps { grid-template-columns: 1fr; max-width: 520px; margin-left: auto; margin-right: auto; }
  .about__grid, .split, .contact { grid-template-columns: 1fr; gap: 36px; }
  .split--reverse .split__media { order: 0; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .rules { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
}

@media (max-width: 600px) {
  .container { padding: 0 16px; }
  .section { padding: 56px 0; }
  .logo__text strong { font-size: 1.45rem; }
  .logo__icon { font-size: 1.7rem; }

  .search { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); width: 100%; gap: 10px; }
  .search__field { width: auto; min-width: 0; }
  .search__field input { width: 100%; min-width: 0; height: 52px; padding: 0 12px; }
  .search .date-field__ph { left: 12px; right: 40px; font-size: .9rem; }
  .search .date-field > i { right: 12px; }
  .date-field__ph { left: 16px; }
  .search .btn { grid-column: 1 / -1; }

  .features { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .form__row { gap: 12px; }
  .form__group > label { font-size: .95rem; }
  .options { grid-template-columns: 1fr; }
  .form input[type="text"], .form input[type="date"], .form input[type="number"], .form select, .form textarea { min-height: 56px; padding: 14px 16px; font-size: 1rem; }
  .contact__map { height: 320px; }
  .fab { right: 14px; bottom: 14px; }
  .fab__btn { width: 52px; height: 52px; }
}
