/*** ARCHIVE APTEKI ***/

/* --- CONTAINER OGRANICZONY DO 1200PX --- */
.archive-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- Breadcrumbs w archiwum --- */
.archive-breadcrumbs-wrapper {
    display: flex;
    justify-content: center;
    background: #F3F3F3;
    padding: 10px 0;
    margin-bottom: 20px;
}

.archive-breadcrumbs {
    width: 1200px;
    font-size: 14px;
    color: #666;
    padding: 5px 15px;
}

.archive-breadcrumbs a {
    color: #007bff;
    text-decoration: none;
}

.archive-breadcrumbs a:hover {
    text-decoration: underline;
}

/* --- Wyśrodkowanie nagłówka h1 w archive-apteki.php --- */
.archive-header {
    text-align: center;
    margin-bottom: 20px;
}

.archive-title {
    font-size: 2rem;
    font-weight: bold;
    padding: 45px 0;
}

/* --- GRID 4 KOLUMNY --- */
.apteki-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

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

@media (max-width: 768px) {
    .apteki-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

/* --- ELEMENT APTEKI --- */
.apteka-item {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s;
    position: relative;
}

.apteka-item:hover {
    transform: scale(1.03);
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

/* --- GRAFIKA KWADRATOWA --- */
.apteka-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    border-radius: 10px 10px 0 0;
}

/* --- OVERLAY NA GRAFICE --- */
.apteka-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Ciemne przyciemnienie */
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px 10px 0 0;
}

/* --- LOGO W OKRĘGU NA ŚRODKU (150x150px) --- */
.apteka-logo-archive {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid #fff;
    /* background: rgba(255, 255, 255, 0.9);*/
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.apteka-logo-archive img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

/* --- NAZWA I ADRES POD GRAFIKĄ --- */
.apteka-content {
    /* padding: 15px; */
	padding: 15px 13px;
}

/* --- NAZWA I ADRES POD GRAFIKĄ (GRID) --- */
.apteka-grid-title {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 5px;
}

.apteka-grid-title a {
    text-decoration: none;
    color: inherit; /* Domyślny kolor motywu */
}

.apteka-grid-title a:hover {
    text-decoration: underline;
}

/* --- ADRES POD NAZWĄ (GRID) --- */
.apteka-grid-address {
    /* font-size: 1rem; */
    font-size: 0.9em;
    line-height: 1em;
	color: #777;
}

/* --- Paginacja --- */
.pagination {
    text-align: center;
    margin-top: 20px;
}

/* --- POPRAWKI RESPONSYWNOŚCI (dla mniejszych ekranów) --- */
@media (max-width: 480px) {
    .apteka-logo-archive {
        width: 90px;
        height: 90px;
        border: 3px solid #fff;
    }

    .apteka-logo-archive img {
        width: 75%;
        height: 75%;
    }
}



/*** SINGLE APETKA ***/

/* --- BREADCRUMBS --- */
.apteka-breadcrumbs-wrapper {
    display: flex;
    justify-content: center;
    background: #F3F3F3;
    padding: 10px 0;
}

.apteka-breadcrumbs {
    width: 1200px;
    font-size: 14px;
    color: #666;
    padding: 5px 15px;
    margin: 10px 0;
}

.apteka-breadcrumbs a {
    color: #007bff;
    text-decoration: none;
}

.apteka-breadcrumbs a:hover {
    text-decoration: underline;
}

/* --- LINK POWROTU --- */
.apteka-back-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.apteka-back {
    display: inline-block;
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
    font-size: 16px;
    margin: 10px 0;
}

.apteka-back:hover {
    color: #0056b3;
}

/* --- BANER Z GRAFIKĄ GŁÓWNĄ --- */
.apteka-header {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.apteka-banner {
    position: relative;
    width: 1200px;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
}

.apteka-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- OVERLAY NA BANERZE --- */
.apteka-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
    color: #fff;
}

/* --- LOGO W OKRĘGU --- */
.apteka-logo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 4px solid #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px; /* Wyśrodkowanie i odstęp od tekstu */
}

.apteka-logo img {
    width: 80%;
    height: 80%;
    object-fit: contain;
}

/* --- TEKST NA BANERZE --- */
.apteka-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 5px;
}

.apteka-address {
    font-size: 28px;
    font-weight: normal;
}

/* --- Ustawienie szerokości kontentu w single-apteki.php --- */
.apteka-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0px;
}

/* --- WYŚRODKOWANIE TEKSTÓW POD BANEREM --- */
.apteka-content {
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- INFORMACJE KONTAKTOWE --- */
.apteka-contact-info {
    text-align: center;
    font-size: 18px;
}

.apteka-contact-info p {
    margin: 10px 0;
}

/* --- IKONY --- */
.apteka-contact-info i {
    margin-right: 8px;
    color: #007bff;
    font-size: 20px;
}

/* --- GODZINY OTWARCIA --- */
.apteka-content h2 {
    font-size: 24px;
    margin-top: 20px;
}

/* --- PRZYCISK "WYZNACZ TRASĘ" --- */
.apteka-map-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #007bff;
    color: white;
    padding: 12px 20px;
    margin-top: 20px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 18px;
    transition: background 0.3s;
    width: 200px;
    margin: 20px auto 0;
}

.apteka-map-btn i {
    margin-right: 8px;
}

.apteka-map-btn:hover {
    background: #0056b3;
}

/* --- RESPONSYWNOŚĆ --- */
@media (max-width: 1024px) {
    .apteka-banner {
        width: 100%;
        height: 350px;
    }

    .apteka-title {
        font-size: 30px;
    }

    .apteka-address {
        font-size: 22px;
    }

    .apteka-logo {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 768px) {
    .apteka-banner {
        width: 100%;
        height: 300px;
    }

    .apteka-title {
        font-size: 28px;
    }

    .apteka-address {
        font-size: 20px;
    }

    .apteka-logo {
        width: 100px;
        height: 100px;
    }

    .apteka-contact-info {
        font-size: 16px;
    }

    .apteka-content {
        padding: 20px;
    }

    .apteka-map-btn {
        width: auto;
        padding: 10px 15px;
        font-size: 16px;
    }
}





/* --- SEKCJA "INNE APTEKI W REGIONIE" --- */
.inne-apteki-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Dynamiczne kolumny */
    gap: 20px;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- Obsługa 4 lub 5 kolumn na desktopie --- */
body.apteki-kolumny-5 .inne-apteki-grid {
    grid-template-columns: repeat(5, 1fr);
}

body.apteki-kolumny-4 .inne-apteki-grid {
    grid-template-columns: repeat(4, 1fr);
}

/* --- Poprawka dla średnich ekranów (tablety) --- */
@media (max-width: 1024px) {
    .inne-apteki-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 kolumny na tabletach */
    }
}

/* --- Poprawka dla małych ekranów (telefony) --- */
@media (max-width: 768px) {
    .inne-apteki-grid {
        grid-template-columns: 1fr !important; /* Wymuszenie jednej kolumny */
    }
}


/* --- SEKCJA "INNE APTEKI W REGIONIE" --- */
.inne-apteki-title {
    font-size: 2rem;
    font-weight: bold;
    text-align: center;
    color: #333;
    margin: 50px auto 20px auto;
}



/**** FORMULARZ DODANIA APTEKI ***/

/* --- Formularz dodawania apteki --- */
.container {
    /* max-width: 600px; */
    margin: 0 auto;
    padding: 20px;
}

.form-title {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
}

form {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: bold;
    margin-top: 10px;
}

input, textarea, button {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

input[type="file"] {
    border: none;
}

button {
    margin-top: 15px;
    padding: 10px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background: #0056b3;
}

.success {
    color: green;
    text-align: center;
    font-weight: bold;
    margin-bottom: 15px;
}



/* --- Sekcja dyżurów apteki --- */
.apteka-dyzury {
    background: #ffdd57;
    padding: 10px;
    margin-top: 15px;
    font-size: 16px;
    font-weight: bold;
    text-align: center;
    border-radius: 5px;
}

/* --- Styl dla dzisiejszego dyżuru (zielone tło) --- */
.apteka-dyzury-today {
    background: #28a745;
    color: #fff;
    padding: 15px;
}

/* --- LABEL DYZUR (NA GÓRZE OVERLAYA) --- */
.apteka-dyzur-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #28a745;
    color: #fff;
    font-size: 12px;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 4px;
    text-transform: uppercase;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 2; /* Najwyższa warstwa */
}

/* --- LABEL DYZUR DZIŚ (ZIELONY) --- */
.dyzur-dzis {
    background: #28a745; /* Zielony */
}

/* --- LABEL DYZUR JUTRO (ŻÓŁTY) --- */
.dyzur-jutro {
    background: #ffc107; /* Żółty */
    left: auto;
    right: 10px; /* Umieszczamy po prawej stronie */
}

/* --- Poprawki responsywne --- */
@media (max-width: 768px) {
    .apteka-dyzur-label {
        font-size: 10px;
        padding: 4px 8px;
    }
}


/*** AJAX ZGLOSZENIA ***/

/* --- Przycisk zgłaszania problemu --- */
.apteka-zglos-btn {
    background: #dc3545;
    color: #fff;
    padding: 10px 15px;
    border: none;
    cursor: pointer;
    margin-top: 20px;
    display: block;
    width: 100%;
    text-align: center;
    border-radius: 5px;
}

.apteka-zglos-btn:hover {
    background: #c82333;
}

/* --- Link "Zgłoś problem / błąd" --- */
.apteka-zglos-link {
    font-size: 11px;
    text-align: right;
    margin-top: 10px;
}

.apteka-zglos-link a {
    text-decoration: none;
    color: #777;
}

.apteka-zglos-link a:hover {
    text-decoration: underline;
    color: #000;
}

/* --- Modal zgłoszeń --- */
.zglos-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.zglos-modal-content {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    width: 400px;
    text-align: center;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
}





