/* assets/style.css */

/* --- RESET I PODSTAWY --- */
body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
        Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    background: #f4f4f4;
    color: #222;
}

/* --- HEADER --- */
header {
    background: #000000;
}
header .container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1em 1.5em;
    flex-wrap: wrap;
}
header h1 {
    margin: 0;
    font-size: 1.5em;
    color: white;
}

/* --- MENU --- */
nav {
    display: flex;
    gap: 1em;
}

nav a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

nav a:hover {
    text-decoration: underline;
}

/* --- MENU HAMBURGER --- */
.menu-toggle {
    display: none;
    font-size: 2em;
    cursor: pointer;
    background: none;
    border: none;
    color: white !important; /* wymuszony biały kolor */
    filter: none !important; /* wyłącz filtry */
    transition: color 0.3s ease;
}

/* --- MAIN --- */
main {
    max-width: 1200px;
    margin: 1.5em auto;
    padding: 0 1em;
}

/* --- GRID GALERII --- */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1em;
}

.grid img,
.grid video {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
    display: block;
}

/* --- RESPONSYWNOŚĆ --- */
@media (max-width: 900px) {
    .grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    nav {
        display: none;
        flex-direction: column;
        gap: 0.5em;
        background: #000000; /* czarne tło */
        padding: 1em;
        position: absolute;
        top: 60px;
        right: 10px;
        border-radius: 8px;
        z-index: 999;
    }
    nav.active {
        display: flex;
    }
    nav a {
        padding: 12px 15px;
        border-bottom: 1px solid rgba(255,255,255,0.2);
        color: white; /* białe litery */
        width: 100%;
        box-sizing: border-box;
        text-align: center;
        display: block;
    }
    nav a:last-child {
        border-bottom: none;
    }
    .menu-toggle {
        display: inline-block;
    }
    .grid {
        grid-template-columns: 1fr;
    }
    form.upload-form {
        padding: 15px;
    }
}

/* --- FOOTER --- */
footer {
    text-align: center;
    padding: 1em;
    font-size: 0.9em;
    color: #666;
    border-top: 1px solid #ddd;
}

/* --- LIGHTBOX --- */
.lightbox {
    position: fixed;
    z-index: 9999;
    padding-top: 60px;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    display: none;
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 10px;
}

.lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
}

.lightbox-description {
    margin-top: 8px;
    color: #ccc;
    font-size: 0.9em;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.close {
    position: absolute;
    top: 30px;
    right: 45px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
}

.prev, .next {
    cursor: pointer;
    position: fixed;
    top: 50%;
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 40px;
    user-select: none;
    transition: 0.3s;
}

.prev {
    left: 20px;
}

.next {
    right: 20px;
}

.prev:hover, .next:hover, .close:hover {
    color: #f1f1f1;
}

/* --- PAGINACJA --- */
.pagination {
    text-align: center;
    margin: 20px 0;
}

.pagination a, .pagination strong {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 4px;
    text-decoration: none;
    color: #336699;
    border: 1px solid #336699;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.pagination strong {
    background: #336699;
    color: white;
    cursor: default;
}

.pagination a:hover {
    background: #294d73;
    color: white;
}

/* --- UPLOAD FORMULARZ --- */
form.upload-form {
    max-width: 600px;
    margin: 20px auto;
    background: #fafafa;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    font-family: Arial, sans-serif;
}

.upload-form label {
    display: block;
    margin: 12px 0 6px;
    font-weight: 600;
}

.upload-form input[type="file"],
.upload-form input[type="text"],
.upload-form input[type="password"],
.upload-form input[type="checkbox"],
.upload-form button {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    font-size: 1em;
}

.upload-form input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

.upload-form button {
    background-color: #336699;
    color: white;
    border: none;
    margin-top: 16px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.upload-form button:hover {
    background-color: #285580;
}

/* --- DODATKOWE --- */
.lightbox-description {
    margin-top: 8px;
    color: #ccc;
    font-size: 0.9em;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Tryb nocny */
body.dark-mode {
  background-color: #121212;
  color: #e0e0e0;
}

body.dark-mode header {
  background-color: #1f1f1f;
}

body.dark-mode nav a {
  color: #a8a8a8;
}

body.dark-mode nav a:hover {
  color: #fff;
}

body.dark-mode .grid img, 
body.dark-mode .grid video {
  box-shadow: 0 3px 6px rgba(255,255,255,0.15);
}

body.dark-mode footer {
  border-top: 1px solid #333;
  color: #888;
}

/* --- Specjalne style dla index.php (biała ikona hamburgera) */
body.homepage .menu-toggle {
  color: white !important;
  filter: none !important;
}
/* Floating Action Button – tylko w mobilce */
.fab-upload {
  display: none;
}

@media (max-width: 600px) {
  .fab-upload {
    display: flex;
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #336699;
    color: #fff;
    font-size: 2em;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    text-decoration: none;
    z-index: 1000;
    transition: background 0.3s;
  }
  .fab-upload:hover {
    background: #285580;
  }
}
/* FAB – pływający przycisk „Wgraj plik” (tylko mobile) */
.fab-upload {
  display: none;              /* desktop: ukryty */
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0d6efd;        /* niebieski, widoczny na czarnym headerze */
  color: #fff;
  text-decoration: none;
  font-size: 32px;
  line-height: 56px;
  text-align: center;
  box-shadow: 0 6px 16px rgba(0,0,0,0.25);
  z-index: 1000;
  transition: transform .15s ease, box-shadow .15s ease, background-color .2s ease;
}
.fab-upload:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.3); }
.fab-upload:active { transform: translateY(0); box-shadow: 0 5px 14px rgba(0,0,0,0.22); }

/* pokazywać tylko na telefonach */
@media (max-width: 640px) {
  .fab-upload { display: inline-block; }
}

/* opcjonalnie: czarny header + jasny hamburger spójnie */
header { background: #000; }
.menu-toggle { color: #fff; }
#main-nav a.upload-link {
  background: #000;
  color: #fff;
  padding: .4em .8em;
  border-radius: 6px;
}
