/* VizuOn — Professional 3D & Interior Architecture */
:root {
  --bg: #0a0f1a;
  --fg: #f1f5f9;
  --card: #111827;
  --muted: #1e293b;
  --muted-fg: #94a3b8;
  --border: #1e293b;
  --primary: #d4af37;
  --primary-fg: #0a0f1a;
  --success: #22c55e;
  --warning: #f59e0b;
  --destructive: #ef4444;
  --radius: 12px;
  --shadow: 0 20px 40px rgba(0,0,0,.25);
}

[data-theme="light"] {
  --bg: #fafafa;
  --fg: #0f172a;
  --card: #ffffff;
  --muted: #f1f5f9;
  --muted-fg: #64748b;
  --border: #e2e8f0;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.6;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }

/* Typography */
h1,h2,h3,h4 { line-height: 1.2; font-weight: 700; }
.gold { color: var(--primary); }
.gradient-text {
  background: linear-gradient(135deg, #d4af37, #f5e6a3, #c9a227);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-muted { color: var(--muted-fg); }
.text-sm { font-size: .875rem; }
.text-center { text-align: center; }
.mb-2 { margin-bottom: .5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-4 { margin-top: 1rem; }
.mt-8 { margin-top: 2rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .625rem 1.25rem; border-radius: 8px; font-size: .875rem; font-weight: 500;
  border: none; cursor: pointer; transition: all .2s; text-decoration: none;
}
.btn-primary { background: var(--primary); color: var(--primary-fg); box-shadow: 0 4px 20px rgba(212,175,55,.25); }
.btn-primary:hover { filter: brightness(1.1); }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--fg); }
.btn-outline:hover { background: var(--muted); }
.btn-secondary { background: var(--muted); color: var(--fg); }
.btn-ghost { background: transparent; color: var(--muted-fg); }
.btn-ghost:hover { background: var(--muted); color: var(--fg); }
.btn-destructive { background: var(--destructive); color: #fff; }
.btn-sm { padding: .4rem .875rem; font-size: .8125rem; }
.btn-lg { padding: .75rem 2rem; font-size: 1rem; }
.btn-icon { background: transparent; border: none; font-size: 1.25rem; cursor: pointer; padding: .5rem; border-radius: 8px; }
.btn-icon:hover { background: var(--muted); }
.w-full { width: 100%; }

/* Badge */
.badge {
  display: inline-flex; padding: .2rem .65rem; border-radius: 999px;
  font-size: .75rem; font-weight: 500; background: rgba(212,175,55,.15); color: var(--primary);
}
.badge-outline { background: transparent; border: 1px solid var(--border); color: var(--muted-fg); }
.badge-success { background: rgba(34,197,94,.15); color: var(--success); }
.badge-warning { background: rgba(245,158,11,.15); color: var(--warning); }

/* Card */
.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.card-body { padding: 1.5rem; }
.card-hover { transition: transform .3s, box-shadow .3s; }
.card-hover:hover { transform: translateY(-4px); box-shadow: var(--shadow); }

/* Form */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: .4rem; }
.input, .textarea, .select {
  width: 100%; padding: .625rem .875rem; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card); color: var(--fg);
  font-size: .875rem; font-family: inherit;
}
.input:focus, .textarea:focus, .select:focus { outline: 2px solid var(--primary); outline-offset: 0; }
.textarea { resize: vertical; min-height: 100px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

/* Navbar */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(10,15,26,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
[data-theme="light"] .navbar { background: rgba(255,255,255,.9); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 1rem; }
.logo { display: flex; align-items: center; gap: .5rem; font-weight: 700; font-size: 1.25rem; }
.logo-icon {
  width: 36px; height: 36px; background: var(--primary); color: var(--primary-fg);
  border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800;
}
.nav-links { display: flex; gap: .25rem; flex-wrap: wrap; }
.nav-links a { padding: .5rem .75rem; font-size: .875rem; color: var(--muted-fg); border-radius: 8px; letter-spacing: 0.01em; }
.nav-links a:hover { color: var(--fg); background: var(--muted); }
.nav-actions { display: flex; align-items: center; gap: .5rem; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.5rem; color: var(--fg); cursor: pointer; }
.main-content { padding-top: 64px; min-height: calc(100vh - 200px); }

/* Hero */
.hero {
  position: relative; min-height: 90vh; display: flex; align-items: center; overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(10,15,26,.95), rgba(30,41,59,.85), rgba(10,15,26,.9));
}
.hero-content { position: relative; z-index: 1; padding: 6rem 0 4rem; max-width: 720px; }
.hero h1 { font-size: clamp(2rem, 5vw, 4rem); margin-bottom: 1.5rem; }
.hero p { font-size: 1.125rem; color: var(--muted-fg); margin-bottom: 2rem; }
.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid rgba(255,255,255,.1); }
.hero-stats .stat-value { font-size: 1.75rem; font-weight: 700; color: var(--primary); }
.hero-stats .stat-label { font-size: .875rem; color: var(--muted-fg); }

/* Sections */
.section { padding: 5rem 0; }
.section-alt { background: rgba(15, 23, 42, 0.45); }
[data-theme="light"] .section-alt { background: var(--muted); }
.section-header { text-align: center; margin-bottom: 3rem; }
.section-header h2 { font-size: clamp(1.75rem, 3vw, 2.5rem); margin-bottom: 1rem; }
.section-header p { color: var(--muted-fg); max-width: 600px; margin: 0 auto; }

/* Grid */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.5rem; }

/* Gallery */
.gallery-item { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.gallery-item .img-wrap { aspect-ratio: 4/3; overflow: hidden; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .info { padding: 1.25rem; }

/* Service card */
.service-icon {
  width: 48px; height: 48px; border-radius: 10px;
  background: rgba(212,175,55,.1); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin-bottom: 1rem;
}

/* Team */
.team-card img { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: var(--radius) var(--radius) 0 0; }
.team-card .info { padding: 1.25rem; text-align: center; }

/* FAQ */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .75rem; overflow: hidden; }
.faq-question {
  width: 100%; padding: 1.25rem; background: var(--card); border: none; color: var(--fg);
  font-size: .9375rem; font-weight: 500; text-align: left; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-answer { padding: 0 1.25rem 1.25rem; color: var(--muted-fg); font-size: .875rem; display: none; }
.faq-item.open .faq-answer { display: block; }
.faq-item.open .faq-arrow { transform: rotate(180deg); }

/* Footer */
.footer { border-top: 1px solid var(--border); background: var(--card); margin-top: auto; padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; margin-bottom: 2rem; }
.footer h4 { margin-bottom: 1rem; font-size: .9375rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: var(--muted-fg); font-size: .875rem; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { border-top: 1px solid var(--border); padding-top: 1.5rem; text-align: center; color: var(--muted-fg); font-size: .875rem; }

/* Auth */
.auth-wrap { min-height: 80vh; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card .card-body { padding: 2rem; }
.auth-header { text-align: center; margin-bottom: 1.5rem; }
.auth-header h1 { font-size: 1.5rem; margin-bottom: .5rem; }
.alert { padding: .75rem 1rem; border-radius: 8px; font-size: .875rem; margin-bottom: 1rem; }
.alert-error { background: rgba(239,68,68,.1); color: var(--destructive); }
.alert-success { background: rgba(34,197,94,.1); color: var(--success); }
.demo-box { background: var(--muted); padding: 1rem; border-radius: 8px; font-size: .8125rem; color: var(--muted-fg); margin-top: 1.5rem; }

/* Panel layout */
.panel-layout { display: flex; min-height: 100vh; }
.panel-sidebar {
  width: 260px; background: var(--card); border-right: 1px solid var(--border);
  position: fixed; top: 0; left: 0; bottom: 0; overflow-y: auto; z-index: 50;
}
.panel-main { margin-left: 260px; flex: 1; padding: 2rem; }
.panel-nav-section { padding: .75rem 1rem .25rem; font-size: .6875rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-fg); font-weight: 600; }
.panel-nav a {
  display: flex; align-items: center; gap: .75rem; padding: .625rem 1rem;
  font-size: .875rem; color: var(--muted-fg); border-radius: 8px; margin: .125rem .5rem;
}
.panel-nav a:hover, .panel-nav a.active { background: rgba(212,175,55,.1); color: var(--primary); }
.panel-header { margin-bottom: 2rem; }
.panel-header h1 { font-size: 1.75rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card .stat-value { font-size: 1.5rem; font-weight: 700; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
th, td { padding: .875rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--muted-fg); }
tr:hover { background: rgba(255,255,255,.02); }

/* CMS drag */
.cms-layout { display: grid; grid-template-columns: 1fr 1.2fr; gap: 1.5rem; align-items: start; }
.cms-block {
  display: flex; align-items: center; gap: 1rem; padding: 1rem;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .75rem;
  cursor: grab; transition: border-color .2s, opacity .2s;
}
.cms-block-active { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.cms-block-disabled { opacity: .55; }
.cms-block.dragging { opacity: .5; }
.cms-handle { color: var(--muted-fg); font-size: 1.25rem; cursor: grab; }
.cms-preview .preview-block {
  padding: .75rem; margin-bottom: .5rem; border: 1px dashed var(--border);
  border-radius: 8px; text-align: center; font-size: .875rem; color: var(--muted-fg);
}
.cms-empty-editor { padding: 2rem 0; text-align: center; }
.locale-tabs { display: flex; gap: .5rem; margin-bottom: 1rem; }
.locale-tab {
  padding: .5rem 1rem; border: 1px solid var(--border); border-radius: 8px;
  background: var(--muted); color: var(--muted-fg); cursor: pointer; font-size: .875rem;
}
.locale-tab.active { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.locale-panel { display: none; }
.locale-panel.active { display: block; }

/* Language switch */
.lang-switch { display: flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.lang-btn {
  padding: .35rem .6rem; font-size: .75rem; font-weight: 600; color: var(--muted-fg);
}
.lang-btn.active { background: var(--primary); color: var(--primary-fg); }

/* Flash */
.flash {
  position: fixed; top: 80px; right: 1rem; z-index: 200;
  padding: .75rem 1.25rem; border-radius: 8px; font-size: .875rem;
  animation: slideIn .3s ease;
}
.flash-success { background: var(--success); color: #fff; }
.flash-error { background: var(--destructive); color: #fff; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: none; opacity: 1; } }

/* Stars */
.stars { color: var(--primary); letter-spacing: 2px; }

/* Switch */
.switch { display: flex; align-items: center; gap: .75rem; cursor: pointer; }
.switch input { display: none; }
.switch-slider {
  width: 44px; height: 24px; background: var(--muted); border-radius: 999px;
  position: relative; transition: background .2s;
}
.switch-slider::after {
  content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  background: #fff; border-radius: 50%; transition: transform .2s;
}
.switch input:checked + .switch-slider { background: var(--primary); }
.switch input:checked + .switch-slider::after { transform: translateX(20px); }

/* Responsive */
@media (max-width: 1024px) {
  .cms-layout { grid-template-columns: 1fr; }
  .nav-links { display: none; position: absolute; top: 64px; left: 0; right: 0; background: var(--card); border-bottom: 1px solid var(--border); flex-direction: column; padding: 1rem; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .panel-sidebar { transform: translateX(-100%); transition: transform .3s; }
  .panel-sidebar.open { transform: translateX(0); }
  .panel-main { margin-left: 0; }
  .grid-2 { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr; gap: 1rem; }
}

/* Page hero */
.page-hero { padding: 4rem 0 2rem; text-align: center; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }

/* Filter pills */
.filter-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-bottom: 2rem; }
.filter-pill {
  padding: .5rem 1rem; border-radius: 999px; font-size: .875rem; font-weight: 500;
  border: none; cursor: pointer; background: var(--muted); color: var(--muted-fg);
}
.filter-pill.active { background: var(--primary); color: var(--primary-fg); }

/* Admin inline edit mode */
.admin-edit-bar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 300;
  background: rgba(15, 15, 20, .95); border-top: 1px solid var(--border);
  backdrop-filter: blur(12px); padding: .75rem 1rem;
}
.admin-edit-bar-inner {
  max-width: 1200px; margin: 0 auto; display: flex; align-items: center;
  gap: .75rem; flex-wrap: wrap;
}
.admin-edit-brand { font-weight: 700; color: var(--primary); margin-right: .5rem; }
.admin-edit-hint { font-size: .75rem; color: var(--muted-fg); flex: 1; min-width: 180px; }
.admin-save-toast {
  position: fixed; bottom: 5rem; right: 1rem; z-index: 301;
  background: var(--success); color: #fff; padding: .5rem 1rem; border-radius: 8px;
  font-size: .875rem; opacity: 0; transform: translateY(10px); transition: all .25s;
  pointer-events: none;
}
.admin-save-toast.show { opacity: 1; transform: translateY(0); }

body.admin-edit-mode { padding-bottom: 72px; }
body:has(.admin-edit-bar) { padding-bottom: 64px; }
body.admin-edit-mode .admin-draggable-section {
  position: relative; outline: 2px dashed rgba(212, 175, 55, .35); outline-offset: 4px;
  margin-bottom: 1rem; border-radius: var(--radius);
}
.admin-section-bar, .admin-item-bar {
  display: flex; align-items: center; gap: .5rem; padding: .4rem .75rem;
  background: rgba(212, 175, 55, .15); border: 1px solid rgba(212, 175, 55, .3);
  border-radius: 8px; margin-bottom: .5rem; font-size: .8125rem;
}
.admin-section-bar { margin: -.25rem 0 .75rem; }
.admin-item-bar { margin: -.25rem .25rem .5rem; }
.admin-drag-handle { cursor: grab; font-size: 1.1rem; color: var(--primary); user-select: none; }
.admin-drag-handle:active { cursor: grabbing; }
.admin-bar-label { font-weight: 600; }
.admin-bar-link { color: var(--primary); font-size: .8125rem; white-space: nowrap; }
.admin-draggable-section.dragging,
.admin-draggable-item.dragging { opacity: .55; }
body.admin-edit-mode .admin-draggable-item {
  position: relative; outline: 1px dashed rgba(212, 175, 55, .25); outline-offset: 2px;
  border-radius: 8px;
}
body.admin-edit-mode .admin-sortable-items { min-height: 40px; }

/* ═══ Portfolio layout ═══ */
.section-portfolio {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
}

.section-header--editorial {
  text-align: left;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  max-width: 640px;
}

.section-header--editorial h2 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  letter-spacing: -0.03em;
}

.section-header--editorial p {
  margin: 0;
  max-width: none;
  font-size: 1.05rem;
  line-height: 1.7;
}

.portfolio-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--primary);
  font-weight: 500;
  font-size: 0.9375rem;
  transition: gap 0.2s ease;
}

.portfolio-link:hover {
  gap: 0.6rem;
}

.portfolio-gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
}

.portfolio-card {
  grid-column: span 4;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(17, 24, 39, 0.55);
}

.portfolio-card--featured {
  grid-column: span 8;
}

.portfolio-card .img-wrap {
  aspect-ratio: 16 / 10;
}

.portfolio-card--featured .img-wrap {
  aspect-ratio: 21 / 10;
}

.portfolio-card h3 {
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.portfolio-projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.portfolio-project {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--card);
  overflow: hidden;
}

.portfolio-project-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.portfolio-project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.portfolio-project:hover .portfolio-project-media img {
  transform: scale(1.05);
}

.portfolio-project-year {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(4, 5, 10, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
}

.portfolio-project-client {
  color: var(--muted-fg);
  opacity: 0.85;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.about-media img {
  width: 100%;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.about-lead {
  font-size: 1.0625rem;
  line-height: 1.75;
}

.about-list {
  list-style: none;
  display: grid;
  gap: 0.65rem;
}

.about-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  color: var(--muted-fg);
}

.about-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.section-contact .section-header--editorial {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.text-left { text-align: left; }

@media (max-width: 1024px) {
  .portfolio-card,
  .portfolio-card--featured {
    grid-column: span 6;
  }
}

.specializations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.specialization-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(17, 24, 39, 0.5);
  min-height: 100%;
}

.specialization-card h3 {
  font-size: 1.125rem;
  letter-spacing: -0.02em;
  margin-top: 1rem;
}

.specialization-index {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--primary);
  opacity: 0.85;
}

@media (max-width: 768px) {
  .portfolio-gallery {
    grid-template-columns: 1fr;
  }
  .portfolio-card,
  .portfolio-card--featured {
    grid-column: auto;
  }
  .about-grid {
    grid-template-columns: 1fr;
  }
}
body.admin-edit-mode .admin-faq-list { display: flex; flex-direction: column; gap: .5rem; }
body.admin-edit-mode .admin-project-list,
body.admin-edit-mode .admin-review-list { display: flex; flex-direction: column; gap: 1rem; }
