/* ============================================================
   Beverly Slater Atelier – Main Stylesheet
   Replicates the original React/Tailwind design
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500&family=Inter:wght@300;400;500;600&display=swap');

/* ── CSS Variables ── */
:root {
  --font-display:     'Cormorant Garamond', serif;
  --font-body:        'Inter', sans-serif;

  --bg:               hsl(30, 20%, 97%);
  --fg:               hsl(0, 0%, 10%);
  --primary:          hsl(24, 25%, 66%);
  --primary-fg:       #ffffff;
  --secondary:        hsl(30, 10%, 92%);
  --muted-fg:         hsl(0, 0%, 40%);
  --border:           hsl(30, 15%, 85%);
  --card-bg:          hsl(30, 20%, 97%);
  --radius:           0.25rem;
}

/* ── Reset & base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ── Typography helpers ── */
.font-display { font-family: var(--font-display); }
.font-body    { font-family: var(--font-body); }

/* ── Layout ── */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 1024px) { .container { padding: 0 3rem; } }

/* ── Navbar ── */
nav.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background 0.5s, box-shadow 0.5s;
}
nav.site-nav.scrolled {
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}
nav.site-nav .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
@media (min-width: 1024px) { nav.site-nav .nav-inner { padding: 0 3rem; } }

nav.site-nav .nav-logo img {
  height: 64px;
  width: auto;
  transition: filter 0.5s;
}
@media (min-width: 768px) { nav.site-nav .nav-logo img { height: 80px; } }
nav.site-nav:not(.scrolled) .nav-logo img { filter: brightness(0) invert(1); }
nav.site-nav.scrolled .nav-logo img { filter: none; }

nav.site-nav .nav-links {
  display: none;
  align-items: center;
  gap: 2.5rem;
  list-style: none;
}
@media (min-width: 768px) { nav.site-nav .nav-links { display: flex; } }

nav.site-nav .nav-links a {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  transition: color 0.3s;
}
nav.site-nav:not(.scrolled) .nav-links a { color: rgba(255,255,255,0.8); }
nav.site-nav:not(.scrolled) .nav-links a:hover,
nav.site-nav:not(.scrolled) .nav-links a.active { color: #fff; }
nav.site-nav.scrolled .nav-links a { color: rgba(26,26,26,0.7); }
nav.site-nav.scrolled .nav-links a:hover,
nav.site-nav.scrolled .nav-links a.active { color: var(--primary); }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  cursor: pointer;
  transition: color 0.3s;
}
@media (min-width: 768px) { .nav-toggle { display: none; } }
nav.site-nav:not(.scrolled) .nav-toggle { color: #fff; }
nav.site-nav.scrolled .nav-toggle { color: var(--fg); }
.nav-toggle span {
  display: block;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  display: none;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  flex-direction: column;
  gap: 1rem;
}
.mobile-menu.open { display: flex; }
.mobile-menu a {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(26,26,26,0.7);
  padding: 0.5rem 0;
}
.mobile-menu a.active { color: var(--primary); }

/* ── Page Hero ── */
.page-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}
.page-hero .hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(26,26,26,0.35);
}
.page-hero .hero-content {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  padding: 0 1.5rem;
}
.page-hero .hero-logo {
  height: 112px;
  width: auto;
  margin: 0 auto 1.5rem;
  filter: brightness(0) invert(1);
}
@media (min-width: 768px) { .page-hero .hero-logo { height: 160px; } }
.page-hero .hero-subtitle {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 6rem);
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1;
}
.page-hero .hero-sub {
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-top: 1.5rem;
}

/* ── Sections ── */
section { padding: 6rem 0; }
@media (min-width: 1024px) { section { padding: 10rem 0; } }

/* ── Quote section ── */
.quote-section {
  background: var(--secondary);
  text-align: center;
  padding: 5rem 1.5rem;
}
.quote-section blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-style: italic;
  color: var(--fg);
  max-width: 800px;
  margin: 0 auto 1rem;
  line-height: 1.5;
}
.quote-section cite {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
}

/* ── Services preview ── */
.services-preview { padding: 6rem 0; }
@media (min-width: 1024px) { .services-preview { padding: 10rem 0; } }
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-top: 4rem;
}
@media (min-width: 768px) { .services-grid { grid-template-columns: repeat(3, 1fr); gap: 4rem; } }
.service-card { text-align: center; }
.service-icon {
  width: 64px; height: 64px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  border: 1px solid rgba(184,158,139,0.3);
  display: flex; align-items: center; justify-content: center;
}
.service-icon svg { width: 24px; height: 24px; color: var(--primary); stroke: var(--primary); }
.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin-bottom: 1rem;
}
.service-card p {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: rgba(26,26,26,0.6);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}
.link-underline {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  border-bottom: 1px solid rgba(184,158,139,0.4);
  padding-bottom: 2px;
  transition: border-color 0.2s;
}
.link-underline:hover { border-color: var(--primary); }

/* ── Testimonials ── */
.testimonials-section {
  background: var(--fg);
  color: rgba(250,248,245,0.8);
  text-align: center;
  padding: 6rem 1.5rem;
}
@media (min-width: 1024px) { .testimonials-section { padding: 10rem 1.5rem; } }
.testimonial-quote {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.5rem);
  font-style: italic;
  line-height: 1.5;
  color: rgba(250,248,245,0.9);
  max-width: 800px;
  margin: 0 auto 2rem;
}
.testimonial-name {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
}
.testimonial-detail {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: rgba(250,248,245,0.5);
  margin-top: 0.25rem;
}
.testimonial-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 3rem;
}
.testimonial-btn {
  color: rgba(250,248,245,0.4);
  transition: color 0.2s;
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
}
.testimonial-btn:hover { color: rgba(250,248,245,1); }
.testimonial-btn svg { width: 20px; height: 20px; }
.testimonial-dots { display: flex; gap: 8px; }
.testimonial-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(250,248,245,0.2);
  transition: background 0.2s;
  cursor: pointer;
  border: none;
}
.testimonial-dot.active { background: var(--primary); }

/* ── CTA section ── */
.cta-section { text-align: center; padding: 6rem 0; }
@media (min-width: 1024px) { .cta-section { padding: 10rem 0; } }
.cta-section h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 1.5rem;
}
.cta-section p {
  font-family: var(--font-body);
  color: rgba(26,26,26,0.6);
  max-width: 480px;
  margin: 0 auto 2.5rem;
  line-height: 1.8;
}

/* ── Buttons ── */
.btn-primary {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  background: var(--primary);
  color: #fff;
  padding: 1rem 2.5rem;
  transition: background 0.2s;
}
.btn-primary:hover { background: rgba(184,158,139,0.85); }
.btn-outline {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 0.625rem 1.25rem;
  background: var(--bg);
  transition: background 0.2s;
  border-radius: var(--radius);
}
.btn-outline:hover { background: var(--secondary); }
.btn-danger {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  background: #dc2626;
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  transition: background 0.2s;
}
.btn-danger:hover { background: #b91c1c; }

/* ── About page grid ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}
@media (min-width: 1024px) { .about-grid { grid-template-columns: 3fr 2fr; gap: 6rem; } }
.about-text h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 2rem;
}
.about-text p {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: rgba(26,26,26,0.7);
  line-height: 1.85;
  margin-bottom: 1.5rem;
}
.about-img img { box-shadow: 0 25px 50px rgba(0,0,0,0.15); }
@media (min-width: 1024px) { .about-img img { position: sticky; top: 7rem; } }

/* ── Services page ── */
.services-list { display: flex; flex-direction: column; gap: 6rem; }
.service-item { display: flex; flex-direction: column; gap: 2rem; align-items: flex-start; }
@media (min-width: 768px) { .service-item { flex-direction: row; gap: 2rem; } }
.service-item-icon {
  width: 64px; height: 64px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(184,158,139,0.3);
  display: flex; align-items: center; justify-content: center;
}
.service-item h3 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 1rem;
}
.service-item p {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: rgba(26,26,26,0.7);
  line-height: 1.85;
}

/* ── Blog ── */
.blog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}
@media (min-width: 768px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .blog-grid { grid-template-columns: repeat(3, 1fr); } }

.blog-card a { display: block; }
.blog-card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.blog-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s;
}
.blog-card a:hover .blog-card-img img { transform: scale(1.05); }
.blog-card-date {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.75rem;
}
.blog-card h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  transition: color 0.2s;
}
.blog-card a:hover h3 { color: var(--primary); }
.blog-card p {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: rgba(26,26,26,0.6);
  margin-top: 0.75rem;
  line-height: 1.7;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ── Blog post ── */
.blog-post-hero {
  width: 100%;
  height: 50vh;
  min-height: 400px;
  overflow: hidden;
  margin-top: 96px;
}
.blog-post-hero img { width: 100%; height: 100%; object-fit: cover; }
.blog-post-article {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--primary);
  margin-bottom: 2.5rem;
  transition: color 0.2s;
}
.back-link:hover { color: rgba(184,158,139,0.7); }
.back-link svg { width: 14px; height: 14px; }
.post-meta {
  font-family: var(--font-body);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1rem;
}
.post-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  margin-bottom: 2.5rem;
  line-height: 1.1;
}

/* ── Rich text content ── */
.prose-content h1 { font-family: var(--font-display); font-size: 2rem; font-weight: 600; margin-bottom: 1rem; }
.prose-content h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; margin-bottom: 0.75rem; }
.prose-content h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
.prose-content p { margin-bottom: 1rem; line-height: 1.75; color: rgba(26,26,26,0.8); }
.prose-content ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.prose-content ol { list-style: decimal; padding-left: 1.5rem; margin-bottom: 1rem; }
.prose-content li { margin-bottom: 0.25rem; }
.prose-content blockquote { border-left: 3px solid var(--primary); padding-left: 1rem; margin: 1.5rem 0; font-style: italic; }
.prose-content a { color: var(--primary); text-decoration: underline; }

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
}
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 6rem; } }
.contact-detail-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.contact-detail-value {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--fg);
  transition: color 0.2s;
  word-break: break-word;
}
.contact-detail-value:hover { color: var(--primary); }
.contact-hours {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: rgba(26,26,26,0.6);
  line-height: 1.8;
}
.contact-h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 2.5rem;
}

/* ── Form ── */
.form-group { margin-bottom: 1.5rem; }
.form-label {
  display: block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(26,26,26,0.6);
  margin-bottom: 0.5rem;
}
.form-input, .form-textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  padding: 0.5rem 0;
  outline: none;
  color: var(--fg);
  border-radius: 0;
  transition: border-color 0.2s;
}
.form-input:focus, .form-textarea:focus { border-color: var(--primary); }
.form-textarea { resize: none; min-height: 150px; }

/* Admin form inputs */
.admin-input, .admin-textarea, .admin-select {
  width: 100%;
  font-family: var(--font-body);
  font-size: 0.875rem;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  outline: none;
  color: var(--fg);
  border-radius: var(--radius);
  transition: border-color 0.2s;
}
.admin-input:focus, .admin-textarea:focus, .admin-select:focus { border-color: var(--primary); }
.admin-textarea { resize: vertical; min-height: 120px; }

/* ── Footer ── */
footer.site-footer {
  background: var(--fg);
  color: rgba(250,248,245,0.8);
  padding: 4rem 0 2rem;
}
@media (min-width: 1024px) { footer.site-footer { padding: 6rem 0 2.5rem; } }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); gap: 4rem; } }
.footer-heading {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: rgba(250,248,245,1);
  margin-bottom: 1.5rem;
}
.footer-body {
  font-family: var(--font-body);
  font-size: 0.875rem;
  line-height: 1.8;
  color: rgba(250,248,245,0.8);
}
.footer-body a { transition: color 0.2s; }
.footer-body a:hover { color: var(--primary); }
.footer-bottom {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(250,248,245,0.1);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.footer-copy {
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: rgba(250,248,245,0.5);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.footer-copy a { transition: color 0.2s; }
.footer-copy a:hover { color: var(--primary); }
.footer-links {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  color: rgba(250,248,245,0.5);
}
.footer-links a { transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }
.footer-admin-icon { opacity: 0.4; transition: opacity 0.2s; }
.footer-admin-icon:hover { opacity: 1; }

/* ── Cookie consent banner ── */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  left: 1rem;
  right: 1rem;
  max-width: 480px;
  background: var(--fg);
  color: rgba(250,248,245,0.9);
  padding: 1.25rem 1.5rem;
  z-index: 999;
  display: none;
  gap: 1rem;
  align-items: flex-start;
  flex-direction: column;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
}
.cookie-banner.show { display: flex; }
@media (min-width: 640px) { .cookie-banner { flex-direction: row; align-items: center; } }
.cookie-banner p {
  font-family: var(--font-body);
  font-size: 0.8rem;
  line-height: 1.6;
  flex: 1;
}
.cookie-banner a { color: var(--primary); }
.cookie-btn {
  font-family: var(--font-body);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--primary);
  color: #fff;
  padding: 0.5rem 1rem;
  white-space: nowrap;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.cookie-btn:hover { background: rgba(184,158,139,0.85); }

/* ── Policy pages ── */
.policy-page {
  padding-top: 96px;
  min-height: 100vh;
}
.policy-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 1.5rem 6rem;
}
.policy-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 2.5rem;
}

/* ── Spinner ── */
.spinner {
  width: 32px; height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 3rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Toast notifications ── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.toast {
  background: var(--fg);
  color: rgba(250,248,245,0.9);
  padding: 0.875rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  max-width: 340px;
  animation: slideIn 0.3s ease-out;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.toast.success { border-left: 3px solid #22c55e; }
.toast.error   { border-left: 3px solid #ef4444; }
@keyframes slideIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ── Admin layout ── */
.admin-wrap {
  display: flex;
  min-height: 100vh;
  background: hsl(30, 10%, 92%);
}
.admin-sidebar {
  width: 256px;
  flex-shrink: 0;
  background: var(--bg);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0; bottom: 0; left: 0;
  z-index: 40;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s;
}
@media (min-width: 1024px) { .admin-sidebar { transform: translateX(0); position: sticky; top: 0; height: 100vh; } }
.admin-sidebar.open { transform: translateX(0); }
.admin-sidebar-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-sidebar-header h2 { font-family: var(--font-display); font-size: 1.5rem; }
.admin-sidebar nav { padding: 1rem; flex: 1; overflow-y: auto; }
.admin-nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: rgba(26,26,26,0.6);
  border-radius: var(--radius);
  transition: background 0.2s, color 0.2s;
  margin-bottom: 2px;
}
.admin-nav-link:hover { background: var(--secondary); color: var(--fg); }
.admin-nav-link.active { background: rgba(184,158,139,0.1); color: var(--primary); }
.admin-nav-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.admin-sidebar-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
}
.admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
@media (min-width: 1024px) { .admin-main { margin-left: 0; } }
.admin-topbar {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  position: sticky;
  top: 0;
  z-index: 30;
}
.admin-topbar .welcome {
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: rgba(26,26,26,0.6);
}
.admin-content { padding: 1.5rem; flex: 1; }
@media (min-width: 1024px) { .admin-content { padding: 2.5rem; } }
.admin-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(26,26,26,0.3);
  z-index: 35;
}
.admin-sidebar-overlay.show { display: block; }

/* ── Admin cards ── */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
}
.card-header h3 {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 500;
}
.card-body { padding: 1.5rem; }

/* ── Dashboard grid ── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) { .dashboard-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .dashboard-grid { grid-template-columns: repeat(3, 1fr); } }

.dash-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  cursor: pointer;
  transition: box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
}
.dash-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.dash-card-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(184,158,139,0.1);
  display: flex; align-items: center; justify-content: center;
}
.dash-card-icon svg { width: 18px; height: 18px; color: var(--primary); stroke: var(--primary); }
.dash-card-label {
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
}
.dash-card-value {
  font-family: var(--font-display);
  font-size: 2rem;
}

/* ── Admin tables / post list ── */
.post-list { display: flex; flex-direction: column; gap: 0.75rem; }
.post-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}
.post-item-thumb {
  width: 64px; height: 64px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
}
.post-item-info { flex: 1; min-width: 0; }
.post-item-title {
  font-family: var(--font-body);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.post-item-meta { font-size: 0.75rem; color: rgba(26,26,26,0.5); margin-top: 0.25rem; }
.post-item-actions { display: flex; gap: 0.25rem; flex-shrink: 0; }
.icon-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: rgba(26,26,26,0.5);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.icon-btn:hover { background: var(--secondary); color: var(--fg); }
.icon-btn.danger:hover { background: #fee2e2; color: #dc2626; }
.icon-btn svg { width: 14px; height: 14px; }

/* ── Messages ── */
.msg-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 0.75rem;
}
.msg-item.read { opacity: 0.65; }
.msg-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.msg-name { font-family: var(--font-body); font-weight: 500; }
.badge-new {
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-body);
}
.msg-contact { font-size: 0.8rem; color: rgba(26,26,26,0.6); margin-top: 0.25rem; }
.msg-body { font-size: 0.875rem; margin-top: 0.75rem; color: rgba(26,26,26,0.8); line-height: 1.6; }
.msg-date { font-size: 0.7rem; color: rgba(26,26,26,0.4); margin-top: 0.5rem; }

/* ── Tabs ── */
.tabs { margin-bottom: 1rem; display: flex; gap: 0; border-bottom: 1px solid var(--border); }
.tab-btn {
  font-family: var(--font-body);
  font-size: 0.875rem;
  padding: 0.75rem 1.25rem;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  color: rgba(26,26,26,0.6);
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Modal / dialog ── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg);
  border-radius: var(--radius);
  width: 100%;
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
}
.modal h2 { font-family: var(--font-display); font-size: 1.75rem; margin-bottom: 1.5rem; }
.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(26,26,26,0.5);
  font-size: 1.5rem;
  line-height: 1;
}

/* ── Switch toggle ── */
.switch-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
}
.switch-input { display: none; }
.switch-track {
  width: 40px; height: 22px;
  background: var(--border);
  border-radius: 999px;
  position: relative;
  transition: background 0.2s;
}
.switch-input:checked + .switch-track { background: var(--primary); }
.switch-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.switch-input:checked + .switch-track .switch-thumb { transform: translateX(18px); }
.switch-text { font-family: var(--font-body); font-size: 0.875rem; }

/* ── Alert ── */
.alert {
  padding: 0.875rem 1rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}
.alert.error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert.success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

/* ── Quill rich editor ── */
.ql-editor { min-height: 200px; font-family: var(--font-body); }
.ql-toolbar { border: 1px solid var(--border) !important; border-bottom: none !important; border-radius: var(--radius) var(--radius) 0 0; }
.ql-container { border: 1px solid var(--border) !important; border-radius: 0 0 var(--radius) var(--radius); font-family: var(--font-body) !important; }

/* ── Utility ── */
.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-8 { margin-bottom: 2rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.flex-1 { flex: 1; }
.hidden { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ── Animation helper ── */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* ── Page not found ── */
.not-found {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}
.not-found h1 { font-family: var(--font-display); font-size: 8rem; color: var(--border); line-height: 1; }
.not-found p { font-family: var(--font-body); color: rgba(26,26,26,0.5); margin-top: 1rem; }

/* ── Map ── */
.map-section iframe { display: block; }

/* ── Upload preview ── */
.upload-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.upload-preview img { width: 96px; height: 64px; object-fit: cover; border-radius: var(--radius); }
.upload-btn-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.2s;
  background: var(--bg);
}
.upload-btn-label:hover { background: var(--secondary); }
.upload-btn-label svg { width: 14px; height: 14px; }

/* ── Login page ── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--secondary);
  padding: 1.5rem;
}
.login-card {
  background: var(--bg);
  border: 1px solid var(--border);
  padding: 2.5rem;
  width: 100%;
  max-width: 400px;
}
.login-card h1 { font-family: var(--font-display); font-size: 2.5rem; margin-bottom: 0.5rem; }
.login-card p { font-family: var(--font-body); font-size: 0.875rem; color: rgba(26,26,26,0.5); margin-bottom: 2rem; }

/* ── Home two-col ── */
.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
}
@media (min-width: 1024px) { .home-grid { grid-template-columns: 1fr 1fr; gap: 6rem; } }
.home-grid h2 {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: 2rem;
}
.home-grid p {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: rgba(26,26,26,0.7);
  line-height: 1.85;
  margin-bottom: 1.5rem;
}
.home-portrait { box-shadow: 0 25px 50px rgba(0,0,0,0.15); max-width: 400px; margin: 0 auto; }

/* ── Section headings ── */
.section-heading {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  text-align: center;
  margin-bottom: 4rem;
}

/* ── User list ── */
.user-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}
.user-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(184,158,139,0.1);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.user-avatar svg { width: 16px; height: 16px; color: var(--primary); }
.badge-role {
  font-size: 0.7rem;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--font-body);
  color: rgba(26,26,26,0.6);
}
