/* Incremental refinements approved after the initial design. */
.hero-logo {
  width: clamp(145px, 18vw, 210px);
  height: 165px;
  margin-bottom: -12px;
}

@media (max-width: 600px) {
  .hero-logo {
    width: 145px;
    height: 135px;
    margin-bottom: -8px;
  }
}

.ai-advisor {
  background: linear-gradient(145deg, #f4efe5, #fff 55%, #f7f3eb);
}

.ai-advisor-grid {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 28px;
  align-items: stretch;
}

.ai-advisor-form,
.ai-result-panel {
  padding: 28px;
  border: 1px solid #e8dfd0;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
}

.ai-upload {
  position: relative;
  display: grid;
  height: 285px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed #cdbd9f;
  border-radius: 16px;
  background: #faf8f3;
  cursor: pointer;
}

.ai-upload.dragging {
  border-color: var(--gold);
  background: #f6efe1;
}

.ai-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.ai-upload > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ai-upload-empty {
  display: grid;
  place-items: center;
  text-align: center;
}

.ai-upload-empty i {
  margin-bottom: 14px;
  color: var(--gold);
  font-size: 2.7rem;
}

.ai-upload-empty strong,
.ai-upload-empty small {
  display: block;
}

.ai-upload-empty small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.74rem;
}

.ai-change-image {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 7px 13px;
  border: 0;
  border-radius: 22px;
  background: rgba(17, 17, 17, 0.8);
  color: #fff;
  cursor: pointer;
}

html[dir="ltr"] .ai-change-image {
  right: auto;
  left: 14px;
}

.ai-styles {
  margin: 22px 0 16px;
  border: 0;
}

.ai-styles legend {
  margin-bottom: 9px;
  font-size: 0.82rem;
  font-weight: 700;
}

.ai-style-options {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.ai-style {
  padding: 7px 13px;
  border: 1px solid #ded4c3;
  border-radius: 22px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.ai-style:hover,
.ai-style.active {
  border-color: var(--gold);
  background: var(--gold);
  color: #fff;
}

.ai-privacy {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: #5f5a51;
  font-size: 0.76rem;
  cursor: pointer;
}

.ai-privacy input {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  accent-color: var(--gold);
}

.ai-notice {
  display: flex;
  gap: 8px;
  margin: 13px 0 18px;
  color: var(--muted);
  font-size: 0.72rem;
}

.ai-notice i {
  color: var(--gold-dark);
}

.ai-submit {
  width: 100%;
}

.ai-mobile-source-actions { display: none; grid-template-columns: 1fr 1fr; gap: 10px; }
.ai-camera-input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.ai-camera-button, .ai-gallery-button { min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 12px; border: 1px solid #d9c8a6; border-radius: 12px; background: #fff; color: var(--ink); font-weight: 700; font-size: .82rem; cursor: pointer; }
.ai-camera-button { background: var(--gold); border-color: var(--gold); color: #fff; }

.ai-submit:disabled {
  cursor: wait;
  opacity: 0.65;
}

.ai-result-panel {
  display: grid;
  min-height: 530px;
  place-items: center;
  background: var(--ink);
  color: #fff;
}

.ai-result-placeholder {
  max-width: 430px;
  text-align: center;
}

.ai-result-placeholder > i {
  margin-bottom: 20px;
  color: var(--gold);
  font-size: 3.5rem;
}

.ai-result-placeholder h3 {
  margin-bottom: 12px;
  color: #fff;
  font-size: 1.45rem;
}

.ai-result-placeholder p {
  color: rgba(255, 255, 255, 0.6);
}

.ai-loading {
  text-align: center;
}

.ai-loading span {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin: 0 4px;
  border-radius: 50%;
  background: var(--gold);
  animation: ai-pulse 1.2s infinite ease-in-out;
}

.ai-loading span:nth-child(2) { animation-delay: 0.15s; }
.ai-loading span:nth-child(3) { animation-delay: 0.3s; }

@keyframes ai-pulse {
  50% { transform: translateY(-8px); opacity: 0.5; }
}

.ai-loading p {
  margin-top: 15px;
  color: rgba(255, 255, 255, 0.66);
}

.ai-result-content {
  width: 100%;
}

.ai-result-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.13);
}

.ai-result-heading h3 {
  margin-top: 5px;
  color: #fff;
  font-size: 1.35rem;
}

.ai-result-heading > i {
  color: var(--gold);
  font-size: 1.7rem;
}

.ai-result-text {
  max-height: 220px;
  overflow-y: auto;
  padding: 20px 6px;
  color: rgba(255, 255, 255, 0.83);
  font-size: 0.88rem;
  line-height: 1.95;
  white-space: pre-wrap;
}

.ai-generated-wrap { margin: 18px 0 0; }
.ai-generated-image { display: block; width: 100%; max-height: 330px; border-radius: 14px; object-fit: contain; background: #0b0b0b; }
.ai-generated-wrap figcaption { margin-top: 8px; color: rgba(255,255,255,.55); font-size: .72rem; text-align: center; }

.ai-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
}

.ai-result-actions .btn-outline {
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

.ai-error {
  max-width: 430px;
  text-align: center;
}

.ai-error i {
  color: #dfad52;
  font-size: 2.5rem;
}

.ai-error p {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.76);
}

@media (max-width: 900px) {
  .ai-advisor-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  html { scroll-padding-top: 70px; }
  body { font-size: 15px; }
  .section { padding: 64px 0; }
  .section-head { margin-bottom: 30px; }
  .section-copy h2, .section-head h2, .factory h2, .quote h2 { font-size: clamp(1.7rem, 8vw, 2.25rem); }
  .btn { width: 100%; min-height: 50px; padding: 12px 18px; }
  .nav-inner { gap: 8px; }
  .nav-controls { gap: 7px; }
  .lang-switch { padding: 6px 11px; }
  .nav-links { inset: 68px 14px auto; max-height: calc(100dvh - 84px); overflow-y: auto; }
  .hero { height: auto; min-height: 100svh; padding: 95px 0 60px; }
  .hero-content { padding-top: 15px; }
  .hero-logo { width: 150px; height: 125px; margin-bottom: -8px; }
  .hero h1 { font-size: clamp(2rem, 10vw, 2.7rem); }
  .scroll-cue { display: none; }
  .ai-mobile-source-actions { display: grid; }
  .ai-advisor-form,
  .ai-result-panel {
    padding: 16px;
    border-radius: 16px;
  }

  .ai-upload {
    height: 210px;
  }

  .ai-style-options { gap: 7px; }
  .ai-style { flex: 1 1 calc(33.333% - 7px); min-height: 44px; padding: 8px 9px; }

  .ai-result-panel {
    min-height: 390px;
  }

  .ai-generated-image { max-height: 260px; }
  .ai-result-text { max-height: none; padding-inline: 2px; font-size: .84rem; }

  .ai-result-actions {
    flex-direction: column;
  }

  .whatsapp-float { left: 14px; bottom: max(14px, env(safe-area-inset-bottom)); width: 52px; height: 52px; }
  html[dir="ltr"] .whatsapp-float { right: 14px; left: auto; }
  .lightbox { padding: 16px; }
  .lightbox button { top: 8px; right: 12px; }
  input, select, textarea { font-size: 16px; }
  .split-grid, .quote-grid { gap: 30px; }
  .service-card { padding: 26px 22px; }
  .gallery { gap: 12px; }
  .gallery-item span { right: 15px; bottom: 12px; left: 15px; }
  html[dir="ltr"] .gallery-item span { right: 15px; left: 15px; }
  .filters { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
  .filter { flex: 0 0 auto; min-height: 42px; scroll-snap-align: start; }
  .vision-card { padding: 30px 22px; }
  .quote-form { padding: 20px 16px; }
  .footer-grid { gap: 28px; }
  footer { padding-top: 52px; padding-bottom: env(safe-area-inset-bottom); }
  .certificate-info { padding: 20px; }
  .certificate-info p { min-height: 0; }
}

@media (max-width: 600px) and (orientation: landscape) {
  .hero { min-height: 620px; }
  .panorama-viewer { height: 78svh; min-height: 300px; }
}

@media (max-width: 380px) {
  .ai-mobile-source-actions { grid-template-columns: 1fr; }
  .quality-row { grid-template-columns: 1fr; }
}

.public-testimonials {
  position: relative;
  overflow: hidden;
  background: #fff;
}

.public-testimonials::before {
  content: "“";
  position: absolute;
  top: 0;
  right: 5%;
  color: rgba(197, 160, 89, 0.08);
  font: 700 18rem/1 "Playfair Display", serif;
  pointer-events: none;
}

html[dir="ltr"] .public-testimonials::before {
  right: auto;
  left: 5%;
}

.testimonials-stage {
  position: relative;
}

.testimonials-track {
  display: grid;
  grid-auto-columns: calc((100% - 40px) / 3);
  grid-auto-flow: column;
  gap: 20px;
  overflow-x: auto;
  padding: 8px 4px 26px;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.testimonials-track::-webkit-scrollbar {
  display: none;
}

.public-testimonial-card {
  position: relative;
  min-height: 330px;
  padding: 32px;
  border: 1px solid #eee7da;
  border-radius: var(--radius);
  background: var(--cream);
  scroll-snap-align: start;
  transition: transform 0.35s, box-shadow 0.35s;
}

.public-testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
}

.testimonial-stars {
  color: #d0a13f;
  font-size: 0.95rem;
  letter-spacing: 2px;
}

.testimonial-quote {
  margin: 24px 0 30px;
  color: #4e4a43;
  font-size: 1rem;
  line-height: 2;
}

.testimonial-client {
  display: flex;
  align-items: center;
  gap: 13px;
  margin-top: auto;
}

.testimonial-client img,
.testimonial-client-placeholder {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-client-placeholder {
  display: grid;
  place-items: center;
  background: #e8decc;
  color: var(--gold-dark);
  font-size: 1.25rem;
  font-weight: 800;
}

.testimonial-client strong,
.testimonial-client span {
  display: block;
}

.testimonial-client span {
  color: var(--muted);
  font-size: 0.78rem;
}

.testimonials-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 14px;
}

.testimonials-controls > button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #ddd4c4;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: 0.3s;
}

.testimonials-controls > button:hover {
  border-color: var(--gold);
  background: var(--gold);
  color: #fff;
}

.testimonials-dots {
  display: flex;
  gap: 6px;
}

.testimonials-dots span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d8d1c5;
}

.testimonials-dots span.active {
  width: 20px;
  border-radius: 8px;
  background: var(--gold);
}

@media (max-width: 900px) {
  .testimonials-track {
    grid-auto-columns: calc((100% - 20px) / 2);
  }
}

@media (max-width: 600px) {
  .testimonials-track {
    grid-auto-columns: 100%;
  }

  .public-testimonial-card {
    min-height: 300px;
    padding: 26px;
  }
}

.panorama-section {
  overflow: hidden;
  background: var(--ink);
  color: #fff;
}

.panorama-section .section-head h2 {
  color: #fff;
}

.panorama-section .section-head p {
  color: rgba(255, 255, 255, 0.7);
}

.panorama-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  background: #090909;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
}

.panorama-scenes {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: -18px 0 26px;
  flex-wrap: wrap;
}

.panorama-scene {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  padding: 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.76);
  cursor: pointer;
  transition: 0.3s;
}

.panorama-scene:hover,
.panorama-scene.active {
  border-color: var(--gold);
  background: var(--gold);
  color: #fff;
}

.panorama-scene i {
  font-size: 0.9rem;
}

.panorama-viewer {
  width: 100%;
  height: min(68vh, 680px);
  min-height: 470px;
}

.panorama-viewer .pnlm-load-box {
  background: rgba(17, 17, 17, 0.86);
  border: 0;
  border-radius: 14px;
}

.panorama-viewer .pnlm-controls-container {
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.panorama-hint {
  position: absolute;
  z-index: 5;
  right: 50%;
  bottom: 22px;
  display: flex;
  gap: 9px;
  align-items: center;
  padding: 9px 17px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 30px;
  background: rgba(10, 10, 10, 0.68);
  color: #fff;
  font-size: 0.82rem;
  pointer-events: none;
  transform: translateX(50%);
  backdrop-filter: blur(10px);
}

.panorama-hint i {
  color: var(--gold);
  animation: panorama-drag 1.8s ease-in-out infinite;
}

@keyframes panorama-drag {
  50% {
    transform: translateX(-7px);
  }
}

html[dir="ltr"] .panorama-hint i {
  animation-name: panorama-drag-ltr;
}

@keyframes panorama-drag-ltr {
  50% {
    transform: translateX(7px);
  }
}

@media (max-width: 600px) {
  .panorama-viewer {
    height: 62vh;
    min-height: 430px;
  }

  .panorama-hint {
    bottom: 15px;
  }

  .panorama-scenes {
    display: grid;
    grid-template-columns: 1fr;
  }

  .panorama-scene {
    justify-content: center;
  }
}

.certificates {
  background: #fff;
}

.certificates-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.certificate-card {
  overflow: hidden;
  border: 1px solid #eee8dc;
  border-radius: var(--radius);
  background: var(--cream);
  box-shadow: 0 12px 40px rgba(24, 18, 8, 0.06);
  transition: transform 0.35s, box-shadow 0.35s;
}

.certificate-card:hover {
  transform: translateY(-7px);
  box-shadow: var(--shadow);
}

.certificate-preview {
  position: relative;
  display: block;
  width: 100%;
  height: 365px;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid #eee8dc;
  background: #f4f1eb;
  cursor: zoom-in;
}

.certificate-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 14px;
  transition: transform 0.45s;
}

.certificate-card:hover .certificate-preview img {
  transform: scale(1.025);
}

.certificate-zoom {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.82);
  color: #fff;
}

html[dir="ltr"] .certificate-zoom {
  right: auto;
  left: 18px;
}

.certificate-info {
  padding: 25px;
}

.certificate-code {
  color: var(--gold-dark);
  font: 700 0.82rem "Lato", sans-serif;
  letter-spacing: 1px;
}

.certificate-info h3 {
  margin: 6px 0 10px;
  font-size: 1.12rem;
}

.certificate-info p {
  min-height: 54px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.84rem;
}

.certificate-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-dark);
  font-size: 0.86rem;
  font-weight: 700;
}

.certificate-link:hover {
  color: var(--ink);
}

@media (max-width: 900px) {
  .certificates-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .certificates-grid {
    grid-template-columns: 1fr;
  }

  .certificate-preview {
    height: min(105vw, 390px);
  }

  .panorama-viewer { height: 58svh; min-height: 360px; }
  .panorama-hint { max-width: calc(100% - 28px); white-space: nowrap; }
  .public-testimonial-card { min-height: auto; padding: 22px 20px; }
  .testimonial-quote { margin: 18px 0 24px; }
}

@media (max-width: 600px) and (orientation: landscape) {
  .panorama-viewer { height: 78svh; min-height: 300px; }
}
