/* =========================
   ROOT VARIABLES
========================= */

:root {
  --primary: #ffffff;
  --secondary: #111111;
  --accent: #d72638;
  --card-bg: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.12);
  --shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
  --radius: 20px;
  --transition: 0.4s ease;
}

/* =========================
   RESET
========================= */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Arial, sans-serif;
  background: #0f0f0f;
  color: var(--primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* =========================
   SCROLLBAR
========================= */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #111;
}

::-webkit-scrollbar-thumb {
  background: #444;
  border-radius: 50px;
}

/* =========================
   SECTION
========================= */

.gallery-section {
  padding: 20px 10px;
}

.container {
  width: min(1200px, 100%);
  margin: auto;
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.sub-title {
  color: var(--accent);
  font-size: 14px;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.section-header h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  margin: 15px 0;
}

.section-header p {
  max-width: 700px;
  margin: auto;
  color: #b5b5b5;
}

/* =========================
   FILTER BUTTONS
========================= */

.filter-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 50px;
}

.filter-btn {
  padding: 12px 22px;
  border: 1px solid var(--border);
  background: transparent;
  color: white;
  cursor: pointer;
  border-radius: 50px;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--accent);
  transform: translateY(-3px);
}

/* =========================
   GALLERY GRID
========================= */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.gallery-item {
  transition: 0.5s ease;
}

.gallery-item.hide {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #1a1a1a;
}

.image-wrapper img {
  width: 100%;
  height: 350px;
  object-fit: cover;
  display: block;
  transition: transform 0.7s ease;
}

.image-wrapper:hover img {
  transform: scale(1.1);
}

/* =========================
   OVERLAY
========================= */

.overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,0.8),
    rgba(0,0,0,0.2)
  );

  display: flex;
  flex-direction: column;
  justify-content: flex-end;

  padding: 25px;

  opacity: 0;
  transition: var(--transition);
}

.image-wrapper:hover .overlay {
  opacity: 1;
}

.overlay h3 {
  font-size: 1.3rem;
  margin-bottom: 5px;
}

.overlay p {
  color: #dddddd;
}

/* =========================
   SKELETON LOADING
========================= */

.skeleton {
  position: relative;
}

.skeleton::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    #1c1c1c 25%,
    #2b2b2b 50%,
    #1c1c1c 75%
  );

  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  z-index: 0;
}

.image-wrapper.loaded::before {
  display: none;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* =========================
   LIGHTBOX
========================= */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(10px);

  display: flex;
  align-items: center;
  justify-content: center;

  opacity: 0;
  visibility: hidden;

  transition: 0.4s ease;
  z-index: 999;
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90%;
  text-align: center;
  animation: zoomIn 0.4s ease;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 75vh;
  border-radius: 16px;
}

.lightbox-caption {
  margin-top: 20px;
}

.lightbox-caption h3 {
  margin-bottom: 8px;
}

.lightbox-caption p {
  color: #cccccc;
}

#image-counter {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* =========================
   BUTTONS
========================= */

.close-btn,
.nav-btn {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: none;
  color: white;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: 0.3s ease;
}

.close-btn:hover,
.nav-btn:hover {
  background: var(--accent);
}

.close-btn {
  top: 20px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 2rem;
}

.nav-btn {
  top: 50%;
  transform: translateY(-50%);
  width: 55px;
  height: 55px;
  border-radius: 50%;
  font-size: 1.5rem;
}

.prev-btn {
  left: 30px;
}

.next-btn {
  right: 30px;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

  .lightbox-content img {
    max-height: 60vh;
  }

  .nav-btn {
    width: 45px;
    height: 45px;
  }

}


