/* ============================================================
   Vuka — gallery.css
   Custom styles for gallery.html
   ============================================================ */

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  color: #111111;
  background: #fff;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a   { text-decoration: none; color: inherit; }

/* ── Design tokens ─────────────────────────────────────── */
:root {
  --green:       #3DBF50;
  --green-dark:  #35a845;
  --green-tint:  rgba(61,191,80,0.08);
  --near-black:  #111111;
  --mid-grey:    #888888;
  --light-grey:  #F4F4F4;
  --white:       #FFFFFF;
  --radius-card: 12px;
  --radius-btn:  100px;
  --transition:  all 0.2s ease;
  --max-w:       1100px;
}

/* ── Utilities ──────────────────────────────────────────── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

.section-label {
  display: block;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 16px;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--green);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  padding: 14px 28px;
  border-radius: var(--radius-btn);
  border: 2px solid var(--green);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  transform: scale(1.02);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--green);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 22px;
  border-radius: var(--radius-btn);
  border: 2px solid var(--green);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.btn-outline:hover { background: var(--green); color: #fff; }

/* ── Navigation ─────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s, box-shadow 0.2s;
  padding: 0 24px;
}
.nav.scrolled {
  border-color: var(--light-grey);
  box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-logo        { display: flex; align-items: center; gap: 10px; }
.nav-logo-mark   { width: 36px; height: 36px; background: var(--green); border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-logo-mark svg { width: 18px; height: 18px; }
.nav-logo-word   { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 22px; color: var(--green); letter-spacing: -0.02em; }
.nav-links       { display: flex; align-items: center; gap: 32px; }
.nav-links a     { font-size: 14px; font-weight: 500; color: var(--near-black); transition: color 0.15s; }
.nav-links a:hover { color: var(--green); }
.nav-links a.active { color: var(--green); font-weight: 600; }
.nav-actions     { display: flex; align-items: center; gap: 12px; }
.nav-hamburger   { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 4px; background: none; border: none; }
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--near-black); border-radius: 2px; transition: var(--transition); }

.nav-mobile {
  display: none;
  position: fixed;
  top: 68px; left: 0; right: 0;
  background: #fff;
  padding: 24px;
  border-bottom: 1px solid var(--light-grey);
  z-index: 199;
  flex-direction: column;
  gap: 24px;
}
.nav-mobile.open { display: flex; }
.nav-mobile a { font-size: 16px; font-weight: 500; color: var(--near-black); }
.nav-mobile a:hover { color: var(--green); }
.nav-mobile .btn-primary { width: 100%; justify-content: center; }

/* ── Gallery hero ───────────────────────────────────────── */
.gallery-hero {
  padding: 148px 24px 80px;
  text-align: center;
  background: #fff;
}
.gallery-hero h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: clamp(38px, 5vw, 64px);
  color: var(--near-black);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.gallery-hero h1 em { font-style: normal; color: var(--green); }
.gallery-hero p {
  font-size: clamp(16px, 2vw, 19px);
  color: var(--mid-grey);
  max-width: 560px;
  margin: 0 auto 36px;
  line-height: 1.65;
}
.gallery-hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.hero-stat          { text-align: center; }
.hero-stat strong   { display: block; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 26px; color: var(--near-black); }
.hero-stat span     { font-size: 13px; color: var(--mid-grey); }
.hero-stat-divider  { width: 1px; height: 36px; background: #E0E0E0; }

/* ── Filter bar ─────────────────────────────────────────── */
.filter-bar   { padding: 0 24px 56px; background: #fff; }
.filter-inner { max-width: var(--max-w); margin: 0 auto; }
.filter-tabs  { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-tab {
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--mid-grey);
  background: var(--light-grey);
  border: 2px solid transparent;
  border-radius: var(--radius-btn);
  padding: 9px 20px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  user-select: none;
}
.filter-tab:hover { color: var(--near-black); background: #E8E8E8; }
.filter-tab.active { color: var(--green); background: var(--green-tint); border-color: var(--green); font-weight: 600; }

/* ── Gallery grid ───────────────────────────────────────── */
.gallery-section { padding: 0 24px 100px; background: #fff; }
.gallery-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ── Template card ──────────────────────────────────────── */
.template-card {
  border: 1px solid #E8E8E8;
  border-radius: var(--radius-card);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.template-card:hover {
  box-shadow: 0 8px 40px rgba(0,0,0,0.1);
  transform: translateY(-4px);
  border-color: var(--green);
}
.template-card.hidden { display: none; }

/* Browser chrome */
.card-browser    { background: #F0F0F0; padding: 10px 14px 0; border-bottom: 1px solid #E0E0E0; flex-shrink: 0; }
.browser-dots    { display: flex; gap: 6px; margin-bottom: 8px; }
.browser-dot     { width: 10px; height: 10px; border-radius: 50%; }
.browser-dot:nth-child(1) { background: #FF5F57; }
.browser-dot:nth-child(2) { background: #FFBD2E; }
.browser-dot:nth-child(3) { background: #28C840; }
.browser-address {
  background: #fff;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 11px;
  color: var(--mid-grey);
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}
.browser-address::before {
  content: '';
  display: inline-block;
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Iframe preview */
.card-preview {
  width: 100%;
  height: 220px;
  overflow: hidden;
  position: relative;
  background: var(--light-grey);
  cursor: pointer;
}
.card-preview iframe {
  width: 1280px;
  height: 740px;
  border: none;
  transform-origin: top left;
  pointer-events: none;
  display: block;
  transform: scale(0.273);
}
.card-preview-overlay { position: absolute; inset: 0; z-index: 10; cursor: pointer; }

/* Loading shimmer */
.card-preview::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  z-index: 1;
  transition: opacity 0.4s;
}
.card-preview.loaded::before { opacity: 0; pointer-events: none; }
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Card body */
.card-body     { padding: 20px 20px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card-meta     { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card-badge    { font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; padding: 4px 10px; border-radius: 100px; flex-shrink: 0; }

.badge-barber      { background: #111;     color: #e8b84b; }
.badge-salon       { background: #fdf0e8;  color: #a67a52; }
.badge-freelancer  { background: #EEF2FF;  color: #4F46E5; }
.badge-mechanic    { background: #FFF4E6;  color: #D97706; }
.badge-tutor       { background: #F0FDF4;  color: #16A34A; }
.badge-dj          { background: #18181B;  color: #A855F7; }
.badge-architect   { background: #F8FAFC;  color: #334155; }
.badge-furniture   { background: #FEF9F0;  color: #92400E; }
.badge-professional{ background: #EFF6FF;  color: #1D4ED8; }
.badge-blog        { background: #FDF4FF;  color: #9333EA; }
.badge-affiliate   { background: #F0FDF4;  color: #15803D; }
.badge-influencer  { background: #FFF1F2;  color: #E11D48; }

.card-live-dot { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--mid-grey); font-weight: 500; }
.card-live-dot::before { content: ''; display: block; width: 6px; height: 6px; background: var(--green); border-radius: 50%; }

.card-title  { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 700; font-size: 17px; color: var(--near-black); line-height: 1.3; }
.card-desc   { font-size: 13px; color: var(--mid-grey); line-height: 1.55; flex: 1; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; padding-top: 16px; border-top: 1px solid var(--light-grey); }

.card-preview-link { font-size: 13px; font-weight: 500; color: var(--mid-grey); display: flex; align-items: center; gap: 4px; transition: color 0.15s; }
.card-preview-link:hover { color: var(--near-black); }
.card-preview-link svg { flex-shrink: 0; }

/* ── Empty state ────────────────────────────────────────── */
.gallery-empty { display: none; text-align: center; padding: 64px 24px; grid-column: 1 / -1; }
.gallery-empty.visible { display: block; }
.gallery-empty p { font-size: 16px; color: var(--mid-grey); }

/* ── CTA section ────────────────────────────────────────── */
.cta-section    { background: var(--green); padding: 100px 24px; text-align: center; }
.cta-section h2 { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: clamp(34px, 4vw, 52px); color: #fff; line-height: 1.15; letter-spacing: -0.02em; margin-bottom: 16px; }
.cta-section p  { font-size: 18px; color: rgba(255,255,255,0.88); margin-bottom: 36px; }
.btn-cta-inverted {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  color: var(--green);
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 16px;
  padding: 16px 36px;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}
.btn-cta-inverted:hover { transform: scale(1.03); box-shadow: 0 8px 32px rgba(0,0,0,0.15); }
.cta-microcopy { margin-top: 16px; font-size: 13px; color: rgba(255,255,255,0.65); }

/* ── Footer ─────────────────────────────────────────────── */
.footer        { background: var(--near-black); padding: 56px 24px 40px; }
.footer-inner  { max-width: var(--max-w); margin: 0 auto; }
.footer-top    { display: flex; align-items: flex-start; justify-content: space-between; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.08); flex-wrap: wrap; }
.footer-brand  { max-width: 280px; }
.footer-logo   { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-logo-mark { width: 32px; height: 32px; background: var(--green); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.footer-logo-mark svg { width: 16px; height: 16px; }
.footer-logo-word { font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 800; font-size: 20px; color: #fff; }
.footer-tagline   { font-size: 13px; color: #666; line-height: 1.6; }
.footer-links     { display: flex; gap: 32px; flex-wrap: wrap; }
.footer-links a   { font-size: 14px; color: #666; transition: color 0.15s; }
.footer-links a:hover { color: #fff; }
.footer-bottom    { padding-top: 28px; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-copy      { font-size: 13px; color: #444; }
.footer-site      { font-size: 13px; color: var(--green); }

/* ── Lightbox ───────────────────────────────────────────── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox-inner {
  width: 100%;
  max-width: 1100px;
  height: 85vh;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 32px 80px rgba(0,0,0,0.4);
}
.lightbox-bar     { background: #F0F0F0; padding: 12px 16px; display: flex; align-items: center; gap: 12px; flex-shrink: 0; border-bottom: 1px solid #E0E0E0; }
.lightbox-dots    { display: flex; gap: 6px; }
.lightbox-close   { background: #FF5F57; border: none; cursor: pointer; padding: 0; width: 10px; height: 10px; border-radius: 50%; }
.lightbox-dots span:nth-child(2) { width: 10px; height: 10px; background: #FFBD2E; border-radius: 50%; display: block; }
.lightbox-dots span:nth-child(3) { width: 10px; height: 10px; background: #28C840; border-radius: 50%; display: block; }
.lightbox-url    { flex: 1; background: #fff; border-radius: 6px; padding: 6px 14px; font-size: 12px; color: var(--mid-grey); }
.lightbox-iframe { flex: 1; width: 100%; border: none; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav-links, .nav-actions .btn-primary { display: none; }
  .nav-hamburger { display: flex; }
}
@media (max-width: 900px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (max-width: 600px) {
  .gallery-grid       { grid-template-columns: 1fr; gap: 20px; }
  .gallery-hero       { padding: 120px 20px 56px; }
  .filter-bar         { padding: 0 20px 40px; }
  .gallery-section    { padding: 0 20px 72px; }
  .cta-section        { padding: 72px 20px; }
  .hero-stat-divider  { display: none; }
  .gallery-hero-stats { gap: 24px; }
}
