/* =========================================================
   Hostal Jopia — stylesheet
   ========================================================= */

:root {
  --color-bg: #FBF7F1;
  --color-bg-alt: #F2EAE0;
  --color-dark: #24312A;
  --color-dark-2: #1A241E;
  --color-primary: #C4633B;
  --color-primary-dark: #A8502D;
  --color-accent: #6E8B6A;
  --color-text: #2B2B26;
  --color-text-light: #6B6459;
  --color-white: #FFFFFF;

  --font-heading: "Poppins", sans-serif;
  --font-body: "Inter", sans-serif;

  --radius: 14px;
  --shadow: 0 10px 30px rgba(36, 49, 42, 0.12);
  --transition: 0.25s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  color: var(--color-dark);
}

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

.section { padding: 96px 0; }
.section-alt { background: var(--color-bg-alt); }
.section-dark { background: var(--color-dark); color: #EDE7DD; }
.section-dark h2, .section-dark p { color: #EDE7DD; }

.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 10px;
}
.section-eyebrow.center { text-align: center; }

.section-lead {
  max-width: 640px;
  margin: 0 auto 48px;
  color: var(--color-text-light);
}

h2 { font-size: clamp(28px, 4vw, 40px); margin-bottom: 14px; }
.center { text-align: center; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  transition: transform var(--transition), background var(--transition), color var(--transition), box-shadow var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-2px); }
.btn-outline {
  border: 2px solid #fff;
  color: #fff;
}
.btn-outline:hover { background: #fff; color: var(--color-dark); }
.btn-outline-light {
  border: 2px solid #EDE7DD;
  color: #EDE7DD;
  padding: 12px 26px;
}
.btn-outline-light:hover { background: #EDE7DD; color: var(--color-dark); }
.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-nav {
  padding: 10px 22px;
  background: var(--color-primary);
  color: #fff;
}
.btn-nav:hover { background: var(--color-primary-dark); }
.btn-search {
  grid-column: 1 / -1;
  white-space: nowrap;
  margin-top: 4px;
}

/* =========== HEADER =========== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 18px 0;
  transition: background var(--transition), padding var(--transition), box-shadow var(--transition);
}
.site-header.scrolled {
  background: rgba(251, 247, 241, 0.95);
  backdrop-filter: blur(8px);
  padding: 10px 0;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
}
.logo {
  display: flex;
  align-items: center;
}
.logo-img {
  height: 52px;
  width: auto;
  border-radius: 10px;
  transition: transform var(--transition);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  flex-shrink: 0;
}
.main-nav a {
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  transition: color var(--transition);
  padding-bottom: 2px;
}
.site-header.scrolled .main-nav a:not(.btn) { color: var(--color-dark); }
.main-nav a:not(.btn):hover { color: var(--color-primary); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1100;
}
.nav-toggle span {
  width: 26px;
  height: 2px;
  background: #fff;
  transition: var(--transition);
}
.site-header.scrolled .nav-toggle span { background: var(--color-dark); }

/* =========== HERO =========== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: linear-gradient(160deg, #3A4B3B, #24312A 60%);
  color: #fff;
  padding: 140px 0 160px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 20%, rgba(196,99,59,0.25), transparent 45%),
              radial-gradient(circle at 80% 80%, rgba(110,139,106,0.3), transparent 50%);
}
.hero-bg {
  position: absolute;
  inset: -10% -10% -10% -10%;
  z-index: 1;
  background:
    radial-gradient(circle at 15% 25%, rgba(196,99,59,0.35), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(247,215,116,0.18), transparent 45%),
    radial-gradient(circle at 75% 85%, rgba(110,139,106,0.35), transparent 45%);
  animation: heroDrift 18s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes heroDrift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.08); }
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 720px;
  animation: heroRise 1s ease both;
}
.hero-actions .btn { animation: heroRise 1s ease both; animation-delay: 0.15s; }
@keyframes heroRise {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: translateY(0); }
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 4px;
  font-size: 13px;
  color: #E3D9C8;
  margin-bottom: 12px;
}
.hero h1 {
  font-size: clamp(42px, 7vw, 76px);
  color: #fff;
  margin-bottom: 18px;
}
.hero-sub {
  font-size: 18px;
  color: #DAD3C6;
  max-width: 560px;
  margin: 0 auto 34px;
}
.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Booking bar */
.booking-bar {
  position: relative;
  z-index: 3;
  margin: -60px auto 0;
  max-width: 1000px;
  padding: 0 24px;
}
.booking-form {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  align-items: end;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.booking-status {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  font-size: 14px;
  font-weight: 600;
}
.booking-status:empty { display: none; }
.booking-status.checking { color: var(--color-text-light); }
.booking-status.available { color: #2f7d4f; }
.booking-status.unavailable { color: #b3432b; }
.field label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-text-light);
}
.field input, .field select {
  padding: 12px 14px;
  border: 1px solid #E4DCCE;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--color-text);
  background: var(--color-bg);
}
.field input:focus, .field select:focus { outline: 2px solid var(--color-primary); }

/* =========== ABOUT =========== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.about-images {
  position: relative;
  display: grid;
}
.about-img-main {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  height: 420px;
  object-fit: cover;
}
.about-img-small {
  position: absolute;
  bottom: -30px;
  right: -30px;
  width: 45%;
  height: 220px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 6px solid var(--color-bg);
  box-shadow: var(--shadow);
}
.about-text p { color: var(--color-text-light); margin-bottom: 16px; }
.about-highlights { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; margin-bottom: 22px; }
.about-highlights li { font-weight: 500; color: var(--color-dark); }
.about-highlights.light li { color: #EDE7DD; }

/* =========== ROOMS =========== */
.rooms-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 20px;
}
.rooms-grid-2 {
  grid-template-columns: repeat(2, 1fr);
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
}
.room-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition);
  display: flex;
  flex-direction: column;
}
.room-card:hover { transform: translateY(-6px); }
.room-img { position: relative; height: 190px; }
.room-img img { width: 100%; height: 100%; object-fit: cover; }
.room-img-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}
.room-img-duo img { height: 190px; }
.room-tag {
  position: absolute;
  top: 14px; left: 14px;
  background: var(--color-primary);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 999px;
}
.room-body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.room-body h3 { font-size: 20px; margin-bottom: 8px; }
.room-body p { color: var(--color-text-light); font-size: 14px; margin-bottom: 14px; }
.room-features { display: flex; flex-direction: column; gap: 6px; margin-bottom: 20px; flex: 1; }
.room-features li { font-size: 13px; color: var(--color-text-light); }
.room-features li::before { content: "— "; color: var(--color-primary); }
.room-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  border-top: 1px solid #F0EAE0;
  padding-top: 16px;
}
.room-note {
  text-align: center;
  color: var(--color-text-light);
  font-size: 13px;
  margin-top: 24px;
}

/* =========== SERVICES =========== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  margin-top: 20px;
}
.service-card {
  text-align: center;
  padding: 36px 24px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform var(--transition);
}
.service-card:hover { transform: translateY(-6px); }
.service-icon { font-size: 34px; margin-bottom: 14px; }
.service-card h3 { font-size: 18px; margin-bottom: 8px; }
.service-card p { color: var(--color-text-light); font-size: 14px; }

/* =========== RESTAURANT =========== */
.restaurant-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.restaurant-text p { color: #C9C2B5; margin-bottom: 16px; }
.restaurant-img img {
  border-radius: var(--radius);
  height: 420px;
  width: 100%;
  object-fit: cover;
  box-shadow: var(--shadow);
}

/* =========== GALLERY =========== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.gallery-item { border-radius: var(--radius); overflow: hidden; height: 260px; box-shadow: var(--shadow); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-item:hover img { transform: scale(1.08); }

/* =========== LOCATION =========== */
.location-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: stretch;
}
.location-map {
  min-height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.location-item { margin-bottom: 12px; color: var(--color-text-light); }
.location-item a { color: var(--color-primary); font-weight: 600; }
.social-links { display: flex; gap: 18px; margin: 20px 0 26px; }
.social-links a {
  font-weight: 600;
  font-size: 14px;
  color: var(--color-dark);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 2px;
}
.contact-form { display: flex; flex-direction: column; gap: 12px; }
.contact-form input, .contact-form textarea {
  padding: 14px 16px;
  border: 1px solid #E4DCCE;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  background: #fff;
  resize: vertical;
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--color-primary); }
.contact-form .btn { align-self: flex-start; }

/* =========== FOOTER =========== */
.site-footer { background: var(--color-dark-2); color: #C9C2B5; padding: 40px 0; }
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo { display: flex; }
.footer-logo-img { height: 46px; width: auto; border-radius: 8px; }
.site-footer .social-links a { color: #C9C2B5; border-color: var(--color-primary); }

/* =========== RESPONSIVE =========== */

/* Tablets (iPad portrait/landscape) and phones landscape: the full text
   nav (7 links + button) doesn't fit past this point, so switch to the
   hamburger menu well before the grid breakpoints kick in. */
@media (max-width: 1300px) {
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed;
    top: 0; right: -100%;
    width: 78%;
    max-width: 320px;
    height: 100vh;
    background: var(--color-dark);
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 40px;
    gap: 26px;
    transition: right var(--transition);
  }
  .main-nav.open { right: 0; }
  .main-nav a { color: #fff !important; font-size: 18px; }
  .main-nav a.btn {
    margin-top: 10px;
    align-self: stretch;
    text-align: center;
  }
}

@media (max-width: 1024px) {
  .rooms-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .booking-form { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .about-grid, .restaurant-grid, .location-grid { grid-template-columns: 1fr; }
  .about-img-small { position: static; width: 100%; margin-top: 20px; }
  .restaurant-img { order: -1; }
}

@media (max-width: 768px) {
  .rooms-grid, .services-grid, .gallery-grid { grid-template-columns: 1fr; }
  .booking-form { grid-template-columns: 1fr; }
  .btn-search { white-space: normal; }
  .section { padding: 64px 0; }
  .logo-img { height: 42px; }
}

/* =========================================================
   Scroll animations / dynamic motion
   ========================================================= */

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
  z-index: 2000;
  transition: width 0.1s linear;
}

/* Generic reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s cubic-bezier(.2,.7,.3,1), transform 0.7s cubic-bezier(.2,.7,.3,1);
}
.reveal.reveal-left { transform: translateX(-48px); }
.reveal.reveal-right { transform: translateX(48px); }
.reveal.is-visible {
  opacity: 1;
}
.reveal.is-visible:not(:hover) {
  transform: translate(0, 0);
}

/* Stagger children of grids automatically */
.rooms-grid .reveal.is-visible,
.services-grid .reveal.is-visible,
.gallery-grid .reveal.is-visible {
  transition-duration: 0.7s;
}

/* Image hover / motion */
.parallax-img {
  --parallax-y: 0px;
  transform: translate3d(0, var(--parallax-y), 0);
  will-change: transform;
}

.about-img-main, .about-img-small, .restaurant-img img {
  transition: transform 0.6s ease, box-shadow 0.6s ease;
}
.about-images:hover .about-img-main { transform: translate3d(0, var(--parallax-y), 0) scale(1.03) rotate(-0.5deg); }
.about-images:hover .about-img-small { transform: translate3d(0, var(--parallax-y), 0) scale(1.05) rotate(1deg); }
.restaurant-img:hover img { transform: translate3d(0, var(--parallax-y), 0) scale(1.04); }

.room-img img {
  transition: transform 0.6s ease;
}
.room-card:hover .room-img img { transform: scale(1.08); }

.service-icon {
  display: inline-block;
  transition: transform 0.4s ease;
}
.service-card:hover .service-icon {
  transform: translateY(-6px) scale(1.15) rotate(-4deg);
}

.gallery-item img { transition: transform 0.5s ease, filter 0.5s ease; }
.gallery-item:hover img { transform: scale(1.1); filter: saturate(1.15); }

/* Floating logo accent on hover */
.logo:hover .logo-img { transform: scale(1.05); }

/* Nav link underline sweep */
.main-nav a:not(.btn) {
  position: relative;
}
.main-nav a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -4px;
  width: 0%;
  height: 2px;
  background: var(--color-primary);
  transition: width 0.3s ease;
}
.main-nav a:not(.btn):hover::after { width: 100%; }

/* Button micro-interaction */
.btn { position: relative; overflow: hidden; }
.btn-primary:active, .btn-outline:active, .btn-sm:active { transform: scale(0.96); }

/* Scroll cue on hero */
.scroll-cue {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px;
  height: 42px;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 999px;
}
.scroll-cue::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 4px;
  height: 8px;
  background: #fff;
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollCue 1.6s ease infinite;
}
@keyframes scrollCue {
  0%   { opacity: 1; top: 8px; }
  70%  { opacity: 0; top: 20px; }
  100% { opacity: 0; top: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-cue::before { animation: none; }
}

/* =========================================================
   Lightbox (click to enlarge)
   ========================================================= */

.gallery-item img,
.room-img img,
.restaurant-img img,
.about-img-main,
.about-img-small {
  cursor: zoom-in;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(20, 18, 14, 0.92);
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.is-open { display: flex; }

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: lightboxIn 0.25s ease both;
}
@keyframes lightboxIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
  transition: opacity var(--transition);
}
.lightbox-close:hover { opacity: 0.7; }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.12);
  border: none;
  color: #fff;
  font-size: 20px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition);
}
.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

@media (max-width: 600px) {
  .lightbox { padding: 16px; }
  .lightbox-close { top: 10px; right: 14px; font-size: 30px; }
  .lightbox-nav { width: 40px; height: 40px; font-size: 16px; }
}
