/* Reset */
* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

body {
  font-family: "Poppins", sans-serif;
  background: #0f172a;
  color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 50px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo { 
  font-size: 1.5rem; 
  font-weight: bold; 
  color: #38bdf8; 
}

.nav-links { 
  display: flex; 
  list-style: none; 
}

.nav-links li { 
  margin: 0 15px; 
}

.nav-links a {
  text-decoration: none;
  color: #fff;
  transition: 0.3s;
  font-weight: 500;
}

.nav-links a:hover,
.nav-links .active { 
  color: #38bdf8; 
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: #38bdf8;
  margin: 4px 0;
  transition: 0.3s;
  border-radius: 2px;
}

/* Gallery Section */
.gallery-section {
  text-align: center;
  padding: 80px 40px;
  max-width: 1600px;
  margin: 0 auto;
}

.gallery-section h1 {
  font-size: 3rem;
  color: #ebebeb;
  margin-bottom: 15px;
  font-weight: 700;
}

.gallery-section h1 span {
  color: #00e0ff;
  text-shadow: 0 0 20px rgba(0, 224, 255, 0.5);
}

.subtitle { 
  color: #a3a3a3; 
  margin-bottom: 60px;
  font-size: 1.1rem;
}

/* Gallery Grid - Fixed for proper display */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  padding: 0 20px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  height: 300px; /* Fixed height for consistency */
}

.gallery-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.1), rgba(0, 224, 255, 0.1));
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  pointer-events: none;
}

.gallery-item:hover::before {
  opacity: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* This ensures images fill the space without distortion */
  display: block;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  background: #1e293b; /* Fallback color if image doesn't load */
}

/* Image loading state */
.gallery-item img[src=""],
.gallery-item img:not([src]) {
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  position: relative;
}

.gallery-item img[src=""]::after,
.gallery-item img:not([src])::after {
  content: '📷';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  opacity: 0.3;
}

.gallery-item:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 20px 40px rgba(56, 189, 248, 0.3);
}

.gallery-item:hover img { 
  transform: scale(1.15); 
}

.overlay {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  color: #38bdf8;
  font-size: 2.5rem;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
}

.overlay i {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.gallery-item:hover .overlay { 
  opacity: 1; 
}

/* Footer */
footer {
  text-align: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.8);
  color: #a3a3a3;
  margin-top: 80px;
  font-size: 0.95rem;
}

/* ========== RESPONSIVE MEDIA QUERIES ========== */

/* Large Desktop */
@media screen and (min-width: 1600px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 1800px;
  }
}

/* Desktop */
@media screen and (min-width: 1200px) and (max-width: 1599px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet - Medium Screens */
@media screen and (max-width: 992px) {
  .navbar {
    padding: 15px 30px;
  }
  
  .gallery-section {
    padding: 60px 25px;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
  
  .gallery-item {
    height: 250px;
  }
  
  .gallery-section h1 {
    font-size: 2.5rem;
  }
}

/* Mobile - Small Screens */
@media screen and (max-width: 768px) {
  .navbar {
    padding: 15px 20px;
  }
  
  .menu-toggle {
    display: flex;
    z-index: 101;
  }
  
  .nav-links {
    position: fixed;
    right: -100%;
    top: 0;
    flex-direction: column;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    width: 70%;
    max-width: 300px;
    height: 100vh;
    text-align: center;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 80px 0 20px;
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.5);
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links li {
    margin: 20px 0;
  }
  
  .nav-links a {
    font-size: 1.1rem;
  }
  
  .gallery-section {
    padding: 50px 15px;
  }
  
  .gallery-section h1 {
    font-size: 2rem;
  }
  
  .subtitle {
    font-size: 0.95rem;
    margin-bottom: 40px;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 10px;
  }
  
  .gallery-item {
    height: 280px;
  }
  
  .overlay {
    font-size: 2rem;
  }
}

/* Extra Small Mobile */
@media screen and (max-width: 480px) {
  .logo {
    font-size: 1.2rem;
  }
  
  .gallery-section h1 {
    font-size: 1.8rem;
  }
  
  .gallery-grid {
    gap: 15px;
  }
  
  .gallery-item {
    height: 250px;
  }
  
  .overlay {
    font-size: 1.5rem;
  }
}

/* Loading Animation */
@keyframes shimmer {
  0% { background-position: -1000px 0; }
  100% { background-position: 1000px 0; }
}

.gallery-item.loading img {
  background: linear-gradient(90deg, #1e293b 0%, #334155 50%, #1e293b 100%);
  background-size: 1000px 100%;
  animation: shimmer 2s infinite;
}