@charset "UTF-8";

/* --- GLOBALNE --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #121212; /* Dark Mode Background */
    color: #e0e0e0; /* Light Gray Text */
    margin: 0;
    padding: 0;
}

/* --- NAGŁÓWEK GŁÓWNY --- */
.top-header {
    background-color: #000;
    color: #fff;
    padding: 15px 0 12px 0;
    text-align: center;
}

.top-header a {
    color: #fff;
    text-decoration: none;
    font-size: 1.4em;
    font-weight: 300;
    letter-spacing: 1px;
    display: inline-block;
    transition: color 0.3s ease;
}

.top-header a:hover {
    color: #aaa;
}

/* --- DRUGI PASEK (SOCIAL & TOOLS) --- */
.sub-header {
    background-color: #1e1e1e;
    padding: 10px 0;
    display: flex;
    justify-content: center;
    gap: 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    margin-bottom: 25px;
    border-bottom: 1px solid #333;
}

.sub-header a {
    color: #bbb;
    text-decoration: none;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    font-weight: 400;
}

.sub-header a:hover {
    color: #fff;
}

/* --- KONTENER TREŚCI --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 20px 20px;
}

/* --- SIATKA (WIDOK GŁÓWNY) --- */
.gallery-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}

.gallery-item {
    background: #1e1e1e;
    padding: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
    width: 300px;
    text-align: center;
    border-radius: 4px;
    transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    border: 1px solid #333;
}

.gallery-item:hover {
    transform: translateY(-3px);
    background-color: #252525;
    box-shadow: 0 6px 12px rgba(0,0,0,0.5);
}

.gallery-item a {
    text-decoration: none;
    color: inherit;
    display: block;
    width: 100%;
}

.thumb-wrapper {
    width: 100%;
    height: 225px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 2px;
}

.thumb-wrapper img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.caption {
    text-align: left;
    border-top: 1px solid #333;
    padding-top: 10px;
}

.caption-title {
    font-weight: bold;
    display: block;
    margin-bottom: 4px;
    color: #fff;
}

.caption-desc {
    font-weight: normal;
    font-size: 0.9em;
    color: #aaa;
}

/* --- WIDOK SZCZEGÓŁOWY --- */
.photo-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
}

/* --- NAGŁÓWEK OPISU GALERII --- */
.gallery-info-card {
    background: #1e1e1e;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    border: 1px solid #333;
    border-radius: 2px;
    max-width: calc(100vh - 180px);
    width: 100%;
    text-align: center;
    margin-bottom: 15px;
}

.gallery-info-title {
    font-size: 1.6em;
    font-weight: 300;
    color: #fff;
    margin: 0 0 10px 0;
    letter-spacing: 1px;
}

.gallery-info-desc {
    font-size: 1em;
    color: #ccc;
    line-height: 1.5;
}

/* --- WPIS ZDJĘCIA --- */
.photo-entry {
    background: #1e1e1e;
    padding: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    max-width: calc(100vh - 180px);
    width: 100%;
    text-align: center;
    border: 1px solid #333;
}

/* Obrazy w galerii - kwadratowy obszar wyświetlania, mieści się na ekranie */
.photo-entry img {
    max-width: calc(100vh - 210px);
    max-height: calc(100vh - 210px);
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto 12px auto;
    border: 1px solid #000;
    object-fit: contain;
}

/* Media query dla małych ekranów (wysokość <= 900px) */
@media (max-height: 900px) {
    .photo-entry {
        max-width: calc(100vh - 140px);
        padding: 12px;
    }

    .photo-entry img {
        max-height: calc(100vh - 170px);
        max-width: calc(100vh - 170px);
        margin-bottom: 10px;
    }
}

/* Media query dla bardzo małych ekranów (wysokość <= 700px) */
@media (max-height: 700px) {
    .photo-entry {
        max-width: calc(100vh - 100px);
        padding: 10px;
    }

    .photo-entry img {
        max-height: calc(100vh - 130px);
        max-width: calc(100vh - 130px);
        margin-bottom: 8px;
    }

    .exif-data {
        padding: 10px;
        font-size: 0.75em;
    }
}

.exif-data {
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.8em;
    color: #ccc;
    text-align: center;
    line-height: 1.5;
    background: #121212;
    padding: 12px;
    border-top: 1px solid #333;
    border-radius: 2px;
}

.exif-row {
    display: block;
}

/* --- ZDJĘCIA PEŁNOEKRANOWE --- */
.fullscreen-capable {
    cursor: pointer;
}

/* --- LIGHTBOX (PEŁNOEKRANOWY WIDOK ZDJĘĆ) --- */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
}

.lightbox img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border: none;
}

/* =====================================================
   KALKULATORY OPTYCZNE (dof/*.php) — paleta Slate
   ===================================================== */

/* Tło strony — tylko dla stron z kalkulatorem */
body:has(.calc-card) {
    background: linear-gradient(160deg, #0c1422 0%, #111827 55%, #0e1628 100%);
}

.container.calc-offset {
    margin-top: 60px;
}

/* Główna karta */
.calc-card {
    background: rgba(100, 140, 220, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(120, 160, 240, 0.12);
    border-radius: 16px;
    padding: 36px;
    box-shadow:
        0 24px 48px rgba(0, 10, 30, 0.7),
        inset 0 1px 0 rgba(160, 200, 255, 0.08);
    max-width: 620px;
    width: 100%;
    margin: 0 auto;
    color: #dde5f4;
}

/* Nagłówek karty */
.calc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(120, 160, 240, 0.10);
}

.calc-title {
    font-size: 1.3em;
    font-weight: 400;
    color: #e8f0ff;
    letter-spacing: 0.2px;
    margin-bottom: 5px;
    line-height: 1.3;
}

.calc-subtitle {
    font-size: 0.82em;
    color: #4a5e7e;
    line-height: 1.5;
}

/* Badge trybu (dof_makro.php) */
.calc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.7em;
    color: #6b7fa0;
    border: 1px solid rgba(120, 160, 240, 0.12);
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(100, 140, 220, 0.06);
    font-family: 'Consolas', 'Monaco', monospace;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-dot {
    width: 6px;
    height: 6px;
    background-color: #4ade80;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Formularz */
.calc-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-bottom: 28px;
}

@media (max-width: 600px) {
    .calc-form {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 0.78em;
    color: #4a5e7e;
    font-weight: 500;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.form-group label span {
    font-size: 0.9em;
    color: #3a4a62;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
}

/* Pola wejściowe */
.form-control {
    background: rgba(8, 16, 36, 0.5);
    border: 1px solid rgba(100, 140, 200, 0.14);
    border-radius: 8px;
    color: #dde5f4;
    padding: 10px 13px;
    font-family: inherit;
    font-size: 0.9em;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
}

.form-control:focus {
    border-color: rgba(130, 170, 255, 0.50);
    box-shadow: 0 0 0 3px rgba(100, 140, 255, 0.10);
}

/* Select z ikoną strzałki */
select.form-control {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7fa0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px;
    padding-right: 36px;
    cursor: pointer;
}

select.form-control option {
    background-color: #111827;
    color: #dde5f4;
}

/* Przycisk */
.btn-calc {
    grid-column: 1 / -1;
    background: rgba(100, 140, 220, 0.14);
    color: #c8d8f4;
    border: 1px solid rgba(120, 160, 240, 0.25);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.85em;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.btn-calc:hover {
    background: rgba(100, 140, 220, 0.24);
    border-color: rgba(120, 160, 240, 0.40);
}

/* Błędy */
.error-box {
    background: rgba(200, 60, 60, 0.08);
    border: 1px solid rgba(200, 80, 80, 0.28);
    border-radius: 8px;
    color: #f8b4b4;
    padding: 14px 16px;
    margin-bottom: 24px;
    font-size: 0.88em;
    line-height: 1.5;
}

/* Wyniki */
.results-section {
    border-top: 1px solid rgba(100, 140, 200, 0.10);
    padding-top: 24px;
    padding-bottom: 8px;
}

.results-header {
    font-size: 0.7em;
    color: #3a4e6e;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 16px;
    font-weight: 500;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 10px 0;
    border-bottom: 1px solid rgba(100, 140, 200, 0.08);
    font-size: 0.88em;
}

.result-row:last-child {
    border-bottom: none;
}

.result-label {
    color: #5a6e90;
}

.result-value {
    color: #c8d8f4;
    font-family: 'Consolas', 'Monaco', monospace;
    font-weight: 500;
}

/* Ostrzeżenia */
.warnings-box {
    margin-top: 20px;
    border: 1px solid rgba(180, 140, 40, 0.22);
    background: rgba(180, 140, 40, 0.05);
    border-radius: 8px;
    padding: 14px 16px;
}

.warnings-title {
    color: #a08040;
    font-size: 0.78em;
    font-weight: 600;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.warning-entry {
    display: flex;
    gap: 8px;
    font-size: 0.83em;
    color: #6b7fa0;
    margin-bottom: 6px;
    line-height: 1.5;
    text-align: left;
}

.warning-entry:last-child {
    margin-bottom: 0;
}

/* Responsywność mobilna */
@media (max-width: 680px) {
    .calc-card {
        padding: 24px 20px;
        border-radius: 12px;
    }

    .calc-header {
        flex-direction: column;
        gap: 12px;
    }
}
