/* ============================================================
   BNI Directory – Design System CSS
   Pinterest × Bento Grid × Luxury SaaS
   ============================================================ */

/* ── Google Fonts: Inter ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ── Design Tokens ── */
:root {
  /* Brand – Pinterest Red is THE primary */
  --c-primary:        #e60023;
  --c-primary-dark:   #cc001f;
  --c-cta:            #e60023;
  --c-cta-pressed:    #cc001f;

  /* Surfaces (Pinterest cream palette) */
  --c-canvas:         #ffffff;
  --c-surface-soft:   #fbfbf9;
  --c-surface-card:   #f6f6f3;
  --c-secondary-bg:   #e5e5e0;
  --c-secondary-p:    #c8c8c1;
  --c-surface-dark:   #262622;

  /* Text */
  --c-ink:            #000000;
  --c-ink-soft:       #211922;
  --c-body:           #33332e;
  --c-mute:           #62625b;
  --c-ash:            #91918c;
  --c-stone:          #c8c8c1;
  --c-on-dark:        #ffffff;

  /* Border */
  --c-hairline:       #dadad3;
  --c-hairline-soft:  #e5e5e0;

  /* Semantic */
  --c-error:          #9e0a0a;
  --c-success-deep:   #103c25;
  --c-success-pale:   #c7f0da;
  --c-focus:          #435ee5;
  --c-accent-purple:  #7e238b;

  /* Radius (Pinterest three-value system) */
  --r-sm:   8px;
  --r-md:   16px;   /* buttons, inputs, cards */
  --r-lg:   32px;   /* hero cards, modals */
  --r-full: 9999px; /* search bar, chips, avatars */

  /* Spacing */
  --sp-xs:      6px;
  --sp-sm:      8px;
  --sp-md:      12px;
  --sp-lg:      16px;
  --sp-xl:      24px;
  --sp-xxl:     32px;
  --sp-section: 64px;

  /* Shadows (minimal – only modal) */
  --shadow-modal: 0 16px 48px rgba(0,0,0,0.18);
  --shadow-card:  none;
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, system-ui, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--c-surface-soft);
  color: var(--c-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }

/* ── Typography scale ── */
.t-display { font-size: clamp(40px, 5vw, 64px); font-weight: 700; line-height: 1.1; letter-spacing: -1.2px; }
.t-h1      { font-size: clamp(28px, 4vw, 44px);  font-weight: 700; line-height: 1.15; letter-spacing: -0.8px; }
.t-h2      { font-size: 28px; font-weight: 700; line-height: 1.2; letter-spacing: -1.2px; }
.t-h3      { font-size: 22px; font-weight: 600; line-height: 1.25; }
.t-h4      { font-size: 18px; font-weight: 600; line-height: 1.3; }
.t-body    { font-size: 16px; font-weight: 400; line-height: 1.6; }
.t-strong  { font-size: 16px; font-weight: 600; line-height: 1.4; }
.t-sm      { font-size: 14px; font-weight: 400; line-height: 1.4; }
.t-sm-b    { font-size: 14px; font-weight: 700; line-height: 1.4; }
.t-btn     { font-size: 14px; font-weight: 700; line-height: 1; }
.t-caption { font-size: 12px; font-weight: 500; line-height: 1.5; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s, opacity 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--c-cta);
  color: #fff;
}
.btn-primary:hover  { background: var(--c-cta-pressed); }

.btn-secondary {
  background: var(--c-secondary-bg);
  color: var(--c-ink);
}
.btn-secondary:hover { background: var(--c-secondary-p); }

.btn-accent {
  background: var(--c-primary);
  color: #fff;
}
.btn-accent:hover { background: var(--c-primary-dark); }

/* Legacy alias */
.btn-green { background: var(--c-primary); color: #fff; }
.btn-green:hover { background: var(--c-primary-dark); }

.btn-ghost {
  background: transparent;
  color: var(--c-ink);
  border: 1.5px solid var(--c-hairline);
}
.btn-ghost:hover { background: var(--c-surface-card); }

.btn-dark {
  background: var(--c-surface-dark);
  color: #fff;
}
.btn-dark:hover { opacity: 0.85; }

.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-pill { border-radius: var(--r-full); }
.btn-icon {
  width: 40px; height: 40px; padding: 0;
  justify-content: center;
  border-radius: var(--r-full);
  background: var(--c-surface-card);
  color: var(--c-ink);
}
.btn-icon:hover { background: var(--c-secondary-bg); }

/* ── Cards ── */
.card {
  background: var(--c-canvas);
  border-radius: var(--r-md);
  overflow: hidden;
}
.card-soft { background: var(--c-surface-card); }
.card-lg   { border-radius: var(--r-lg); }
.card-pad  { padding: var(--sp-xxl); }

/* ── Pin Card (image-first, no padding) ── */
.pin-card {
  background: var(--c-surface-card);
  border-radius: var(--r-md);
  overflow: hidden;
  break-inside: avoid;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s;
}
.pin-card:hover { transform: translateY(-2px); }
.pin-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--r-md);
}
.pin-card .pin-overlay-pill {
  position: absolute;
  bottom: 10px; left: 10px;
  background: var(--c-canvas);
  color: var(--c-ink);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: var(--r-full);
  pointer-events: none;
}

/* ── Masonry Grid ── */
.masonry {
  column-gap: 8px;
}
.masonry-5 { column-count: 5; }
.masonry-4 { column-count: 4; }
.masonry-3 { column-count: 3; }
.masonry-2 { column-count: 2; }
.masonry-1 { column-count: 1; }

.masonry .pin-card {
  margin-bottom: 8px;
  display: inline-block;
  width: 100%;
}

@media (max-width: 1280px) { .masonry { column-count: 4; } }
@media (max-width: 1024px) { .masonry { column-count: 3; } }
@media (max-width: 768px)  { .masonry { column-count: 2; column-gap: 6px; } .masonry .pin-card { margin-bottom: 6px; } }
@media (max-width: 480px)  { .masonry { column-count: 2; column-gap: 6px; } }

/* ── Filter Chips ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--r-full);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  border: none;
  background: var(--c-surface-card);
  color: var(--c-ink);
}
.chip:hover   { background: var(--c-secondary-bg); }
.chip.active  { background: var(--c-ink); color: var(--c-on-dark); }
.chip-green   { background: #dcfce7; color: #166534; }

/* ── Tag Pills (Looking For) ── */
.tag-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--r-full);
  background: var(--c-surface-card);
  border: 1.5px solid var(--c-hairline);
  color: var(--c-body);
  font-size: 13px;
  font-weight: 600;
  transition: background 0.15s, border-color 0.15s;
}
.tag-pill:hover { background: var(--c-secondary-bg); border-color: var(--c-ash); }

/* ── Inputs ── */
.input {
  width: 100%;
  padding: 11px 15px;
  height: 44px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--c-hairline);
  background: var(--c-canvas);
  color: var(--c-ink);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input:focus {
  border-color: var(--c-ink);
  box-shadow: 0 0 0 4px rgba(67,94,229,0.15);
}
.input::placeholder { color: var(--c-ash); }

.search-bar {
  width: 100%;
  padding: 11px 15px 11px 44px;
  height: 48px;
  border-radius: var(--r-full);
  border: 1.5px solid transparent;
  background: var(--c-surface-card);
  color: var(--c-ink);
  font-size: 16px;
  font-family: inherit;
  outline: none;
  transition: background 0.15s, border-color 0.15s;
}
.search-bar:focus {
  background: var(--c-canvas);
  border-color: var(--c-ash);
}
.search-bar::placeholder { color: var(--c-ash); }

.search-wrap { position: relative; }
.search-wrap .search-icon {
  position: absolute;
  left: 14px; top: 50%;
  transform: translateY(-50%);
  color: var(--c-ash);
  pointer-events: none;
  width: 20px; height: 20px;
}

/* ── Navbar ── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: var(--c-canvas);
  border-bottom: 1px solid var(--c-hairline);
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
}
.navbar.scrolled { box-shadow: 0 2px 16px rgba(0,0,0,0.06); }

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--c-ink);
  flex-shrink: 0;
}
.nav-logo .logo-mark {
  width: 32px; height: 32px;
  background: var(--c-primary);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 16px;
}

/* ── Sticky Mobile Bottom CTA ── */
.mobile-cta-bar {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--c-canvas);
  border-top: 1px solid var(--c-hairline);
  padding: 12px 16px;
  gap: 8px;
  z-index: 200;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}
@media (max-width: 768px) {
  .mobile-cta-bar { display: flex; }
  .mobile-cta-bar .btn { flex: 1; justify-content: center; }
}

/* ── Hero Section ── */
.hero-cover {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--c-surface-dark);
}
.hero-cover .cover-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.hero-cover .cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.55) 100%);
}
.hero-cover .cover-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #fff;
  padding: 48px 24px;
  max-width: 720px;
}

/* ── Bento Grid ── */
.bento {
  display: grid;
  gap: 16px;
}
.bento-2   { grid-template-columns: 1fr 1fr; }
.bento-3   { grid-template-columns: 2fr 1fr 1fr; }
.bento-auto { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
@media (max-width: 768px) {
  .bento-2, .bento-3 { grid-template-columns: 1fr; }
}

.bento-card {
  background: var(--c-canvas);
  border-radius: var(--r-md);
  padding: 28px;
  border: 1px solid var(--c-hairline-soft);
}
.bento-card-soft {
  background: var(--c-surface-card);
  border-radius: var(--r-md);
  padding: 28px;
}
.bento-card-dark {
  background: var(--c-surface-dark);
  color: var(--c-on-dark);
  border-radius: var(--r-md);
  padding: 28px;
}
.bento-card-green {
  background: var(--c-primary);
  color: #fff;
  border-radius: var(--r-md);
  padding: 28px;
}

/* ── Infinite Logo Slider ── */
.logo-slider-wrap {
  overflow: hidden;
  position: relative;
}
.logo-slider-wrap::before,
.logo-slider-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 80px;
  z-index: 2;
  pointer-events: none;
}
.logo-slider-wrap::before { left: 0;  background: linear-gradient(to right, var(--c-surface-soft), transparent); }
.logo-slider-wrap::after  { right: 0; background: linear-gradient(to left, var(--c-surface-soft), transparent); }

.logo-slider {
  display: flex;
  gap: 32px;
  animation: slideLogos 20s linear infinite;
  width: max-content;
}
.logo-slider:hover { animation-play-state: paused; }

.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  min-width: 120px;
  padding: 0 16px;
  background: var(--c-canvas);
  border-radius: var(--r-md);
  border: 1px solid var(--c-hairline-soft);
  font-size: 13px;
  font-weight: 700;
  color: var(--c-mute);
  white-space: nowrap;
  flex-shrink: 0;
}
.logo-item img { max-height: 32px; object-fit: contain; }

@keyframes slideLogos {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ── Testimonial Card ── */
.testimonial-card {
  background: var(--c-canvas);
  border-radius: var(--r-md);
  padding: 24px;
  border: 1px solid var(--c-hairline-soft);
  flex-shrink: 0;
}
.testimonial-slider {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.testimonial-slider::-webkit-scrollbar { display: none; }
.testimonial-slider .testimonial-card  { scroll-snap-align: start; min-width: 300px; max-width: 340px; }

/* ── Contact Cards ── */
.contact-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--c-canvas);
  border-radius: var(--r-md);
  border: 1px solid var(--c-hairline-soft);
  text-decoration: none;
  color: var(--c-ink);
  transition: background 0.15s, transform 0.15s;
}
.contact-card:hover { background: var(--c-surface-card); transform: translateY(-1px); }
.contact-card .cc-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 22px;
}

/* Masonry treatment for member cards */
.masonry .member-card {
  display: inline-block;
  width: 100%;
}

/* ── Member Card (directory) ── */
.member-card {
  background: var(--c-canvas);
  border-radius: var(--r-md);
  overflow: hidden;
  break-inside: avoid;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  display: block;
  text-decoration: none;
  color: inherit;
  margin-bottom: 16px;
  border: 1px solid var(--c-hairline-soft);
}
.member-card:hover { transform: translateY(-3px); box-shadow: 0 8px 32px rgba(0,0,0,0.08); }
.member-card .mc-cover {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: var(--c-surface-card);
  display: block;
}
.member-card .mc-cover-placeholder {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--c-surface-card), var(--c-secondary-bg));
  display: flex;
  align-items: center;
  justify-content: center;
}
.member-card .mc-body { padding: 16px; }
.member-card .mc-logo {
  width: 48px; height: 48px;
  border-radius: var(--r-full);
  object-fit: cover;
  border: 2.5px solid var(--c-canvas);
  background: var(--c-surface-card);
  margin-top: -28px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

/* ── Section spacing ── */
.section       { padding: var(--sp-section) 0; }
.section-sm    { padding: 40px 0; }
.container     { max-width: 1280px; margin: 0 auto; padding: 0 24px; }
.container-sm  { max-width: 960px;  margin: 0 auto; padding: 0 24px; }

/* ── Avatar ── */
.avatar {
  border-radius: var(--r-full);
  overflow: hidden;
  background: var(--c-surface-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}
.avatar-sm  { width: 32px; height: 32px; font-size: 12px; }
.avatar-md  { width: 48px; height: 48px; font-size: 16px; }
.avatar-lg  { width: 80px; height: 80px; font-size: 24px; }
.avatar-xl  { width: 112px; height: 112px; font-size: 32px; }

/* ── Badge ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 600;
}
.badge-green  { background: #dcfce7; color: #166534; }
.badge-red    { background: #fee2e2; color: #9e0a0a; }
.badge-gray   { background: var(--c-surface-card); color: var(--c-mute); }
.badge-dark   { background: var(--c-ink); color: #fff; }

/* ── Divider ── */
.divider { height: 1px; background: var(--c-hairline); margin: var(--sp-xl) 0; }

/* ── Modal / Lightbox ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal-card {
  background: var(--c-canvas);
  border-radius: var(--r-lg);
  padding: var(--sp-xxl);
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow-modal);
  transform: scale(0.95);
  transition: transform 0.25s;
}
.modal-overlay.open .modal-card { transform: scale(1); }

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: var(--r-md); object-fit: contain; }
.lightbox-close {
  position: absolute;
  top: 20px; right: 20px;
  background: rgba(255,255,255,0.15);
  border: none; cursor: pointer;
  width: 40px; height: 40px;
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px;
  transition: background 0.15s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.3); }

/* ── Footer ── */
.footer {
  background: var(--c-canvas);
  border-top: 1px solid var(--c-hairline);
  padding: var(--sp-xxl) 0;
  color: var(--c-mute);
}

/* ── Dark mode ── */
.dark {
  --c-canvas:        #111111;
  --c-surface-soft:  #161616;
  --c-surface-card:  #1e1e1e;
  --c-secondary-bg:  #2a2a2a;
  --c-hairline:      #2e2e2e;
  --c-hairline-soft: #232323;
  --c-ink:           #f5f5f5;
  --c-body:          #d4d4d4;
  --c-mute:          #888;
  --c-on-dark:       #f5f5f5;
}
.dark body  { background: var(--c-surface-soft); color: var(--c-body); }
.dark .navbar, .dark .footer { background: var(--c-canvas); }

/* ── Scroll animations ── */
[data-aos] {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.6s ease, filter 0.6s ease;
}
[data-aos].aos-in { opacity: 1; transform: none !important; filter: none !important; }

[data-aos="fade-up"]    { transform: translateY(28px); }
[data-aos="fade-right"] { transform: translateX(-28px); }
[data-aos="fade-left"]  { transform: translateX(28px); }
[data-aos="scale"]      { transform: scale(0.94); }
[data-aos="blur"]       { filter: blur(6px); transform: translateY(12px); }

/* AOS delays */
[data-aos-delay="100"] { transition-delay: 0.1s; }
[data-aos-delay="150"] { transition-delay: 0.15s; }
[data-aos-delay="200"] { transition-delay: 0.2s; }
[data-aos-delay="300"] { transition-delay: 0.3s; }
[data-aos-delay="400"] { transition-delay: 0.4s; }
[data-aos-delay="500"] { transition-delay: 0.5s; }

/* ── Admin sidebar layout ── */
.admin-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
@media (max-width: 768px) {
  .admin-layout { grid-template-columns: 1fr; }
  .admin-sidebar { display: none; }
  .admin-sidebar.open { display: flex; position: fixed; inset: 0; z-index: 300; }
}

.admin-sidebar {
  background: var(--c-surface-dark);
  color: var(--c-on-dark);
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.admin-sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px 20px;
  font-weight: 700;
  font-size: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 12px;
}
.admin-sidebar .brand .dot {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--c-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800;
}
.admin-sidebar a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.admin-sidebar a:hover  { background: rgba(255,255,255,0.08); color: #fff; }
.admin-sidebar a.active { background: rgba(255,255,255,0.12); color: #fff; font-weight: 600; }
.admin-sidebar a svg    { width: 18px; height: 18px; flex-shrink: 0; }

.admin-content {
  background: var(--c-surface-soft);
  padding: 32px;
  overflow-y: auto;
}
@media (max-width: 768px) { .admin-content { padding: 20px 16px; } }

/* ── Stat card ── */
.stat-card {
  background: var(--c-canvas);
  border-radius: var(--r-md);
  padding: 24px;
  border: 1px solid var(--c-hairline-soft);
}
.stat-card .stat-num {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
}
.stat-card .stat-label { font-size: 13px; color: var(--c-mute); margin-top: 4px; }

/* ── Table ── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
table th { font-size: 12px; font-weight: 700; color: var(--c-mute); text-transform: uppercase; letter-spacing: 0.5px; padding: 10px 16px; border-bottom: 1px solid var(--c-hairline); text-align: left; background: var(--c-surface-card); }
table td { padding: 14px 16px; border-bottom: 1px solid var(--c-hairline-soft); font-size: 14px; vertical-align: middle; }
table tr:last-child td { border-bottom: none; }
table tbody tr:hover { background: var(--c-surface-card); }

/* ── Form group ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--c-body); }
.form-group .hint  { font-size: 12px; color: var(--c-mute); }

textarea.input { height: auto; min-height: 100px; resize: vertical; padding: 11px 15px; }
select.input   { appearance: none; cursor: pointer; }

/* ── Alert / Notice ── */
.alert {
  padding: 14px 18px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
}
.alert-success { background: #dcfce7; color: #166534; }
.alert-error   { background: #fee2e2; color: #9e0a0a; }
.alert-info    { background: #dbeafe; color: #1e40af; }

/* ── Utility ── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.aspect-square { aspect-ratio: 1 / 1; }
.aspect-video  { aspect-ratio: 16 / 9; }
.object-cover  { object-fit: cover; width: 100%; height: 100%; }

/* ── Green accent line ── */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--c-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}
.section-label::before {
  content: '';
  display: block;
  width: 20px; height: 2.5px;
  background: var(--c-primary);
  border-radius: 2px;
}

/* ── Profile completion bar ── */
.progress-bar {
  height: 6px;
  background: var(--c-surface-card);
  border-radius: var(--r-full);
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--c-primary);
  border-radius: var(--r-full);
  transition: width 0.6s ease;
}

/* ── QR code wrapper ── */
.qr-wrap {
  display: inline-flex;
  padding: 16px;
  background: #fff;
  border-radius: var(--r-md);
  border: 1px solid var(--c-hairline);
}

/* ── Gallery Hero Slider ── */
.gallery-slider-wrap { position: relative; }

.gallery-hero-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--c-surface-card);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
@media (max-width: 640px) {
  .gallery-hero-slider {
    aspect-ratio: 4/3;
    border-radius: var(--r-md);
  }
}

.gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}
.gallery-slide.active {
  opacity: 1;
  pointer-events: auto;
}
.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-slide-caption {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
  padding: 56px 24px 20px;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  pointer-events: none;
}

/* Arrows */
.slider-arrow {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px;
  background: rgba(255,255,255,0.92);
  border: none;
  border-radius: var(--r-full);
  cursor: pointer;
  z-index: 10;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
  transition: background 0.15s, transform 0.15s;
  color: var(--c-ink);
}
.slider-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.06); }
.slider-arrow-prev { left: 14px; }
.slider-arrow-next { right: 14px; }
@media (max-width: 480px) {
  .slider-arrow { width: 36px; height: 36px; }
  .slider-arrow-prev { left: 8px; }
  .slider-arrow-next { right: 8px; }
}

/* Progress bar (auto-play indicator) */
.slider-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255,255,255,0.2);
  z-index: 10;
  overflow: hidden;
}
.slider-progress-fill {
  height: 100%;
  background: var(--c-primary);
  width: 0;
  animation: sliderProgress 3s linear infinite;
}
@keyframes sliderProgress { from { width: 0; } to { width: 100%; } }
.gallery-hero-slider:hover .slider-progress-fill { animation-play-state: paused; }

/* Dots */
.slider-dots {
  position: absolute;
  bottom: 14px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
  z-index: 10;
}
.slider-dot {
  width: 8px; height: 8px;
  border-radius: var(--r-full);
  background: rgba(255,255,255,0.45);
  border: none; cursor: pointer;
  transition: background 0.2s, width 0.25s;
  padding: 0;
}
.slider-dot.active { background: #fff; width: 24px; }

/* Slide counter badge */
.slider-counter {
  position: absolute;
  top: 14px; right: 14px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-full);
  z-index: 10;
  letter-spacing: 0.5px;
}

/* Thumbnails strip */
.gallery-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0 2px;
  scrollbar-width: none;
}
.gallery-thumbs::-webkit-scrollbar { display: none; }
.gallery-thumb {
  flex-shrink: 0;
  width: 80px; height: 56px;
  border-radius: var(--r-sm);
  overflow: hidden;
  cursor: pointer;
  opacity: 0.55;
  border: 2.5px solid transparent;
  transition: opacity 0.2s, border-color 0.2s;
}
.gallery-thumb.active { opacity: 1; border-color: var(--c-primary); }
.gallery-thumb:hover  { opacity: 0.85; }
.gallery-thumb img    { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 480px) {
  .gallery-thumb { width: 60px; height: 42px; }
}

/* ── Rating Stars (interactive) ── */
.rating-star {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--c-ash);
  transition: color 0.15s, transform 0.1s;
}
.rating-star:hover { transform: scale(1.15); }
.rating-star.active { color: #fbbf24; }

/* ── Testimonial Rotation ── */
.testimonial-item {
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.testimonial-item.fade-out {
  opacity: 0;
  transform: translateY(10px);
}
.testimonial-item.fade-in {
  opacity: 1;
  transform: translateY(0);
}

/* ── Stats Bar ── */
.stats-bar {
  background: var(--c-surface-dark);
  padding: 56px 0;
}
.stats-bar .stat-item {
  text-align: center;
  padding: 0 24px;
  border-right: 1px solid rgba(255,255,255,0.08);
}
.stats-bar .stat-item:last-child { border-right: none; }
.stats-bar .stat-num {
  font-size: clamp(36px,6vw,60px);
  font-weight: 800;
  color: var(--c-primary);
  line-height: 1;
  letter-spacing: -2px;
  display: block;
}
.stats-bar .stat-label {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  margin-top: 8px;
  font-weight: 500;
}

/* ── Testimonials Grid ── */
.testimonial-grid-card {
  background: var(--c-canvas);
  border: 1px solid var(--c-hairline);
  border-radius: var(--r-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.testimonial-grid-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
}
.testimonial-grid-card .quote-bg {
  position: absolute;
  top: 12px;
  left: 16px;
  font-size: 80px;
  line-height: 1;
  color: var(--c-hairline);
  font-family: Georgia, serif;
  pointer-events: none;
  user-select: none;
}

/* ── Contact Form Modal ── */
#contact-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}
#contact-modal.open {
  opacity: 1;
  pointer-events: all;
}
#contact-modal .modal-inner {
  background: var(--c-canvas);
  border-radius: var(--r-modal);
  padding: 32px;
  width: 100%;
  max-width: 440px;
  transform: translateY(20px);
  transition: transform 0.25s;
  box-shadow: 0 24px 80px rgba(0,0,0,0.2);
}
#contact-modal.open .modal-inner {
  transform: translateY(0);
}

/* ── Floating Contact Button ── */
.floating-msg-btn {
  position: fixed;
  right: 20px;
  bottom: 88px;
  z-index: 190;
  background: var(--c-primary);
  color: #fff;
  border: none;
  border-radius: var(--r-full);
  padding: 13px 20px;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,192,122,0.45);
  transition: transform 0.2s, box-shadow 0.2s;
}
.floating-msg-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,192,122,0.55);
}
@media (max-width: 640px) {
  .floating-msg-btn .btn-label { display: none; }
  .floating-msg-btn { padding: 14px; border-radius: 50%; }
}

/* ── Hero review badge ── */
.hero-review-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--r-full);
  padding: 6px 16px;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 16px;
}
.hero-review-badge .stars { color: #fbbf24; }

/* ── vCard / Download button ── */
.btn-dark {
  background: var(--c-ink);
  color: #fff;
  border: 1px solid transparent;
}
.btn-dark:hover {
  background: #222;
}

/* ── Before / After Comparison Slider ── */
.ba-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-md);
  cursor: col-resize;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  background: var(--c-surface-card);
}
.ba-before,
.ba-after {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.ba-after {
  clip-path: inset(0 50% 0 0);
}
.ba-spacer {
  width: 100%;
  aspect-ratio: 4 / 3;
  display: block;
  visibility: hidden;
}
.ba-divider {
  position: absolute;
  top: 0; bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(255,255,255,0.9);
  pointer-events: none;
  transform: translateX(-50%);
}
.ba-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  border-radius: var(--r-full);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.25);
  pointer-events: none;
  color: var(--c-ink);
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -2px;
}
.ba-label-before,
.ba-label-after {
  position: absolute;
  bottom: 10px;
  padding: 4px 12px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 700;
  pointer-events: none;
  background: rgba(0,0,0,0.55);
  color: #fff;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.ba-label-before { left: 12px; }
.ba-label-after  { right: 12px; }

/* ── Video Embed ── */
.video-embed-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--r-md);
  overflow: hidden;
  background: #000;
}
.video-embed-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ── Maps Embed ── */
.maps-embed-wrap {
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--c-hairline-soft);
}
.maps-embed-wrap iframe {
  width: 100%;
  height: 360px;
  border: none;
  display: block;
}

/* ── Drop zone drag state ── */
.drop-zone { transition: border-color 0.15s, background 0.15s; }
.drop-zone.drag-over {
  border-color: var(--c-primary) !important;
  background: rgba(0,192,122,0.06) !important;
}

/* ── Mobile admin sidebar open state ── */
@media (max-width: 768px) {
  .admin-sidebar.open {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    width: 260px;
    z-index: 300;
    overflow-y: auto;
  }
}

/* Scrollbar styling */
::-webkit-scrollbar        { width: 6px; height: 6px; }
::-webkit-scrollbar-track  { background: transparent; }
::-webkit-scrollbar-thumb  { background: var(--c-stone); border-radius: 99px; }
