/* ═══════════════════════════════════════════
   AQUABOTÂNICA — COMPONENTS
   Cartoon Brutalist • Bold Outlines • Chunky Shadows
   ═══════════════════════════════════════════ */

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  padding: var(--space-lg) 0;
  transition: all var(--transition-base);
}

.header.scrolled {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: var(--border-thick) solid var(--text-primary);
  box-shadow: var(--shadow-md);
  padding: var(--space-sm) 0;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  z-index: 10;
}

.header__logo-image {
  height: 56px;
  width: auto;
  transition: transform var(--transition-fast);
  filter: drop-shadow(2px 2px 0px rgba(26, 26, 26, 0.15));
}

.header__logo-image:hover {
  transform: scale(1.08) rotate(-2deg);
}

.header.scrolled .header__logo-image {
  height: 44px;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
}

.header__nav-link {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  position: relative;
  padding: 8px 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.header__nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

.header__nav-link:hover::after,
.header__nav-link.active::after {
  transform: scaleX(1);
}

.header__nav-link:hover {
  color: var(--forest);
}

.header.scrolled .header__nav-link {
  color: var(--text-primary);
}

/* Theme Toggle */
.theme-toggle {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  color: var(--text-primary);
  transition: all var(--transition-fast);
  border: var(--border-thick) solid var(--text-primary);
  background: var(--bg-card);
  box-shadow: var(--shadow-sm);
}

.theme-toggle:hover {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0px var(--text-primary);
}

.theme-toggle__icon {
  width: 20px;
  height: 20px;
}

.theme-toggle__icon--moon {
  display: none;
}

[data-theme="dark"] .theme-toggle__icon--sun {
  display: none;
}
[data-theme="dark"] .theme-toggle__icon--moon {
  display: block;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Mobile Menu Button */
.header__menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  width: 32px;
  padding: 6px 0;
  z-index: 10;
  cursor: pointer;
}

.header__menu-btn span {
  display: block;
  width: 100%;
  height: 3px;
  background: var(--text-primary);
  border-radius: 0;
  transition: all var(--transition-base);
}

.header__menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}
.header__menu-btn.active span:nth-child(2) {
  opacity: 0;
}
.header__menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(245, 240, 232, 0.55) 0%,
    rgba(26, 60, 42, 0.15) 40%,
    rgba(10, 61, 79, 0.1) 65%,
    rgba(201, 168, 76, 0.05) 100%
  );
}

[data-theme="dark"] .hero__overlay {
  background: linear-gradient(
    135deg,
    rgba(13, 13, 13, 0.96) 0%,
    rgba(13, 13, 13, 0.88) 35%,
    rgba(10, 61, 79, 0.5) 65%,
    rgba(26, 60, 42, 0.4) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: var(--space-4xl) 0;
}

.hero__text {
  padding: var(--space-3xl);
  border: var(--border-thick) solid var(--text-primary);
  max-width: 800px;
  margin: 0 auto;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  box-shadow: 16px 16px 0px var(--text-primary);
}

.hero__title {
  font-size: var(--fs-3xl);
  margin-bottom: var(--space-lg);
  line-height: 1.1;
}

.hero__subtitle {
  font-size: var(--fs-md);
  line-height: 1.8;
  margin-bottom: var(--space-2xl);
  color: var(--text-secondary);
}

[data-theme="dark"] .hero__subtitle {
  color: var(--text-on-dark-muted);
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 8px 18px;
  background: var(--bg-card);
  border: var(--border-thick) solid var(--text-primary);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  margin-bottom: var(--space-lg);
  box-shadow: var(--shadow-sm);
}

.hero__badge svg {
  width: 16px;
  height: 16px;
}

.hero__buttons {
  display: flex;
  gap: var(--space-md);
  justify-content: center;
  flex-wrap: wrap;
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-2xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: var(--border-thick) solid var(--text-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
  animation: bounce 2s infinite;
  transition: all var(--transition-fast);
}

.hero__scroll:hover {
  transform: translateX(-50%) translate(-3px, -3px);
  box-shadow: 6px 6px 0px var(--text-primary);
}

.hero__scroll svg {
  width: 24px;
  height: 24px;
}

/* ===== STATS BAR ===== */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-xl);
  padding: var(--space-2xl);
  background: var(--bg-card);
  border: var(--border-thick) solid var(--text-primary);
  box-shadow: 12px 12px 0px var(--text-primary);
  margin-top: -60px;
  position: relative;
  z-index: 2;
}

.stats-bar__item {
  text-align: center;
  padding: var(--space-lg);
  border-right: 2px solid var(--border-color);
}

.stats-bar__item:last-child {
  border-right: none;
}

.stats-bar__number {
  font-family: var(--font-title);
  font-size: var(--fs-3xl);
  font-weight: 700;
  color: var(--forest);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.stats-bar__label {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== CHAT WIDGET ===== */
.chat-widget {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  z-index: var(--z-chat);
}

.chat-widget__toggle {
  width: 60px;
  height: 60px;
  background: var(--forest);
  border: var(--border-thick) solid var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-on-dark);
  cursor: pointer;
  box-shadow: 5px 5px 0px var(--text-primary);
  transition: all var(--transition-fast);
  position: relative;
}

.chat-widget__toggle:hover {
  transform: translate(-3px, -3px);
  box-shadow: 8px 8px 0px var(--text-primary);
  background: var(--gold);
  color: var(--charcoal);
}

.chat-widget__toggle svg {
  width: 28px;
  height: 28px;
}

.chat-widget__icon-close {
  display: none;
}

.chat-widget.active .chat-widget__icon-chat { display: none; }
.chat-widget.active .chat-widget__icon-close { display: block; }

.chat-widget__badge {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: var(--gold);
  border: 2px solid var(--charcoal);
  font-size: 12px;
  font-weight: 700;
  color: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse 2s infinite;
}

.chat-widget__window {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 380px;
  max-height: 520px;
  background: var(--bg-card);
  border: var(--border-thick) solid var(--text-primary);
  box-shadow: 12px 12px 0px var(--text-primary);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.chat-widget.active .chat-widget__window {
  display: flex;
}

.chat-widget__header {
  background: var(--forest);
  color: var(--text-on-dark);
  padding: var(--space-md) var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: var(--border-thick) solid var(--text-primary);
}

.chat-widget__header-info {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.chat-widget__avatar {
  font-size: 1.6rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold);
  border: 2px solid var(--charcoal);
  color: var(--charcoal);
}

.chat-widget__name {
  font-size: var(--fs-sm);
  font-weight: 700;
  margin: 0;
  color: var(--text-on-dark);
}

.chat-widget__status {
  font-size: var(--fs-xs);
  opacity: 0.8;
}

.chat-widget__close {
  background: none;
  border: none;
  color: var(--text-on-dark);
  cursor: pointer;
  padding: 4px;
  opacity: 0.8;
  transition: opacity var(--transition-fast);
}
.chat-widget__close:hover { opacity: 1; }
.chat-widget__close svg { width: 20px; height: 20px; }

.chat-widget__messages {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-height: 350px;
}

.chat-widget__message {
  max-width: 85%;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--fs-sm);
  line-height: 1.5;
  border: 2px solid var(--text-primary);
}

.chat-widget__message--bot {
  background: var(--bg-secondary);
  color: var(--text-primary);
  align-self: flex-start;
  box-shadow: 4px 4px 0px var(--text-primary);
}

.chat-widget__message--user {
  background: var(--forest);
  color: var(--text-on-dark);
  align-self: flex-end;
  border-color: var(--text-primary);
  box-shadow: 4px 4px 0px var(--text-primary);
}

.chat-widget__message p {
  margin: 0 0 var(--space-xs);
}
.chat-widget__message p:last-child {
  margin-bottom: 0;
}

.chat-widget__suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  padding: 0 var(--space-lg) var(--space-sm);
}

.chat-widget__suggestion {
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 2px solid var(--text-primary);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.chat-widget__suggestion:hover {
  background: var(--gold);
  color: var(--charcoal);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px var(--text-primary);
}

.chat-widget__input-area {
  display: flex;
  padding: var(--space-sm);
  border-top: var(--border-thick) solid var(--text-primary);
  gap: var(--space-xs);
}

.chat-widget__input {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  border: 2px solid var(--text-primary);
  font-size: var(--fs-sm);
  outline: none;
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
}

.chat-widget__input:focus {
  border-color: var(--accent);
  box-shadow: 3px 3px 0px var(--accent);
}

.chat-widget__send {
  width: 44px;
  height: 44px;
  background: var(--forest);
  border: 2px solid var(--text-primary);
  color: var(--text-on-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.chat-widget__send:hover {
  background: var(--gold);
  color: var(--charcoal);
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0px var(--text-primary);
}

.chat-widget__send svg { width: 18px; height: 18px; }

/* ===== WHATSAPP FLOAT ===== */
.whatsapp-float {
  position: fixed;
  bottom: calc(var(--space-xl) + 75px);
  right: var(--space-xl);
  z-index: var(--z-whatsapp);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: flex-end;
}

.whatsapp-float__tooltip {
  background: var(--bg-card);
  padding: 8px 18px;
  border: 2px solid var(--text-primary);
  box-shadow: 4px 4px 0px var(--text-primary);
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--text-primary);
  opacity: 0;
  transform: translateY(10px);
  transition: all var(--transition-base);
  pointer-events: none;
}

.whatsapp-float:hover .whatsapp-float__tooltip {
  opacity: 1;
  transform: translateY(0);
}

.whatsapp-float .chat-widget__toggle {
  box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.2);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: var(--space-xl);
  left: var(--space-xl);
  z-index: var(--z-whatsapp);
  width: 48px;
  height: 48px;
  background: var(--bg-card);
  border: var(--border-thick) solid var(--text-primary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-base);
  pointer-events: none;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.back-to-top:hover {
  background: var(--gold);
  color: var(--charcoal);
  transform: translateY(-3px) translateX(-3px);
  box-shadow: 8px 8px 0px var(--text-primary);
}

.back-to-top svg { width: 22px; height: 22px; }

/* ===== LOADING SPINNER ===== */
.loading-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3xl);
}

.loading-spinner__icon {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top-color: var(--forest);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== MODAL OVERLAY ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal-content {
  background: var(--bg-card);
  border: var(--border-thick) solid var(--text-primary);
  box-shadow: 16px 16px 0px var(--text-primary);
  padding: var(--space-3xl);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.9);
  transition: transform var(--transition-base);
}

.modal-overlay.open .modal-content {
  transform: scale(1);
}

/* ===== CHAT TYPING ===== */
.chat-widget__message--typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 16px;
  min-height: 20px;
}

.typing-dot {
  width: 8px;
  height: 8px;
  border-radius: 0;
  background: var(--stone);
  display: inline-block;
  animation: typingBounce 1.4s infinite both;
}
.typing-dot:nth-child(1) { animation-delay: 0s; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}
