/* Modern CVN-68 Gallery Styles - Mobile-first, CSS3, Responsive Dark Navy Theme */

:root {
  --navy: #0a192f;
  --navy-dark: #020c1b;
  --gold: #ffd700;
  --white: #ffffff;
  --light-gray: #a0a0a0;
  --shadow: 0 10px 30px rgba(0,0,0,0.5);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--navy-dark);
  color: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Header/Nav */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 25, 47, 0.95);
  backdrop-filter: blur(10px);
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.nav-brand h1 {
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  color: var(--gold);
  font-weight: 700;
}

.subtitle {
  font-size: 0.9rem;
  opacity: 0.8;
}

.hamburger {
  display: flex;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 101;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--white);
  margin: 3px 0;
  transition: var(--transition);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1rem;
  align-items: center;
}

.nav-menu button, .nav-menu input {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
}

.nav-menu button:hover, .nav-menu input:focus {
  background: var(--gold);
  color: var(--navy);
  transform: scale(1.05);
}

/* Mobile Menu */
@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    flex-direction: column;
    background: var(--navy);
    width: 100%;
    height: 100vh;
    justify-content: flex-start;
    align-items: flex-start;
    padding-top: 100px;
    transition: right 0.3s ease;
  }
  
  .nav-menu.active {
    right: 0;
  }
}

/* Hero Slider */
.hero-slider {
  position: relative;
  height: clamp(50vh, 70vw, 80vh);
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.slider-container {
  height: 100%;
  position: relative;
  display: flex;
  align-items: center;
}

.slider-track {
  display: flex;
  height: 100%;
  scroll-snap-type: x mandatory;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.slider-track::-webkit-scrollbar {
  display: none;
}

.slider-track img {
  flex: 0 0 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: center;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.slider-track img:hover {
  transform: scale(1.02);
}

.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: none;
  color: var(--white);
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
  z-index: 10;
}

.prev { left: 10px; }
.next { right: 10px; }

.slider-btn:hover {
  background: var(--gold);
  color: var(--navy);
  transform: translateY(-50%) scale(1.1);
}

.slider-indicators {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}

.slider-indicators .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  cursor: pointer;
  transition: var(--transition);
}

.slider-indicators .dot.active {
  background: var(--gold);
}

/* Gallery Grid */
.gallery-grid {
  max-width: 1400px;
  margin: 3rem auto;
  padding: 0 2rem;
}

.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  grid-auto-rows: 200px;
}

.grid-item {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.grid-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0,0,0,0.5);
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.grid-item:hover img {
  transform: scale(1.05);
}

.grid-item .info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  color: var(--white);
  padding: 1rem;
  transform: translateY(100%);
  transition: var(--transition);
}

.grid-item:hover .info {
  transform: translateY(0);
}

#loading {
  text-align: center;
  padding: 2rem;
  font-size: 1.2rem;
  opacity: 0.7;
}

/* Search Results */
.search-results {
  max-width: 1200px;
  margin: 3rem auto;
  padding: 0 2rem;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  text-align: center;
}

#lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

.close-btn {
  position: absolute;
  top: -50px;
  right: 0;
  background: none;
  border: none;
  color: var(--white);
  font-size: 3rem;
  cursor: pointer;
}

.nav-btn {
  position: absolute;
  top: 50%;
  background: rgba(255,255,255,0.2);
  border: none;
  color: var(--white);
  font-size: 3rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.nav-btn:hover {
  background: var(--gold);
  color: var(--navy);
}

.img-info {
  position: absolute;
  bottom: -60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.8);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  white-space: nowrap;
}

/* Responsive */
@media (min-width: 768px) {
  .grid-container {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
  }
}

@media (min-width: 1024px) {
  .grid-container {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .hero-slider {
    margin: 4rem auto;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.6s ease forwards;
}

/* Scroll to top */
.scroll-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--gold);
  color: var(--navy);
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0;
  transition: var(--transition);
  z-index: 100;
}

.scroll-top.show {
  opacity: 1;
}

