/* =====================================================
   AFRICAN STOCK PHOTOS — MASTER STYLESHEET
   Theme: Warm Neutral + Deep Green Accents
   ===================================================== */

/* ===== CSS VARIABLES ===== */
:root {
  --primary: #2D7D46;
  --primary-dark: #1f5c33;
  --primary-light: #e8f5ed;
  --accent: #C17B2F;
  --accent-light: #fdf3e3;
  --bg: #FAFAF8;
  --bg-alt: #F3F0EB;
  --bg-card: #FFFFFF;
  --border: #E8E2D9;
  --text: #1A1A1A;
  --text-muted: #6B6560;
  --text-light: #9B9590;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.14);
  --shadow-xl: 0 24px 60px rgba(0,0,0,0.18);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 999px;
  --font: 'Inter', sans-serif;
  --font-display: 'Playfair Display', serif;
  --transition: 0.22s cubic-bezier(0.4,0,0.2,1);
  --header-h: 68px;
  --max-w: 1400px;
}

[data-theme="dark"] {
  --bg: #111110;
  --bg-alt: #1A1917;
  --bg-card: #1F1E1C;
  --border: #2E2C28;
  --text: #F0EDE8;
  --text-muted: #9B9590;
  --text-light: #6B6560;
  --primary-light: #1a3d26;
  --accent-light: #2a1f0e;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select { font-family: inherit; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ===== UTILITIES ===== */
.hidden { display: none !important; }
.mt-2 { margin-top: 12px; }
.page { min-height: calc(100vh - var(--header-h)); }
.page.active { display: block; }
.page.hidden { display: none; }

/* ===== HEADER ===== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  height: var(--header-h);
}
.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
}
.site-logo {
  display: flex; align-items: center; gap: 10px;
  flex-shrink: 0; text-decoration: none;
}
.logo-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 16px;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-main { font-size: 15px; font-weight: 800; color: var(--primary); letter-spacing: -0.3px; }
.logo-sub { font-size: 10px; font-weight: 500; color: var(--text-muted); letter-spacing: 0.5px; text-transform: uppercase; }

.header-search { flex: 1; max-width: 480px; }
.search-form-sm {
  display: flex; align-items: center;
  background: var(--bg-alt);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-full);
  padding: 0 16px 0 12px;
  gap: 8px; height: 40px;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.search-form-sm:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45,125,70,0.12);
}
.search-icon-sm { color: var(--text-muted); font-size: 14px; flex-shrink: 0; }
.search-form-sm input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 14px; color: var(--text);
}
.search-form-sm button {
  background: var(--primary); color: white;
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; flex-shrink: 0;
  transition: background var(--transition), transform var(--transition);
}
.search-form-sm button:hover { background: var(--primary-dark); transform: scale(1.05); }

.header-nav { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav-link {
  font-size: 14px; font-weight: 500; color: var(--text-muted);
  padding: 8px 14px; border-radius: var(--radius-full);
  transition: all var(--transition); white-space: nowrap;
}
.nav-link:hover { background: var(--bg-alt); color: var(--text); }
.icon-btn {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  color: var(--text-muted); font-size: 16px;
  transition: all var(--transition);
}
.icon-btn:hover { background: var(--bg-alt); color: var(--text); }

.mobile-menu-btn { display: none; font-size: 20px; color: var(--text); padding: 8px; }
.mobile-menu {
  background: var(--bg-card); border-top: 1px solid var(--border);
  padding: 12px 16px;
}
.mobile-menu a {
  display: block; padding: 12px 16px;
  font-size: 15px; font-weight: 500; color: var(--text);
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.mobile-menu a:hover { background: var(--bg-alt); }

/* ===== BUTTONS ===== */
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary); color: white;
  padding: 11px 22px; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 600;
  transition: all var(--transition);
  white-space: nowrap; cursor: pointer; border: none;
}
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-primary:active { transform: translateY(0); }
.btn-outline {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
  padding: 11px 22px; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
}
.btn-outline:hover { background: var(--primary); color: white; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent; color: var(--text-muted);
  padding: 11px 22px; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 500;
  transition: all var(--transition); border: none; cursor: pointer;
}
.btn-ghost:hover { background: var(--bg-alt); color: var(--text); }
.btn-lg { padding: 14px 32px; font-size: 16px; }

/* ===== HERO ===== */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(145deg, #0D3B20 0%, #1B5E35 40%, #2D7D46 70%, #C17B2F 100%);
  padding: 100px 24px 0;
  display: flex; flex-direction: column; align-items: center;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(13,59,32,0.95) 0%, rgba(45,125,70,0.85) 50%, rgba(193,123,47,0.7) 100%);
}
.hero-shapes { position: absolute; inset: 0; overflow: hidden; }
.hero-shape {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.03);
}
.hero-shape.s1 { width: 600px; height: 600px; top: -200px; right: -100px; }
.hero-shape.s2 { width: 400px; height: 400px; bottom: -150px; left: -100px; }
.hero-shape.s3 { width: 300px; height: 300px; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(255,255,255,0.02); }

.hero-content {
  position: relative; z-index: 1;
  max-width: 800px; width: 100%;
  text-align: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.12); color: rgba(255,255,255,0.9);
  padding: 6px 16px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600; margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 800; line-height: 1.1;
  color: white; margin-bottom: 16px; letter-spacing: -1px;
}
.hero-title em { color: #F5C842; font-style: normal; }
.hero-subtitle {
  font-size: clamp(15px, 2vw, 18px);
  color: rgba(255,255,255,0.8);
  margin-bottom: 40px; max-width: 560px; margin-left: auto; margin-right: auto;
}

.hero-search-form { width: 100%; max-width: 680px; margin: 0 auto 24px; }
.hero-search-box {
  display: flex; align-items: center;
  background: white; border-radius: var(--radius-full);
  padding: 6px 6px 6px 24px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  gap: 12px;
}
.hs-icon { color: var(--text-muted); font-size: 18px; flex-shrink: 0; }
.hero-search-box input {
  flex: 1; border: none; outline: none;
  font-size: 16px; color: var(--text);
  background: transparent;
}
.hero-search-box input::placeholder { color: var(--text-muted); }
.hs-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white; padding: 12px 28px;
  border-radius: var(--radius-full); border: none;
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; white-space: nowrap;
  transition: all var(--transition);
  box-shadow: 0 4px 16px rgba(45,125,70,0.4);
}
.hs-btn:hover { background: linear-gradient(135deg, var(--primary-dark), #164027); transform: translateY(-1px); }

.hero-trending {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; justify-content: center; margin-bottom: 10px;
}
.trending-label { color: rgba(255,255,255,0.6); font-size: 13px; font-weight: 500; }
.trending-tags { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.trending-tag {
  background: rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.9);
  padding: 5px 14px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 500;
  cursor: pointer; border: 1px solid rgba(255,255,255,0.15);
  transition: all var(--transition);
}
.trending-tag:hover { background: rgba(255,255,255,0.25); transform: translateY(-1px); }

.hero-stats {
  position: relative; z-index: 1;
  display: flex; gap: 0;
  width: 100%; max-width: 700px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  margin-top: 48px; overflow: hidden;
}
.hero-stat {
  flex: 1; padding: 20px 16px;
  text-align: center;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.hero-stat:last-child { border-right: none; }
.stat-num { display: block; font-size: 22px; font-weight: 800; color: #F5C842; }
.stat-label { font-size: 11px; color: rgba(255,255,255,0.6); font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

/* ===== SECTIONS ===== */
.home-section { padding: 72px 24px; max-width: var(--max-w); margin: 0 auto; }
.alt-bg { background: var(--bg-alt); max-width: none; }
.section-alt-bg { background: var(--bg-alt); }

.section-header { text-align: center; margin-bottom: 48px; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 800; color: var(--text);
  margin-bottom: 10px; letter-spacing: -0.5px;
}
.section-sub { font-size: 16px; color: var(--text-muted); }

/* ===== CATEGORIES GRID ===== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}
.category-card {
  position: relative; overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 4/3;
  cursor: pointer;
  background: var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.category-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.cat-img-wrap { position: absolute; inset: 0; }
.cat-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.category-card:hover .cat-img-wrap img { transform: scale(1.06); }
.category-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
}
.category-label {
  position: absolute; bottom: 12px; left: 12px; right: 12px;
  color: white; font-size: 13px; font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.category-icon {
  position: absolute; top: 12px; right: 12px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border-radius: 8px; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  color: white; font-size: 14px;
}

/* ===== COLLECTIONS GRID ===== */
.collections-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}
.collections-full-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  padding: 48px 24px; max-width: var(--max-w); margin: 0 auto;
}
.collection-card {
  border-radius: var(--radius-xl); overflow: hidden;
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.collection-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.collection-img-wrap {
  position: relative; height: 200px; overflow: hidden;
}
.collection-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s ease;
}
.collection-card:hover .collection-img-wrap img { transform: scale(1.05); }
.collection-img-grid {
  display: grid; grid-template-columns: 1fr 1fr; height: 200px; gap: 2px;
}
.collection-img-grid img { width: 100%; height: 100%; object-fit: cover; }
.collection-badge {
  position: absolute; top: 12px; left: 12px;
  background: var(--primary); color: white;
  padding: 4px 12px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 700; text-transform: uppercase;
}
.collection-body { padding: 20px; }
.collection-name { font-size: 17px; font-weight: 700; margin-bottom: 6px; color: var(--text); }
.collection-meta { font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }

/* ===== MASONRY GRID ===== */
.masonry-grid {
  columns: 5 220px;
  column-gap: 14px;
  padding: 0 24px 24px;
}
.photo-card {
  break-inside: avoid;
  margin-bottom: 14px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--border);
  position: relative;
  cursor: pointer;
  display: block;
}
.photo-card img {
  width: 100%; display: block;
  transition: transform 0.35s ease;
}
.photo-card:hover img { transform: scale(1.03); }

.photo-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.2) 40%, transparent 60%);
  opacity: 0; transition: opacity var(--transition);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 16px;
}
.photo-card:hover .photo-overlay { opacity: 1; }

.photo-actions {
  display: flex; gap: 8px; margin-bottom: 8px;
  justify-content: flex-end;
}
.photo-action-btn {
  width: 36px; height: 36px;
  background: rgba(255,255,255,0.9);
  color: var(--text); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; cursor: pointer;
  transition: all var(--transition); border: none;
  backdrop-filter: blur(8px);
}
.photo-action-btn:hover { background: white; transform: scale(1.1); }
.photo-action-btn.favorited { background: #ff4757; color: white; }
.photo-action-btn.favorited:hover { background: #ff6b7a; }

.photo-meta {
  display: flex; align-items: center; justify-content: space-between;
}
.photo-photographer {
  font-size: 12px; color: rgba(255,255,255,0.9);
  font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px;
}
.provider-badge {
  font-size: 10px; font-weight: 700; padding: 3px 8px;
  border-radius: var(--radius-full); text-transform: uppercase; letter-spacing: 0.3px;
}
.provider-badge.pexels { background: rgba(0,125,105,0.9); color: white; }
.provider-badge.unsplash { background: rgba(0,0,0,0.8); color: white; }
.provider-badge.pixabay { background: rgba(32,120,224,0.9); color: white; }
.provider-badge.demo { background: rgba(193,123,47,0.9); color: white; }

/* ===== SEARCH PAGE ===== */
.search-page-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 20px 24px;
  position: sticky; top: var(--header-h); z-index: 50;
}
.search-page-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.search-result-info { display: flex; align-items: center; gap: 14px; }
.search-result-info h2 { font-size: 20px; font-weight: 700; }
.result-count {
  background: var(--primary-light); color: var(--primary);
  padding: 4px 12px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 600;
}
.search-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filter-select {
  background: var(--bg-alt); border: 1.5px solid var(--border);
  border-radius: var(--radius-full); padding: 8px 14px;
  font-size: 13px; color: var(--text); outline: none;
  cursor: pointer; transition: border-color var(--transition);
}
.filter-select:focus { border-color: var(--primary); }
.filter-clear {
  background: var(--bg-alt); border: 1.5px solid var(--border);
  border-radius: var(--radius-full); padding: 8px 14px;
  font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px;
  transition: all var(--transition);
}
.filter-clear:hover { border-color: #ff4757; color: #ff4757; }

.search-page-body { padding: 24px 0; max-width: var(--max-w); margin: 0 auto; }
.related-keywords {
  padding: 0 24px 20px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.related-kw-label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.related-kw {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius-full); padding: 5px 14px;
  font-size: 13px; color: var(--text); cursor: pointer;
  transition: all var(--transition);
}
.related-kw:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* ===== LOADING ===== */
.search-loading {
  text-align: center; padding: 80px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 20px;
}
.loading-spinner {
  width: 48px; height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-providers { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

.search-loading p { color: var(--text-muted); font-size: 15px; }

/* ===== NO KEYS WARNING ===== */
.no-keys-warning {
  text-align: center; padding: 60px 24px;
  background: var(--accent-light);
  border: 1px solid rgba(193,123,47,0.2);
  border-radius: var(--radius-xl); margin: 24px;
}
.warning-icon { font-size: 48px; color: var(--accent); margin-bottom: 16px; }
.no-keys-warning h3 { font-size: 22px; font-weight: 700; margin-bottom: 10px; }
.no-keys-warning p { color: var(--text-muted); margin-bottom: 20px; }
.warning-note { font-size: 13px; margin-top: 12px; color: var(--text-muted); }

/* ===== SEARCH EMPTY ===== */
.search-empty {
  text-align: center; padding: 80px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
}
.empty-icon { font-size: 64px; color: var(--border); }
.search-empty h3 { font-size: 22px; font-weight: 700; }
.search-empty p { color: var(--text-muted); }
.empty-suggestions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }
.empty-sug {
  background: var(--bg-alt); border: 1px solid var(--border);
  border-radius: var(--radius-full); padding: 8px 18px;
  font-size: 14px; cursor: pointer;
  transition: all var(--transition);
}
.empty-sug:hover { background: var(--primary); color: white; border-color: var(--primary); }

/* ===== LOAD MORE ===== */
.load-more-wrap { text-align: center; padding: 32px; }

/* ===== PHOTO CARD SKELETON ===== */
.photo-skeleton {
  break-inside: avoid; margin-bottom: 14px;
  border-radius: var(--radius-md); overflow: hidden;
  background: var(--bg-alt);
}
.skeleton-img {
  background: linear-gradient(90deg, var(--bg-alt) 25%, var(--border) 50%, var(--bg-alt) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}
@keyframes shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }

/* ===== PAGE HERO ===== */
.page-hero {
  padding: 80px 24px 60px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
}
.page-hero h1 { font-size: clamp(28px, 4vw, 48px); font-weight: 800; margin-bottom: 12px; font-family: var(--font-display); }
.page-hero p { font-size: 16px; opacity: 0.8; }
.collections-hero { background: linear-gradient(135deg, #1A3B2A 0%, #2D7D46 50%, #C17B2F 100%); }
.favorites-hero { background: linear-gradient(135deg, #5B1E3C 0%, #922B5B 100%); }

/* ===== LIGHTBOX ===== */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.92);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(12px);
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox-close {
  position: absolute; top: 20px; right: 20px;
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.12);
  color: white; font-size: 18px;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); transform: scale(1.1); }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  background: rgba(255,255,255,0.12); color: white;
  font-size: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition);
}
.lightbox-nav:hover { background: rgba(255,255,255,0.25); }
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
.lightbox-content {
  display: flex; gap: 28px; align-items: flex-start;
  max-width: 1100px; width: 100%;
  max-height: calc(100vh - 80px);
}
.lightbox-img-wrap {
  flex: 1; position: relative;
  display: flex; align-items: center; justify-content: center;
  min-height: 200px;
}
.lightbox-img-wrap img {
  max-height: calc(100vh - 120px); max-width: 100%;
  border-radius: var(--radius-lg);
  object-fit: contain;
}
.lightbox-loading {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  color: white; font-size: 32px;
}
.lightbox-info {
  width: 300px; flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl); padding: 28px;
  color: white; overflow-y: auto; max-height: calc(100vh - 120px);
}
.lightbox-meta { margin-bottom: 24px; }
.lightbox-photographer {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
}
.photographer-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; font-weight: 700; color: white; flex-shrink: 0;
}
.photographer-name { display: block; font-size: 15px; font-weight: 600; }
.photographer-provider { font-size: 12px; color: rgba(255,255,255,0.5); }
.lightbox-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.lightbox-tag {
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.8);
  padding: 4px 10px; border-radius: var(--radius-full);
  font-size: 11px; font-weight: 500;
}
.lightbox-dims { font-size: 12px; color: rgba(255,255,255,0.4); }
.lightbox-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.lb-btn { justify-content: center; width: 100%; }
.lb-btn.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); }
.lb-btn.btn-outline { border-color: rgba(255,255,255,0.3); color: white; }
.lb-btn.btn-outline:hover { background: rgba(255,255,255,0.1); color: white; }
.lb-btn.btn-ghost { color: rgba(255,255,255,0.7); }
.lb-btn.btn-ghost:hover { background: rgba(255,255,255,0.1); color: white; }
.lightbox-attribution { font-size: 11px; color: rgba(255,255,255,0.3); text-align: center; }

/* ===== CTA BANNER ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  padding: 80px 24px; text-align: center; color: white;
}
.cta-content h2 { font-family: var(--font-display); font-size: clamp(24px, 3.5vw, 40px); font-weight: 800; margin-bottom: 12px; }
.cta-content p { font-size: 16px; opacity: 0.8; margin-bottom: 32px; }
.cta-banner .btn-primary { background: white; color: var(--primary); box-shadow: var(--shadow-lg); }
.cta-banner .btn-primary:hover { background: rgba(255,255,255,0.92); }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 60px 24px 0;
}
[data-theme="dark"] .site-footer { background: #0A0A09; }
.footer-inner {
  max-width: var(--max-w); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 2fr; gap: 60px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-brand .site-logo { margin-bottom: 16px; }
.footer-brand .logo-main { color: white; }
.footer-brand .logo-sub { color: rgba(255,255,255,0.4); }
.footer-brand .logo-icon { background: linear-gradient(135deg, var(--primary), var(--accent)); }
.footer-brand p { font-size: 14px; line-height: 1.7; margin-bottom: 20px; color: rgba(255,255,255,0.5); }
.footer-providers { display: flex; gap: 8px; }
.footer-links {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px;
}
.footer-col h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: white; margin-bottom: 16px; }
.footer-col a {
  display: block; font-size: 14px; color: rgba(255,255,255,0.5);
  margin-bottom: 10px; transition: color var(--transition);
}
.footer-col a:hover { color: white; }
.footer-bottom {
  max-width: var(--max-w); margin: 0 auto;
  padding: 20px 0;
  font-size: 12px; color: rgba(255,255,255,0.3); text-align: center;
}

/* ===== MODAL ===== */
.modal-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; backdrop-filter: blur(8px);
}
.modal-box {
  background: var(--bg-card); border-radius: var(--radius-xl);
  border: 1px solid var(--border); width: 100%; max-width: 520px;
  box-shadow: var(--shadow-xl); overflow: hidden;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 28px 0;
}
.modal-header h2 { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.modal-close {
  width: 36px; height: 36px;
  background: var(--bg-alt); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; color: var(--text-muted);
  transition: all var(--transition);
}
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-desc { padding: 12px 28px 0; font-size: 14px; color: var(--text-muted); }
.modal-form { padding: 24px 28px 28px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.input-row { display: flex; gap: 10px; }
.input-row input {
  flex: 1; padding: 10px 16px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg-alt); color: var(--text); font-size: 14px;
  outline: none; transition: border-color var(--transition);
}
.input-row input:focus { border-color: var(--primary); }
.get-key-btn {
  background: var(--primary-light); color: var(--primary);
  padding: 10px 16px; border-radius: var(--radius-sm);
  font-size: 12px; font-weight: 600; white-space: nowrap;
  transition: all var(--transition);
}
.get-key-btn:hover { background: var(--primary); color: white; }
.modal-actions { display: flex; gap: 10px; margin-top: 8px; }
.modal-note {
  margin-top: 16px; font-size: 12px; color: var(--text-muted);
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-alt); padding: 12px 16px; border-radius: var(--radius-sm);
}

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 2000;
  background: var(--text); color: var(--bg);
  padding: 14px 24px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.3s ease;
  max-width: 320px;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .masonry-grid { columns: 4 200px; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 768px) {
  :root { --header-h: 60px; }
  .header-search { display: none; }
  .header-nav .nav-link:not(.icon-btn) { display: none; }
  .mobile-menu-btn { display: flex; align-items: center; justify-content: center; }
  .hero { padding: 60px 16px 0; }
  .hero-stats { flex-wrap: wrap; }
  .hero-stat { min-width: 50%; border-bottom: 1px solid rgba(255,255,255,0.08); }
  .masonry-grid { columns: 2 160px; column-gap: 10px; padding: 0 12px 12px; }
  .photo-card { margin-bottom: 10px; }
  .home-section { padding: 48px 16px; }
  .categories-grid { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  .collections-grid { grid-template-columns: 1fr; }
  .lightbox-content { flex-direction: column; }
  .lightbox-info { width: 100%; max-height: 300px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .search-page-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .masonry-grid { columns: 2 140px; }
  .hero-title { font-size: 32px; }
  .hero-search-box { padding: 4px 4px 4px 16px; }
  .hero-search-box input { font-size: 14px; }
  .hs-btn { padding: 10px 18px; font-size: 13px; }
  .lightbox-nav { display: none; }
  .footer-links { grid-template-columns: 1fr; }
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in-up {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.fade-in-up.visible { opacity: 1; transform: translateY(0); }

/* ===== PROVIDER LOAD STATES ===== */
.provider-done { opacity: 0.5; }
.provider-done i { display: none; }
.provider-done::before { content: "✓ "; }
