:root {
  --navy: #1a3a5c;
  --ocean: #2d6a9f;
  --gold: #e8a835;
  --sand: #f5efe6;
  --white: #ffffff;
  --text: #2c3e50;
  --light-blue: #eaf4fb;
  --transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- ОСНОВНИ --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* FIX 1: Prevent horizontal scroll on all devices */
html, body { 
  overflow-x: hidden; 
  width: 100%; 
  position: relative; 
}

body {
  font-family: 'Jost', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
}


/* --- NAV --- */
nav {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  /* FIX 2: Higher z-index to stay above the mobile overlay */
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 50px;
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  transition: var(--transition);
  box-sizing: border-box;
}
nav.scrolled { padding: 12px 50px; background: rgba(255,255,255,0.95); box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.nav-logo { flex-shrink: 0; }
.nav-logo img { height: 50px; max-width: 150px; display: block; }
.nav-links { display: flex; gap: 40px; list-style: none; }
.nav-links a { text-decoration: none; color: var(--navy); font-size: 0.8rem; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; transition: 0.3s; }

/* FIX 3: Active page styling */
.nav-links a.active {
  color: var(--gold);
  font-weight: 700;
}

.nav-links a:hover {
  color: var(--gold);
}

/* --- HERO --- */
.hero { height: 100vh; position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; text-align: center; color: white; }
.hero-mini { height: 55vh; min-height: 400px; }
.hero-bg { position: absolute; inset: 0; background: url('images/orig_22605_26.jpg') center/cover no-repeat; z-index: -2; animation: zoom 20s infinite alternate; }
@keyframes zoom { from { transform: scale(1); } to { transform: scale(1.1); } }
.hero-overlay { position: absolute; inset: 0; background: rgba(26,58,92,0.45); z-index: -1; }
.hero h1 { font-family: 'Cormorant Garamond', serif; font-size: clamp(2.5rem, 8vw, 5.5rem); line-height: 1.1; margin-bottom: 20px; }
.hero h1 em { font-style: italic; color: var(--gold); }

/* --- FEATURES --- */
.features-strip { background: var(--navy); padding: 50px 20px; display: flex; justify: center; flex-wrap: wrap; }
.feature-item { flex: 1; min-width: 140px; text-align: center; color: white; border-right: 1px solid rgba(255,255,255,0.1); padding: 10px; }
.feature-item:last-child { border-right: none; }
.feature-icon { font-size: 2rem; margin-bottom: 10px; }

/* --- ABOUT (Home) --- */
.about { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; max-width: 1200px; margin: 100px auto; padding: 0 50px; align-items: center; }
.about-images { position: relative; height: 500px; }
.about-img-main { position: absolute; width: 80%; height: 90%; object-fit: cover; left: 0; top: 0; box-shadow: 0 30px 60px rgba(0,0,0,0.1); border-radius: 4px; }
.about-img-accent { position: absolute; width: 55%; height: 60%; object-fit: cover; bottom: 0; right: 0; border: 12px solid white; border-radius: 4px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); z-index: 2; }

/* --- ROOMS (Home - 5 Circles) --- */
.rooms-section { padding: 100px 20px; text-align: center; background: var(--white); }
.rooms-horizontal-container { display: flex; justify-content: center; gap: 30px; max-width: 1300px; margin: 50px auto; flex-wrap: wrap; }
.room-round-item { width: 180px; text-align: center; }
.room-round-img { width: 100%; aspect-ratio: 1/1; border-radius: 50%; overflow: hidden; margin-bottom: 20px; border: 4px solid white; box-shadow: 0 15px 35px rgba(0,0,0,0.1); transition: var(--transition); }
.room-round-img img { width: 100%; height: 100%; object-fit: cover; }
.room-round-item:hover .room-round-img { transform: translateY(-10px) scale(1.05); }
.room-round-item h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; color: var(--navy); }

/* --- ROOMS PAGE (List View - rooms.php) --- */
.rooms-list-section { padding: 100px 50px; max-width: 1200px; margin: 0 auto; }
.room-list-item { display: flex; align-items: center; gap: 60px; margin-bottom: 80px; width: 100%; }
.room-list-item:nth-child(even) { flex-direction: row-reverse; }
.room-list-img { flex: 0 0 55%; height: 450px; overflow: hidden; border-radius: 4px; box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.room-list-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.8s; }
.room-list-item:hover img { transform: scale(1.05); }
.room-list-content { flex: 1; }
.room-list-content h3 { font-family: 'Cormorant Garamond', serif; font-size: 2.5rem; color: var(--navy); margin-bottom: 15px; }
.room-features { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 25px; }
.room-features li { font-size: 0.9rem; color: #666; display: flex; align-items: center; gap: 8px; }

/* --- DINING, POOL, GALLERY --- */
.dining { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 60px; max-width: 1200px; margin: 100px auto; padding: 0 50px; align-items: center; }
.dining-images { display: grid; grid-template-columns: repeat(12, 1fr); grid-template-rows: repeat(12, 1fr); height: 450px; gap: 10px; }
.dining-images img:nth-child(1) { grid-area: 1 / 1 / 13 / 8; width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.dining-images img:nth-child(2) { grid-area: 1 / 8 / 7 / 13; width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }
.dining-images img:nth-child(3) { grid-area: 7 / 8 / 13 / 13; width: 100%; height: 100%; object-fit: cover; border-radius: 4px; }

.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 200px; gap: 15px; max-width: 1200px; margin: 50px auto; padding: 0 20px; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; transition: 0.4s; }
.gallery-grid img:nth-child(1) { grid-column: span 2; grid-row: span 2; }

.pool-section { position: relative; margin-top: 80px; overflow: hidden; }

.pool-collage {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 250px;
}

.pool-col-img { overflow: hidden; }
.pool-col-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.8s ease;
}
.pool-col-img:hover img { transform: scale(1.05); }

/* thin gold gap line between the two photos */
.pool-col-img-1 { border-right: 3px solid var(--gold); }

.pool-col-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(26,58,92,0.25) 0%, rgba(26,58,92,0.65) 100%);
  z-index: 1;
}

.pool-content {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
  padding: 40px 20px;
}

@media (max-width: 992px) {
  .pool-collage { grid-template-columns: 1fr; height: 250px; }
  .pool-col-img-2 { display: none; }
  .pool-col-img-1 { border-right: none; }
}

/* --- CONTACT & CTA --- */
.cta-section { background: var(--navy); padding: 100px 20px; text-align: center; color: white; }
.contact-container { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; max-width: 1200px; margin: 100px auto; padding: 0 50px; }
.form-group { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; text-align: left; }
.form-group input, .form-group textarea { padding: 15px; background: var(--light-blue); border: 1px solid transparent; outline: none; font-family: inherit; }
.form-group input:focus { border-color: var(--gold); background: white; }

/* --- FOOTER --- */
footer { background: #0f2438; color: white; padding: 80px 50px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 50px; }
footer h5 { color: var(--gold); text-transform: uppercase; margin-bottom: 20px; letter-spacing: 0.1em; }
footer p { opacity: 0.7; font-size: 0.9rem; }
footer ul { list-style: none; }
footer ul li { margin-bottom: 10px; opacity: 0.7; font-size: 0.9rem; }
footer ul a { color: white; text-decoration: none; transition: 0.3s; }
footer ul a:hover { color: var(--gold); padding-left: 5px; }
.footer-bottom { background: #0a1e30; padding: 25px 50px; display: flex; justify-content: space-between; color: rgba(255,255,255,0.3); font-size: 0.8rem; }

/* --- БУТОНИ --- */
.btn { display: inline-block; padding: 15px 35px; border: 2px solid var(--navy); color: var(--navy); text-decoration: none; text-transform: uppercase; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.1em; transition: 0.3s; cursor: pointer; }
.btn-solid { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn-solid:hover { background: var(--navy); color: white; transform: translateY(-3px); }
.btn:hover { border-color: var(--gold); color: var(--gold); }

/* --- АНИМАЦИИ --- */
.reveal, .reveal-left, .reveal-right { opacity: 0; transition: all 1s ease-out; }
.reveal { transform: translateY(40px); }
.reveal-left { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }
.reveal.visible, .reveal-left.visible, .reveal-right.visible { opacity: 1; transform: translate(0); }

/* --- HAMBURGER BUTTON --- */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  /* FIX 4: Ensure toggle stays above overlay too */
  z-index: 2100;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--navy);
  border-radius: 2px;
  transition: all 0.35s ease;
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
  nav { padding: 12px 20px; }
  nav.scrolled { padding: 10px 20px; }

  .features-strip { padding: 30px 10px; }
  .feature-item { min-width: 100px; flex: 1 1 30%; border-right: none; border-bottom: 1px solid rgba(255,255,255,0.1); }

  footer { padding: 50px 20px; text-align: center; }
  .footer-bottom { padding: 20px; flex-direction: column; gap: 10px; text-align: center; }

  .hero-content { padding: 0 20px; }
  .hero-eyebrow, .hero-sub { padding: 0 10px; }

  .nav-toggle { display: flex; }

  .nav-links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; right: 0;
    width: 75vw;
    max-width: 320px;
    height: 100vh;
    background: white;
    padding: 90px 40px 40px;
    gap: 10px;
    transform: translateX(100%);
    /* FIX 5: Prevent interactions and visibility issues when closed */
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.4s;
    box-shadow: -10px 0 40px rgba(0,0,0,0.12);
    /* FIX 6: Menu links must be above the dark overlay (z-index 1900) */
    z-index: 2050;
  }
  
  /* FIX 7: Reveal the menu properly when open */
  .nav-links.open { 
    transform: translateX(0); 
    visibility: visible;
    pointer-events: auto;
  }
  
  .nav-links a {
    font-size: 1.1rem;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.07);
    display: block;
  }

  /* Overlay behind mobile menu */
  body.menu-open::before {
    content: '';
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    /* FIX 8: Lower z-index than the nav and nav-links */
    z-index: 1900;
  }

  /* Image fixes */
  .about-images { height: 280px; }
  .about-img-main { width: 85%; height: 80%; }
  .about-img-accent { width: 60%; height: 55%; border-width: 6px; }

  .room-list-img { flex: none; height: 260px; width: 100%; }
  .room-list-img img { width: 100%; height: 100%; object-fit: cover; }

  .dining-images { height: 280px; }

  .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 160px; }

  section[style*="padding: 80px 48px"] { padding: 60px 20px !important; }

  .rooms-list-section { padding: 60px 20px; }
  .room-list-item {
    display: flex;
    flex-direction: column !important;
    gap: 30px;
    margin-bottom: 60px;
  }
  .room-list-item:nth-child(even) { flex-direction: column !important; }

  .about, .dining, .contact-container, footer {
    grid-template-columns: 1fr;
    padding: 50px 20px;
    gap: 40px;
  }

  footer { text-align: center; }
  .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }

  .rooms-horizontal-container { gap: 20px; }
  .room-round-item { width: 130px; }
}

/* --- VIDEOS --- */
.videos-section { padding: 80px 50px; background: var(--white); text-align: center; }
.videos-header { margin-bottom: 50px; }
.videos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
}
.video-item {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.12);
  aspect-ratio: 16/9;
  background: var(--navy);
}
.video-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 992px) {
  .videos-section { padding: 60px 20px; }
  .videos-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* --- PRICE TABLE --- */
.price-table-section { padding: 100px 50px; text-align: center; background: var(--sand); }
.price-table-header { margin-bottom: 50px; }

.price-table-outer {
  max-width: 860px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 8px 40px rgba(26,58,92,0.13);
}

.price-table { width: 100%; border-collapse: collapse; table-layout: fixed; }

.price-table thead tr { background: var(--navy); }
.price-table thead th {
  padding: 22px 28px;
  color: var(--white);
  font-family: 'Jost', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-align: center;
  vertical-align: top;
}
.price-table thead th.pt-col-room { text-align: left; width: 38%; }

.pt-col-dates {
  display: block;
  font-size: 0.68rem;
  font-weight: 300;
  opacity: 0.6;
  margin-top: 5px;
  text-transform: none;
  letter-spacing: 0;
}

.pt-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.63rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pt-badge-low  { background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.8); }
.pt-badge-high { background: var(--gold); color: var(--navy); }

.price-table tbody tr {
  background: var(--white);
  border-bottom: 1px solid #eef1f5;
  transition: background 0.2s;
}
.price-table tbody tr:last-child { border-bottom: none; }
.price-table tbody tr:hover { background: var(--light-blue); }

.price-table td {
  padding: 18px 28px;
  font-size: 0.93rem;
  color: var(--text);
  text-align: center;
}

.price-table td.pt-col-room {
  background: var(--navy);
  color: var(--white);
  text-align: left;
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.price-table tbody tr:last-child td.pt-col-room { border-bottom: none; }

.pt-room-icon {
  display: inline-block;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  margin-right: 10px;
  text-align: center;
  line-height: 28px;
  font-size: 0.85rem;
  vertical-align: middle;
}

.pt-col-price { border-left: 1px solid #eef1f5; }

.pt-price-low  { color: var(--text); font-weight: 400; }
.pt-price-high { color: var(--navy); font-weight: 600; }
.pt-price-high::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  margin-right: 7px;
  vertical-align: middle;
  position: relative;
  top: -1px;
}

.price-note {
  max-width: 860px;
  margin: 14px auto 0;
  text-align: left;
  font-size: 0.76rem;
  color: #999;
  padding: 0 4px;
}

/* --- ROOM GALLERY --- */
.room-gallery { position: relative; overflow: visible !important; }

.room-gallery .gallery-main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.3s ease;
  border-radius: 4px;
}

.gallery-thumbs {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
  flex-wrap: nowrap;
  max-width: 90%;
  overflow-x: auto;
  padding: 4px 6px;
  scrollbar-width: none;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }

.gallery-thumbs .thumb {
  width: 60px;
  height: 45px;
  object-fit: cover;
  border-radius: 3px;
  cursor: pointer;
  border: 2px solid rgba(255,255,255,0.4);
  transition: all 0.25s;
  opacity: 0.75;
}

.gallery-thumbs .thumb:hover,
.gallery-thumbs .thumb.active {
  border-color: var(--gold);
  opacity: 1;
  transform: translateY(-3px);
}

.gallery-expand {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0,0,0,0.45);
  color: white;
  border: none;
  border-radius: 4px;
  width: 36px;
  height: 36px;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10;
}
.gallery-expand:hover { background: var(--gold); color: var(--navy); }

/* --- LIGHTBOX --- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.open { opacity: 1; pointer-events: all; }

.lb-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
}

#lb-img {
  max-width: 88vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  transition: opacity 0.25s ease;
  display: block;
}

.lb-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.8;
  transition: opacity 0.2s, color 0.2s;
  z-index: 10000;
}
.lb-close:hover { opacity: 1; color: var(--gold); }

.lb-prev, .lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: white;
  font-size: 1.5rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 10000;
}
.lb-prev { left: 20px; }
.lb-next { right: 20px; }
.lb-prev:hover, .lb-next:hover { background: var(--gold); color: var(--navy); border-color: var(--gold); }

.lb-dots {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.lb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background 0.2s;
}
.lb-dot.active { background: var(--gold); }

@media (max-width: 992px) {
  .gallery-thumbs .thumb { width: 46px; height: 36px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}



@media (max-width: 992px) {
  .price-table-section { padding: 60px 16px; }
  .price-table thead th,
  .price-table td { padding: 14px 14px; font-size: 0.82rem; }
  .price-table td.pt-col-room { font-size: 0.85rem; }
  .pt-room-icon { display: none; }
  .pt-badge { display: inline-block; padding: 2px 7px; font-size: 0.58rem; margin-top: 5px; }
  .pt-col-dates { font-size: 0.62rem; }
}
