/* Ważne Punkty (SOS/Urzędy) - Premium Design Settings */

:root {
    --sos-primary: #1e3a8a;
    --sos-secondary: #3b82f6;
    --sos-accent: #fbbf24;
    --sos-bg: #f8fafc;
    --sos-card-bg: #ffffff;
    --sos-text: #1e293b;
    --sos-text-muted: #64748b;
    --sos-border: #e2e8f0;
    --sos-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

.sos-wrapper {
    background-color: var(--sos-bg);
    padding-bottom: 80px;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--sos-text);
}

/* Hero Section */
.sos-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    padding: 80px 0 120px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.sos-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, var(--sos-bg), transparent);
}

.sos-header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: -2px;
    line-height: 1.1;
}

.sos-header p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
    line-height: 1.6;
}

/* Anchor Navigation */
.sos-anchor-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: -30px;
    margin-bottom: 40px;
    position: sticky;
    top: 80px;
    /* Sticky below header */
    z-index: 100;
    padding: 15px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--sos-border);
}

.sos-anchor-link {
    background: white;
    border: 1px solid var(--sos-border);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    color: var(--sos-text);
    text-decoration: none;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sos-anchor-link i {
    color: var(--sos-secondary);
}

.sos-anchor-link:hover {
    transform: translateY(-2px);
    border-color: var(--sos-secondary);
    background: var(--sos-bg);
}

/* Category Sections */
.sos-category-section {
    margin-bottom: 60px;
    scroll-margin-top: 150px;
    /* Offset for sticky nav */
}

.sos-category-title {
    font-size: 24px;
    font-weight: 900;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--sos-primary);
    border-bottom: 2px solid var(--sos-border);
    padding-bottom: 10px;
}

.sos-category-title i {
    width: 45px;
    height: 45px;
    background: var(--sos-primary);
    color: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

/* Map hidden as requested */
.sos-map-section {
    display: none;
}

/* Result Grid */
.sos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
}

@media (max-width: 480px) {
    .sos-grid {
        grid-template-columns: 1fr;
    }
}

/* Result Grid -> List View */
.sos-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Institution List Item -> 3 Column Layout */
.sos-card {
    background: var(--sos-card-bg);
    border-radius: 20px;
    padding: 25px 30px;
    border: 1px solid var(--sos-border);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
    overflow: hidden;
}

.sos-card:hover {
    transform: translateX(8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border-color: var(--sos-secondary);
}

/* Col 1: Main Info (Title, Address, Masked Links) */
.sos-col-info {
    flex: 1.2;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding-right: 30px;
}

/* Col 2: Hours (Inline Grid) */
.sos-col-hours {
    flex: 1;
    padding: 0 40px;
    border-left: 1px solid #eef2f6;
    border-right: 1px solid #eef2f6;
}

/* Col 3: Actions (Buttons) */
.sos-col-actions {
    flex: 0.8;
    display: flex;
    justify-content: flex-end;
    padding-left: 30px;
}

/* Internal Elements */
.sos-card-icon {
    width: 65px;
    height: 65px;
    background: #f8fafc;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--sos-primary);
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.sos-card-content h3 {
    font-size: 21px;
    font-weight: 800;
    margin: 0 0 8px;
    line-height: 1.3;
    color: #1e293b;
}

.sos-status-badge {
    position: absolute;
    top: 20px;
    left: 30px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    z-index: 2;
}

/* Hours Grid Styling */
.hours-compact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 15px;
}

.hour-mini-row {
    font-size: 12px;
    display: flex;
    justify-content: space-between;
    color: #64748b;
}

.hour-mini-row.is-today {
    color: var(--sos-primary);
    font-weight: 800;
}

.day-label {
    font-weight: 700;
    min-width: 25px;
}

/* Actions Stack */
.sos-actions-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    max-width: 220px;
}

.sos-btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.sos-btn.btn-primary {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    color: white !important;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

.sos-btn.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(30, 58, 138, 0.3);
    filter: brightness(1.1);
}

.sos-btn.btn-outline {
    background: #ffffff;
    color: var(--sos-primary) !important;
    border: 2px solid var(--sos-primary);
}

.sos-btn.btn-outline:hover {
    background: var(--sos-primary);
    color: white !important;
}

/* Responsive fixes */
@media (max-width: 1200px) {
    .sos-card {
        flex-direction: column;
        align-items: stretch;
        padding: 40px 25px 25px;
    }

    .sos-col-info,
    .sos-col-hours,
    .sos-col-actions {
        padding: 0;
        border: none;
        flex: none;
        margin-bottom: 20px;
    }

    .sos-col-hours {
        padding: 15px 0;
        border-top: 1px solid #eef2f6;
        border-bottom: 1px solid #eef2f6;
    }

    .sos-col-actions {
        margin-bottom: 0;
        justify-content: center;
    }

    .sos-actions-stack {
        max-width: none;
        flex-direction: row;
    }
}

@media (max-width: 640px) {
    .sos-actions-stack {
        flex-direction: column;
    }

    .hours-compact-grid {
        grid-template-columns: 1fr;
    }
}

.masked-toggle {
    color: var(--sos-primary);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    border-bottom: 2px dashed rgba(var(--sos-primary-rgb), 0.3);
    transition: all 0.2s ease;
}

.masked-toggle:hover {
    color: var(--sos-secondary);
    border-bottom-color: var(--sos-secondary);
}

.sos-detail-value {
    color: var(--sos-text);
    font-weight: 800;
}

.sos-hours-list.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hour-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 12px;
    border-bottom: 1px solid #f1f5f9;
}

.hour-row.today {
    color: var(--sos-secondary);
    font-weight: 800;
}

/* SEO Friendly Hidden Components */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}