/**
 * Offizone Floor Plans CSS
 */

/* ==========================================================================
   FIXED HEADER SCROLL OFFSET
   ========================================================================== */
html {
    scroll-padding-top: 118px;
}

@media (max-width: 768px) {
    html {
        scroll-padding-top: 80px;
    }
}

/* ==========================================================================
   FLOOR SECTION LAYOUT - nadpis+legenda vľavo, pôdorys vpravo
   ========================================================================== */
.offizone-floor {
    margin-bottom: 60px;
}

.offizone-floor-row {
    display: flex;
    align-items: flex-start;
    gap: 40px;
    margin-bottom: 40px;
}

.offizone-floor-left {
    flex: 0 0 220px;
}

.offizone-floor-right {
    flex: 1;
}

@media (max-width: 900px) {
    .offizone-floor-row {
        flex-direction: column;
    }
    .offizone-floor-left {
        flex: none;
        width: 100%;
    }
}

/* ==========================================================================
   ACCORDION
   ========================================================================== */
.offizone-floor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 15px 0;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 0;
    user-select: none;
}

.offizone-floor-header h3 {
    margin: 0;
}

.offizone-accordion-icon {
    width: 24px;
    height: 24px;
    position: relative;
    flex-shrink: 0;
}

.offizone-accordion-icon::before,
.offizone-accordion-icon::after {
    content: '';
    position: absolute;
    background: #333;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: transform 0.3s;
}

.offizone-accordion-icon::before {
    width: 16px;
    height: 2px;
}

.offizone-accordion-icon::after {
    width: 2px;
    height: 16px;
}

.offizone-floor.active .offizone-accordion-icon::after {
    transform: translate(-50%, -50%) rotate(90deg);
    opacity: 0;
}

.offizone-floor-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.offizone-floor.active .offizone-floor-content {
    overflow: visible;
}

/* ==========================================================================
   LEGEND
   ========================================================================== */
.offizone-legend {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
}

.offizone-legend li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.offizone-legend-color {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    flex-shrink: 0;
}

.offizone-legend-color.available { background: #96bb73; }
.offizone-legend-color.occupied { background: #dd6d5b; }
.offizone-legend-color.meeting { background: #8490c7; }
.offizone-legend-color.reception { background: #e3d2bc; }
.offizone-legend-color.office-corner { background: #a7b6be; }

/* ==========================================================================
   FLOORPLAN + SVG
   ========================================================================== */
.offizone-floorplan-wrap {
    position: relative;
}

.offizone-floorplan-wrap img {
    display: block;
    width: 100%;
    height: auto;
}

.offizone-floorplan-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.offizone-area {
    cursor: pointer;
    transition: opacity 0.2s;
    stroke-width: 2;
}

.offizone-area:hover {
    opacity: 0.7;
}

.offizone-floor-group:hover .offizone-area {
    opacity: 0.7;
}

.offizone-area.available { fill: rgba(150, 187, 115, 0.5); stroke: #96bb73; }
.offizone-area.occupied { fill: rgba(221, 109, 91, 0.5); stroke: #dd6d5b; }
.offizone-area.meeting { fill: rgba(132, 144, 199, 0.5); stroke: #8490c7; }
.offizone-area.reception { fill: rgba(227, 210, 188, 0.5); stroke: #e3d2bc; }
.offizone-area.office-corner { fill: rgba(167, 182, 190, 0.5); stroke: #a7b6be; }

.offizone-area-label {
    pointer-events: none;
    text-anchor: middle;
    dominant-baseline: middle;
    font-size: 18px;
    font-weight: 600;
    fill: #333;
}

/* ==========================================================================
   OFFICES GRID
   ========================================================================== */
.offizone-offices-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

@media (max-width: 992px) {
    .offizone-offices-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .offizone-offices-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   OFFICE CARD
   ========================================================================== */
.offizone-office-card {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.offizone-office-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.offizone-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.offizone-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.offizone-card-content {
    padding: 15px;
}

/* ==========================================================================
   STATUS BADGE
   ========================================================================== */
.offizone-status-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 5px 12px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.offizone-status-badge.available { background: #96bb73; color: #fff; }
.offizone-status-badge.occupied { background: #dd6d5b; color: #fff; }

/* ==========================================================================
   MODAL
   ========================================================================== */
.offizone-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.offizone-modal-overlay.active {
    display: flex;
}

.offizone-modal {
    background: #fff;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.offizone-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    cursor: pointer;
    font-size: 24px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.offizone-modal-close:hover {
    background: #c9a86c;
    color: #fff;
}

.offizone-modal-image {
    position: relative;
}

.offizone-modal-image img {
    display: block;
    width: 100%;
    height: auto;
}

.offizone-modal-image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px 25px 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 70%, transparent 100%);
    color: #fff;
}

.offizone-modal-info-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 20px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(4px);
    font-size: 14px;
    color: #fff;
}

.offizone-modal-info-bar h3 {
    margin: 0;
    color: #fff !important;
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
}

.offizone-modal-info-details {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* ==========================================================================
   CTA BUTTON
   ========================================================================== */
.offizone-btn-primary {
    display: inline-block;
    padding: 12px 25px;
    background: #c9a86c;
    color: #fff;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: background 0.2s;
}

.offizone-btn-primary:hover {
    background: #1a1a1a;
    color: #fff;
}

/* ==========================================================================
   GALLERY HOVER ZOOM
   ========================================================================== */
.elementor-image-gallery .gallery-icon {
    overflow: hidden;
}

.elementor-image-gallery .gallery-icon img {
    transition: transform 0.4s ease;
}

.elementor-image-gallery .gallery-icon:hover img {
    transform: scale(1.1);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 768px) {
    .offizone-area-label {
        font-size: 12px;
    }

    .offizone-modal-image-overlay {
        position: static;
        background: #7A3360;
        padding: 15px 20px;
    }

    .offizone-modal-info-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 0;
        background: none;
        backdrop-filter: none;
    }

    .offizone-modal-info-bar h3 {
        font-size: 18px;
    }

    .offizone-modal-info-details {
        gap: 12px;
        font-size: 13px;
    }

    .gallery {
        display: flex !important;
        flex-wrap: wrap !important;
        gap: 10px !important;
        padding: 0 10px !important;
    }

    .gallery .gallery-item {
        width: calc(50% - 5px) !important;
        max-width: calc(50% - 5px) !important;
        padding: 0 !important;
        margin: 0 !important;
    }
}
