/* Pavas Corp - Grayscale theme overrides */

:root {
  --bs-primary: #111111;
  --bs-primary-rgb: 17, 17, 17;
  --bs-secondary: #6b7280;
  --bs-secondary-rgb: 107, 114, 128;
  --bs-dark: #111111;
  --bs-dark-rgb: 17, 17, 17;
  --bs-light: #f3f4f6;
  --bs-light-rgb: 243, 244, 246;
  --brand-mark-url: url("../img/branding/logo-2.png");
  --ui-bg: #ffffff;
  --ui-surface: #f5f5f5;
  --ui-card: #ffffff;
  --ui-text: #111111;
  --ui-text-muted: #6b7280;
  --ui-border: #e5e7eb;
  --ui-accent: #111111;
  --ui-accent-contrast: #ffffff;
  --ui-tooltip-bg: #111111;
  --ui-tooltip-text: #ffffff;
}

body[data-theme="dark"] {
  --ui-bg: #101214;
  --ui-surface: #171a1f;
  --ui-card: #1f242b;
  --ui-text: #f3f4f6;
  --ui-text-muted: #c0c6cf;
  --ui-border: #374151;
  --ui-accent: #f3f4f6;
  --ui-accent-contrast: #111111;
  --ui-tooltip-bg: #f3f4f6;
  --ui-tooltip-text: #111111;
}

.hero-photo {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
}

body {
  background: var(--ui-bg);
  color: var(--ui-text);
}

.footer {
  position: relative;
  z-index: 1;
  overflow: hidden;
}

.footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--brand-mark-url);
  background-repeat: repeat;
  background-size: 140px;
  opacity: 0.04;
  pointer-events: none;
  z-index: 0;
}

.footer > * {
  position: relative;
  z-index: 1;
}

.brand-logo-header {
  height: 82px;
  width: auto;
  display: block;
  transition: transform 200ms ease;
  transform-origin: left center;
  filter: none;
  image-rendering: auto;
}

.navbar-brand:hover .brand-logo-header {
  transform: scale(1.20);
}

.brand-logo-mark {
  height: 50px;
  width: auto;
  transition: transform 500ms ease;
  transform-origin: left center;
  filter: none;
}

.footer-logo-wrapper a:hover .brand-logo-mark {
  transform: scale(1.20);
}

.brand-logo-inline {
  height: 20px;
  width: auto;
  display: inline-block;
}

@media (max-width: 576px) {
  .brand-logo-header {
    height: 56px;
  }

  .brand-logo-mark {
    height: 36px;
  }

  .brand-logo-inline {
    height: 18px;
  }
}

.bsb-tpl-bg-alabaster,
.bg-light {
  background-color: var(--ui-surface) !important;
}

.text-primary,
.link-primary {
  color: var(--ui-accent) !important;
}

.btn-primary,
.bg-primary {
  background-color: var(--ui-accent) !important;
  border-color: var(--ui-accent) !important;
  color: var(--ui-accent-contrast) !important;
}

.btn-outline-primary {
  color: var(--ui-accent) !important;
  border-color: var(--ui-accent) !important;
}

.btn-outline-primary:hover {
  background-color: var(--ui-accent) !important;
  color: var(--ui-accent-contrast) !important;
}

.border-primary {
  border-color: var(--ui-accent) !important;
}

.text-secondary,
.link-secondary {
  color: var(--ui-text-muted) !important;
}

.bg-accent,
.border-accent {
  background-color: var(--ui-border) !important;
  border-color: var(--ui-border) !important;
}

.border-warning,
.text-warning,
.bg-warning {
  border-color: #9ca3af !important;
  color: #9ca3af !important;
  background-color: #9ca3af !important;
}

.bsb-circle.bg-primary {
  background-color: var(--ui-accent) !important;
}

.navbar .nav-link {
  color: var(--ui-text) !important;
}

.footer .link-dark {
  color: var(--ui-text) !important;
}

.footer .link-dark:hover,
.footer .link-secondary:hover,
.link-primary:hover {
  color: #000000 !important;
}

.bsb-tpl-logo,
.bsb-tpl-logo-footer {
  filter: grayscale(100%);
}

.services-swiper {
  padding-bottom: 40px;
}

.services-swiper .swiper-button-next,
.services-swiper .swiper-button-prev {
  color: var(--ui-accent);
}

.services-swiper .swiper-pagination-bullet {
  background: #9ca3af;
  opacity: 1;
}

.services-swiper .swiper-pagination-bullet-active {
  background: var(--ui-accent);
}

/* Precotización */
.quote-steps .quote-option.active {
  background-color: var(--ui-accent) !important;
  color: var(--ui-accent-contrast) !important;
  border-color: var(--ui-accent) !important;
}

.quote-summary {
  background: var(--ui-surface) !important;
}

.quote-option-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quote-help {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--ui-accent);
  color: var(--ui-accent);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: background-color 160ms ease, color 160ms ease;
}

.quote-help:hover,
.quote-help:focus {
  background: var(--ui-accent);
  color: var(--ui-accent-contrast);
}

.quote-help::after {
  content: attr(data-info);
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  width: 260px;
  max-width: 75vw;
  background: var(--ui-tooltip-bg);
  color: var(--ui-tooltip-text);
  padding: 10px 12px;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  z-index: 2;
  font-size: 12px;
  line-height: 1.4;
}

.quote-help:hover::after,
.quote-help:focus::after {
  opacity: 1;
  transform: translateY(0);
}

/* Floating buttons */
.floating-whatsapp,
.back-to-top {
  position: fixed;
  right: 20px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
  z-index: 9999;
  transition: transform 160ms ease, opacity 200ms ease, box-shadow 200ms ease;
}

.floating-whatsapp {
  bottom: 24px;
  background: var(--ui-accent);
  color: var(--ui-accent-contrast);
}

.floating-whatsapp:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.back-to-top {
  bottom: 86px;
  background: var(--ui-card);
  color: var(--ui-accent);
  border: 1px solid var(--ui-border);
  opacity: 0;
  pointer-events: none;
}

.bg-white,
.card,
.list-group-item,
.offcanvas,
.navbar,
.input-group-text,
.form-control,
.btn-dark {
  background-color: var(--ui-card) !important;
  color: var(--ui-text) !important;
  border-color: var(--ui-border) !important;
}

.btn-dark {
  background-color: var(--ui-accent) !important;
  border-color: var(--ui-accent) !important;
  color: var(--ui-accent-contrast) !important;
}

.link-dark {
  color: var(--ui-text) !important;
}

.team-svg-icon {
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ui-accent);
  background: linear-gradient(180deg, var(--ui-surface) 0%, var(--ui-card) 100%);
  border-bottom: 1px solid var(--ui-border);
}

.team-svg-icon svg {
  width: 96px;
  height: 96px;
}

#themeToggle {
  min-width: 138px;
}

.back-to-top.show {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

@media (max-width: 576px) {
  .floating-whatsapp,
  .back-to-top {
    right: 14px;
    width: 48px;
    height: 48px;
  }

  .back-to-top {
    bottom: 78px;
  }
}
