/**
 * SIRO Inmobiliaria - Global Stylesheet
 * Custom classes, global element styles, animations, and typography enhancements.
 */

@import url('design-tokens.css');

/* Global Transitions & Behaviors */
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: var(--font-family-body);
  background-color: var(--color-background);
  color: var(--color-on-background);
  overflow-x: hidden;
}

/* Material Symbols Setup */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined' !important;
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* Glassmorphism Effect */
.glass-effect {
  background: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* Custom Interactive States */
.btn-gold {
  background-color: var(--color-accent-gold) !important;
  color: var(--color-accent-navy) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-gold:hover {
  background-color: var(--color-accent-gold-hover) !important;
  color: var(--color-accent-navy) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 178, 111, 0.25);
}

/* Interactive Card Transitions */
.interactive-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.interactive-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(19, 27, 46, 0.06);
}

/* Selection */
::selection {
  background-color: var(--color-accent-gold);
  color: var(--color-accent-navy);
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-background);
}

::-webkit-scrollbar-thumb {
  background: var(--color-outline-variant);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-outline);
}

/* Navigation Bar Adaptive Contrast & Scrolled Styles */
nav {
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

/* Base states: Force black/dark-grey navbar links/buttons in ALL conditions (since background is always light) */
nav a.text-on-surface-variant,
nav a.dark\:text-on-secondary-fixed-variant {
  color: #45464d !important;
  opacity: 0.85;
  transition: color 0.3s ease, opacity 0.3s ease, transform 0.3s ease !important;
}

nav a.text-on-surface-variant:hover,
nav a.dark\:text-on-secondary-fixed-variant:hover {
  color: var(--color-tertiary) !important;
  opacity: 1 !important;
}

nav a.text-primary,
nav a.dark\:text-primary-fixed-dim {
  color: #0b1c30 !important;
  opacity: 1 !important;
  font-weight: 700 !important;
}

/* Toggle menu button & logo text */
nav button,
nav button span,
nav .text-primary,
nav .dark\:text-primary {
  color: #0b1c30 !important;
  transition: color 0.3s ease !important;
}

nav button:hover,
nav button:hover span {
  color: var(--color-tertiary) !important;
}

/* Light / Dark Mode adaptive scrolled navigation glass styles */
nav.glass-effect {
  background: var(--glass-bg) !important;
  border-color: var(--glass-border) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
}

/* Force-remove active underlines, borders, or shadows on the logo brand link under all conditions */
.logo-link,
.logo-link *,
.logo-link:hover,
.logo-link img:hover,
.logo-link:active,
.logo-link:focus,
.logo-link.border-b-2,
.logo-link.border-tertiary-container {
  border: none !important;
  border-bottom: 0 !important;
  border-bottom-width: 0 !important;
  text-decoration: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* ===== Google Reviews Widget ===== */

/* Star Rating — rendered via inline SVG, this handles the gold fill */
.review-star {
  color: #FBBC04; /* Google's official star gold */
  filter: drop-shadow(0 1px 2px rgba(251, 188, 4, 0.3));
}

/* Review Card */
.review-card {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.review-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(19, 27, 46, 0.08),
              0 8px 16px rgba(212, 178, 111, 0.06);
}

/* Quote mark decorative accent */
.review-card::before {
  content: '\201C';
  position: absolute;
  top: -8px;
  left: 20px;
  font-size: 72px;
  line-height: 1;
  font-family: var(--font-family-display);
  color: var(--color-accent-gold);
  opacity: 0.12;
  pointer-events: none;
  z-index: 0;
}

/* Horizontal scroll carousel */
.reviews-carousel {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
  scrollbar-width: none; /* Firefox */
}

.reviews-carousel::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.reviews-carousel > .review-card {
  scroll-snap-align: start;
  flex: 0 0 calc(33.333% - 16px);
  min-width: 300px;
}

@media (max-width: 768px) {
  .reviews-carousel > .review-card {
    flex: 0 0 calc(85% - 12px);
    min-width: 280px;
  }
}

/* Google badge hover glow */
.google-badge {
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.google-badge:hover {
  box-shadow: 0 4px 20px rgba(66, 133, 244, 0.15);
  transform: translateY(-1px);
}

/* Fade-in animation for review cards on scroll */
.review-card {
  opacity: 0;
  transform: translateY(24px);
  animation: reviewFadeIn 0.6s ease forwards;
}

.review-card:nth-child(1) { animation-delay: 0.1s; }
.review-card:nth-child(2) { animation-delay: 0.2s; }
.review-card:nth-child(3) { animation-delay: 0.3s; }
.review-card:nth-child(4) { animation-delay: 0.4s; }
.review-card:nth-child(5) { animation-delay: 0.5s; }
.review-card:nth-child(6) { animation-delay: 0.6s; }

@keyframes reviewFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
