/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  height: auto;
  min-height: 100%;
  max-height: none;
  overflow-x: hidden;
  overflow-y: auto;
  width: 100%;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

body {
  background-color: #000;
  color: #fff;
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  height: auto;
  max-height: none;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  width: 100%;
  position: relative;
  overscroll-behavior: none;
  -webkit-overscroll-behavior: none;
}

body:not([data-lang-applied]) .btn-text,
body:not([data-lang-applied]) .header_booking,
body:not([data-lang-applied]) .header_contact,
body:not([data-lang-applied]) .header_language,
body:not([data-lang-applied]) .alarm-booking,
body:not([data-lang-applied]) .call-contactus {
  visibility: hidden;
}

/* Header styles */
.header-up {
  width: 100%;
  height: 57px;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-sizing: border-box;
  background: #a56b00;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 87px 0 40px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 5px;
}

.header-right {
  display: flex;
  align-items: center;
}

.header_alarm {
  width: 24px;
  height: 24px;
}

.header_booking,
.header_contact,
.header_language {
  font: 400 16px/21px 'Inter', sans-serif;
  color: #fff;
  display: flex;
  align-items: center;
}

.header_booking {
  margin-top: 1px;
}

.header_contact {
  margin-right: 21px;
  cursor: pointer;
}

.header_call {
  margin-right: 6.6px;
}

.header_language_logo {
  width: 16px;
  height: 11px;
  margin-left: 8px;
}

/* Main content layout */
.main-content {
  margin-top: 57px;
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 57px);
  height: auto;
  width: 100%;
  overflow: visible;
  overflow-x: hidden;
  overflow-y: visible;
}

/* Hero section */
.hero {
  width: 100%;
  height: 120px;
  background-color: #370617;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 15px 20px 10px 20px;
  box-sizing: border-box;
  flex-shrink: 0;
}

.hero-logo {
  width: 200px;
  height: 50px;
  object-fit: contain;
  margin: 0 0 12px 0;
  cursor: pointer;
}

.hero a {
  text-decoration: none;
  display: inline-block;
}

.hero-nav {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Button styles */
.btn-text {
  background: transparent;
  border: none;
  color: white;
  font: 400 16px/1.5 'Inter', sans-serif;
  padding: 8px 16px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

/* Middle content section */
.middle {
  width: 100%;
  height: auto;
  min-height: auto;
  max-height: none;
  background-color: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 20px;
  box-sizing: border-box;
  overflow: visible;
  overflow-x: hidden;
  overflow-y: visible;
}

.Escorts-Model {
  color: rgba(255, 207, 132, 1);
  font-family: 'Inter', sans-serif;
  font-size: 64px;
  font-weight: 400;
  line-height: 77px;
  text-align: center;
  margin: 0 0 50px 0;
}

/* Cards grid */
.cards-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  width: 100%;
  max-width: 1600px;
  box-sizing: border-box;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  align-items: center;
  cursor: pointer;
}

.picture {
  background-color: #333;
  width: 280px;
  height: 410px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border: none;
  outline: none;
  display: block;
  flex-shrink: 0;
  position: relative;
  transition: opacity 0.3s ease;
}

/* Placeholder для lazy loading изображений */
.picture.lazy-image {
  background-color: #333;
  background-image: none;
}

.picture.lazy-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, #333 0%, #444 50%, #333 100%);
  background-size: 200% 100%;
  animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.picture.loaded {
  opacity: 1;
}

.picture.error {
  background-color: #222;
  background-image: none;
}

.info-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  align-items: center;
  width: 100%;
}

.name-text {
  color: rgba(255, 255, 255, 1);
  font-family: Inter;
  font-size: 24px;
  font-weight: 400;
  line-height: 29px;
  text-align: center;
  text-decoration: none;
}

.location-years-text {
  color: rgba(255, 255, 255, 0.5);
  font-family: Inter;
  font-size: 18px;
  font-weight: 400;
  line-height: 22px;
  text-align: center;
  text-decoration: none;
}

/* Footer sections */
.footer-sections {
  width: 100%;
  overflow: visible;
}

.book {
  width: 100%;
  height: 50px;
  background-color: #211708;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 20px;
  box-sizing: border-box;
}

.book-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.book .alarm,
.book .call-contact {
  width: 24px;
  height: 24px;
}

.alarm-booking,
.call-contactus {
  color: rgba(255, 255, 255, 1);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 44px;
  cursor: pointer;
}

.reserved {
  width: 100%;
  height: 20px;
  background-color: #370617;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 0 20px;
  box-sizing: border-box;
}

.reserved-text {
  color: rgba(255, 255, 255, 1);
  font-family: Inter;
  font-size: 16px;
  font-weight: 400;
  line-height: 20px;
  text-align: center;
}

.bottom-btn {
  width: 100%;
  height: 60px;
  background-color: #211708;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 200px;
  box-sizing: border-box;
}

.RoyalEscort-bottom {
  color: rgba(255, 255, 255, 1);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 19px;
  margin-left: auto;
}

/* Mobile menu styles */
.mobile-menu-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 8px;
  padding: 6px;
  margin-left: 10px;
  cursor: pointer;
  display: none;
  flex-direction: column;
  gap: 3px;
}

.mobile-menu-btn__bar {
  width: 18px;
  height: 2px;
  background: #fff;
  display: block;
}

.tablet-menu-btn {
  display: none;
}

.mobile-menu {
  position: fixed;
  top: 57px;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.98);
  border-bottom: 1px solid rgba(255,255,255,0.14);
  z-index: 1500;
  display: none;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 12px 14px;
  box-sizing: border-box;
}

.mobile-menu .btn-text {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
}

/* Show menu when toggled */
body.menu-open .mobile-menu {
  display: grid !important;
}

/* Empty state styles */
.cards-container.empty-state {
  display: flex !important;
  justify-content: center;
  align-items: center;
  min-height: 400px;
}

.empty-state-message {
  color: #fff;
  text-align: center;
  padding: 40px 20px;
}

.empty-state-title {
  font-size: 20px;
  font-weight: 500;
  margin-bottom: 10px;
  font-family: 'Inter', sans-serif;
}

.empty-state-subtitle {
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  font-family: 'Inter', sans-serif;
}

/* Pagination styles */
.pagination-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 40px;
  padding: 20px 0;
  flex-wrap: wrap;
}

.pagination-btn {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 400;
  padding: 10px 16px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.3s ease;
  min-width: 40px;
  text-align: center;
}

.pagination-btn:hover:not(:disabled) {
  background: rgba(255, 207, 132, 0.2);
  border-color: rgba(255, 207, 132, 0.5);
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-btn.active {
  background: rgba(255, 207, 132, 0.3);
  border-color: rgba(255, 207, 132, 0.6);
  color: rgba(255, 207, 132, 1);
}

.pagination-info {
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  margin: 0 10px;
}

/* Responsive media queries */
@media (max-width: 1200px) {
  .header-up {
    padding: 0 48px 0 28px;
  }
  
  .cards-container {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .header-up {
    padding: 0 32px 0 20px;
  }
  
  .hero {
    height: 160px;
    gap: 28px;
  }
  
  .bottom-btn {
    padding: 0 48px;
    gap: 16px;
  }
  
  .cards-container {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .tablet-menu-btn {
    display: inline-flex !important;
  }
}

@media (max-width: 768px) {
  html {
    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    position: relative !important;
  }
  
  body {
    display: block !important;
    flex-direction: unset !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    position: relative !important;
    overscroll-behavior: none !important;
    -webkit-overscroll-behavior: none !important;
    -webkit-touch-callout: default !important;
  }
  
  main,
  .main-content {
    overflow: visible !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    position: relative !important;
  }
  
  .middle {
    overflow: visible !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    height: auto !important;
    max-height: none !important;
    position: relative !important;
  }
  
  .footer-sections,
  section {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
    position: relative !important;
  }
  
  body.menu-open,
  body.tablet-menu-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
  }
  
  .header-up {
    padding: 0 20px;
    height: 57px;
  }
  
  .hero {
    height: 140px;
    gap: 20px;
    padding: 0 20px 18px 20px;
  }
  
  .hero-nav {
    display: none !important;
  }
  
  .btn-text {
    padding: 6px 10px;
    font-size: 14px;
  }
  
  .middle {
    padding: 28px 16px;
    gap: 20px;
  }
  
  .Escorts-Model {
    font-size: 36px;
    line-height: 1.3;
    margin-bottom: 35px;
  }
  
  .bottom-btn {
    padding: 0 20px;
    flex-wrap: wrap;
    height: auto;
    display: none;
  }
  
  .cards-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }
  
  .picture {
    width: 100%;
    max-width: 280px;
    height: 350px !important;
    display: block !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
  }
  
  .pagination-container {
    margin-top: 32px;
    padding: 16px 0;
    gap: 8px;
  }
  
  .pagination-btn {
    padding: 8px 14px;
    font-size: 15px;
    min-width: 38px;
  }
  
  .book {
    height: 48px;
    gap: 18px;
    padding: 0 20px;
  }
  
  .reserved {
    height: 19px;
    padding: 0 20px;
  }
  
  body.menu-open .mobile-menu {
    top: 57px;
  }
}

@media (max-width: 576px) {
  .hero {
    height: 120px;
    gap: 14px;
    padding: 0 12px 18px 12px;
  }
  
  .hero-logo {
    width: 160px;
    height: auto;
  }
  
  .btn-text {
    padding: 6px 8px;
    font-size: 13px;
  }
  
  .Escorts-Model {
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 24px;
  }
  
  .cards-container {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 0 8px;
  }
  
  .picture {
    height: 300px !important;
    display: block !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
  }
  
  .pagination-container {
    margin-top: 30px;
    padding: 15px 0;
    gap: 8px;
  }
  
  .pagination-btn {
    padding: 8px 12px;
    font-size: 14px;
    min-width: 35px;
  }
  
  .pagination-info {
    font-size: 14px;
    margin: 0 5px;
  }
}

@media (max-width: 425px) {
  html {
    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  body {
    display: block !important;
    flex-direction: unset !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    -webkit-touch-callout: default !important;
  }
  
  .main-content,
  .middle,
  .footer-sections,
  section {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
  }
  
  .main-content {
    min-height: auto !important;
  }
  
  body.menu-open,
  body.tablet-menu-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
  }
  
  .header-up {
    padding: 0 16px;
    height: 57px;
  }
  
  .header_booking, .header_contact, .header_language {
    font-size: 14px;
  }
  
  .header_contact {
    margin-right: 15px;
  }
  
  .header_alarm, .header_call {
    width: 20px;
    height: 20px;
  }
  
  .hero {
    height: 100px;
    padding: 6px 12px 2px 12px;
  }
  
  .hero-logo {
    width: 140px;
  }
  
  .mobile-menu-btn {
    display: inline-flex !important;
    margin-left: 12px;
  }
  
  .tablet-menu-btn {
    display: none !important;
  }
  
  .name-text {
    font-size: 20px;
  }
  
  .location-years-text {
    font-size: 16px;
  }
}

@media (max-width: 375px) {
  html {
    height: auto !important;
    min-height: 100% !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  
  body {
    display: block !important;
    flex-direction: unset !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    touch-action: pan-y !important;
    -webkit-touch-callout: default !important;
  }
  
  .main-content,
  .middle,
  .footer-sections,
  section {
    overflow: visible !important;
    height: auto !important;
    max-height: none !important;
  }
  
  .main-content {
    min-height: auto !important;
  }
  
  body.menu-open,
  body.tablet-menu-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
    top: 0 !important;
    left: 0 !important;
  }
  
  .header-up {
    padding: 0 12px;
    height: 57px;
  }
  
  .header_booking, .header_contact, .header_language {
    font-size: 13px;
  }
  
  .header_contact {
    margin-right: 12px;
  }
  
  .header_alarm, .header_call {
    width: 18px;
    height: 18px;
  }
  
  .hero {
    height: 90px;
    padding: 4px 12px 0 12px;
  }
  
  .hero-logo {
    width: 130px;
  }
  
  .mobile-menu-btn {
    margin-left: 10px;
    padding: 4px;
  }
  
  .mobile-menu-btn__bar {
    width: 16px;
  }
  
  .Escorts-Model {
    font-size: 24px;
    margin-bottom: 20px;
  }
  
  .picture {
    height: 280px !important;
    display: block !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
  }
  
  .pagination-container {
    margin-top: 24px;
    padding: 12px 0;
    gap: 6px;
  }
  
  .pagination-btn {
    padding: 6px 10px;
    font-size: 13px;
    min-width: 32px;
  }
  
  .pagination-info {
    font-size: 13px;
    margin: 0 4px;
  }
}

/* КРИТИЧЕСКИЙ ФИКС ДЛЯ МОБИЛЬНЫХ - переопределяем все возможные блокировки */
@media (max-width: 768px) {
    html {
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    html, body {
        -webkit-overflow-scrolling: touch !important;
    }
    
    body {
        display: block !important;
        flex-direction: unset !important;
        overflow-y: auto !important;
        touch-action: pan-y !important;
        height: auto !important;
        min-height: 100vh !important;
        max-height: none !important;
    }
    
    .main-content,
    .footer-sections,
    section {
        overflow: visible !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch !important;
        height: auto !important;
        max-height: none !important;
    }
    
    .middle {
        overflow: visible !important;
        overflow-x: hidden !important;
        overflow-y: visible !important;
        height: auto !important;
        max-height: none !important;
    }
    
    /* Исключаем карточки и изображения из общего правила для div */
    .card,
    .picture {
        overflow: visible !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .picture {
        display: block !important;
        background-size: cover !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
    }
    
    /* Убеждаемся, что контент может быть выше экрана */
    main,
    .main-content {
        min-height: auto !important;
        height: auto !important;
    }
    
    body.menu-open,
    body.tablet-menu-open {
        overflow: hidden !important;
        position: fixed !important;
        width: 100% !important;
        height: 100% !important;
        top: 0 !important;
        left: 0 !important;
    }
}