/* ========================================
   MOBILE RESPONSIVE STYLES
   ======================================== */

/* Prevent scroll jumping on mobile */
@media (max-width: 768px) {
  html {
    scroll-behavior: auto;
    overflow-x: hidden;
  }
  
  body {
    overflow-x: hidden;
    overscroll-behavior: none;
    -webkit-overflow-scrolling: touch;
  }
  
  /* Disable hover animations on mobile to prevent reflows */
  .calendar-day:hover {
    transform: none !important;
  }
  
  .apt-card:hover .apt-image {
    transform: none !important;
  }
  
  .luxury-item:hover img {
    transform: none !important;
  }
}

/* Tablet and below */
@media (max-width: 1024px) {
  :root {
    --space-lg: 3rem;
    --space-xl: 4rem;
    --space-2xl: 5rem;
  }
  
  .container {
    padding: 0 var(--space-sm);
  }
  
  /* Tablet: Gallery photos under map - 2 side by side */
  .archive-section.with-padding .luxury-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  /* Tablet: Apartamenty buttons centered */
  .laba-section .cta-container {
    display: flex;
    justify-content: center;
  }
}

/* Mobile */
@media (max-width: 768px) {
  /* Typography scaling */
  :root {
    --fs-hero: 2.5rem;
    --fs-h1: 2rem;
    --fs-h2: 1.75rem;
  }
  
  /* === HERO MOBILE === */
  .hero-subtitle {
    letter-spacing: 0.05em; /* Reduced from 0.3em */
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 800;
    color: #ffffff;
    opacity: 1;
  }
  
  .hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding: 0 1rem;
  }
  
  .hero-actions .flux-btn {
    width: 100%;
    max-width: 320px;
    text-align: center;
    justify-content: center;
  }
  
  /* === APARTAMENTY GALERIE MOBILE - Horizontal Scroll === */
  .gallery-wrapper {
    position: relative;
  }
  
  .luxury-grid {
    display: flex;
    overflow-x: scroll;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 15px;
    padding: 0 20px 20px 20px;
    margin-bottom: 1.5rem;
    scroll-behavior: smooth;
  }
  
  /* === SWIPE HINT - Elegant minimal icon === */
  .gallery-wrapper {
    position: relative;
  }
  
  .swipe-hint {
    display: block !important;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 60px;
    color: #fff;
    pointer-events: none;
    z-index: 100;
    opacity: 1;
    transition: opacity 0.5s ease, visibility 0.5s ease;
    filter: drop-shadow(0 2px 10px rgba(0,0,0,0.6));
    animation: swipeHintMove 2s ease-in-out infinite;
  }
  
  .swipe-hint svg {
    width: 100%;
    height: 100%;
  }
  
  @keyframes swipeHintMove {
    0%, 100% { transform: translate(-50%, -50%) translateX(-12px); }
    50% { transform: translate(-50%, -50%) translateX(12px); }
  }
  
  /* Show ALL photos in mobile slider (including hidden) */
  .luxury-grid .luxury-item.hidden-batch,
  .luxury-grid .luxury-item.hidden-batch-laba {
    display: block !important;
    opacity: 1 !important;
    transform: none !important;
  }
  
  .luxury-grid::-webkit-scrollbar {
    display: none;
  }
  
  .luxury-grid {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
  }
  
  .luxury-item {
    flex: 0 0 85vw;
    max-width: 85vw;
    height: 350px;
    scroll-snap-align: center;
    overflow: hidden;
    opacity: 1 !important;
    transform: none !important;
  }

  /* Hide "Load more" buttons in galleries on mobile */
  #labaActions,
  #ahojActions {
    display: none;
  }
  
  /* Gallery photos under map - HIDE ALL on mobile */
  .archive-section.with-padding .luxury-grid {
    display: none;
  }
  
  /* Hide "Twoja baza wypadowa" on mobile */
  .location-map-label {
    display: none;
  }
  
  /* Map marker tooltip - break into 2 lines on mobile */
  .main-label-tooltip {
    max-width: 120px !important;
    white-space: normal !important;
    text-align: center;
    padding: 6px 8px !important;
    font-size: 0.75rem !important;
  }
  
  .main-label-tooltip strong {
    display: block;
    line-height: 1.3;
  }
  
  /* Hide marker description on mobile */
  .main-label-tooltip .marker-desc {
    display: none !important;
  }
  
  /* Section titles in one line on mobile - left aligned */
  .split-header-col.left,
  .testimonials-header .laba-text-block.headlines {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 0.4rem;
    justify-content: flex-start;
    text-align: left;
  }
  
  .split-header-col.left .laba-title,
  .testimonials-header .laba-title {
    font-size: 2rem;
    white-space: nowrap;
  }
  
  /* === FAQ MOBILE - Hide call/write buttons === */
  .faq-actions .flux-btn--white {
    display: none;
  }
  
  .faq-helper-text {
    display: none;
  }
  
  /* === BOOKING/CALENDARS MOBILE - 1 column === */
  .calendars-grid-container {
    display: grid;
    grid-template-columns: 1fr !important;
    gap: 3rem;
    padding: 0 3vw;
    overflow-x: hidden;
  }
  
  .calendar-column {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .calendar-container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  /* Calendar navigation - smaller arrows to fit on mobile */
  .calendar-nav {
    padding: 0 0.5rem;
  }
  
  .calendar-nav-btn {
    width: 28px !important;
    height: 28px !important;
    font-size: 1rem !important;
    flex-shrink: 0;
  }
  
  .calendar-month-name {
    font-size: 1rem !important;
    min-width: auto !important;
  }
  
  /* Calendar dates row - no borders, more space */
  .calendar-dates-row {
    gap: 0.5rem;
    justify-content: space-between;
  }
  
  .calendar-date-field {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0.3rem 0 !important;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
  
  .calendar-date-field:first-child {
    align-items: flex-start;
  }
  
  .calendar-date-field:last-child {
    align-items: center;
  }
  
  .calendar-date-field.filled {
    border: none !important;
    box-shadow: none !important;
  }
  
  .calendar-info-label {
    font-size: 0.65rem !important;
  }
  
  .calendar-info-value {
    font-size: 0.85rem !important;
  }
  
  /* Calendar day prices - bigger on mobile (60% of day height) */
  .calendar-day .day-number {
    font-size: 0.65rem !important;
    top: 2px;
    left: 3px;
  }
  
  .calendar-day.available .day-price,
  .calendar-day.promo .day-price {
    font-size: 0.75rem !important;
    font-weight: 500 !important;
    bottom: 2px;
    right: 3px;
    line-height: 1;
  }
  
  .booking-header-grid {
    flex-direction: column !important;
    gap: 1rem;
    margin-top: 4rem;
    margin-bottom: 2rem;
  }
  
  /* Calendar price section - button on separate line */
  .calendar-price-section > div:first-child {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1rem !important;
  }
  
  .calendar-price-section .flux-btn {
    width: 100% !important;
    white-space: normal !important;
  }
  
  .booking-header-left,
  .booking-header-right {
    width: 100% !important;
  }
  
  .booking-header-title {
    font-size: 2.5rem !important;
    white-space: nowrap;
  }
  
  /* Tytuł w jednej linii na mobile */
  .booking-header-left {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0 0.5rem;
  }
  
  /* === CONTACT MOBILE - smaller header, 1 column === */
  .contact-header {
    font-size: 1.5rem;
    line-height: 1.3;
  }
  
  .contact-section {
    padding: 3rem 5vw;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  /* === FOOTER MOBILE - white background, padding === */
  .footer {
    background: #fff;
    color: var(--storm-foam);
    border-top: 1px solid #e5e5e5;
    padding: 2rem 5vw 1.5rem;
  }
  
  /* === APARTAMENTY KARTY MOBILE === */
  .apartments-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 3rem;
    overflow-x: hidden;
  }
  
  .apt-card {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .apt-image-wrapper {
    height: 300px;
    margin-bottom: 1.5rem;
  }
  
  .apt-stats-row {
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-start;
  }
  
  .apt-stat-item span {
    font-size: 0.75rem;
  }
  
  .apt-stat-item svg {
    width: 16px;
    height: 16px;
  }
  
  .apt-title {
    font-size: 1.75rem !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    margin-bottom: 1rem;
    line-height: 1.2;
    max-width: 100%;
    display: block;
  }
  
  .apt-desc {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
  }
  
  .apt-content {
    padding: 0 0.5rem;
  }
  
  /* Amenity cards mobile - smaller, prevent overflow */
  .amenity-card {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  
  .amenity-card-inner {
    padding: 0.8rem 1rem;
  }
  
  .amenity-grid {
    gap: 0.2rem 0.5rem;
  }
  
  .amenity-icon svg {
    width: 1.5rem;
    height: 1.5rem;
  }
  
  .amenity-title {
    font-size: 0.75rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    line-height: 1.2;
    max-width: 100%;
  }
  
  .amenity-desc {
    font-size: 0.7rem;
    word-wrap: break-word;
    line-height: 1.3;
  }
  
  .apt-actions {
    flex-direction: column;
    gap: 0.8rem;
  }
  
  .apt-actions .flux-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  
  .apt-meta {
    font-size: 0.7rem;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  
  .apt-meta span svg {
    width: 12px;
    height: 12px;
  }
  
  /* === KSIĘGA GOŚCI MOBILE - 1 column reviews === */
  #testimonials-container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  #testimonials-container .archive-actions {
    grid-column: span 1;
  }
  
  .quote-wide {
    grid-column: span 1;
  }
  
  /* Apartamenty buttons full width */
  .laba-section .cta-container {
    width: 100%;
    padding: 0 5vw;
  }
  
  .laba-section .cta-container .flux-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  
  /* === LOKALIZACJA MOBILE - 1 column header === */
  .location-header {
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
  }
  
  .location-title-col,
  .location-desc-col {
    width: 100%;
  }
  
  .location-title-col .laba-title {
    font-size: 3rem;
  }
  
  /* === KSIĘGA GOŚCI MOBILE - 1 column === */
  .testimonials-header {
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
  }
  
  .testimonials-header .laba-text-block {
    width: 100%;
  }
  
  /* Navigation mobile - only logo and hamburger */
  .navbar-container {
    justify-content: space-between;
  }
  
  .menu-toggle {
    display: flex !important;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    left: auto;
    width: 80%;
    max-width: 300px;
    height: 100vh;
    background-color: var(--canvas);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-xl) var(--space-md);
    box-shadow: var(--shadow-xl);
    transition: right var(--transition-base);
    z-index: calc(var(--z-navbar) - 1);
  }
  
  .nav-menu.active {
    right: 0;
    left: auto;
  }
  
  /* Hide desktop-only nav CTA on mobile */
  .nav-menu .nav-cta {
    display: none;
  }
  
  /* Bento grid mobile */
  .bento-card.large {
    grid-column: span 1;
    aspect-ratio: 4 / 3;
  }
  
  /* Hero mobile */
  .hero {
    min-height: 500px;
  }
  
  .hero-content {
    padding: var(--space-sm);
  }
  
  .scroll-indicator {
    bottom: var(--space-md);
  }
}

/* Small mobile */
@media (max-width: 480px) {
  :root {
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
  }
  
  section {
    padding: var(--space-xl) 0;
  }
  
  .btn {
    padding: 0.875rem 2rem;
    font-size: 0.9375rem;
  }
  
  .luxury-item {
    flex: 0 0 90vw;
    max-width: 90vw;
    height: 300px;
  }
  
  .location-title-col .laba-title {
    font-size: 2.5rem;
  }
}

/* ===== STICKY PHONE BUTTON - MAP ESCAPE MODE (Mobile only) ===== */
@media (max-width: 768px) {
  .sticky-phone-btn.map-escape-mode {
    background: #fff !important;
    color: #000 !important;
    border: 1px solid #000 !important;
  }
  
  .sticky-phone-btn.map-escape-mode:hover,
  .sticky-phone-btn.map-escape-mode:active {
    background: #000 !important;
    color: #fff !important;
  }
}
/* === POOL SECTION MOBILE FIX === */
@media (max-width: 768px) {
  .laba-section.pool-section {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  
  .pool-section .pool-header {
    padding-left: 20px;
    padding-right: 20px;
  }

  .pool-image-container .luxury-item {
    max-width: 100%;
    flex: 0 0 100%;
    border-radius: 0;
  }
}
