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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #1a1a1a;
    min-height: 100vh;
    color: #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

header {
    position: relative;
    background-image: url('imagins/OVOA8674.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: 0 1px 10px rgba(255, 255, 255, 0.08);
    width: 100vw;
    margin-left: calc(50% - 50vw);
}

header h1 {
    position: relative;
    z-index: 2;
}

header h1 a {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    font-family: 'Idiqlat', cursive, sans-serif;
    background: linear-gradient(90deg, #ffffff 0%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
    display: inline-block;
   
    -webkit-text-stroke: 0.5px black;
}

header h1 a:hover {
    text-decoration: none;
}

.books-gallery {
    width: min(1100px, 100%);
    padding: 2rem 1.5rem;
    text-align: center;
}

.books-gallery h2 {
    margin-bottom: 1.25rem;
    color: #ffffff;
    font-size: 1.6rem;
}

.books-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.25rem;
}

.book-card {
    display: block;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 250ms ease, box-shadow 250ms ease;
}

.book-card.is-missing {
    display: none;
}

.book-card:hover,
.book-card:focus-visible {
    transform: translateY(-5px);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.45);
}

.book-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.books-empty {
    display: none;
    margin-top: 1rem;
    color: #999999;
    font-size: 0.9rem;
}



.full-width-image {
    width: 800px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 2rem auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    object-fit: cover;
    object-position: center;
}

section {
    position: relative;
    background: rgba(26, 26, 26, 0.3);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.05);
    overflow: hidden;
}



section p {
    line-height: 1.7;
    color: #b0b0b0;
    position: relative;
    z-index: 1;
}



/* ===== PANORAMA SECTION ===== */
.panorama-container {
    position: relative;
    width: 100vw;
    max-width: none;
    margin-left: calc(50% - 50vw);
    height: 70vh;
    overflow: hidden;
    touch-action: pan-y;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Obraz warehouse.jpg - większy od kontenera, wystaje poza krawędzie */
.panorama-viewport {
    position: absolute;
    width: 115%;
    max-width: none;
    height: 100%;
    top: 0;
    left: 50%;
    object-fit: cover;
    object-position: center center;
    will-change: transform;
    transition: transform 650ms ease;
    transform: translateX(-50%);
    z-index: 1;
}

/* Niewidoczne strefy hover (przezroczyste, zajmują 1/3 szerokości) */
.interactive-area {
    position: absolute;
    width: 33.333%;
    height: 100%;
    top: 0;
    z-index: 10;
    cursor: pointer;
    pointer-events: auto;
}

.left-area { left: 0; }
.center-area { left: 33.333%; }
.right-area { left: 66.666%; }

/* Overlaye z treścią - pojawiają się w swojej strefie */
.content-overlay {
    position: absolute;
    width: 33.333%;
    height: 100%;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 600ms ease;
    color: white;
    text-align: center;
    z-index: 3;
    pointer-events: none;
}

.left-overlay { left: 0; }
.center-overlay { left: 33.333%; }
.right-overlay { left: 66.666%; }

.content-overlay.active {
    opacity: 1;
}

/* Obraz PNG nad zdjęciem */
.overlay-image {
    max-width: 80%;
    max-height: 60%;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.7));
    margin-bottom: 15px;
    transition: opacity 600ms ease;
}

.overlay-title {
    margin: 0 0 10px;
    font-size: 1.4rem;
    font-weight: 600;
    transition: opacity 600ms ease;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.overlay-description {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 90%;
    transition: opacity 600ms ease;
}



/* Mobile touch support */
@media (hover: none) and (max-width: 768px) {
    .panorama-container {
        width: 100%;
        min-height: 300px;
        height: min(60vh, 520px);
        margin-left: 0;
        border-radius: 0;
    }

    .panorama-viewport {
        width: 115%;
        height: 100%;
        object-position: center center;
    }
    
    .overlay-title {
        font-size: 1.2rem;
    }
    
    .overlay-description {
        font-size: 0.9rem;
    }
    
    .prev-btn, .next-btn {
        padding: 6px 12px;
        font-size: 0.75rem;
    }
    
    .overlay-buttons {
        bottom: 10px;
    }
}

footer {
    text-align: center;
    padding: 2rem;
    background: rgba(40, 40, 40, 0.8);
    backdrop-filter: blur(15px);
    margin-top: auto;
    color: #888888;
    font-size: 0.9rem;
    box-shadow: 0 -1px 10px rgba(255, 255, 255, 0.08);
    width: 100%;
}

/* ===== BOOKING PANEL ===== */
.booking-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 33.33%;
    z-index: 15;
    
    /* Initially hidden */
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    
    /* Smooth transition */
    transition: opacity 400ms ease, transform 400ms ease, visibility 400ms ease;
    
    /* Semi-transparent overlay style */
    background: rgba(15, 15, 15, 0.45);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-left: 1px solid rgba(255, 255, 255, 0.18);
    
    /* Text color */
    color: #ffffff;
    
    /* Center content in panel */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Show panel on hover - desktop */
.right-area:hover ~ .booking-panel,
.booking-panel:hover {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

/* Mobile: controlled by JS via .visible class */
.booking-panel.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

.booking-container {
    width: 100%;
    max-width: 100%;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

/* Calendar Container */
.calendar-container {
    background: rgba(15, 15, 15, 0.3);
    border-radius: 0;
    border: none;
    width: 100%;
    max-width: 100%;
    transform: scale(0.85);
    transform-origin: center;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.current-month {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.calendar-nav {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    pointer-events: auto;
}

.calendar-nav:hover {
    background: rgba(255, 255, 255, 0.2);
}

.calendar-nav:active {
    background: rgba(255, 255, 255, 0.1);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    text-align: center;
    width: 100%;
}

.calendar-weekdays span {
    color: #cccccc;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 6px 0;
    text-transform: uppercase;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    width: 100%;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.7rem;
    cursor: default;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    color: #e0e0e0;
    pointer-events: none;
}

.calendar-day:hover:not(.disabled):not(.selected):not(.today) {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}



.calendar-day.today:hover {
    background: rgba(229, 69, 155, 0.4);
}

.calendar-day.selected {
    background: linear-gradient(135deg, #e5459b, #9d00ff);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(229, 69, 155, 0.4);
}

.calendar-day.disabled {
    color: #555555;
    cursor: not-allowed;
    background: transparent;
    opacity: 0.5;
}

.calendar-day.other-month {
    color: #666666;
    opacity: 0.5;
}





/* Mobile touch support for booking panel */
@media (hover: none) and (max-width: 768px) {
    .booking-panel {
        /* On mobile, show full width when visible */
        width: 100%;
        right: 0;
        left: 0;
        /* Override transform for mobile */
        transform: translateX(0);
    }
    
    .booking-panel:not(.visible) {
        transform: translateX(100%);
    }
    
    .booking-panel.visible {
        transform: translateX(0);
    }
    
    .booking-container {
        padding: 6px;
    }
    
    .calendar-container {
        transform: scale(0.9);
    }
    
    .calendar-weekdays {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .calendar-days {
        grid-template-columns: repeat(5, 1fr);
        gap: 2px;
    }
    
    .calendar-day {
        font-size: 0.7rem;
    }
    
    .calendar-nav {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
    }
}

.calendar-day.busy {
  position: relative;
  background: #eeeeee;
  color: #8a8a8a;
  opacity: 0.7;
  cursor: not-allowed;
    border-radius: 0;
}

.calendar-day.busy::before,
.calendar-day.busy::after {
  content: "";
  position: absolute;
  left: 8%;
  top: 49%;
  width: 84%;
  height: 2px;
  background: #b32daf;
}

.calendar-day.busy::before {
    transform: rotate(45deg);
}

.calendar-day.busy::after {
  transform: rotate(-45deg);
}

.calendar-day.busy:hover {
  transform: none;
}