/* style.css - Nowoczesny wygląd Sebgo Photo */

:root {
    --primary: #0069d9;      /* Twój firmowy zielony */
    --primary-hover: #0069d9;
    --secondary: #007bff;    /* Niebieski do zaznaczania */
    --bg: #f5f7fa;          /* Nowoczesne, chłodniejsze tło */
    --surface: #ffffff;
    --text: #2d3436;
    --text-light: #636e72;
    --radius: 12px;         /* Zaokrąglenia Apple/Android */
    --shadow-sm: 0 4px 12px rgba(0,0,0,0.05);
    --shadow-md: 0 8px 24px rgba(0,0,0,0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  }

  html {
    scroll-behavior: smooth;
  }
  
  body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    margin: 0;
    padding: 2em;
  }
  
  h1, h2, h3 { font-weight: 700; color: #111; }
  .gallery-title { font-size: 2.5rem; text-align: center; margin-bottom: 40px; letter-spacing: -0.5px; }
  
  /* --- PRZYCISKI --- */
  .btn, button, #download-all-btn, #manual-download {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
    display: inline-block;
    text-decoration: none;
  }
  .btn:hover, button:hover, #download-all-btn:hover {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    
  }
  .btn-secondary { background: #6c757d; box-shadow: var(--shadow-sm); }
  .btn-secondary:hover { background: #5a6268; }
  .btn-primary { background: var(--secondary); box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2); }
  .btn-primary:hover { background: #0069d9; }
  
  /* --- FORMULARZE I ZAKŁADKI --- */
  input[type="text"], input[type="password"] {
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: var(--transition);
    outline: none;
  }
  input[type="password"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(24, 199, 110, 0.1);
  }
  
  .section-tabs { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }
  .section-tab {
    padding: 10px 24px;
    background: var(--surface);
    border: 2px solid transparent;
    border-radius: 0px; /* Styl pastylek (pills) */
    color: var(--text-light);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
  }
  .section-tab:hover { color: var(--primary); transform: translateY(-2px); }
  .section-tab.active { background: var(--primary); color: white; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
  
  /* --- NOWOCZESNA SIATKA ZDJĘĆ (CSS GRID) --- */
  /* --- UKŁAD MASONRY (Cegiełkowy) --- */
.gallery {
  column-count: 4; /* Liczba kolumn na dużym ekranie */
  column-gap: 20px;
  width: 100%;
  margin-bottom: 40px;
}

.gallery-item {
  
  position: relative;
  border-radius: 0; /* <--- Ostre, klasyczne kąty */
  overflow: hidden;
  background: var(--surface);
  transition: var(--transition);
  cursor: pointer;
  break-inside: avoid;
  margin-bottom: 20px;
  transform: translateZ(0);
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.gallery img { 
  width: 100%; 
  height: auto; /* W układzie Masonry zdjęcia muszą mieć naturalną wysokość */
  display: block; 
  transition: transform 0.5s ease; 
}

.gallery-item:hover img { 
  transform: scale(1.03); 
}
  
  /* --- CHECKBOXY (Styl iOS) --- */
  /* --- ULUBIONE ZDJĘCIA (Motyw Serca) --- */
.gallery-item input[type="checkbox"] {
  position: absolute; 
  top: 15px; 
  right: 15px; /* Przenosimy na prawą stronę */
  left: auto; 
  width: 35px; 
  height: 35px;
  z-index: 11; 
  cursor: pointer; 
  opacity: 0; 
  margin: 0;
}

.checkbox-overlay {
  position: absolute; 
  top: 15px; 
  right: 15px; 
  left: auto;
  width: 32px; 
  height: 32px;
  background: rgba(255, 255, 255, 0.85);
  border: none;
  border-radius: 50%;
  display: flex; 
  align-items: center; 
  justify-content: center;
  opacity: 0; 
  transition: var(--transition); 
  z-index: 9;
  box-shadow: var(--shadow-sm);
}

.gallery-item:hover .checkbox-overlay { 
  opacity: 1; 
}

/* Stan, gdy zdjęcie jest dodane do ulubionych */
.gallery-item input[type="checkbox"]:checked + .checkbox-overlay {
  opacity: 1; 
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(232, 65, 24, 0.2);
}

/* Puste serduszko przed zaznaczeniem */
.checkbox-overlay::after { 
  content: '♡'; 
  color: #333; 
  font-size: 20px; 
  line-height: 1;
  margin-top: 2px;
  transition: all 0.3s;
}

/* Wypełnione czerwone serduszko po zaznaczeniu */
.gallery-item input[type="checkbox"]:checked + .checkbox-overlay::after { 
  content: '♥'; 
  color: #e84118; 
  transform: scale(1.1); /* Delikatny efekt pop-up przy kliknięciu */
}

/* Usuwamy brzydką niebieską obwódkę całego zdjęcia - serduszko wystarczy */
.gallery-item.selected { 
  outline: none; 
}
  
  /* --- LEWITUJĄCY PASEK ZAZNACZANIA (Glassmorphism) --- */
  .select-actions {
    position: fixed; bottom: 30px; left: 50%; 
    transform: translateX(-50%) translateY(100px); /* Ukryty pod ekranem */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px); /* Efekt matowego szkła */
    -webkit-backdrop-filter: blur(10px);
    padding: 16px 32px;
    border-radius: 50px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex; gap: 15px; align-items: center; z-index: 1000;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.4s;
    opacity: 0; pointer-events: none;
  }
  .select-actions.show { 
    transform: translateX(-50%) translateY(0); /* Płynnie wyjeżdża z dołu */
    opacity: 1; 
    pointer-events: auto; 
  }
  .select-count { font-weight: 700; color: var(--text); background: #e9ecef; padding: 6px 16px; border-radius: 20px; }
  
  @media (max-width: 768px) {
    .select-actions { flex-wrap: wrap; justify-content: center; width: 90%; border-radius: 20px; padding: 15px; }
    .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
    body { padding: 1em; }
  }
  
  

  /* =========================================
   FULLSCREEN LOGIN STYLE (Ze zdjęciem w tle)
   ========================================= */
.fullscreen-login {
  position: fixed; /* Przykrywa całą stronę, ignoruje paddingi z body */
  top: 0; left: 0; 
  width: 100vw; height: 100vh;
  background-size: cover;
  background-position: center;
  background-color: #222; /* Fallback, jeśli zdjęcie się jeszcze ładuje */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.login-overlay {
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Ciemny, półprzezroczysty filtr */
  z-index: 1;
}

.login-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  width: 100%;
  max-width: 450px;
  padding: 0 20px;
  font-family: 'Montserrat', sans-serif;
}

.login-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  margin: 0 0 5px 0;
  color: #fff;
}

.brand-subtitle {
  font-size: 0.6rem;
  letter-spacing: 3px;
  margin: 0 0 40px 0;
  color: rgba(255, 255, 255, 0.7);
}

.login-instruction {
  font-size: 0.8rem;
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.9);
}

.login-form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-form input[type="password"] {
  width: 100%;
  padding: 16px 20px;
  margin-bottom: 20px;
  border: none;
  border-radius: 0; /* Ostre rogi jak na projekcie */
  font-size: 14px;
  font-family: 'Montserrat', sans-serif;
  background: #fff;
  color: #333;
  text-align: left;
  outline: none;
}

.btn-enter {
  background: transparent;
  color: #fff;
  border: 1px solid #fff; /* Cienka biała ramka */
  padding: 12px 40px;
  font-size: 0.7rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  letter-spacing: 3px;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  box-shadow: none;
}

.btn-enter:hover {
  background: #fff;
  color: #000;
  transform: none; /* Wyłączamy podskakiwanie */
  box-shadow: none;
}

.error-message {
  margin-top: 20px;
  color: #ff6b6b;
  font-weight: 600;
  font-size: 13px;
  background: rgba(0,0,0,0.6);
  padding: 8px 15px;
  border-radius: 4px;
}

/* =========================================
   GALERIA - GÓRNY PASEK NARZĘDZI (TOOLBAR)
   ========================================= */
   .gallery-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 15px 40px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #f0f0f0;
    margin: 0 -2em 30px -2em; /* Ignoruje padding z tagu body */
  }
  
  .toolbar-left {
    display: flex;
    flex-direction: column;
  }
  
  .toolbar-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
    color: #222;
  }
  
  .toolbar-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 9px;
    letter-spacing: 2px;
    color: #999;
    margin-top: 3px;
  }
  
  .toolbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
  }
  
  .toolbar-text-link {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #888;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.3s;
  }
  
  .toolbar-text-link:hover {
    color: #222;
  }
  
  .download-selected-text {
    color: #007bff; /* Wyraźny kolor dla akcji zaznaczania */
  }
  
  .toolbar-divider {
    width: 1px;
    height: 20px;
    background: #e0e0e0;
  }
  
  .toolbar-icon-btn {
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.3s, transform 0.3s;
  }
  
  .toolbar-icon-btn:hover {
    color: #222;
    transform: translateY(-2px);
  }
  
  @media (max-width: 768px) {
    .gallery-toolbar {
      padding: 15px 20px;
      margin: -1em -1em 20px -1em;
    }
    .toolbar-text-link { display: none; } /* Na telefonach ukrywamy tekst PRINT STORE żeby zrobić miejsce */
    .download-selected-text { display: block !important; }
  }

  @media (max-width: 1200px) {
    .gallery { column-count: 3; }
  }
  
  @media (max-width: 768px) {
    .gallery { column-count: 2; column-gap: 10px; }
    .gallery-item { margin-bottom: 10px; }
    .select-actions { flex-wrap: wrap; justify-content: center; width: 90%; border-radius: 20px; padding: 15px; }
    body { padding: 1em; }
  }
  
  @media (max-width: 480px) {
    .gallery { column-count: 1; }
  }


 /* =========================================
   WĄSKI PASEK HERO (Nagłówek galerii)
   ========================================= */
   .gallery-hero {
    position: relative;
    height: 100vh;
    width: 100vw;
    margin-left: -2em;
    margin-top: -2em;
    margin-bottom: 0;
    background-size: cover;
    background-position: center 25%; 
    display: flex;
    align-items: center; /* <--- Wyrównanie w pionie do środka */
    justify-content: center; /* <--- Wyrównanie w poziomie do środka */
  }

.hero-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  /* Bardzo delikatny, ciemny gradient od dołu, żeby biały tekst był czytelny na jasnym zdjęciu */
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.1) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center; /* <--- Wyśrodkowanie samego tekstu */
  color: #fff;
  font-family: 'Montserrat', sans-serif;
  padding: 0 20px; /* <--- Równe odstępy z każdej strony */
  width: 100%;
}

.hero-title {
  font-size: 4.2rem; /* Zmniejszona czcionka */
  font-weight: 700;
  letter-spacing: 2px;
  margin: 0 0 5px 0;
  text-shadow: 0 2px 8px rgba(0,0,0,0.6); /* Mocniejszy cień dla czytelności */
  color: #fff;
}

.hero-date {
  font-size: 0.75rem;
  letter-spacing: 3px;
  margin-bottom: 0; /* Usunięty ogromny dolny margines */
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 5px rgba(0,0,0,0.6);
}

/* Ukrywamy niepotrzebny już przycisk VIEW GALLERY */
.btn-view-gallery {
  display: inline-block;
  padding: 12px 30px;
  border: 1px solid #fff;
  color: #fff;
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 3px;
  transition: all 0.3s;
  background: transparent;
  box-shadow: none;
  margin-top: 20px; /* Robi ładny odstęp między datą a przyciskiem */
}
.btn-view-gallery:hover {
  background: #fff;
  color: #000;
  transform: none;
}
/* Responsywność dla telefonów */
@media (max-width: 768px) {
  .gallery-hero {
    height: 50vh; /* <--- Na telefonie też dajemy połowę ekranu zamiast 150px */
    margin-left: -1em;
    margin-top: -1em;
  }
  .hero-content {
    padding: 0 20px 15px 20px;
  }
  .hero-title {
    font-size: 1.5rem;
  }
}

/* Wygląd guzika "Pobierz ulubione" na górnym pasku */
#download-selected-btn {
  transition: var(--transition);
  padding: 8px 16px;
  border-radius: 0px;
  background: var(--secondary) !important; /* Domyślnie cały czas niebieski */
  color: #ffffff !important;               /* Domyślnie biały tekst */
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2); /* Lekki cień na start */
}

#download-selected-btn:hover {
         /* Jaśniejszy niebieski po najechaniu */
  color: #ffffff !important;
  transform: translateY(-2px);             /* Delikatny podskok */
  /* Wyraźniejszy cień po najechaniu */
}