@import url('https://fonts.googleapis.com/css?family=Abel');

body {
    font-family: 'Abel', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

h1 {
    font-weight: 300;
    font-size: 2.5rem;
    text-align: center;
    margin-top: 30px;
    color: #236bb2;
}

header {
    background: #333;
    color: white;
    text-align: center;
    padding: 20px;
}

.side-nav {
    width: 200px;
    margin-right: 20px;
    position: relative;
}

.dropdown-btn {
    background-color: #444;
    color: white;
    padding: 12px;
    width: 100%;
    border: none;
    text-align: left;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
}

.dropdown-btn:hover {
    background-color: #555;
}

.dropdown-content {
    display: none;
    background-color: #f9f9f9;
    width: 100%;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    list-style: none;
}

.side-nav:hover .dropdown-content {
    display: block;
}

.dropdown-content li a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s;
}

.dropdown-content li a:hover {
    background-color: #ddd;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    background: #444;
    padding: 10px;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.galerija {
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    padding: 20px;
}

.galerija_slika {
    margin: 0;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.galerija_slika:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.galerija_slika img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px 10px 0 0;
    transition: transform 0.5s ease;
}

.galerija_slika:hover img {
    transform: scale(1.05);
}

.galerija_slika figcaption {
    padding: 10px;
    text-align: center;
    background-color: #fff;
    border-radius: 0 0 10px 10px;
}

.galerija_slika a {
    cursor: zoom-in;
    display: block;
}

.lightbox {
    display: none;
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    animation: fadeIn 0.5s ease;
}

.lightbox:target {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    position: relative;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    margin: 0 auto 10px;
}

.lightbox-content p {
    margin: 10px 0 0;
    font-size: 1.2rem;
    color: #333;
}

.lightbox .close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2.5rem;
    color: white;
    text-decoration: none;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.lightbox .close:hover {
    background: rgba(255, 0, 0, 0.7);
    transform: rotate(90deg);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 768px) {
    .galerija {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
}

@media (max-width: 480px) {
  .galerija {
      grid-template-columns: 1fr 1fr;
      gap: 10px;
  }

  h1 {
      font-size: 1.8rem;
  }
  
  .lightbox-content {
      max-width: 95%;
      padding: 10px;
  }
  
  .lightbox .close {
      top: 10px;
      right: 10px;
      font-size: 2rem;
      width: 30px;
      height: 30px;
      line-height: 30px;
  }
}

@media (max-width: 320px) {
  .galerija {
      grid-template-columns: 1fr;
  }
  
  .lightbox-content p {
      font-size: 1rem;
  }
}