/* style-page.css - Style dla podstron schronisk */

/* =============================================
   MAPA
   ============================================= */
.shelter-map-section {
    width: 100%;
    padding: 0;
    margin: 0;
}

.shelter-map {
    width: 100%;
    height: 400px;
    min-height: 300px;
    background: #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

@media (max-width: 768px) {
    .shelter-map {
        height: 300px;
    }
}

/* =============================================
   META INFORMACJE (pasmo · wysokość)
   ============================================= */
.shelter-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin: 0.75rem 0 1.5rem;
    font-size: 0.95rem;
    color: var(--text-muted, #6b7280);
}

.shelter-meta .pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
}

.shelter-meta .meta-sep {
    color: #9ca3af;
    margin: 0 0.25rem;
}

/* =============================================
   DIVIDER (linia pozioma)
   ============================================= */
.divider {
    height: 1px;
    background: #e5e7eb;
    margin: 1.5rem 0;
    border: none;
}

/* =============================================
   GRID: LOGO + TABELA
   ============================================= */
.shelter-details-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

@media (min-width: 768px) {
    .shelter-details-grid {
        grid-template-columns: 300px 1fr;
        align-items: start;
    }
}

.shelter-logo {
    width: 100%;
}

.shelter-logo img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    background: #f9fafb;
}

.shelter-table {
    width: 100%;
}

.shelter-stats {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.shelter-stats th,
.shelter-stats td {
    padding: 0.625rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #f3f4f6;
}

.shelter-stats th {
    font-weight: 600;
    color: #374151;
    width: 40%;
}

.shelter-stats td {
    color: #4b5563;
}

.shelter-stats tr:last-child th,
.shelter-stats tr:last-child td {
    border-bottom: none;
}

/* =============================================
   OPIS SCHRONISKA
   ============================================= */
.shelter-description {
    margin: 1.5rem 0;
    line-height: 1.7;
    color: #374151;
}

.shelter-description p {
    margin: 0 0 1rem;
}

.shelter-description p:last-child {
    margin-bottom: 0;
}

/* =============================================
   GALERIA ZDJĘĆ
   ============================================= */
.shelter-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.gallery-item {
    margin: 0;
    overflow: hidden;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.2s ease;
    cursor: pointer;
}

.gallery-item img:hover {
    transform: scale(1.03);
}

/* =============================================
   LIGHTBOX (POPUP ZDJĘĆ)
   ============================================= */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox[hidden] {
    display: none;
}

.lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 0.25rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* =============================================
   RESPANSYWNOŚĆ
   ============================================= */
@media (max-width: 640px) {
    .shelter-meta {
        font-size: 0.875rem;
    }

    .shelter-stats th,
    .shelter-stats td {
        padding: 0.5rem;
        font-size: 0.875rem;
    }

    .gallery-item img {
        height: 160px;
    }
}