/* =========================================
   БАЗОВЫЕ НАСТРОЙКИ И ПЕРЕМЕННЫЕ
   ========================================= */
:root {
    --primary: #1a5c3a;
    --primary-light: #2d7a52;
    --primary-dark: #0f3d26;
    --accent: #c9a227;
    --accent-light: #e0c158;
    --white: #ffffff;
    --cream: #f8f6f0;
    --light-gray: #f0ede6;
    --text: #1a1a1a;
    --text-light: #555555;
    --shadow: rgba(0,0,0,0.1);
    --shadow-hover: rgba(0,0,0,0.2);
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text);
    background: #1a5c3a;
    overflow-x: hidden;
    line-height: 1.8;
}

h1, h2, h3, h4, h5 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   ЭФФЕКТЫ: ПРОГРЕСС-БАР, КУРСОР, АНИМАЦИИ
   ========================================= */
#progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--accent);
    z-index: 9999;
    width: 0;
    transition: width 0.2s ease-out;
}

.custom-cursor-active {
    cursor: none;
}

#cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--primary);
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99999;
    transition: transform 0.1s;
}

#cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent);
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 99998;
    transition: transform 0.15s ease-out, opacity 0.3s;
}

.effect-fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.effect-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.effect-fade-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.effect-fade-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.effect-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.effect-scale.visible {
    opacity: 1;
    transform: scale(1);
}

.effect-blur-in {
    opacity: 0;
    filter: blur(10px);
    transition: opacity 0.8s ease-out, filter 0.8s ease-out;
}

.effect-blur-in.visible {
    opacity: 1;
    filter: blur(0);
}

/* =========================================
   LIGHTBOX
   ========================================= */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10001;
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    transform: rotate(90deg);
}

.lightbox-caption {
    position: absolute;
    bottom: 30px;
    left: 30px;
    right: 30px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 20px;
    border-radius: 12px;
    color: white;
    max-width: 600px;
}

.lightbox-caption h4 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--accent);
}

.lightbox-caption p {
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.6;
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
    border-radius: 8px;
}

.lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* =========================================
   ОБЩИЕ СТИЛИ СЕКЦИЙ
   ========================================= */
section {
    padding: 100px 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-label {
    display: inline-block;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.section-desc {
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-light);
    line-height: 1.7;
    font-size: 1.05rem;
}

/* =========================================
   РЕЖИМ ЗВОНКА (модалка)
   ========================================= */
#bookingFields { display: block; }
.call-mode #bookingFields { display: none; }

/* =========================================
   АДАПТИВНОСТЬ (MEDIA QUERIES)
   ========================================= */
@media (max-width: 1024px) {
    .about-grid,
    .contact-grid,
    .calc-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }
    .rooms-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .gallery-item:nth-child(1),
    .gallery-item:nth-child(4),
    .gallery-item:nth-child(5) {
        grid-column: span 1;
        grid-row: span 1;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .reviews-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .detail-hero,
    .event-hero,
    .category-hero {
        height: 50vh;
        min-height: 350px;
    }
}

@media (max-width: 768px) {
    .nav-links,
    .nav-more-trigger,
    .nav-cta {
        display: none !important;
    }
    .nav-cta {
        overflow: hidden;
    }
    .nav-right {
        min-width: 0;
        padding-left: 0;
        flex: 0;
    }
    .logo {
        min-width: 0;
        flex: 1;
    }
    .logo-images {
        width: 120px;
        height: 56px;
    }
    .navbar:not(.scrolled) .logo {
        padding: 6px 14px;
    }
    .mobile-menu-btn {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: rgba(255,255,255,0.1);
        border: 1px solid rgba(255,255,255,0.2);
        border-radius: 10px;
        color: var(--white);
        font-size: 1.4rem;
        cursor: pointer;
        flex-shrink: 0;
    }
    .navbar.scrolled .mobile-menu-btn {
        background: var(--cream);
        border-color: var(--light-gray);
        color: var(--primary);
    }
    .nav-links.mobile-active {
        display: flex !important;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        padding: 30px 20px;
        box-shadow: 0 15px 40px var(--shadow-hover);
        gap: 20px;
        z-index: 999;
        border-top: 1px solid var(--light-gray);
        animation: slideDown 0.3s ease;
    }
    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-10px); }
        to { opacity: 1; transform: translateY(0); }
    }
    .navbar .nav-links.mobile-active a {
        color: var(--text) !important;
        font-size: 1.1rem;
        font-weight: 600;
        text-align: center;
        padding: 12px 0;
        display: block;
        min-height: 48px;
        line-height: 1.3;
    }
    /* Перебиваем is-on-dark в мобильном меню (белый фон → тёмный текст) */
    .navbar.is-on-dark:not(.scrolled) .nav-links.mobile-active a {
        color: var(--text) !important;
    }
    .nav-links.mobile-active .nav-cta {
        display: block !important;
        text-align: center;
        margin: 15px 0 0;
        width: 100%;
        padding: 15px;
    }
    .hero h1 {
        font-size: 2.5rem;
    }
    .rooms-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }
    .features-list {
        grid-template-columns: 1fr;
    }
    .about-img-secondary {
        display: none;
    }
    .calc-container {
        padding: 30px 20px;
    }
    .modal {
        padding: 30px 20px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-social {
        justify-content: center;
    }
    section {
        padding: 60px 0;
    }
    .container {
        padding: 0 20px;
    }
    .reviews-grid {
        grid-template-columns: 1fr;
    }
.custom-cursor-active {
    cursor: auto;
}
#cursor-dot,
#cursor-outline {
    display: none;
}

/* =========================================
   MOBILE CTA — sticky bottom action bar
   ========================================= */
.mobile-cta { display: none; }

@media (max-width: 768px) {
  .mobile-cta {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(26,92,58,0.97) 0%, rgba(15,65,40,0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 12px 16px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
    gap: 12px;
    align-items: center;
    justify-content: center;
    box-shadow: 0 -8px 40px rgba(0,0,0,0.35), 0 -2px 10px rgba(26,92,58,0.2), inset 0 1px 0 rgba(255,255,255,0.06);
    animation: slideUp 0.5s cubic-bezier(0.22,1,0.36,1);
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .mobile-cta a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 24px;
    border-radius: 16px;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    flex: 1;
    min-width: 0;
    letter-spacing: 0.02em;
    transition: transform 0.25s cubic-bezier(0.22,1,0.36,1), box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
  }
  .mobile-cta a::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 60%);
    pointer-events: none;
    border-radius: inherit;
  }
  .mobile-cta a::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255,255,255,0.15) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
  }
  .mobile-cta a:active { transform: scale(0.95); }
  .mobile-cta .cta-call {
    background: #fff;
    color: var(--primary, #1a5c3a);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.1), inset 0 -2px 0 rgba(0,0,0,0.06);
  }
  .mobile-cta .cta-call:active { box-shadow: 0 2px 8px rgba(0,0,0,0.2); transform: scale(0.95); }
  .mobile-cta .cta-call i { font-size: 1.1em; }
  .mobile-cta .cta-booking {
    background: linear-gradient(135deg, var(--accent, #c9a227) 0%, #e6b830 100%);
    color: #1a1a1a;
    box-shadow: 0 4px 20px rgba(201,162,39,0.4), 0 0 0 1px rgba(201,162,39,0.2), inset 0 -2px 0 rgba(0,0,0,0.1);
    animation: gentlePulse 2.5s ease-in-out infinite;
  }
  @keyframes gentlePulse {
    0%, 100% { box-shadow: 0 4px 20px rgba(201,162,39,0.4), 0 0 0 1px rgba(201,162,39,0.2), inset 0 -2px 0 rgba(0,0,0,0.1); }
    50% { box-shadow: 0 4px 28px rgba(201,162,39,0.6), 0 0 0 2px rgba(201,162,39,0.3), inset 0 -2px 0 rgba(0,0,0,0.1); }
  }
  .mobile-cta .cta-booking:active { box-shadow: 0 2px 10px rgba(201,162,39,0.5); transform: scale(0.95); }
  .mobile-cta .cta-booking i { font-size: 1.1em; }
  body { padding-bottom: 80px; }
  body.has-mobile-cta { padding-bottom: 80px; }
}

/* Small phones */
@media (max-width: 380px) {
  .mobile-cta { gap: 8px; padding: 10px 12px; }
  .mobile-cta a { padding: 14px 16px; font-size: 0.85rem; gap: 6px; border-radius: 14px; }
  .mobile-cta a i { font-size: 1em; }
}

/* Medium phones */
@media (min-width: 381px) and (max-width: 480px) {
  .mobile-cta a { padding: 16px 20px; font-size: 0.9rem; }
}

/* Tablets */
@media (min-width: 481px) and (max-width: 768px) {
  .mobile-cta {
    padding: 14px 28px;
    gap: 16px;
    max-width: 540px;
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    border-radius: 20px 20px 0 0;
  }
  .mobile-cta a { padding: 18px 28px; font-size: 1rem; border-radius: 18px; }
}

@keyframes slideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* Nav overlay */
.nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 98;
    animation: fadeIn 0.2s ease;
}
.nav-overlay.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
    .toast {
        bottom: 20px;
        left: 20px;
        right: 20px;
        max-width: none;
        transform: translateY(150%);
    }
    .toast.show {
        transform: translateY(0);
    }
    /* Если мобильное CTA видимо — поднимаем тост */
    .mobile-cta ~ .toast,
    body.has-mobile-cta .toast {
        bottom: 80px;
    }
    .lightbox-caption {
        bottom: 15px;
        left: 15px;
        max-width: 85%;
        padding: 10px 15px;
    }
    .lightbox-caption h4 {
        font-size: 1.1rem;
    }
    .lightbox-caption p {
        font-size: 0.85rem;
    }
    .lightbox-arrow {
        font-size: 1.2rem;
        padding: 10px 15px;
    }
    .lightbox-prev {
        left: 10px;
    }
    .lightbox-next {
        right: 10px;
    }
    .lightbox-overlay img {
        max-width: 95%;
        max-height: 80vh;
    }
    .detail-hero,
    .event-hero,
    .category-hero {
        height: 40vh;
        min-height: 300px;
    }
    .detail-content,
    .category-content {
        padding: 40px 0;
    }
    .detail-grid h2 {
        font-size: 1.6rem;
    }
    .detail-grid h3 {
        font-size: 1.4rem;
    }
}

/* =========================================
   ХЛЕБНЫЕ КРОШКИ
   ========================================= */
.breadcrumbs {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 20px;
    font-size: 0.85rem;
    color: var(--text-light);
}
.breadcrumbs a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s;
}
.breadcrumbs a:hover {
    color: var(--primary);
}
.bc-sep {
    margin: 0 8px;
    color: #bbb;
}
.breadcrumbs [itemprop="name"]:last-child {
    color: var(--text);
    font-weight: 500;
}

/* =========================================
   DESIGN ENHANCEMENTS v2
   ========================================= */
:root {
  --glass-bg: rgba(255,255,255,0.05);
  --glass-border: rgba(255,255,255,0.08);
  --glass-shadow: 0 8px 32px rgba(0,0,0,0.1);
  --glow-green: 0 0 20px rgba(26,92,58,0.15);
  --glow-gold: 0 0 20px rgba(201,162,39,0.12);
  --radius-xl: 20px;
  --transition-smooth: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-bounce: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

::selection {
  background: var(--primary);
  color: var(--white);
}

.btn, a, .card, .room-card, .service-item, .gallery-item, .review-card {
  -webkit-tap-highlight-color: transparent;
}

.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: -1;
  border-radius: inherit;
}

.btn:hover::before { opacity: 1; }

.btn-outline {
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.btn-outline::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 52px;
  background: linear-gradient(135deg, var(--accent), var(--primary-light), var(--accent));
  background-size: 200% 200%;
  z-index: -1;
  animation: gradientShift 4s ease infinite;
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-outline:hover::after { opacity: 1; }

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.section-header {
  position: relative;
}

.section-header::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary-light));
  margin: 16px auto 0;
  border-radius: 2px;
}

.glass-card {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--radius-xl);
  transition: var(--transition-smooth);
}

.glass-card:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(201,162,39,0.12);
  box-shadow: 0 8px 40px rgba(0,0,0,0.08), var(--glow-green);
}

.img-hover-zoom {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.img-hover-zoom img {
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.img-hover-zoom:hover img {
  transform: scale(1.05);
}

.btn-shimmer {
  position: relative;
  overflow: hidden;
}

.btn-shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.03), transparent);
  transform: rotate(45deg);
  animation: btnShimmer 3s ease-in-out infinite;
}

@keyframes btnShimmer {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.room-card, .service-item, .review-card {
  transition: var(--transition-smooth);
}

.room-card:hover, .service-item:hover, .review-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,92,58,0.15);
}

input, select, textarea {
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.toast {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 32px rgba(0,0,0,0.2), var(--glow-green);
}
