/* Enhanced Georgian Gallery Page Background */
body {
  margin: 0;
  padding-left: 15%;
  padding-right: 15%;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-image: url("../background1.jpg");
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
}

img {
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

img:hover {
  opacity: 1;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
  z-index: -1;
}

/* Modern Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, rgba(30, 30, 40, 0.95), rgba(50, 50, 60, 0.95));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 2px solid rgba(100, 181, 246, 0.3);
  color: white;
  padding: 0.8rem 2rem;
  position: sticky;
  top: 0;
  z-index: 999;
  flex-wrap: nowrap;
  min-width: 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.navbar .logo {
  text-decoration: none;
  color: white;
  font-weight: 800;
  font-size: 1.3rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #ffffff, #64b5f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: nowrap;
  flex-shrink: 0;
}

.navbar .logo:hover {
  filter: brightness(1.2);
  transform: scale(1.05);
}

.navbar .menu {
  display: flex;
  gap: 0.3rem;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: hidden;
  align-items: center;
  flex-wrap: nowrap;
  flex-shrink: 1;
}

.navbar .menu li {
  list-style-type: none;
}

.navbar .menu li::before {
  content: none;
}

.navbar .menu li a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  padding: 0.5rem 0.7rem;
  transition: all 0.3s ease;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  position: relative;
  white-space: nowrap;
  border: 1px solid transparent;
  overflow: hidden;
  text-overflow: ellipsis;
}

.navbar .menu li a:hover {
  background: linear-gradient(135deg, rgba(100, 181, 246, 0.2), rgba(100, 181, 246, 0.3));
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(100, 181, 246, 0.4);
  border-color: rgba(100, 181, 246, 0.5);
}

/* Mobile Hamburger Menu */
@media (max-width: 1200px) {
  .navbar .menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: linear-gradient(135deg, rgba(30, 30, 40, 0.98), rgba(50, 50, 60, 0.98));
    backdrop-filter: blur(15px);
    flex-direction: column;
    padding: 0.5rem 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    border-radius: 0 0 16px 16px;
    border: 2px solid rgba(100, 181, 246, 0.3);
    border-top: none;
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    width: auto;
    min-width: 180px;
    max-width: 250px;
  }

  .navbar .menu.show {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .navbar .menu li {
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
  }

  .navbar .menu li:last-child {
    border-bottom: none;
  }

  .navbar .menu li a {
    padding: 0.9rem 1.2rem;
    display: block;
    text-align: left;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-radius: 0;
  }

  .navbar .menu li a:hover {
    background: linear-gradient(90deg, rgba(100, 181, 246, 0.3), rgba(100, 181, 246, 0.1));
    color: #ffffff;
    padding-left: 1.5rem;
    box-shadow: inset 4px 0 0 #64b5f6;
  }

  .hamburger {
    display: flex;
  }
}

/* Compact Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 0.3rem;
  justify-content: center;
  align-items: center;
  border-radius: 3px;
  transition: all 0.3s ease;
  background: rgba(255, 255, 255, 0.1);
}

.hamburger:hover {
  background: rgba(255, 255, 255, 0.2);
}

.hamburger span {
  height: 2px;
  width: 18px;
  background: white;
  margin: 1.5px 0;
  border-radius: 1px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger Animation */
.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scale(0);
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.flag {
  vertical-align: middle;
  border-radius: 2px;
}

/* Main Content */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.title {
  margin: 1rem 0;
  text-align: center;
  color: white;
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.7), 0 0 20px rgba(100, 181, 246, 0.3);
  font-size: 4rem;
  font-weight: 800;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #ffffff, #64b5f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleGlow 3s ease-in-out infinite alternate;
}

@keyframes titleGlow {
  from { text-shadow: 0 4px 8px rgba(0, 0, 0, 0.7), 0 0 20px rgba(100, 181, 246, 0.3); }
  to { text-shadow: 0 4px 8px rgba(0, 0, 0, 0.7), 0 0 30px rgba(100, 181, 246, 0.6); }
}

/* Modern Photo Gallery */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.photo {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
  transition: all 0.3s ease;
  aspect-ratio: 4/3;
}

.photo:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border-color: rgba(100, 181, 246, 0.3);
}

.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 0.3s ease;
}

.photo:hover img {
  transform: scale(1.1);
}

.photo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 2rem 1.5rem 1.5rem;
  transform: translateY(100%);
  transition: all 0.3s ease;
}

.photo:hover .photo-overlay {
  transform: translateY(0);
}

.photo-overlay h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
  color: #64b5f6;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

/* Mobile Hamburger Menu */
@media (max-width: 768px) {
  body {
    padding-left: 5%;
    padding-right: 5%;
  }

  .navbar {
    padding: 0.8rem 1rem;
  }
  
  .navbar .menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(68, 68, 68, 0.98);
    flex-direction: column;
    padding: 0.5rem 0;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
    border-radius: 0 0 12px 12px;
    border: 1px solid rgba(100, 181, 246, 0.2);
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
    width: auto;
    min-width: 160px;
    max-width: 250px;
  }

  .navbar .menu.show {
    display: flex;
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }

  .navbar .menu li {
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
  }

  .navbar .menu li:last-child {
    border-bottom: none;
  }

  .navbar .menu li a {
    padding: 0.8rem 1rem;
    display: block;
    text-align: left;
    font-size: 0.9rem;
    transition: all 0.3s ease;
  }

  .navbar .menu li a:hover {
    background: rgba(100, 181, 246, 0.2);
    color: #64b5f6;
    padding-left: 1.2rem;
    box-shadow: inset 3px 0 0 #64b5f6;
  }

  .hamburger {
    display: flex;
  }

  .title {
    font-size: clamp(2.5rem, 8vw, 3.5rem);
    margin-bottom: 1rem;
  }

  .photo-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  body {
    padding-left: 3%;
    padding-right: 3%;
  }

  .navbar {
    padding: 0.6rem 0.8rem;
  }

  .navbar .logo {
    font-size: 1.1rem;
  }

  .title {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .photo-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease;
}

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

.modal-content {
  position: relative;
  margin: auto;
  padding: 20px;
  width: 90%;
  max-width: 1200px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.modal-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
  from { transform: scale(0.8); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10000;
  transition: all 0.3s ease;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close:hover {
  color: #64b5f6;
  background: rgba(100, 181, 246, 0.2);
  transform: scale(1.1);
}

.modal-caption {
  text-align: center;
  margin-top: 20px;
}

.modal-caption h3 {
  color: white;
  font-size: 1.5rem;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.photo {
  cursor: pointer;
}

.photo:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border-color: rgba(100, 181, 246, 0.3);
}
