/* ============================================
   Modern CSS Framework - Vouches Website
   ============================================ */

:root {
  --bg: #060608;
  --bg-secondary: #0b0b0b;
  --card: #0f1113;
  --card-hover: #16181b;
  --muted: #bfc7cf;
  --muted-light: #c9d6df;
  --accent: #4db6ff;
  --accent-hover: #6bc5ff;
  --accent-dark: #2196F3;
  --glass: rgba(255, 255, 255, 0.03);
  --glass-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 20px rgba(77, 182, 255, 0.3);
}

/* ============================================
   Reset & Base Styles
   ============================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-secondary) 60%);
  color: var(--muted);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  min-height: 100%;
  padding: 28px;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--accent);
}

h1 {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

h2 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

p {
  margin-bottom: 12px;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--accent-hover);
}

/* ============================================
   Layout Components
   ============================================ */

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

header {
  max-width: 1100px;
  margin: 0 auto 24px;
  text-align: center;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

header h1 {
  margin: 0 0 8px;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

p.lead {
  margin: 8px 0 0;
  color: var(--muted-light);
  font-size: 1rem;
}

.controls {
  max-width: 1100px;
  margin: 24px auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px;
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  background: var(--card);
  color: var(--accent);
  padding: 10px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--glass);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(77, 182, 255, 0.1), transparent);
  transition: left 0.5s ease;
}

.btn:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md), var(--shadow-glow);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  color: #fff;
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  box-shadow: var(--shadow-lg), 0 0 30px rgba(77, 182, 255, 0.4);
}

/* ============================================
   Grid & Cards
   ============================================ */

main {
  max-width: 1100px;
  margin: 24px auto 80px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
  animation: fadeIn 0.6s ease-out;
}

@media (max-width: 900px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

@media (max-width: 420px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  box-shadow: var(--shadow-sm);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(77, 182, 255, 0.1), transparent);
  transition: left 0.6s ease;
  z-index: 1;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card:hover::before {
  left: 100%;
}

.card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.thumb {
  width: 100%;
  padding-bottom: 75%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.4s ease;
  position: relative;
}

.card:hover .thumb {
  transform: scale(1.05);
}

.caption {
  padding: 12px;
  background: var(--card);
  border-top: 1px solid var(--border);
}

.caption .date {
  color: var(--muted-light);
  font-size: 0.9rem;
  font-weight: 500;
}

/* ============================================
   Lightbox
   ============================================ */

.lb {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(6, 6, 8, 0.95);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lb.active {
  display: flex;
  opacity: 1;
}

.lb-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: var(--shadow-lg), 0 0 50px rgba(0, 0, 0, 0.8);
  /* Animation handled by JavaScript */
}

@keyframes zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lb-prev,
.lb-next,
.lb-close {
  position: absolute;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--accent);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
  z-index: 10001;
}

.lb-prev:hover,
.lb-next:hover,
.lb-close:hover {
  background: var(--card-hover);
  border-color: var(--accent);
  transform: scale(1.1);
  box-shadow: var(--shadow-md);
}

.lb-prev {
  left: 20px;
}

.lb-next {
  right: 20px;
}

.lb-close {
  top: 20px;
  right: 20px;
}

.lb-meta {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card);
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--muted-light);
  font-size: 0.9rem;
}

/* ============================================
   Animations
   ============================================ */

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.note {
  color: var(--muted);
  font-size: 0.92rem;
}

/* ============================================
   Scrollbar
   ============================================ */

::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-radius: 10px;
  border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, var(--accent-hover) 0%, var(--accent) 100%);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent) var(--bg);
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
  body {
    padding: 16px;
  }

  header h1 {
    font-size: 1.5rem;
  }

  .controls {
    flex-direction: column;
    align-items: flex-start;
  }

  .lb-prev,
  .lb-next {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .lb-prev {
    left: 10px;
  }

  .lb-next {
    right: 10px;
  }

  .lb-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
  }
}
