/* Frontend Styles for Standorte Map - Based on Mission Testimonials Design */

:root {
    --contrast: #000000;
    --contrast-2: #575760;
    --contrast-3: #b2b2be;
    --base: #f0f0f0;
    --base-2: #f7f8f9;
    --base-3: #ffffff;
    --accent: #759e41;
    --accent-1: #d3dec4;
    --pagehero-green: #759E41;
    --pagehero-white: #FFFFFF;
    --pagehero-black: #000000;
}

/* Main Container */
.standorte-map-container {
    margin: 40px auto;
    width: 100%;
    max-width: 1200px;
    padding: 0 20px;
    box-sizing: border-box;
}

.standorte-map-wrapper {
    background-color: var(--base-2);
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* SVG Map Styles */
#mapka {
    width: 100%;
    height: auto;
    max-width: 100%;
    transition: transform 0.3s ease;
}

/* Region Styles */
#regiony path {
    transition: all 0.3s ease;
    cursor: pointer;
}

#regiony path:hover {
    fill: var(--pagehero-green) !important;
    transform-origin: center;
}

#regiony path.highlighted {
    fill: var(--pagehero-green) !important;
}

#tooltip {
    position: absolute;
    background: linear-gradient(135deg, var(--pagehero-green) 0%, #638536 100%);
    color: var(--pagehero-white);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(117, 158, 65, 0.3);
    backdrop-filter: blur(10px);
    pointer-events: none;
    z-index: 1000;
    transform: translateY(-5px);
}

#tooltip:after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: var(--pagehero-green);
}

#tooltip.show {
    opacity: 1;
    visibility: visible;
}

.standorte-modal {
    display: none;
    justify-content: center;
    align-items: center;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.standorte-modal-content {
    position: relative;
    margin: 0 auto;
    padding: 0;
    width: 80%;
    max-width: 900px;
    background-color: #FFFFFF;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(117, 158, 65, 0.15);
    overflow: hidden;
    max-height: 90vh;
    overflow-y: auto;
}

/* Przycisk zamknij X */
.standorte-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--pagehero-white);
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    z-index: 10002;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.standorte-modal-close:hover,
.standorte-modal-close:focus {
    background: rgba(255, 255, 255, 0.3);
    color: var(--pagehero-white);
    text-decoration: none;
    transform: scale(1.1);
}

.standorte-modal-header {
    background: linear-gradient(135deg, var(--pagehero-green) 0%, #638536 100%);
    color: var(--pagehero-white);
    padding: 24px 28px;
    position: relative;
}

.standorte-modal-header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="10" height="10" patternUnits="userSpaceOnUse"><circle cx="5" cy="5" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.3;
}

#standorte-modal-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    position: relative;
    z-index: 1;
    padding-right: 50px; /* Miejsce na przycisk X */
}

#standorte-modal-subtitle {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 500;
    position: relative;
    z-index: 1;
    margin: 0;
}

/* Modal Body */
.standorte-modal-body {
    padding: 28px;
}

#standorte-modal-description {
    line-height: 1.7;
    color: var(--contrast);
    font-size: 16px;
    margin-bottom: 24px;
}

/* Gallery Styles */
#standorte-modal-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

#standorte-modal-gallery img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

#standorte-modal-gallery img:hover {
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

/* Responsive Design */
@media (max-width: 768px) {
    .standorte-map-container {
        margin: 20px auto;
        padding: 0 15px;
    }
    
    .standorte-map-wrapper {
        padding: 20px;
    }
    
    .standorte-modal-content {
        width: 90%;
    }
    
    .standorte-modal-close {
        top: 12px;
        right: 15px;
        font-size: 24px;
        width: 26px;
        height: 26px;
    }
    
    .standorte-modal-header {
        padding: 20px;
    }
    
    #standorte-modal-title {
        font-size: 20px;
        padding-right: 45px;
    }
    
    #standorte-modal-subtitle {
        font-size: 14px;
    }
    
    .standorte-modal-body {
        padding: 20px;
    }
    
    #standorte-modal-gallery {
        grid-template-columns: 1fr;
    }
    
    #tooltip {
        font-size: 11px;
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .standorte-map-container {
        margin: 15px auto;
        padding: 0 10px;
    }
    
    .standorte-map-wrapper {
        padding: 15px;
    }
    
    .standorte-modal-content {
        width: 95%;
        margin: 5% auto;
    }
    
    .standorte-modal-close {
        top: 10px;
        right: 12px;
        font-size: 22px;
        width: 24px;
        height: 24px;
    }
    
    .standorte-modal-header {
        padding: 15px;
    }
    
    #standorte-modal-title {
        font-size: 18px;
        padding-right: 40px;
    }
    
    .standorte-modal-body {
        padding: 15px;
    }
    
    #tooltip {
        font-size: 10px;
        padding: 5px 10px;
    }
}

/* Loading Animation */
.standorte-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(117, 158, 65, 0.3);
    border-radius: 50%;
    border-top-color: var(--pagehero-green);
}