/* ========================================
   Tu Hogar en Texas - Design System
   Fonts: Raleway + Space Grotesk
   ======================================== */

/* Fonts are loaded by a <link> in index.html (faster than @import) */

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand Colors */
  --color-primary: #1a2055;
  --color-primary-dark: #0e1338;
  --color-primary-light: #2d3578;
  --color-accent: #c9a043;
  --color-accent-light: #ddb85e;
  --color-accent-dark: #a8832e;
  --color-focus: #8a6516; /* focus rings: 3:1 or better on white, off-white and light gray */

  /* Neutrals */
  --color-white: #ffffff;
  --color-off-white: #f8f7f4;
  --color-light-gray: #edeae4;
  --color-medium-gray: #b0a899;
  --color-dark-gray: #4a4a4a;
  --color-text: #2d2d2d;
  --color-text-light: #6b6b6b;

  /* Semantic */
  --color-success: #2e7d32;
  --tips-do: #2e7d32;
  --tips-avoid: #b3261e;
  --color-bg-hero: linear-gradient(135deg, #0e1338 0%, #1a2055 40%, #2d3578 100%);
  --color-bg-section-alt: #f4f1ec;

  /* Typography */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Raleway', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;

  /* Layout */
  --max-width: 1400px;
  --header-height: 80px;
  --border-radius: 12px;
  --border-radius-sm: 8px;
  --border-radius-lg: 20px;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 40px rgba(0,0,0,0.15);
  --shadow-card: 0 4px 24px rgba(26,58,92,0.08);

  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-primary-dark);
}

/* ---------- Utility Classes ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 4vw;
}

.section-padding {
  padding: 60px 0;
}

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

.text-accent {
  color: var(--color-accent);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}

/* ---------- HEADER / NAVIGATION ---------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: box-shadow var(--transition-base), background var(--transition-base);
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 4vw;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.logo img {
  height: 56px;
  width: auto;
  background: transparent;
  border: none;
  box-shadow: none;
}

.logo img[src] {
  content-visibility: auto;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  line-height: 1.2;
}

.logo-text span {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--color-accent);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Main Navigation */
.main-nav {
  position: fixed;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 0;
  height: var(--header-height);
  padding-right: 4vw;
  z-index: 1001;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 18px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  letter-spacing: 0.3px;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
  white-space: nowrap;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-accent-dark);
  background: rgba(200, 164, 86, 0.08);
}

.nav-link .arrow {
  font-size: 0.6rem;
  transition: transform var(--transition-fast);
  margin-left: 2px;
}

.nav-item:hover .nav-link .arrow,
.nav-item.open .nav-link .arrow {
  transform: rotate(180deg);
}

/* Dropdown Menus */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 280px;
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  padding: 12px 0;
  padding-top: 16px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all var(--transition-base);
  border: 1px solid rgba(0,0,0,0.06);
  z-index: 100;
}

/* Invisible hover bridge between nav link and dropdown */
.has-dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 20px;
  background: transparent;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 8px;
  background: var(--color-white);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

.nav-item:hover .dropdown-menu,
.nav-item.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.dropdown-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text);
  transition: all var(--transition-fast);
}

.dropdown-link:hover {
  background: rgba(200, 164, 86, 0.08);
  color: var(--color-primary-dark);
  padding-left: 26px;
}

.dropdown-link .icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  border-radius: 8px;
  color: var(--color-white);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.dropdown-divider {
  height: 1px;
  background: var(--color-light-gray);
  margin: 6px 16px;
}

/* Language Toggle */
.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--color-off-white);
  border-radius: 20px;
  padding: 3px;
  margin-left: 12px;
}

.lang-btn {
  padding: 5px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 18px;
  transition: all var(--transition-fast);
  color: var(--color-text-light);
  letter-spacing: 0.5px;
}

.lang-btn.active {
  background: var(--color-primary);
  color: var(--color-white);
}

.lang-btn:hover:not(.active) {
  color: var(--color-primary-dark);
}

/* CTA Header Button */
.header-cta {
  margin-left: 16px;
  padding: 10px 22px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 30px;
  transition: all var(--transition-base);
  box-shadow: 0 3px 12px rgba(200, 164, 86, 0.3);
  white-space: nowrap;
}

.header-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200, 164, 86, 0.4);
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  cursor: pointer;
  z-index: 1300;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary-dark);
  border-radius: 2px;
  transition: all var(--transition-base);
}

.mobile-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.open span:nth-child(2) {
  opacity: 0;
}

.mobile-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ---------- HERO SECTION ---------- */
.hero-section {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background: var(--color-bg-hero);
  overflow: hidden;
  margin-top: var(--header-height);
  padding-top: 40px;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

/* Soft light glows (gradients fade to transparent, so no hard circle edges) */
.hero-bg-shapes .shape {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 174, 80, 0.22) 0%, rgba(212, 174, 80, 0.08) 40%, transparent 70%);
}

.hero-bg-shapes .shape-1 {
  width: 900px;
  height: 900px;
  top: -260px;
  right: -280px;
  animation: float 20s ease-in-out infinite;
}

.hero-bg-shapes .shape-2 {
  width: 700px;
  height: 700px;
  bottom: -320px;
  left: -120px;
  background: radial-gradient(circle, rgba(92, 128, 230, 0.28) 0%, rgba(92, 128, 230, 0.1) 40%, transparent 70%);
  animation: float 15s ease-in-out infinite reverse;
}

.hero-bg-shapes .shape-3 {
  width: 520px;
  height: 520px;
  top: 25%;
  right: 30%;
  background: radial-gradient(circle, rgba(140, 110, 220, 0.14) 0%, transparent 70%);
  animation: float 18s ease-in-out infinite 3s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(20px, -30px); }
  66% { transform: translate(-15px, 20px); }
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.hero-text {
  color: var(--color-white);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(200, 164, 86, 0.15);
  border: 1px solid rgba(200, 164, 86, 0.3);
  padding: 8px 18px;
  border-radius: 30px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-accent-light);
  margin-bottom: var(--space-md);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.3); }
}

.hero-title {
  font-size: clamp(2.2rem, 4.5vw, 3.8rem);
  color: var(--color-white);
  margin-bottom: var(--space-md);
  letter-spacing: -0.5px;
}

.hero-title .highlight {
  color: var(--color-accent);
  position: relative;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: var(--space-lg);
  max-width: 520px;
  font-weight: 400;
}

.hero-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  max-width: 520px;
}

.hero-buttons > :last-child {
  grid-column: 1 / -1;
  justify-self: center;
  min-width: 260px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-heading);
  font-size: 0.93rem;
  font-weight: 600;
  border-radius: 30px;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
  transition: left 0.5s ease;
}

.btn:hover::after {
  left: 100%;
}

.btn-primary {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(200, 164, 86, 0.35);
  border: 2px solid rgba(255,255,255,0.15);
}

.btn-primary:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 28px rgba(200, 164, 86, 0.5);
  border-color: rgba(255,255,255,0.3);
}

.btn-outline {
  background: transparent;
  color: var(--color-primary-dark);
  border: 2px solid var(--color-primary-dark);
}

.btn-outline:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}

/* Outline buttons on dark backgrounds (hero, CTA sections) */
.hero-section .btn-outline,
.careers-section .btn-outline {
  color: var(--color-white);
  border-color: rgba(255,255,255,0.4);
}

.hero-section .btn-outline:hover,
.careers-section .btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.6);
  color: #fff;
}

[data-theme="dark"] .btn-outline {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

[data-theme="dark"] .btn-outline:hover {
  background: var(--color-accent);
  color: #1a1a2e;
}

.btn-dark {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 4px 16px rgba(26,58,92,0.3);
}

.btn-dark:hover {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  gap: var(--space-lg);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  padding-bottom: var(--space-xl);
  border-top: 1px solid rgba(255,255,255,0.1);
}

.stat-item {
  text-align: center;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-accent);
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-image {
  position: relative;
  min-width: 0; /* the 3D canvas must never widen its grid column */
}

.hero-image-wrapper {
  position: relative;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.hero-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
}

/* Three.js 3D Container: larger than its column, with edges that fade out
   so the coin and its particles blend into the hero (no visible box) */
.hero-3d-container {
  width: auto;
  height: 600px;
  margin: -60px -4vw -60px 0;
  overflow: hidden;
  position: relative;
  cursor: grab;
  background: transparent;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 68%, transparent 100%);
  mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 68%, transparent 100%);
}

/* Gold halo behind the coin */
.hero-3d-container::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  height: 92%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232, 193, 93, 0.3) 0%, rgba(201, 160, 67, 0.12) 38%, transparent 68%);
  animation: haloPulse 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes haloPulse {
  0%, 100% { opacity: 0.75; transform: translate(-50%, -50%) scale(0.96); }
  50% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); }
}

/* Flat logo shown until the 3D coin is ready. Sized to match the coin:
   the camera shows the coin at about 67.8% of the canvas height. */
.hero-coin-placeholder {
  position: absolute;
  left: 50%;
  top: 50%;
  height: 67.8%;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  /* Gold rim around the logo face, like the 3D coin's edge */
  background: radial-gradient(circle closest-side, #e3c062 93%, #b8902f 97%, #8a6a1f 100%);
  box-shadow: 0 0 60px rgba(232, 193, 93, 0.25);
  transition: opacity 0.8s ease;
  pointer-events: none;
}

.hero-coin-placeholder img {
  position: absolute;
  left: 3.2%;
  top: 3.2%;
  width: 93.6%;
  height: 93.6%;
  border-radius: 50%;
  object-fit: cover;
}

.hero-3d-container.is-3d .hero-coin-placeholder {
  opacity: 0;
}

.hero-3d-container:active {
  cursor: grabbing;
}

/* Positioned over the container so its pixel size (set by three.js) never
   affects the layout */
.hero-3d-container canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100% !important;
  height: 100% !important;
}

.hero-float-card {
  position: absolute;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 16px 20px;
  box-shadow: var(--shadow-md);
  animation: float-card 4s ease-in-out infinite;
}

.hero-float-card.card-1 {
  bottom: 20px;
  left: -30px;
}

.hero-float-card.card-2 {
  top: 30px;
  right: -20px;
  animation-delay: 2s;
}

@keyframes float-card {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.float-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: 8px;
}

.float-card-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-primary-dark);
}

.float-card-sub {
  font-size: 0.7rem;
  color: var(--color-text-light);
}

/* ---------- SERVICES SECTION ---------- */
.services-section {
  background: var(--color-off-white);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: var(--space-sm);
}

.section-label::before,
.section-label::after {
  content: '';
  width: 30px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}

.section-title {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  margin-bottom: var(--space-sm);
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--color-text-light);
  max-width: 600px;
  margin: 0 auto;
}

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

.service-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  padding: 32px 28px;
  transition: all var(--transition-base);
  border: 1px solid rgba(0,0,0,0.04);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-base);
}

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

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 1.4rem;
  margin-bottom: var(--space-md);
}

.service-card h3 {
  font-size: 1.15rem;
  margin-bottom: var(--space-xs);
}

.service-card p {
  font-size: 0.9rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

.service-card .learn-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent-dark);
  transition: gap var(--transition-fast);
}

.service-card:hover .learn-more {
  gap: 10px;
}

/* ---------- ABOUT / NOSOTROS SECTION ---------- */
.about-section {
  background: var(--color-white);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.about-image {
  position: relative;
}

.about-image-main {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.about-image-main img {
  width: 100%;
  height: 450px;
  object-fit: cover;
}

.about-accent-box {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: var(--color-white);
  padding: 24px;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.about-accent-box .number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
}

.about-accent-box .label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.about-text h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  margin-bottom: var(--space-md);
}

.about-text p {
  color: var(--color-text-light);
  margin-bottom: var(--space-md);
  font-size: 0.95rem;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: var(--space-lg);
}

.about-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--color-off-white);
  border-radius: var(--border-radius-sm);
  transition: background var(--transition-fast);
}

.about-feature:hover {
  background: var(--color-light-gray);
}

.about-feature .check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-success), #43a047);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.about-feature span {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--color-primary-dark);
}

/* ---------- PROCESS / PROCESO SECTION ---------- */
.process-section {
  background: var(--color-primary-dark);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.process-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Ccircle cx='20' cy='20' r='2'/%3E%3C/g%3E%3C/svg%3E");
}

.process-section .section-title {
  color: var(--color-white);
}

.process-section .section-subtitle {
  color: rgba(255,255,255,0.6);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
}

.process-steps::before {
  content: '';
  position: absolute;
  top: 50px;
  left: 10%;
  width: 80%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--color-accent), var(--color-accent), transparent);
  opacity: 0.3;
}

.process-step {
  text-align: center;
  position: relative;
  z-index: 2;
}

.step-number {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-white);
  margin: 0 auto var(--space-md);
  box-shadow: 0 4px 16px rgba(200, 164, 86, 0.3);
}

.process-step h3 {
  color: var(--color-white);
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.process-step p {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.6;
}

/* ---------- TIPS SECTION ---------- */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.tip-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  border: 1px solid rgba(0,0,0,0.04);
}

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

.tip-card-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.tip-card-image .tag {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 5px 14px;
  background: var(--color-accent);
  color: var(--color-white);
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tip-card-body {
  padding: 24px;
}

.tip-card-body h3 {
  font-size: 1.1rem;
  margin-bottom: var(--space-xs);
}

.tip-card-body p {
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.6;
}

.tip-card-body .read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: var(--space-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent-dark);
}

/* ---------- CONTACT SECTION ---------- */
.contact-section {
  background: var(--color-white);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
}

.contact-info h2 {
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  margin-bottom: var(--space-md);
}

.contact-info > p {
  color: var(--color-text-light);
  margin-bottom: var(--space-lg);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-detail {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.contact-detail .icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 1rem;
  flex-shrink: 0;
}

.contact-detail .detail-text h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.contact-detail .detail-text p {
  font-size: 0.88rem;
  color: var(--color-text-light);
}

.contact-detail .detail-text a {
  color: var(--color-accent-dark);
  font-weight: 600;
}

.contact-detail .detail-text a:hover {
  color: var(--color-accent);
}

.social-links {
  display: flex;
  gap: 12px;
  margin-top: var(--space-lg);
}

.social-link {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary-dark);
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.social-link:hover {
  background: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-2px);
}

/* Contact Form */
.contact-form {
  background: var(--color-off-white);
  border-radius: var(--border-radius-lg);
  padding: 36px;
}

.contact-form h3 {
  font-size: 1.3rem;
  margin-bottom: var(--space-md);
}

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--color-light-gray);
  border-radius: var(--border-radius-sm);
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--color-text);
  transition: border-color var(--transition-fast);
  background: var(--color-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-submit {
  width: 100%;
  margin-top: 8px;
}

/* ---------- CAREERS SECTION ---------- */
.careers-section {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: var(--color-white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.careers-section::before {
  content: '';
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(200, 164, 86, 0.06);
  top: -100px;
  right: -100px;
}

.careers-section h2 {
  color: var(--color-white);
  font-size: clamp(1.6rem, 2.5vw, 2.4rem);
  margin-bottom: var(--space-sm);
}

.careers-section p {
  color: rgba(255,255,255,0.7);
  max-width: 600px;
  margin: 0 auto var(--space-lg);
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--color-primary-dark);
  color: rgba(255,255,255,0.7);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.footer-brand .logo {
  margin-bottom: var(--space-md);
}

.footer-brand .logo-text {
  color: var(--color-white);
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.7;
  max-width: 300px;
}

.footer-col h4 {
  color: var(--color-white);
  font-size: 1rem;
  margin-bottom: var(--space-md);
  position: relative;
  padding-bottom: 12px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}

.footer-col a {
  display: block;
  padding: 5px 0;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  transition: all var(--transition-fast);
}

.footer-col a:hover {
  color: var(--color-accent);
  padding-left: 6px;
}

.footer-nmls {
  margin-top: var(--space-md);
  padding: 16px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(255,255,255,0.06);
}

.footer-nmls p {
  font-size: 0.78rem;
  line-height: 1.6;
  color: rgba(255,255,255,0.5);
}

.footer-bottom {
  padding-top: var(--space-md);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.68);
}

.footer-bottom-links {
  display: flex;
  gap: var(--space-md);
}

.footer-bottom-links a {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.68);
  transition: color var(--transition-fast);
}

.footer-bottom-links a:hover {
  color: var(--color-accent);
}

/* ---------- PAGE SECTIONS (Inner pages) ---------- */
.page-hero {
  margin-top: var(--header-height);
  padding: var(--space-2xl) 0;
  background: var(--color-bg-hero);
  color: var(--color-white);
  text-align: center;
  position: relative;
}

.page-hero h1 {
  color: var(--color-white);
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: var(--space-sm);
}

.page-hero p {
  color: rgba(255,255,255,0.7);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.page-content {
  padding: var(--space-2xl) 0;
}

/* Service Detail Cards (for Servicios page) */
/* ---- Service Tabs ---- */
.svc-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 2.5rem;
  border-bottom: 2px solid var(--color-light-gray);
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.svc-tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border: none;
  background: transparent;
  color: var(--color-text-light);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-base);
  border-radius: 8px 8px 0 0;
}

.svc-tab:hover {
  color: var(--color-primary);
  background: rgba(26, 32, 85, 0.04);
}

.svc-tab.active {
  color: var(--color-accent);
  border-bottom-color: var(--color-accent);
  background: rgba(201, 160, 67, 0.06);
}

.svc-tab i {
  font-size: 1rem;
}

/* ---- Service Panels ---- */
.svc-panel {
  display: none;
  animation: svcFadeIn 0.4s ease;
}

.svc-panel.active {
  display: block;
}

@keyframes svcFadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.svc-panel-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.svc-panel-img {
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.svc-panel-img::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--border-radius-lg);
  border: 2px solid rgba(201, 160, 67, 0.2);
  pointer-events: none;
}

.svc-panel-img img {
  width: 100%;
  /* The service photos are 1376x768: keep that shape so nothing is cut off */
  height: auto;
  aspect-ratio: 1376 / 768;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.svc-panel-img:hover img {
  transform: scale(1.03);
}

.svc-panel-text h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: var(--color-primary-dark);
}

.svc-panel-text p {
  color: var(--color-text-light);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.svc-features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.svc-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--color-text);
  line-height: 1.5;
}

.svc-features li i {
  color: var(--color-accent);
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

/* Team section for Nosotros page */
.team-card {
  text-align: center;
  padding: 36px 28px;
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(0,0,0,0.04);
}

.team-avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto var(--space-md);
  border: 4px solid var(--color-accent);
  box-shadow: 0 4px 16px rgba(200, 164, 86, 0.2);
}

.team-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card h3 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}

.team-card .role {
  font-size: 0.88rem;
  color: var(--color-accent-dark);
  font-weight: 600;
  margin-bottom: var(--space-sm);
}

.team-card .nmls {
  font-size: 0.8rem;
  color: var(--color-text-light);
}

/* Careers page */
.careers-benefits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: var(--space-xl);
}

.benefit-card {
  padding: 28px;
  background: var(--color-off-white);
  border-radius: var(--border-radius);
  text-align: center;
  transition: all var(--transition-base);
}

.benefit-card:hover {
  background: var(--color-white);
  box-shadow: var(--shadow-card);
  transform: translateY(-3px);
}

.benefit-card .benefit-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  font-size: 1.3rem;
  margin: 0 auto var(--space-md);
}

.benefit-card h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}

.benefit-card p {
  font-size: 0.88rem;
  color: var(--color-text-light);
}

/* ---------- PAGE VISIBILITY (SPA routing) ---------- */
.page-section {
  display: none;
}

.page-section.active {
  display: block;
}

/* ---------- SCROLL TO TOP ---------- */
.scroll-top {
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--transition-base);
  box-shadow: 0 4px 16px rgba(200, 164, 86, 0.3);
  z-index: 900;
}

.scroll-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(200, 164, 86, 0.4);
}

/* ---------- ANIMATIONS ---------- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- LOADING OVERLAY ---------- */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-primary-dark), var(--color-primary));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  transition: opacity 0.5s, visibility 0.5s;
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-logo {
  width: 120px;
  animation: pulse 1.5s ease-in-out infinite;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--color-accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-top: 20px;
}

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

/* ---------- FLOATING ACTION BUTTON STACK ---------- */
.fab-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 1000;
}

.wa-float {
  width: 56px;
  height: 56px;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  background: #25D366;
  color: white;
  text-decoration: none;
  border: none;
  outline: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
  transition: all 0.3s;
}

.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* ---------- DARK MODE TOGGLE ---------- */
.dark-toggle {
  background: none;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
  margin-right: 8px;
}

.dark-toggle:hover {
  background: var(--color-primary);
  color: white;
}

/* ---------- DARK MODE THEME ---------- */
[data-theme="dark"] {
  --color-primary: #7eb8e0;
  --color-primary-dark: #0d1b2a;
  --color-white: #1a1a2e;
  --color-light: #16213e;
  --color-accent: #e8c15d;
  --color-accent-dark: #d4a843;
  --color-focus: #e8c15d;
  --color-text: #e8e8ec;
  --color-text-light: #b8b8c8;
  --color-off-white: #1e1e36;
  --color-light-gray: #2a2a44;
  --color-medium-gray: #888;
  --color-dark-gray: #ddd;
  --color-bg-section-alt: #16213e;
  --tips-do: #7bd88f;
  --tips-avoid: #ff8a80;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.4);
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .site-header {
  background: rgba(26, 26, 46, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .dropdown-menu {
  background: #1a1a2e;
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .dropdown-menu::before {
  background: #1a1a2e;
}

[data-theme="dark"] .dropdown-link:hover {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .dark-toggle {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

[data-theme="dark"] .dark-toggle:hover {
  background: var(--color-accent);
  color: #1a1a2e;
}

[data-theme="dark"] .logo-text {
  color: #e8e8ec;
}

[data-theme="dark"] .service-card,
[data-theme="dark"] .benefit-card {
  background: #16213e;
}

[data-theme="dark"] .page-hero {
  background: linear-gradient(135deg, #0d1b2a, #1a3a5c);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #16213e;
  color: #e0e0e0;
  border-color: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .site-footer {
  background: #0d1b2a;
}

[data-theme="dark"] .nav-link {
  color: #e0e0e0;
}

[data-theme="dark"] .mobile-toggle span {
  background: #e0e0e0;
}

[data-theme="dark"] .tip-card,
[data-theme="dark"] .team-card {
  background: #16213e;
}

[data-theme="dark"] .contact-form {
  background: #16213e;
}

[data-theme="dark"] .about-feature {
  background: #16213e;
}

[data-theme="dark"] .lang-toggle {
  background: #16213e;
}

[data-theme="dark"] .calc-container,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .blog-card,
[data-theme="dark"] .property-card,
[data-theme="dark"] .quiz-content {
  background: #16213e;
}

[data-theme="dark"] .testimonial-slide {
  background: #16213e;
}

/* About / Nosotros dark mode */
[data-theme="dark"] .about-content h2,
[data-theme="dark"] .about-text h2 {
  color: #e8e8ec;
}
[data-theme="dark"] .about-content p,
[data-theme="dark"] .about-text p {
  color: #b8b8c8;
}
[data-theme="dark"] .about-feature span {
  color: #e0e0e0;
}
[data-theme="dark"] .section-header .section-title,
[data-theme="dark"] .page-content h2,
[data-theme="dark"] .page-content h3 {
  color: #e8e8ec;
}
[data-theme="dark"] .page-content p {
  color: #b8b8c8;
}
[data-theme="dark"] .team-card h3 {
  color: #e8e8ec;
}
[data-theme="dark"] .team-card .role,
[data-theme="dark"] .team-card .nmls {
  color: var(--color-accent);
}
[data-theme="dark"] #page-nosotros [style*="color:var(--color-primary-dark)"],
[data-theme="dark"] #page-nosotros [style*="color: var(--color-primary-dark)"] {
  color: #e8e8ec !important;
}
[data-theme="dark"] .section-label {
  color: var(--color-accent);
}

/* ---------- MASTER DARK MODE FIXES ---------- */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
  color: #e8e8ec;
}

[data-theme="dark"] .dropdown-link:hover {
  color: var(--color-accent);
}

[data-theme="dark"] .lang-btn:hover:not(.active) {
  color: #e8e8ec;
}

[data-theme="dark"] .hero-float-card {
  background: rgba(22, 33, 62, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .float-card-text {
  color: #e8e8ec;
}

[data-theme="dark"] .float-card-sub {
  color: #b8b8c8;
}

[data-theme="dark"] .service-card h3,
[data-theme="dark"] .property-info h3,
[data-theme="dark"] .contact-detail .detail-text h4,
[data-theme="dark"] .form-group label,
[data-theme="dark"] .svc-panel-text h2 {
  color: #e8e8ec;
}

[data-theme="dark"] .service-card p,
[data-theme="dark"] .svc-panel-text p,
[data-theme="dark"] .contact-detail p,
[data-theme="dark"] .property-location,
[data-theme="dark"] .property-details {
  color: #b8b8c8;
}

[data-theme="dark"] .property-price {
  color: #e8e8ec;
}

[data-theme="dark"] #page-inicio [style*="color:var(--color-primary-dark)"],
[data-theme="dark"] #page-contacto [style*="color:var(--color-primary-dark)"],
[data-theme="dark"] #page-servicios [style*="color:var(--color-primary-dark)"],
[data-theme="dark"] #page-tips [style*="color:var(--color-primary-dark)"],
[data-theme="dark"] #page-carreras [style*="color:var(--color-primary-dark)"],
[data-theme="dark"] #page-blog [style*="color:var(--color-primary-dark)"] {
  color: #e8e8ec !important;
}

[data-theme="dark"] .social-link {
  background: #2a2a44;
  color: #e8e8ec;
}

[data-theme="dark"] .social-link:hover {
  background: var(--color-accent);
  color: #1a1a2e;
}

[data-theme="dark"] .testimonial-dot {
  background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .testimonial-dot.active {
  background: var(--color-accent);
}

[data-theme="dark"] .testimonial-prev,
[data-theme="dark"] .testimonial-next {
  background: #16213e;
  border-color: rgba(255, 255, 255, 0.15);
  color: #e8e8ec;
}

[data-theme="dark"] .btn-outline {
  color: #e8e8ec;
  border-color: #e8e8ec;
}

[data-theme="dark"] .btn-outline:hover {
  background: #e8e8ec;
  color: #1a1a2e;
}

[data-theme="dark"] .calc-label {
  color: #e8e8ec;
}

[data-theme="dark"] .calc-input-wrap {
  background: #16213e;
  border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .faq-question {
  color: #e8e8ec;
}

[data-theme="dark"] .faq-answer {
  color: #b8b8c8;
}

[data-theme="dark"] .blog-card-title {
  color: #e8e8ec;
}

[data-theme="dark"] .blog-card-excerpt {
  color: #b8b8c8;
}

[data-theme="dark"] .blog-back {
  color: var(--color-accent);
}

[data-theme="dark"] .quiz-modal-content {
  background: #1a1a2e;
}

[data-theme="dark"] .quiz-title,
[data-theme="dark"] .quiz-slide h3 {
  color: #e8e8ec;
}

[data-theme="dark"] .quiz-option {
  background: #16213e;
  border-color: rgba(255, 255, 255, 0.1);
  color: #e8e8ec;
}

[data-theme="dark"] .quiz-recommendation-box {
  background: #16213e;
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .quiz-recommendation-box h4 {
  color: #e8e8ec;
}

[data-theme="dark"] .quiz-loan-card {
  background: #2a2a44;
  border-left-color: var(--color-accent);
}

[data-theme="dark"] .quiz-loan-card strong {
  color: #e8e8ec;
}

[data-theme="dark"] .quiz-loan-card span,
[data-theme="dark"] .quiz-tips-box ul li {
  color: #b8b8c8;
}

[data-theme="dark"] .quiz-power-box .power-amount {
  color: var(--color-accent);
}

[data-theme="dark"] .quiz-result-title {
  color: #e8e8ec;
}

[data-theme="dark"] .quiz-score-label,
[data-theme="dark"] .quiz-result-desc {
  color: #b8b8c8;
}

[data-theme="dark"] .timeline-content h3 {
  color: #e8e8ec;
}

[data-theme="dark"] .timeline-content p {
  color: #b8b8c8;
}

@media (max-width: 1024px) {
  [data-theme="dark"] .main-nav .nav-link {
    color: #e8e8ec;
    border-bottom-color: rgba(255, 255, 255, 0.08);
  }
}

/* ---------- MORTGAGE CALCULATOR ---------- */
.calc-section {
  background: var(--color-off-white);
}

.calc-container {
  max-width: 960px;
  margin: 0 auto;
  background: var(--color-white);
  border-radius: 20px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.04);
}

.calc-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

.calc-inputs {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.calc-results {
  background: linear-gradient(150deg, #0d1b2a 0%, #1a2055 50%, #2a3a6a 100%);
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.calc-results::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(200, 164, 86, 0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.calc-results::after {
  content: '';
  position: absolute;
  bottom: -40px;
  left: -40px;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(200, 164, 86, 0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calc-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

[data-theme="dark"] .calc-label {
  color: var(--color-text);
}

.calc-input-wrap {
  display: flex;
  align-items: center;
  border: 2px solid var(--color-light-gray);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s;
  background: var(--color-white);
}

.calc-input-wrap:focus-within {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(200, 164, 86, 0.12);
}

.calc-currency,
.calc-pct {
  padding: 12px 14px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-accent-dark);
  background: var(--color-off-white);
  line-height: 1;
}

.calc-input {
  flex: 1;
  width: 100%;
  padding: 14px 16px;
  border: none;
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-text);
  background: transparent;
  outline: none;
  -moz-appearance: textfield;
}

.calc-input::-webkit-inner-spin-button,
.calc-input::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

select.calc-input {
  border: 2px solid var(--color-light-gray);
  border-radius: 12px;
  background: var(--color-white);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='6'%3E%3Cpath d='M0 0l6 6 6-6' fill='%23999'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

select.calc-input:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(200, 164, 86, 0.12);
}

/* Range Slider */
.calc-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 3px;
  background: linear-gradient(to right, var(--color-accent) 0%, var(--color-light-gray) 0%);
  outline: none;
  cursor: pointer;
  margin-top: 4px;
}

.calc-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--color-accent);
  cursor: pointer;
  border: 3px solid var(--color-white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
  transition: transform 0.15s;
}

.calc-range::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.calc-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-accent);
  cursor: pointer;
  border: 3px solid var(--color-white);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Results Panel */
.calc-results-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  opacity: 0.6;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.calc-payment {
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.calc-payment-amount {
  font-family: var(--font-heading);
  font-size: 3.4rem;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
  text-shadow: 0 2px 12px rgba(200, 164, 86, 0.3);
}

.calc-payment-label {
  font-size: 0.85rem;
  opacity: 0.75;
  margin-top: 4px;
}

.calc-breakdown {
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 16px;
  margin-bottom: 28px;
  position: relative;
  z-index: 1;
}

.calc-breakdown-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  opacity: 0.8;
}

.calc-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 36px;
  background: linear-gradient(135deg, var(--color-accent), #e0b84a);
  color: #0d1b2a;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  box-shadow: 0 4px 20px rgba(200, 164, 86, 0.4);
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.calc-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(200, 164, 86, 0.5);
}

.calc-disclaimer {
  font-size: 0.72rem;
  opacity: 0.7;
  margin-top: 16px;
  position: relative;
  z-index: 1;
}

[data-theme="dark"] .calc-container {
  background: #1e1e36;
  border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .calc-input-wrap {
  border-color: rgba(255, 255, 255, 0.12);
  background: #16213e;
}

[data-theme="dark"] .calc-currency,
[data-theme="dark"] .calc-pct {
  background: #0d1b2a;
  color: var(--color-accent);
}

[data-theme="dark"] .calc-input {
  color: #e8e8ec;
}

[data-theme="dark"] select.calc-input {
  border-color: rgba(255, 255, 255, 0.12);
  background-color: #16213e;
  color: #e8e8ec;
}

/* ---------- FAQ ACCORDION ---------- */
.faq-section {
  background: var(--color-white);
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--color-off-white);
  border-radius: var(--border-radius);
  margin-bottom: 12px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  overflow: hidden;
  transition: all var(--transition-base);
}

.faq-item:hover {
  box-shadow: var(--shadow-sm);
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 24px;
  background: none;
  border: none;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
}

[data-theme="dark"] .faq-question {
  color: var(--color-text);
}

.faq-question:hover {
  color: var(--color-accent);
}

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: all var(--transition-base);
}

.faq-item.active .faq-icon {
  background: var(--color-accent);
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.4s ease;
}

.faq-answer-inner {
  padding: 0 24px 18px;
  font-size: 0.92rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

.faq-answer p {
  padding: 0 24px 18px;
  font-size: 0.92rem;
  color: var(--color-text-light);
  line-height: 1.7;
  margin: 0;
}

.faq-item.active .faq-answer {
  max-height: 300px;
}

/* ---------- ENHANCED TIMELINE ---------- */
.timeline-section {
  background: var(--color-off-white);
  overflow: hidden;
  padding: 40px 0;
}

.timeline-container {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 0;
}

.timeline-line {
  position: absolute;
  top: 68px;
  left: 5%;
  width: 90%;
  height: 3px;
  background: var(--color-light-gray);
  border-radius: 2px;
}

.timeline-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
  border-radius: 2px;
  transition: width 3.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.timeline-container.animated .timeline-line::after {
  width: 100%;
}

.timeline-step {
  position: relative;
  z-index: 2;
  text-align: center;
  flex: 1;
  padding: 0 12px;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.timeline-step:hover {
  transform: translateY(-6px);
}

.timeline-step.visible {
  animation: timelineStepIn 1s ease both;
}

@keyframes timelineStepIn {
  from { opacity: 0.5; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.timeline-step:nth-child(2) { animation-delay: 0.5s; }
.timeline-step:nth-child(3) { animation-delay: 1s; }
.timeline-step:nth-child(4) { animation-delay: 1.5s; }
.timeline-step:nth-child(5) { animation-delay: 2s; }
.timeline-step:nth-child(6) { animation-delay: 2.5s; }

.timeline-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-white);
  border: 3px solid var(--color-light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--color-primary);
  margin: 0 auto 16px;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.timeline-step.visible .timeline-icon {
  border-color: var(--color-accent);
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: white;
  box-shadow: 0 4px 16px rgba(200, 164, 86, 0.3);
}

.timeline-content h3 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 6px;
  transition: color var(--transition-base);
}

[data-theme="dark"] .timeline-content h3 {
  color: var(--color-text);
}

.timeline-content p {
  font-size: 0.82rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

.timeline-step:hover .timeline-icon {
  transform: scale(1.15);
  border-color: var(--color-accent);
  color: var(--color-accent);
  box-shadow: 0 4px 16px rgba(200, 164, 86, 0.3);
}

.timeline-step:hover .timeline-content h3 {
  color: var(--color-accent-dark);
}

.timeline-icon {
  cursor: pointer;
}

/* ---------- TESTIMONIALS CAROUSEL ---------- */
.testimonials-section {
  background: var(--color-off-white);
  position: relative;
  overflow: hidden;
}

.testimonials-wrapper {
  max-width: 700px;
  margin: 0 auto;
  position: relative;
}

.testimonial-carousel {
  position: relative;
  min-height: 280px;
}

.testimonial-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--color-white);
  border-radius: var(--border-radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
  text-align: center;
  opacity: 0;
  transform: translateX(60px);
  transition: all 0.5s ease;
  pointer-events: none;
}

.testimonial-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
  position: relative;
}

.testimonial-stars {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 16px;
  color: var(--color-accent);
  font-size: 1.1rem;
}

.testimonial-text {
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.7;
  font-style: italic;
  margin-bottom: 20px;
  position: relative;
}

.testimonial-text::before {
  content: '\201C';
  font-size: 3rem;
  color: var(--color-accent);
  opacity: 0.3;
  position: absolute;
  top: -20px;
  left: -10px;
  font-family: serif;
}

.testimonial-author {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary-dark);
}

[data-theme="dark"] .testimonial-author {
  color: var(--color-text);
}

.testimonial-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.testimonial-prev,
.testimonial-next {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-white);
  border: 2px solid var(--color-light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  color: var(--color-primary);
  font-size: 0.9rem;
}

.testimonial-prev:hover,
.testimonial-next:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

.testimonial-dots {
  display: flex;
  gap: 8px;
}

.testimonial-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-light-gray);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: none;
}

.testimonial-dot.active {
  background: var(--color-accent);
  transform: scale(1.2);
}

.testimonial-rating {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  padding: 8px 20px;
  background: var(--color-white);
  border-radius: 30px;
  box-shadow: var(--shadow-sm);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary-dark);
}

[data-theme="dark"] .testimonial-rating {
  background: #16213e;
  color: var(--color-text);
}

.testimonial-rating .google-icon {
  width: 20px;
  height: 20px;
}

.testimonial-rating .stars {
  color: var(--color-accent);
}

/* ---------- BLOG PAGE ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.blog-card {
  background: var(--color-white);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.blog-card-body {
  padding: 20px 24px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-date {
  font-size: 0.78rem;
  color: var(--color-accent-dark);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.blog-card-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
  line-height: 1.3;
}

.blog-excerpt {
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.6;
  flex: 1;
}

[data-theme="dark"] .blog-card {
  background: #1e1e36;
}

[data-theme="dark"] .blog-card-title {
  color: #e8e8ec;
}

.blog-card-image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}

.blog-card-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.3));
}

.blog-date-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--color-accent);
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.blog-card-content {
  padding: 24px;
}

.blog-card-content h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  line-height: 1.3;
}

.blog-card-content p {
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: 12px;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-accent-dark);
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
  transition: gap var(--transition-fast);
}

.blog-read-more:hover {
  gap: 10px;
}

.blog-article {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-white);
  z-index: 2000;
  overflow-y: auto;
  animation: blogSlideIn 0.3s ease;
}

.blog-article.active {
  display: block;
}

@keyframes blogSlideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.blog-article-content {
  max-width: 700px;
  margin: 0 auto;
  padding: calc(var(--header-height) + 40px) 20px 60px;
}

.blog-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--color-off-white);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  border: none;
  cursor: pointer;
  margin-bottom: 24px;
  transition: all var(--transition-fast);
  font-family: var(--font-body);
}

.blog-back:hover {
  background: var(--color-light-gray);
}

.blog-article-content h1 {
  font-size: 2rem;
  margin-bottom: 16px;
  line-height: 1.3;
}

.blog-article-content p {
  font-size: 1rem;
  color: var(--color-text);
  line-height: 1.8;
  margin-bottom: 16px;
}

/* ---------- QUIZ MODAL ---------- */
.quiz-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 5000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.quiz-modal-overlay.active {
  display: flex;
}

.quiz-modal-content {
  background: linear-gradient(160deg, #1a2a4a 0%, #162040 50%, #1e3460 100%);
  border-radius: 20px;
  max-width: 560px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  color: #e8ecf4;
}

.quiz-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.2rem;
  color: rgba(255,255,255,0.6);
  cursor: pointer;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.quiz-close:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.quiz-progress {
  height: 6px;
  background: rgba(255,255,255,0.12);
  border-radius: 3px;
  margin-bottom: 28px;
  overflow: hidden;
}

.quiz-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--color-accent), #e0b84a);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.quiz-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  color: #fff;
  margin-bottom: 6px;
}

.quiz-subtitle {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 28px;
}

.quiz-slides {
  min-height: 250px;
}

.quiz-slide {
  display: none;
}

.quiz-slide.active {
  display: block;
}

.quiz-slide h3 {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 20px;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border: 2px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.95rem;
  color: #e0e4ec;
}

.quiz-option:hover {
  border-color: var(--color-accent);
  background: rgba(200, 164, 86, 0.1);
}

.quiz-option input[type="radio"] {
  accent-color: var(--color-accent);
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.quiz-option:has(input:checked) {
  border-color: var(--color-accent);
  background: rgba(200, 164, 86, 0.15);
  font-weight: 600;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.quiz-prev-btn,
.quiz-next-btn,
.quiz-submit-btn {
  padding: 10px 28px;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
}

.quiz-prev,
.quiz-next,
.quiz-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 30px;
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  border: none;
}

.quiz-prev {
  background: var(--color-off-white);
  color: var(--color-text);
}

.quiz-prev:hover {
  background: var(--color-light-gray);
}

.quiz-next,
.quiz-submit {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: white;
  box-shadow: 0 3px 12px rgba(200, 164, 86, 0.3);
}

.quiz-next:hover,
.quiz-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200, 164, 86, 0.4);
}

.quiz-results {
  text-align: center;
  padding: 20px 0;
}

.quiz-result-icon {
  font-size: 3.5rem;
  color: #27ae60;
  margin-bottom: 16px;
}
.quiz-result-icon.result-good { color: #27ae60; }
.quiz-result-icon.result-ok { color: var(--color-accent); }
.quiz-result-icon.result-talk { color: #6b9ece; }

.quiz-result-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 12px;
}

.quiz-score-meter {
  width: 100%;
  max-width: 320px;
  height: 10px;
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  margin: 0 auto 8px;
  overflow: hidden;
}
.quiz-score-fill {
  height: 100%;
  border-radius: 10px;
  transition: width 1s ease, background 0.5s ease;
}
.quiz-score-label {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 16px;
  font-weight: 600;
}

.quiz-result-desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
}

.quiz-recommendation-box {
  background: rgba(255,255,255,0.06);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 16px;
  text-align: left;
  max-width: 460px;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid rgba(255,255,255,0.1);
}
.quiz-recommendation-box h4 {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
}

.quiz-loan-card {
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 8px;
  border-left: 4px solid var(--color-accent);
  box-shadow: none;
}
.quiz-loan-card:last-child { margin-bottom: 0; }
.quiz-loan-card strong {
  display: block;
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 4px;
}
.quiz-loan-card span {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
}
.quiz-loan-badge {
  display: inline-block;
  background: var(--color-accent);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 8px;
  vertical-align: middle;
  text-transform: uppercase;
}

.quiz-tips-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.quiz-tips-box ul li {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
}
.quiz-tips-box ul li:last-child { border-bottom: none; }
.quiz-tips-box ul li i {
  color: var(--color-accent);
  margin-top: 3px;
  flex-shrink: 0;
}

.quiz-power-box p {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.7);
  margin: 0;
  line-height: 1.6;
}
.quiz-power-box .power-amount {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-accent);
  font-weight: 700;
}

#quiz-prob-container {
  margin: 20px 0;
  padding: 16px 20px;
  border-radius: 12px;
  background: rgba(46, 204, 113, 0.08);
  border: 1px solid rgba(46, 204, 113, 0.25);
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: #27ae60;
}
[data-theme="dark"] #quiz-prob-container {
  background: rgba(46, 204, 113, 0.12);
  border-color: rgba(46, 204, 113, 0.3);
  color: #2ecc71;
}

.quiz-result-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: white;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: 0 4px 16px rgba(200, 164, 86, 0.35);
}

.quiz-result-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200, 164, 86, 0.45);
}

[data-theme="dark"] .quiz-modal-content {
  background: #1e1e36;
}

[data-theme="dark"] .quiz-title,
[data-theme="dark"] .quiz-slide h3,
[data-theme="dark"] .quiz-result-title {
  color: #e8e8ec;
}

[data-theme="dark"] .quiz-option {
  border-color: rgba(255, 255, 255, 0.12);
  color: #e8e8ec;
}

[data-theme="dark"] .quiz-option:hover {
  border-color: var(--color-accent);
  background: rgba(200, 164, 86, 0.08);
}

[data-theme="dark"] .quiz-close:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ---------- PROPERTY LISTINGS ---------- */
.properties-section {
  background: var(--color-white);
}

.properties-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.property-card {
  background: var(--color-white);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
  transition: all 0.3s;
}

.property-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.1);
}

.property-image {
  height: 220px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.property-price {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
}

.property-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  padding: 5px 14px;
  background: var(--color-accent);
  color: white;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  z-index: 2;
}

.property-info {
  padding: 20px;
}

.property-info h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  line-height: 1.3;
}

.property-info p {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 12px;
}

.property-meta {
  display: flex;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--color-light-gray);
}

.property-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--color-text-light);
}

.property-meta-item i {
  color: var(--color-accent);
  font-size: 0.9rem;
}

.property-location {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 12px;
}

.property-location i {
  color: var(--color-accent);
  margin-right: 4px;
}

.property-details {
  display: flex;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--color-text-light);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-light-gray);
}

.property-details i {
  color: var(--color-accent);
  margin-right: 4px;
}

.property-card .btn-outline {
  border-color: var(--color-accent);
  color: var(--color-accent-dark);
  font-size: 0.85rem;
  padding: 8px 20px;
  border-radius: 25px;
}

.property-card .btn-outline:hover {
  background: var(--color-accent);
  color: #fff;
}

[data-theme="dark"] .property-price {
  color: #e8e8ec;
}

[data-theme="dark"] .property-card .btn-outline {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ---------- ENHANCED BACK-TO-TOP ---------- */
.scroll-top:hover {
  animation: bounceTop 0.6s ease;
}

@keyframes bounceTop {
  0%, 100% { transform: translateY(-3px); }
  50% { transform: translateY(-10px); }
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .process-steps::before {
    display: none;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-subtitle {
    margin: 0 auto var(--space-lg);
  }

  .hero-buttons {
    margin: 0 auto;
  }

  .hero-stats {
    justify-content: center;
  }

  .hero-image {
    display: block;
    order: -1;
    margin-bottom: var(--space-md);
  }

  .hero-3d-container {
    height: 320px !important;
    margin: -24px -4vw -16px;
  }

  .hero-float-card {
    display: none;
  }

  /* New components - 1024px */
  .calc-grid { grid-template-columns: 1fr; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .properties-grid { grid-template-columns: repeat(2, 1fr); }

  .timeline-container {
    flex-direction: column;
    align-items: center;
    gap: 32px;
    padding: 20px 0;
  }

  .timeline-line {
    width: 3px;
    height: 90%;
    top: 5%;
    left: 28px;
  }

  .timeline-line::after {
    width: 100%;
    height: 0;
    transition: height 1.5s ease;
  }

  .timeline-container.animated .timeline-line::after {
    width: 100%;
    height: 100%;
  }

  .timeline-step {
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    padding-left: 0;
  }

  .timeline-icon {
    margin: 0;
    flex-shrink: 0;
  }
}
/* Progressive nav shrink — prevents overlap before hamburger kicks in */
@media (max-width: 1400px) {
  .nav-link {
    padding: 8px 10px;
    font-size: 0.84rem;
  }
  .header-cta {
    padding: 10px 18px;
    font-size: 0.84rem;
  }
}

@media (max-width: 1200px) {
  .nav-link {
    padding: 8px 6px;
    font-size: 0.78rem;
    letter-spacing: 0;
  }
  .logo-text {
    font-size: 0.95rem;
  }
  .logo-text span {
    font-size: 0.6rem;
  }
  .header-cta {
    padding: 8px 14px;
    font-size: 0.78rem;
  }
  .lang-btn {
    width: 28px;
    height: 28px;
    font-size: 0.65rem;
    padding: 0; /* the 14px side padding made ES and EN overlap */
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .lang-toggle { flex-shrink: 0; }
}

@media (max-width: 1024px) {
  :root {
    --header-height: 70px;
  }

  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 380px;
    height: 100vh;
    height: 100dvh;
    background: #ffffff;
    flex-direction: column;
    padding: 100px 30px 40px;
    box-shadow: var(--shadow-lg);
    transition: right var(--transition-base);
    overflow-y: auto;
    z-index: 1200;
    align-items: flex-start;
    gap: 0;
    pointer-events: auto;
  }

  .main-nav.open { right: 0; }

  .nav-list { flex-direction: column; width: 100%; gap: 0; }
  .nav-item { width: 100%; }

  .nav-link {
    width: 100%;
    padding: 14px 0;
    border-bottom: 1px solid var(--color-light-gray);
    border-radius: 0;
    justify-content: space-between;
    color: var(--color-primary-dark);
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
  }

  .dropdown-menu {
    position: static; transform: none; box-shadow: none; border: none;
    padding: 0 0 0 16px; max-height: 0; overflow: hidden;
    opacity: 1; visibility: visible; pointer-events: auto;
    transition: max-height var(--transition-base);
  }
  .dropdown-menu::before { display: none; }
  .nav-item.open .dropdown-menu { max-height: 600px; transform: none; }
  .dropdown-link { padding: 10px 0; }
  .dropdown-link:hover { padding-left: 8px; }

  .lang-toggle { margin: var(--space-md) 0 0; }
  .header-cta { margin: var(--space-md) 0 0; width: 100%; text-align: center; justify-content: center; }
  .mobile-toggle { display: flex; }

  .mobile-overlay {
    display: block; position: fixed; inset: 0;
    background: rgba(0,0,0,0.4); z-index: 1100;
    opacity: 0; visibility: hidden; transition: all var(--transition-base);
  }
  .mobile-overlay.open { opacity: 1; visibility: visible; }

  /* Hero mobile */
  .hero-section { min-height: auto; padding: var(--space-xl) 0 var(--space-lg); }
  .hero-title { font-size: clamp(1.6rem, 6.5vw, 2.4rem); }
  .hero-subtitle { font-size: 0.95rem; margin-bottom: var(--space-md); }
  .hero-badge { font-size: 0.7rem; padding: 6px 14px; margin-bottom: var(--space-sm); }

  .hero-stats {
    flex-direction: row; gap: var(--space-md);
    margin-top: var(--space-lg); padding-top: var(--space-md);
    justify-content: center;
  }
  .stat-number { font-size: 1.5rem; }
  .stat-label { font-size: 0.65rem; }

  .hero-buttons { grid-template-columns: 1fr; max-width: 320px; margin: 0 auto; gap: 12px; }
  .hero-buttons > :last-child { min-width: unset; }
  .btn { padding: 12px 24px; font-size: 0.9rem; }

  /* Layout grids */
  .services-grid { grid-template-columns: 1fr; }
  .about-content { grid-template-columns: 1fr; }
  .about-features { grid-template-columns: 1fr; }
  .contact-content { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: var(--space-lg); }
  .process-steps { grid-template-columns: 1fr; gap: 24px; }
  .careers-benefits { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }

  /* Section typography */
  .section-title { font-size: clamp(1.4rem, 5vw, 2rem); }
  .section-subtitle { font-size: 0.9rem; }
  .section-padding { padding: var(--space-xl) 0; }

  /* Service tabs */
  .svc-panel-inner { grid-template-columns: 1fr; }
  .svc-panel-img img { height: auto; }
  .svc-tab span { display: none; }
  .svc-tab { padding: 10px 14px; }
  .svc-tab i { font-size: 1.2rem; }
  .svc-panel-text h2 { font-size: 1.4rem; }

  /* Trust counters */
  .trust-counters { flex-wrap: wrap; justify-content: center; gap: var(--space-md); }
  .trust-counters .number { font-size: 1.8rem; }
  .about-accent-box .number { font-size: 2rem; }
  /* Stay inside the screen (right: -20px made phones scroll sideways) */
  .about-accent-box { right: -8px; bottom: -16px; padding: 18px; }

  /* Nosotros stats */
  .nos-stats { flex-direction: row; flex-wrap: wrap; gap: var(--space-md); justify-content: center; }

  /* New components - 768px */
  .blog-grid { grid-template-columns: 1fr; }
  .properties-grid { grid-template-columns: 1fr; }
  .calc-inputs { padding: 24px; }
  .calc-results { padding: 24px; }
  .calc-payment-amount { font-size: 2.4rem; }

  .testimonial-slide { padding: 24px; }
  .testimonial-text { font-size: 0.92rem; }

  .quiz-modal-content { max-width: 100%; margin: 0 12px; padding: 24px; }
  .quiz-body { padding: 20px; }
  .quiz-footer { padding: 12px 20px 20px; }

  .faq-question { padding: 14px 18px; font-size: 0.92rem; }
  .faq-answer-inner { padding: 0 18px 14px; }

  .fab-stack { bottom: 16px; right: 16px; }
  .wa-float { width: 50px; height: 50px; font-size: 1.4rem; }
  .ai-chat-fab { width: 50px; height: 50px; font-size: 1.3rem; }
  .scroll-top { bottom: 16px; left: 16px; width: 42px; height: 42px; }

  /* Dark mode mobile nav panel */
  [data-theme="dark"] .main-nav { background: #1a1a2e; }
  [data-theme="dark"] .nav-link { border-bottom-color: rgba(255,255,255,0.08); }
}

@media (max-width: 480px) {
  /* Override spacing vars for mobile */
  :root {
    --space-xl: 2rem;
    --space-lg: 1.5rem;
  }

  .hero-section {
    min-height: auto;
    padding: 1.5rem 0 1rem;
  }

  .hero-title { font-size: clamp(1.5rem, 7vw, 2rem); line-height: 1.2; margin-bottom: 0.75rem; }
  .hero-subtitle { font-size: 0.85rem; margin-bottom: 1rem; line-height: 1.5; }
  .hero-badge { margin-bottom: 0.75rem; }

  .hero-buttons { gap: 10px; }
  .btn { padding: 11px 20px; font-size: 0.85rem; }

  .hero-stats { margin-top: 1rem; padding-top: 1rem; gap: 1.5rem; }
  .stat-number { font-size: 1.4rem; }
  .stat-label { font-size: 0.6rem; letter-spacing: 0.3px; }

  .section-padding { padding: 2rem 0; }
  .section-title { font-size: 1.3rem; margin-bottom: 0.5rem; }
  .section-subtitle { font-size: 0.85rem; }

  .svc-panel-img img { height: auto; }
  .svc-panel-text { padding: 1.25rem; }
  .svc-panel-text h2 { font-size: 1.2rem; }
  .svc-features li { font-size: 0.85rem; }

  .service-card { padding: 1.25rem; }
  .process-step { padding: 1.25rem; }

  /* New components - 480px */
  .calc-payment-amount { font-size: 2rem; }
  .testimonial-slide { padding: 20px 16px; }
  .testimonial-text::before { display: none; }
  .quiz-option { padding: 12px 14px; font-size: 0.85rem; }
  .blog-article-content h1 { font-size: 1.5rem; }
  .timeline-icon { width: 44px; height: 44px; font-size: 1rem; }
  .timeline-line { left: 20.5px; } /* centered on the 44px icons */
  .timeline-content h4 { font-size: 0.85rem; }
  .timeline-content p { font-size: 0.78rem; }
}


/* ---------- DARK MODE ELEMENT OVERRIDES ---------- */
[data-theme="dark"] .section-title,
[data-theme="dark"] .page-hero h1,
[data-theme="dark"] .hero-title {
  color: #e8e8ec;
}

[data-theme="dark"] .section-label {
  color: var(--color-accent);
}

[data-theme="dark"] .hero-section {
  background: linear-gradient(135deg, #0d1b2a 0%, #1a1a2e 50%, #16213e 100%);
}


[data-theme="dark"] .faq-question span:first-child {
  color: #e8e8ec;
}

[data-theme="dark"] .timeline-content h3 {
  color: #e8e8ec;
}

[data-theme="dark"] .calc-container {
  background: #1e1e36;
}

[data-theme="dark"] .calc-results {
  background: linear-gradient(135deg, #16213e, #1a3a5c);
  color: #e8e8ec;
}

[data-theme="dark"] .blog-card-title,
[data-theme="dark"] .property-price {
  color: #e8e8ec;
}

/* ---------- BLOG ARTICLE VIEW ---------- */
.blog-article-view {
  padding: 20px 0;
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
  /* Opaque background + own layer: prevents iOS Safari from leaving a stale
     "ghost" of the hidden blog card (cropped image) behind the article */
  position: relative;
  z-index: 1;
  background: var(--color-white);
  transform: translateZ(0);
}

.blog-article-view h2 {
  color: var(--color-primary);
  margin-bottom: 12px;
  font-size: 1.8rem;
}

.blog-meta {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 24px;
}

.blog-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--color-text);
}

.blog-article-view .blog-back {
  margin-bottom: 24px;
}

/* Cards and posts are built from posts/index.json and posts/<id>.json */
/* Covers are 1200x630 with the title on them, so keep that shape instead of a fixed height that would crop the text */
.blog-thumbnail img { width: 100%; height: auto; aspect-ratio: 1200 / 630; object-fit: cover; display: block; border-radius: 12px 12px 0 0; }
.blog-archive[hidden], .blog-load-error[hidden], .blog-related[hidden] { display: none; }
/* Tablets: two cards per row (a later 1024px rule sets one) */
@media (min-width: 769px) and (max-width: 1024px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
.blog-archive { margin-top: 48px; padding-top: 32px; border-top: 1px solid rgba(127, 127, 127, 0.25); }
.blog-archive h2 { font-family: var(--font-heading); font-size: 1.4rem; color: var(--color-primary); margin-bottom: 8px; }
[data-theme="dark"] .blog-archive h2 { color: #e8e8ec; }
.blog-archive-month { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; color: var(--color-accent-dark); margin: 20px 0 8px; }
[data-theme="dark"] .blog-archive-month { color: var(--color-accent); }
.blog-archive-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
@media (min-width: 769px) { .blog-archive-list { grid-template-columns: repeat(2, 1fr); column-gap: 32px; } }
.blog-archive-list a { color: var(--color-text); line-height: 1.5; text-decoration: none; }
.blog-archive-list a:hover, .blog-archive-list a:focus-visible { color: var(--color-accent-dark); text-decoration: underline; }
[data-theme="dark"] .blog-archive-list a:hover, [data-theme="dark"] .blog-archive-list a:focus-visible { color: var(--color-accent); }
.blog-list-error .btn { margin-top: 12px; }
.blog-loading, .blog-list-error { color: var(--color-text-light); text-align: center; padding: 24px 0; }
.blog-list-error { grid-column: 1 / -1; }
.blog-load-error { margin: 8px 0 24px; padding: 16px 20px; border: 1px solid rgba(127, 127, 127, 0.3); border-radius: 12px; }
.blog-load-error p { margin: 0 0 12px; }
.blog-related { margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(127, 127, 127, 0.25); }
.blog-related h3 { font-family: var(--font-heading); font-size: 1.15rem; color: var(--color-primary); margin-bottom: 12px; }
[data-theme="dark"] .blog-related h3 { color: #e8e8ec; }
.blog-related-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.blog-related-list a { color: var(--color-accent-dark); font-weight: 600; line-height: 1.5; text-decoration: none; }
.blog-related-list a:hover, .blog-related-list a:focus-visible { text-decoration: underline; }
[data-theme="dark"] .blog-related-list a { color: var(--color-accent); }

[data-theme="dark"] .blog-article-view h2 {
  color: #e8e8ec;
}

/* ---------- BLOG READMORE BUTTON ---------- */
.blog-readmore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 8px 20px;
  background: transparent;
  border: 2px solid var(--color-accent);
  color: var(--color-accent-dark);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s;
  text-decoration: none;
}

.blog-readmore:hover {
  background: var(--color-accent);
  color: #fff;
}

[data-theme="dark"] .blog-readmore {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

[data-theme="dark"] .blog-readmore:hover {
  background: var(--color-accent);
  color: #1a1a2e;
}

/* ---------- AI CHAT WIDGET ---------- */
.ai-chat-fab {
  width: 56px;
  height: 56px;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  background: linear-gradient(135deg, #1a2a4a, #2a4a7a);
  color: var(--color-accent);
  border: none;
  outline: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  box-shadow: 0 4px 12px rgba(26,42,74,0.4);
  cursor: pointer;
  transition: all 0.3s;
}
.ai-chat-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(26,42,74,0.6);
}
.ai-chat-fab.active {
  display: none;
}

.ai-chat-panel {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 380px;
  height: 600px;
  max-height: 80vh;
  background: linear-gradient(160deg, #1a2a4a 0%, #162040 50%, #1e3460 100%);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  z-index: 1001;
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(200,164,86,0.15);
}
.ai-chat-panel.active {
  display: flex;
  animation: chatSlideUp 0.3s ease;
}
@keyframes chatSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes quizShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-8px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.ai-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: rgba(0,0,0,0.2);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.ai-chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ai-chat-header-info strong {
  display: block;
  color: #fff;
  font-size: 0.9rem;
}
.ai-chat-header-info span {
  display: block;
  color: rgba(255,255,255,0.5);
  font-size: 0.72rem;
}
.ai-chat-avatar {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--color-accent), #e0b84a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a2a4a;
  font-size: 1.1rem;
}
.ai-chat-close {
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-size: 1rem;
  cursor: pointer;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.ai-chat-close:hover {
  background: rgba(255,255,255,0.1);
  color: #fff;
}

.ai-chat-messages {
  flex: 1 1 0;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 150px;
}
.ai-chat-messages::-webkit-scrollbar { width: 4px; }
.ai-chat-messages::-webkit-scrollbar-track { background: transparent; }
.ai-chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 4px; }

.ai-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.85rem;
  line-height: 1.5;
  word-wrap: break-word;
}
.ai-msg-bot {
  background: rgba(255,255,255,0.08);
  color: #e0e4ec;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}
.ai-msg-user {
  background: linear-gradient(135deg, var(--color-accent), #e0b84a);
  color: #1a2a4a;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}

.ai-msg-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 18px;
}
.ai-msg-typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  animation: typingDot 1.4s infinite;
}
.ai-msg-typing span:nth-child(2) { animation-delay: 0.2s; }
.ai-msg-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingDot {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40% { opacity: 1; transform: scale(1.2); }
}

.ai-chat-input-area {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.ai-chat-input {
  flex: 1;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  padding: 10px 16px;
  color: #fff;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.2s;
  /* textarea that grows with its text (app.js autoGrow), up to about 5 lines */
  resize: none;
  max-height: 7.5em;
  overflow-y: auto;
}
.ai-chat-input::placeholder { color: rgba(255,255,255,0.6); }
.ai-chat-input:focus { border-color: var(--color-accent); }

.ai-chat-send {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-accent), #e0b84a);
  border: none;
  color: #1a2a4a;
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.ai-chat-send:hover { transform: scale(1.1); }
.ai-chat-send:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.ai-chat-disclaimer {
  text-align: center;
  font-size: 0.65rem;
  color: rgba(255,255,255,0.65);
  padding: 6px 14px 10px;
}

@media (max-width: 480px) {
  .ai-chat-panel {
    width: calc(100vw - 20px);
    right: 10px;
    bottom: 10px;
    max-height: 75vh;
  }
  .fab-stack { bottom: 12px; right: 12px; gap: 8px; }
  .wa-float { width: 50px; height: 50px; font-size: 1.4rem; }
  .ai-chat-fab { width: 50px; height: 50px; font-size: 1.3rem; }
  .scroll-top { bottom: 16px; left: 16px; width: 42px; height: 42px; }
}

/* ---------- LANGUAGE SUGGESTION BAR ---------- */
/* Offers the other language when the browser language differs from the page (app.js initLangSuggest) */
/* Fixed colors (not theme variables) keep it readable in dark mode. It sits
   above the scroll-top button but under the chat panel and mobile menu. */
.lang-suggest {
  position: fixed;
  left: 16px;
  bottom: 80px;
  z-index: 950;
  max-width: min(440px, calc(100% - 104px));
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px 10px 16px;
  background: #1a2055;
  color: #fff;
  border: 1px solid rgba(201, 160, 67, 0.6);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  line-height: 1.35;
  animation: langSuggestIn 0.3s ease;
}

.lang-suggest-msg {
  flex: 1;
}

.lang-suggest-yes {
  flex-shrink: 0;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: #c9a043;
  color: #1a2055;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.lang-suggest-close {
  flex-shrink: 0;
  border: 0;
  padding: 4px 8px;
  background: none;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.lang-suggest-close:hover {
  color: #fff;
}

@keyframes langSuggestIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 480px) {
  .lang-suggest {
    left: 12px;
    bottom: 70px;
    max-width: calc(100% - 88px);
    flex-wrap: wrap;
    font-size: 0.85rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .lang-suggest { animation: none; }
}

/* ---------- COMMUNITY CARDS (featured properties section) ---------- */
/* The city is the card's headline now that the cards show no prices */
.property-card .property-location {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 6px;
}

[data-theme="dark"] .property-card .property-location {
  color: #e8e8ec;
}

.property-finance {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-bottom: 14px;
}

.property-finance i {
  color: var(--color-accent);
  margin-right: 4px;
}

/* ---------- CALCULATOR: ASK THE AI ASSISTANT ---------- */
.calc-ask-ai {
  position: relative; /* above the panel's corner glow, like .calc-cta */
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 10px 20px;
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.calc-ask-ai:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.6);
}

.calc-ask-ai i {
  color: var(--color-accent);
}

/* ---------- CONTACT FORM: QUIZ / ESTIMATE INCLUDED ---------- */
.contact-extras {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 16px;
}

.contact-extra {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(201, 160, 67, 0.45);
  border-radius: var(--border-radius);
  background: rgba(201, 160, 67, 0.08);
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--color-text);
}

.contact-extra i {
  color: var(--color-accent);
  flex-shrink: 0;
}

.contact-extra span {
  flex: 1;
}

.contact-extra-remove {
  flex-shrink: 0;
  background: none;
  border: 0;
  padding: 4px;
  color: var(--color-text-light);
  font: inherit;
  font-size: 0.8rem;
  text-decoration: underline;
  cursor: pointer;
}


/* ---------- PRIVACY POLICY PAGE ---------- */
.legal-content {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
}

.legal-content h2 {
  font-size: 1.3rem;
  color: var(--color-primary);
  margin: 2rem 0 0.75rem;
}

.legal-content p,
.legal-content ul {
  margin-bottom: 1rem;
}

.legal-content ul {
  padding-left: 1.4rem;
}

.legal-content li {
  margin-bottom: 0.6rem;
}

.legal-content a {
  color: var(--color-accent);
  text-decoration: underline;
}

.legal-updated {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

.analytics-control {
  margin-top: 2.5rem;
  padding: 20px 24px;
  border: 1px solid rgba(201, 160, 67, 0.45);
  border-radius: var(--border-radius);
  background: rgba(201, 160, 67, 0.06);
}

.analytics-control h2 {
  margin-top: 0;
  font-size: 1.1rem;
}

[data-theme="dark"] .legal-content h2 {
  color: #e8e8ec;
}

/* Note under the contact form's submit button */
.form-privacy-note {
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--color-text-light);
  text-align: center;
}

.form-privacy-note a {
  color: var(--color-accent);
  text-decoration: underline;
}

/* Formatted AI answers (paragraphs and lists from app.js formatReply) */
.ai-msg-bot p {
  margin: 0 0 0.5em;
}

.ai-msg-bot p:last-child,
.ai-msg-bot ul:last-child,
.ai-msg-bot ol:last-child {
  margin-bottom: 0;
}

.ai-msg-bot ul,
.ai-msg-bot ol {
  margin: 0 0 0.5em;
  padding-left: 1.2em;
}

.ai-msg-bot li {
  margin-bottom: 0.25em;
}

.ai-msg-bot strong {
  color: #fff;
}

/* The global reset removes list markers; bring them back where lists are content */
.ai-msg-bot ul,
.legal-content ul {
  list-style: disc;
}

.ai-msg-bot ol {
  list-style: decimal;
}

/* ---------- HERO GOLD DUST ---------- */
/* Two layers of tiny gold and white dots drifting up across the whole hero,
   continuing the 3D coin's particles past its canvas. Each layer moves by
   exactly one tile, so the loop is seamless. Transform and opacity only. */
.hero-sparkles {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-sparkles::before,
.hero-sparkles::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  background-repeat: repeat;
  will-change: transform, opacity;
}

.hero-sparkles::before {
  height: calc(100% + 260px);
  background-image:
    radial-gradient(circle at 24px 40px, rgba(232, 193, 93, 0.7) 0 1.2px, transparent 2.6px),
    radial-gradient(circle at 140px 150px, rgba(255, 255, 255, 0.5) 0 1px, transparent 2.2px),
    radial-gradient(circle at 212px 92px, rgba(232, 193, 93, 0.5) 0 1.6px, transparent 3.2px),
    radial-gradient(circle at 86px 226px, rgba(232, 193, 93, 0.45) 0 1px, transparent 2.2px);
  background-size: 260px 260px;
  animation: dustRiseA 48s linear infinite, dustTwinkle 5s ease-in-out infinite alternate;
}

.hero-sparkles::after {
  height: calc(100% + 380px);
  background-image:
    radial-gradient(circle at 60px 300px, rgba(232, 193, 93, 0.55) 0 1.8px, transparent 3.6px),
    radial-gradient(circle at 250px 60px, rgba(255, 255, 255, 0.4) 0 1.2px, transparent 2.6px),
    radial-gradient(circle at 330px 210px, rgba(232, 193, 93, 0.4) 0 1.2px, transparent 2.6px);
  background-size: 380px 380px;
  animation: dustRiseB 80s linear infinite, dustTwinkle 7s ease-in-out infinite alternate-reverse;
}

@keyframes dustRiseA {
  from { transform: translateY(0); }
  to { transform: translateY(-260px); }
}

@keyframes dustRiseB {
  from { transform: translateY(0); }
  to { transform: translateY(-380px); }
}

@keyframes dustTwinkle {
  from { opacity: 0.45; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-sparkles::before,
  .hero-sparkles::after,
  .hero-3d-container::before,
  .hero-bg-shapes .shape {
    animation: none;
  }
}

/* Texas SML consumer complaint notice (required disclosure, keep it legible) */
.footer-sml-notice {
  max-width: 900px;
  margin: 24px auto 0;
  font-size: 0.75rem;
  line-height: 1.6;
  text-align: center;
  color: rgba(255, 255, 255, 0.72);
}

.footer-sml-notice a {
  color: inherit;
  text-decoration: underline;
}

/* Review count in the testimonials badge links to the Google listing */
a.rating-count {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}
a.rating-count:hover {
  color: var(--color-accent);
}


/* ---------- TESTIMONIALS: rating badge, arrows beside the card, dots ---------- */
.testimonial-rating-badge {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  margin: 0 auto 32px;
  text-align: center;
  font-weight: 600;
}
.testimonial-rating-badge .rating-stars {
  display: flex;
  gap: 3px;
  color: var(--color-accent);
}
.testimonial-carousel {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 20px;
  max-width: 900px;
  margin: 0 auto;
  min-height: 0;
}
/* Every slide sits in the same grid cell, so the track is always as tall
   as the tallest slide and the page doesn't jump as the slides change */
.testimonial-track {
  position: relative;
  min-width: 0;
  display: grid;
}
.testimonial-track .testimonial-slide {
  position: relative;
  grid-area: 1 / 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.testimonial-dots {
  justify-content: center;
  margin-top: 24px;
}
@media (max-width: 768px) {
  .testimonial-carousel {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .testimonial-track { grid-column: 1 / -1; grid-row: 1; }
  .testimonial-prev { grid-row: 2; justify-self: end; }
  .testimonial-next { grid-row: 2; justify-self: start; }
}

/* ---------- GOOGLE REVIEW LINK (testimonials badge) ---------- */
a.review-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--color-accent);
  border-radius: 999px;
  color: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--transition-fast), color var(--transition-fast);
}
a.review-cta:hover,
a.review-cta:focus-visible {
  background: var(--color-accent);
  color: #1a2055;
}

/* ---------- BLOG SHARE BUTTONS ---------- */
.share-bar {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(128,128,128,0.25);
}
.share-label {
  margin: 0 0 12px;
  font-weight: 600;
  color: var(--color-text);
}
.share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid rgba(128,128,128,0.35);
  border-radius: 999px;
  background: var(--color-white);
  color: var(--color-text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.share-btn i { font-size: 1.05rem; }
.share-btn:hover,
.share-btn:focus-visible { border-color: var(--color-accent); }
.share-whatsapp i { color: #25d366; }
.share-facebook i { color: #1877f2; }
.share-btn.copied { border-color: #25a55a; }
.share-btn.copied i { color: #25a55a; }

/* ---------- PAGE NOT FOUND ---------- */
.notfound-box {
  max-width: 640px;
  margin: 0 auto;
  padding: 80px 0 40px;
  text-align: center;
}
.notfound-icon {
  font-size: 3rem;
  color: var(--color-accent);
  margin-bottom: 16px;
}
.notfound-box h1 {
  font-size: clamp(1.8rem, 5vw, 2.6rem);
  color: var(--color-primary);
  margin-bottom: 12px;
}
.notfound-box p {
  color: var(--color-text-light);
  font-size: 1.05rem;
  margin-bottom: 28px;
}
.notfound-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

/* ---------- REAL ESTATE AGENTS PAGE (/agentes, /agents) ---------- */
.agent-jump {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 28px;
}
.btn-outline-light {
  background: transparent;
  border: 2px solid rgba(255,255,255,0.7);
  color: #fff;
}
.btn-outline-light:hover,
.btn-outline-light:focus-visible {
  background: #fff;
  color: #1a2055;
}
.agent-why-title {
  text-align: center;
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 24px;
}
.agent-why {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}
.agent-why-item {
  background: var(--color-off-white);
  border-radius: var(--border-radius-lg);
  padding: 24px;
}
.agent-why-item i {
  font-size: 1.6rem;
  color: var(--color-accent);
  margin-bottom: 12px;
}
.agent-why-item h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.agent-why-item p {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--color-text-light);
  margin: 0;
}
.agent-forms {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  align-items: start;
}
.agent-form-card { scroll-margin-top: calc(var(--header-height) + 16px); }
.agent-form-card h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.35rem;
  margin-bottom: 10px;
}
.agent-form-card h2 i { color: var(--color-accent); }
.agent-form-intro {
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--color-text-light);
  margin-bottom: 20px;
}
.agent-form .agent-form-section {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #8a6516; /* darker gold: the accent is too faint on the light card */
  margin: 8px 0 12px;
}
.agent-checks {
  border: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}
.agent-checks legend {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary-dark);
  margin-bottom: 8px;
  padding: 0;
}
.agent-checks label,
.agent-consent label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--color-text);
  cursor: pointer;
}
.agent-checks input,
.agent-consent input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: none;
  accent-color: var(--color-accent);
}
.agent-consent label { font-weight: 600; }
.agent-form-status {
  margin: 12px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}
.agent-form-status:empty { display: none; }
.agent-form-status.ok { color: #2e7d32; }
.agent-form-status.error { color: #c62828; }
.agent-privacy { margin-top: 24px; }
.agent-urgent {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 20px;
  margin-top: 28px;
  text-align: center;
}
.agent-urgent p { margin: 0; font-weight: 600; }
.agent-urgent a:not(.btn) { color: #8a6516; text-decoration: underline; white-space: nowrap; }
.form-privacy-note a { color: #8a6516; } /* the light accent gold is too faint on white */
[data-theme="dark"] .agent-urgent a:not(.btn),
[data-theme="dark"] .form-privacy-note a { color: var(--color-accent); }
.agent-checks input:focus-visible,
.agent-consent input:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn-whatsapp {
  background: #25d366;
  color: #0b3d1f;
}
.btn-whatsapp:hover,
.btn-whatsapp:focus-visible { background: #1ebe5a; color: #062a14; }
[data-theme="dark"] .agent-why-item { background: #16213e; }
[data-theme="dark"] .agent-why-item h3,
[data-theme="dark"] .agent-why-title,
[data-theme="dark"] .agent-form-card h2,
[data-theme="dark"] .agent-checks legend { color: #e8e8ec; }
[data-theme="dark"] .agent-form .agent-form-section { color: var(--color-accent); }
[data-theme="dark"] .agent-form-status.ok { color: #66bb6a; }
[data-theme="dark"] .agent-form-status.error { color: #ef9a9a; }
@media (max-width: 1024px) {
  .agent-why { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agent-forms { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .agent-why { grid-template-columns: 1fr; }
  .agent-checks { grid-template-columns: 1fr; }
  .agent-jump .btn { width: 100%; justify-content: center; }
}
.field-error {
  color: #c62828;
  font-size: 0.78rem;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
[data-theme="dark"] .field-error { color: #ef9a9a; }

/* ---------- DARK MODE (the default since 2026-10-09): audit fixes ---------- */
/* Native controls (checkboxes, radios, select lists, scrollbars) drawn dark */
:root[data-theme="dark"] { color-scheme: dark; }
/* Phone menu: the header (with the close X) sits above the open menu panel */
.site-header.menu-open { z-index: 1250; }
@media (max-width: 1024px) {
  /* Same gap above it as the language buttons, so it doesn't touch the last menu link */
  #main-nav .dark-toggle { flex-shrink: 0; margin: var(--space-md) 0 0; }
}
/* Floating buttons no longer cover the last footer lines on phones */
@media (max-width: 768px) {
  .site-footer { padding-bottom: 96px; }
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder { color: #9095ab; }
/* Fields a step darker than the form card, with a visible edge */
[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
  background: #101a33;
  border-color: rgba(255, 255, 255, 0.36);
}
[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus,
[data-theme="dark"] .form-group textarea:focus { border-color: var(--color-accent); }
[data-theme="dark"] .nav-link.active,
[data-theme="dark"] .nav-link:hover { color: var(--color-accent); }
/* --color-primary is light blue in dark mode, which washed out these */
[data-theme="dark"] .careers-section { background: linear-gradient(135deg, #0d1b2a 0%, #16213e 100%); }
[data-theme="dark"] .service-icon,
[data-theme="dark"] .dropdown-link .icon,
[data-theme="dark"] .contact-detail .icon-circle {
  background: linear-gradient(135deg, #2d3578, #1a2055);
  color: var(--color-accent);
}
[data-theme="dark"] .faq-icon { background: #2d3578; color: #fff; }
[data-theme="dark"] .faq-item.active .faq-icon { background: var(--color-accent); color: #1a1a2e; }
[data-theme="dark"] .timeline-step.visible .timeline-icon { color: #1a1a2e; }
/* Light text on the gold badge was unreadable (the dark rule for card spans also hit it) */
.quiz-loan-card .quiz-loan-badge,
[data-theme="dark"] .quiz-loan-card .quiz-loan-badge { color: #1a1a2e; }
[data-theme="dark"] .testimonial-dot { background: rgba(255, 255, 255, 0.4); }
[data-theme="dark"] .blog-card {
  background: #16213e;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
[data-theme="dark"] .legal-content li { color: #b8b8c8; }
/* Google's map has no dark style; invert it so it doesn't glow on the page */
[data-theme="dark"] #page-contacto iframe[src*="google.com/maps"] { filter: invert(90%) hue-rotate(180deg); }
/* Unfilled part of the calculator sliders (the fill is drawn with this variable inline) */
[data-theme="dark"] .calc-range { --color-light-gray: #6b6b8f; }
/* Browser autofill keeps the dark field */
[data-theme="dark"] input:-webkit-autofill {
  -webkit-text-fill-color: #e8e8ec;
  box-shadow: 0 0 0 1000px #101a33 inset;
}
/* The team collage has a light grey mat baked in; soften it on the dark page */
[data-theme="dark"] #page-nosotros .about-image img { filter: brightness(0.85); }
.svc-tabs.more-right {
  -webkit-mask-image: linear-gradient(to right, #000 85%, transparent);
  mask-image: linear-gradient(to right, #000 85%, transparent);
}
/* Quiz progress bar stops before the close X */
.quiz-progress { margin-right: 32px; }

/* ---------- PRICE CUT VS. RATE BUYDOWN CALCULATOR ---------- */
.bd-inputs {
  background: var(--color-off-white);
  border-radius: var(--border-radius-lg);
  padding: 28px;
  margin-bottom: 28px;
}
.bd-inputs-title {
  font-size: 1.2rem;
  margin-bottom: 18px;
}
.bd-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px 20px;
}
.bd-fields .calc-field { margin-bottom: 0; }
.bd-field-wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 4px 20px; align-items: center; }
.bd-field-wide .calc-label { grid-column: 1 / -1; }
.bd-hint {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--color-text-light);
}
.bd-results.bd-invalid .bd-options { opacity: 0.45; }
.bd-base {
  text-align: center;
  font-weight: 600;
  margin-bottom: 20px;
}
.bd-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  align-items: stretch;
}
.bd-option {
  position: relative;
  background: var(--color-white);
  border: 2px solid var(--color-light-gray);
  border-radius: var(--border-radius-lg);
  padding: 24px 22px 20px;
}
.bd-option.best { border-color: var(--color-accent); }
.bd-best {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: #1a1a2e;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
  padding: 4px 12px;
  border-radius: 999px;
}
.bd-option h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.05rem;
  margin-bottom: 12px;
}
.bd-option h3 i { color: var(--color-accent); }
.bd-pay {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1.1;
}
.bd-pay span,
.bd-rows strong span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-light);
  margin-left: 2px;
}
.bd-save {
  display: inline-block;
  margin: 8px 0 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(46, 125, 50, 0.12);
  color: #1e6b25;
  font-weight: 700;
  font-size: 0.88rem;
}
.bd-option p {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--color-text-light);
  margin: 0 0 8px;
}
.bd-option p.bd-5y { color: var(--color-text); font-weight: 600; margin-top: 10px; }
.bd-warn,
.bd-option p.bd-warn { color: #9a5b00; font-weight: 600; }
.bd-rows { display: grid; gap: 6px; margin-bottom: 4px; }
.bd-rows div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.9rem;
  border-bottom: 1px dashed rgba(128, 128, 128, 0.3);
  padding-bottom: 6px;
}
.bd-rows strong { white-space: nowrap; }
.bd-limit {
  margin: 20px 0 0;
  padding: 14px 18px;
  border-left: 4px solid #b26a00;
  background: rgba(178, 106, 0, 0.08);
  border-radius: 8px;
  font-size: 0.9rem;
  line-height: 1.55;
}
.bd-summary {
  margin: 24px auto 0;
  max-width: 820px;
  text-align: center;
  font-size: 1.02rem;
  line-height: 1.6;
}
.bd-share {
  margin: 28px auto 0;
  text-align: center;
}
.bd-share h3 { font-size: 1rem; margin-bottom: 12px; }
.bd-share .share-buttons { justify-content: center; }
.bd-cta { display: flex; width: fit-content; max-width: 100%; margin: 28px auto 0; text-align: center; white-space: normal; line-height: 1.35; }
.bd-disclaimer {
  margin: 20px auto 0;
  max-width: 860px;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--color-text-light);
  text-align: center;
}
.agent-calc-promo {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--color-off-white);
  border: 2px solid var(--color-accent);
  border-radius: var(--border-radius-lg);
  padding: 22px 26px;
  margin-bottom: 40px;
}
.agent-calc-promo > i { font-size: 2rem; color: var(--color-accent); flex: none; }
.agent-calc-promo > div { flex: 1; min-width: 0; }
.agent-calc-promo h2 { font-size: 1.15rem; margin-bottom: 4px; }
.agent-calc-promo p { margin: 0; color: var(--color-text-light); font-size: 0.92rem; line-height: 1.55; }
.agent-calc-promo .btn { flex: none; }
[data-theme="dark"] .bd-inputs,
[data-theme="dark"] .agent-calc-promo { background: #16213e; }
[data-theme="dark"] .bd-option { background: #16213e; border-color: rgba(255, 255, 255, 0.12); }
[data-theme="dark"] .bd-option.best { border-color: var(--color-accent); }
[data-theme="dark"] .bd-pay { color: #e8e8ec; }
[data-theme="dark"] .bd-save { background: rgba(102, 187, 106, 0.15); color: #81c784; }
[data-theme="dark"] .bd-warn,
[data-theme="dark"] .bd-option p.bd-warn { color: #ffb74d; }
[data-theme="dark"] .bd-limit { border-left-color: #ffb74d; background: rgba(255, 183, 77, 0.1); }
[data-theme="dark"] .bd-option h3,
[data-theme="dark"] .bd-inputs-title,
[data-theme="dark"] .agent-calc-promo h2 { color: #e8e8ec; }
@media (max-width: 1024px) {
  .bd-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bd-options { grid-template-columns: 1fr; gap: 26px; }
}
@media (max-width: 600px) {
  .bd-inputs { padding: 20px; }
  .bd-fields { grid-template-columns: 1fr; }
  .bd-field-wide { grid-template-columns: 1fr; }
  .agent-calc-promo { flex-direction: column; align-items: flex-start; text-align: left; }
  .bd-cta { width: 100%; justify-content: center; }
}
.bd-pinote {
  font-size: 0.76rem !important;
  line-height: 1.45 !important;
  margin: 4px 0 6px !important;
  color: var(--color-text-light) !important;
}
.share-btn.is-disabled,
.share-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Home calculator: rate prompt and the APR note under the payment */
.calc-rate-prompt {
  margin: 6px 0 0;
  text-align: center;
  font-weight: 600;
  color: var(--color-accent);
}
.calc-apr-note {
  margin: 6px auto 0;
  max-width: 320px;
  text-align: center;
  font-size: 0.75rem;
  line-height: 1.45;
  opacity: 0.8;
  position: relative;
  z-index: 1;
}

/* Home calculator: Compra / Refinanciamiento switch */
.calc-mode {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: var(--color-light-gray);
}
.calc-mode-btn {
  padding: 10px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.calc-mode-btn.active { background: var(--color-primary); color: #fff; }
.calc-mode-btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
[data-theme="dark"] .calc-mode { background: #101a33; }
[data-theme="dark"] .calc-mode-btn { color: #e8e8ec; }
[data-theme="dark"] .calc-mode-btn.active { background: var(--color-accent); color: #1a1a2e; }
.calc-container:not(.refi) .calc-refi-only,
.calc-container.refi .calc-purchase-only { display: none !important; }

/* NMLS numbers link to the official records but keep the box's small text */
.footer-col .footer-nmls a {
  display: inline;
  margin: 0;
  padding: 0;
  font-size: inherit;
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.footer-col .footer-nmls a:hover { color: var(--color-accent); }

/* Links inside blog posts (e.g. to the calculator) look like links */
.blog-content a { color: var(--color-accent-dark); text-decoration: underline; text-underline-offset: 2px; }
[data-theme="dark"] .blog-content a { color: var(--color-accent); }
/* Calculator breakdown: label left, amount right, amounts never wrap */
.calc-breakdown-row { gap: 12px; text-align: left; }
.calc-breakdown-row > span:last-child { white-space: nowrap; text-align: right; }

/* ---------- CONTACT FORM: thank-you panel and error message ---------- */
.form-thanks {
  text-align: center;
  padding: 12px 4px;
  outline: none;
}
.form-thanks-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  background: linear-gradient(135deg, #2e7d32, #43a047);
}
.form-thanks h3 { font-size: 1.4rem; margin-bottom: 10px; }
.form-thanks p { color: var(--color-text-light); line-height: 1.6; margin-bottom: 12px; }
.form-thanks .form-thanks-urgent { margin: 18px 0 10px; font-weight: 600; color: var(--color-text); }
.form-thanks-docs a { color: #8a6516; text-decoration: underline; }
[data-theme="dark"] .form-thanks-docs a { color: var(--color-accent); }
.form-alt-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 10px 0 14px;
}
.form-error-msg {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  border-left: 4px solid #c62828;
  background: rgba(198, 40, 40, 0.08);
  text-align: center;
}
.form-error-msg p { margin: 0 0 6px; font-weight: 600; color: #b71c1c; }
[data-theme="dark"] .form-error-msg { border-left-color: #ef9a9a; background: rgba(239, 154, 154, 0.1); }
[data-theme="dark"] .form-error-msg p { color: #ef9a9a; }

/* ---------- "HABLA CON MARIA" BLOCK ---------- */
.maria-cta {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  margin: 36px 0 8px;
  padding: 22px;
  border-radius: var(--border-radius-lg);
  background: var(--color-off-white);
  border: 2px solid rgba(201, 160, 67, 0.45);
}
.svc-panel .maria-cta { margin-top: 28px; }
.maria-cta > img {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  border: 2px solid var(--color-accent);
}
.maria-cta-body { flex: 1; min-width: 0; }
.maria-cta h3 { font-size: 1.15rem; margin: 0 0 4px; }
.maria-cta p { margin: 0 0 4px; font-size: 0.9rem; color: var(--color-text-light); line-height: 1.5; }
.maria-cta .maria-cta-who { font-weight: 600; color: var(--color-text); }
.maria-stars { color: var(--color-accent); font-size: 0.8rem; letter-spacing: 1px; }
.maria-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
[data-theme="dark"] .maria-cta { background: #16213e; }
[data-theme="dark"] .maria-cta h3 { color: #e8e8ec; }
@media (max-width: 600px) {
  .maria-cta { flex-direction: column; align-items: center; text-align: center; padding: 20px 16px; }
  .maria-cta-actions { justify-content: center; }
}

/* ---------- PHONE CALL BAR ---------- */
.call-bar { display: none; }
@media (max-width: 768px) {
  .call-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 990;
    display: grid;
    grid-template-columns: 1fr 1fr 1.2fr;
    gap: 8px;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    background: rgba(14, 19, 56, 0.97);
    border-top: 1px solid rgba(201, 160, 67, 0.4);
    box-shadow: 0 -4px 18px rgba(0, 0, 0, 0.25);
  }
  .call-bar-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #fff;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
  }
  .call-bar-wa { background: #25d366; border-color: #25d366; color: #0b3d1f; }
  .call-bar-main { background: var(--color-accent); border-color: var(--color-accent); color: #1a1a2e; }
  body.is-typing .call-bar { display: none; }
  /* The bar has WhatsApp, so the float and back-to-top step aside; the chat button sits above the bar */
  .wa-float, .scroll-top { display: none !important; }
  .fab-stack { bottom: calc(72px + env(safe-area-inset-bottom)); }
  .lang-suggest { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .site-footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
}
/* Compact buttons in the new blocks (.btn-sm has no rule of its own) */
.maria-cta-actions .btn,
.form-alt-actions .btn { padding: 10px 18px; font-size: 0.86rem; }
/* Review fixes */
.form-error-msg { scroll-margin: 90px 0 84px; }
#page-nosotros .maria-cta,
#tips-maria-slot .maria-cta { max-width: 760px; margin-left: auto; margin-right: auto; }
@media (max-width: 768px) {
  /* The open chat panel uses the whole bottom of the screen */
  body:has(.ai-chat-panel.active) .call-bar { display: none; }
}

/* ---------- TIPS PAGE (/tips, /homebuyer-tips) ---------- */
/* Jump links in the hero. The hero is navy in both themes, so the white outline buttons need no dark rule.
   .btn sets nowrap and .btn-sm has no rule, so these set their own size and allow wrapping. */
.tips-jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.tips-jump .btn { min-height: 44px; padding: 10px 18px; font-size: 0.9rem; white-space: normal; line-height: 1.25; }
@media (max-width: 480px) {
  .tips-jump { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .tips-jump .btn { width: 100%; padding: 10px 12px; }
}
#tips-dd, #tips-docs, #tips-glossary, #tips-read { scroll-margin-top: calc(var(--header-height) + 16px); }
#calc-section { scroll-margin-top: var(--header-height); }
.tips-doc-group, .tips-term { scroll-margin-top: calc(var(--header-height) + 16px); }
.tips-section h2[tabindex="-1"]:focus:not(:focus-visible) { outline: none; }

.tips-section { max-width: 980px; margin: 0 auto var(--space-xl); }

/* What to do and what to avoid: tabs (same look as .calc-mode, which the calculator binds, so not reused) */
.tips-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  max-width: 420px;
  margin: 0 auto 24px;
  border-radius: 999px;
  background: var(--color-light-gray);
}
.tips-tabs[hidden], .tips-panel[hidden] { display: none; }
.tips-tab {
  min-height: 44px;
  padding: 8px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--color-text);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
.tips-tab[aria-selected="true"] { background: var(--color-primary); color: #fff; }
.tips-tab:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.tips-panel + .tips-panel { margin-top: 32px; } /* without JS all three panels show in order */
.tips-tabs:not([hidden]) ~ .tips-panel { margin-top: 0; }
.tips-panel:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 6px; border-radius: 8px; }
.tips-panel-title { font-size: 1.15rem; margin: 0 0 16px; }
.tips-dd-cols { display: grid; gap: 20px; }
@media (min-width: 768px) {
  .tips-dd-cols { grid-template-columns: 1fr 1fr; gap: 24px; }
}
.tips-dd-head { display: flex; align-items: center; gap: 8px; font-size: 1rem; margin: 0 0 12px; }
.tips-dd-head--do i { color: var(--tips-do); }
.tips-dd-head--avoid i { color: var(--tips-avoid); }
.tips-dd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tips-dd-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--color-off-white);
  border: 1px solid rgba(127, 127, 127, 0.2);
  border-left: 3px solid var(--tips-do);
}
.tips-dd-item--avoid { border-left-color: var(--tips-avoid); }
.tips-dd-item > i { font-size: 1.1rem; margin-top: 3px; flex-shrink: 0; color: var(--tips-do); }
.tips-dd-item--avoid > i { color: var(--tips-avoid); }
.tips-dd-item > div { min-width: 0; }
.tips-dd-item strong { display: block; font-size: 1rem; line-height: 1.4; color: var(--color-text); }
.tips-dd-why { display: block; margin-top: 4px; font-size: 0.92rem; line-height: 1.55; color: var(--color-text-light); }
.tips-dd-why a, .tips-more { color: #8a6516; text-decoration: underline; font-weight: 600; }
.tips-more { display: inline-block; margin-top: 6px; padding: 2px 0; font-size: 0.88rem; }
[data-theme="dark"] .tips-tabs { background: #101a33; }
[data-theme="dark"] .tips-tab { color: #e8e8ec; }
[data-theme="dark"] .tips-tab[aria-selected="true"] { background: var(--color-accent); color: #1a1a2e; }
[data-theme="dark"] .tips-dd-head { color: #e8e8ec; }
[data-theme="dark"] .tips-dd-item { background: #16213e; }
[data-theme="dark"] .tips-dd-why a,
[data-theme="dark"] .tips-more { color: var(--color-accent); }

/* Document checklist */
.tips-docs { max-width: 820px; }
.tips-docs-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin: 0 0 16px; }
.tips-docs-tools[hidden] { display: none; }
.tips-docs-hint { margin: 0; font-size: 0.9rem; color: var(--color-text-light); }
.tips-docs-actions { display: flex; flex-wrap: wrap; gap: 0 16px; }
.tips-text-btn {
  background: none;
  border: 0;
  padding: 10px 4px;
  min-height: 44px;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #8a6516;
  text-decoration: underline;
  cursor: pointer;
}
.tips-text-btn:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 4px; }
[data-theme="dark"] .tips-text-btn { color: var(--color-accent); }
.tips-doc-card, .tips-doc-group {
  background: var(--color-off-white);
  border: 1px solid rgba(127, 127, 127, 0.2);
  border-radius: 12px;
  margin-bottom: 10px;
}
[data-theme="dark"] .tips-doc-card,
[data-theme="dark"] .tips-doc-group { background: #16213e; }
/* The flex row sits on an inner span: older Safari ignores display:flex on <summary> */
.tips-doc-group > summary,
.tips-term > summary { display: block; list-style: none; cursor: pointer; border-radius: 12px; }
.tips-doc-group > summary::-webkit-details-marker,
.tips-term > summary::-webkit-details-marker { display: none; }
.tips-doc-group > summary:focus-visible,
.tips-term > summary:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.tips-doc-head,
.tips-doc-group .tips-sum { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 12px 16px; margin: 0; font-size: 1rem; }
.tips-doc-icon {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(201, 160, 67, 0.15);
  color: var(--color-accent-dark);
}
.tips-doc-title { flex: 1; min-width: 0; font-family: var(--font-heading); font-weight: 600; color: var(--color-text); line-height: 1.35; }
.tips-doc-count { font-family: var(--font-body); font-size: 0.82rem; font-weight: 500; color: var(--color-text-light); white-space: nowrap; }
.tips-doc-count.is-complete { color: var(--tips-do); font-weight: 700; }
.tips-doc-toggle { flex-shrink: 0; color: var(--color-accent-dark); transition: transform var(--transition-fast); }
details[open] > summary .tips-doc-toggle { transform: rotate(45deg); }
[data-theme="dark"] .tips-doc-icon,
[data-theme="dark"] .tips-doc-toggle { color: var(--color-accent); }
/* Phones: the count goes under the title, so long titles keep the full width */
@media (max-width: 600px) {
  .tips-doc-head,
  .tips-doc-group .tips-sum { display: grid; grid-template-columns: 36px 1fr auto; column-gap: 12px; row-gap: 2px; }
  .tips-doc-icon { grid-column: 1; grid-row: 1 / span 2; }
  .tips-doc-head .tips-doc-title,
  .tips-sum .tips-doc-title { grid-column: 2; grid-row: 1; }
  .tips-doc-head .tips-doc-count,
  .tips-sum .tips-doc-count { grid-column: 2; grid-row: 2; }
  .tips-doc-group .tips-doc-toggle { grid-column: 3; grid-row: 1 / span 2; }
}
.tips-doc-list { list-style: none; margin: 0; padding: 0 16px 4px; }
.tips-doc-list li + li { border-top: 1px solid rgba(127, 127, 127, 0.15); }
.tips-doc-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-height: 44px;
  padding: 10px 0;
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text);
}
.tips-doc-row input { width: 20px; height: 20px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--color-accent-dark); cursor: pointer; }
[data-theme="dark"] .tips-doc-row input { accent-color: var(--color-accent); }
.tips-doc-row input:checked + span { color: var(--color-text-light); }
.tips-doc-note {
  margin: 4px 16px 16px;
  padding-left: 12px;
  border-left: 3px solid var(--color-accent);
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--color-text-light);
}
.tips-doc-group > .tips-more { margin: 0 16px 16px; }
.tips-docs-footnote { margin: 16px 0 0; font-size: 0.88rem; color: var(--color-text-light); }
.tips-docs-cta { text-align: center; margin-top: 28px; }
.tips-docs-cta p { font-weight: 600; color: var(--color-text); margin-bottom: 12px; }
[data-theme="dark"] .page-content .tips-docs-cta p { color: var(--color-text); }
.tips-docs-cta-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
@media (max-width: 480px) {
  .tips-docs-cta-btns .btn { width: 100%; white-space: normal; }
}

/* Glossary */
.tips-glossary, .tips-gl-col { display: grid; gap: 10px; align-items: start; }
@media (min-width: 768px) {
  /* Two fixed columns: opening a term only pushes down the terms under it,
     and no term ever jumps to the other column */
  .tips-glossary { grid-template-columns: 1fr 1fr; column-gap: 12px; }
}
.tips-term { background: var(--color-off-white); border: 1px solid rgba(127, 127, 127, 0.2); border-radius: 12px; }
[data-theme="dark"] .tips-term { background: #16213e; }
.tips-term .tips-sum { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; align-items: center; min-height: 56px; padding: 12px 16px; }
.tips-term-en { grid-column: 1; font-weight: 700; font-size: 1rem; line-height: 1.35; color: var(--color-text); }
.tips-term-es { grid-column: 1; font-size: 0.85rem; line-height: 1.4; color: #8a6516; }
[data-theme="dark"] .tips-term-es { color: var(--color-accent); }
.tips-term .tips-doc-toggle { grid-column: 2; grid-row: 1 / span 2; }
.tips-term-def { margin: 0; padding: 0 16px 16px; font-size: 0.95rem; line-height: 1.6; color: var(--color-text); }
[data-theme="dark"] .page-content .tips-term-def { color: var(--color-text); }

/* Free tools and posts */
.tips-read-head { font-size: 1.05rem; margin: 0 0 12px; }
.tips-tools { display: grid; gap: 12px; margin-bottom: 28px; }
@media (min-width: 768px) {
  .tips-tools { grid-template-columns: repeat(3, 1fr); gap: 16px; }
}
.tips-tool {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  width: 100%;
  padding: 18px;
  border-radius: 12px;
  background: var(--color-off-white);
  border: 1px solid rgba(127, 127, 127, 0.2);
  color: var(--color-text);
  text-align: left;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}
.tips-tool:hover,
.tips-tool:focus-visible { border-color: var(--color-accent); }
.tips-tool:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
[data-theme="dark"] .tips-tool { background: #16213e; }
.tips-tool-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(201, 160, 67, 0.15);
  color: var(--color-accent-dark);
}
[data-theme="dark"] .tips-tool-icon { color: var(--color-accent); }
.tips-tool-title { font-family: var(--font-heading); font-weight: 700; font-size: 1rem; line-height: 1.3; color: var(--color-text); }
.tips-tool-desc { font-size: 0.9rem; line-height: 1.5; color: var(--color-text-light); }
.tips-read-list { list-style: none; margin: 0; padding: 0; display: grid; }
@media (min-width: 768px) {
  .tips-read-list { grid-template-columns: 1fr 1fr; column-gap: 24px; }
}
.tips-read-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(127, 127, 127, 0.2);
  color: var(--color-text);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.4;
}
.tips-read-link i { color: var(--color-accent-dark); flex-shrink: 0; font-size: 0.8rem; }
.tips-read-link:hover,
.tips-read-link:focus-visible { color: #8a6516; }
.tips-read-link:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 4px; }
[data-theme="dark"] .tips-read-link i,
[data-theme="dark"] .tips-read-link:hover,
[data-theme="dark"] .tips-read-link:focus-visible { color: var(--color-accent); }
.tips-read-all { text-align: center; margin-top: 16px; }
.tips-read-all a { color: #8a6516; font-weight: 600; text-decoration: underline; }
[data-theme="dark"] .tips-read-all a { color: var(--color-accent); }

/* Company line that only prints with the checklist */
.tips-print-id { display: none; }

/* Legal note under the Maria block (same in both themes) */
.tips-legal {
  max-width: 760px;
  margin: 2rem auto 0;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--color-text-light);
  text-align: center;
}

/* "Imprimir la lista": only the document checklist, all groups open, boxes empty or checked for ticking by hand */
@media print {
  body.tips-print .site-header,
  body.tips-print .main-nav,
  body.tips-print .site-footer,
  body.tips-print .call-bar,
  body.tips-print .fab-stack,
  body.tips-print .scroll-top,
  body.tips-print .lang-suggest,
  body.tips-print .ai-chat-panel,
  body.tips-print .quiz-modal-overlay,
  body.tips-print .mobile-overlay,
  body.tips-print #page-tips .page-hero,
  body.tips-print #tips-dd,
  body.tips-print #tips-glossary,
  body.tips-print #tips-read,
  body.tips-print #tips-maria-slot,
  body.tips-print .tips-legal,
  body.tips-print .tips-docs-tools,
  body.tips-print .tips-docs-cta,
  body.tips-print .tips-doc-toggle,
  body.tips-print #tips-docs .tips-more { display: none !important; }
  /* Light page and light native checkboxes even when the dark theme is on */
  :root:has(> body.tips-print) { background: #fff !important; color-scheme: light; }
  body.tips-print #tips-docs input[type="checkbox"] { accent-color: #333; }
  body.tips-print,
  body.tips-print #page-tips .page-content { background: #fff; color: #000; }
  body.tips-print #page-tips .page-content { padding: 0; }
  body.tips-print #tips-docs,
  body.tips-print #tips-docs * { color: #000 !important; background: transparent !important; box-shadow: none; }
  body.tips-print .fade-in { opacity: 1 !important; transform: none !important; }
  body.tips-print .tips-doc-card,
  body.tips-print .tips-doc-group { border: 1px solid #999; break-inside: avoid; }
  body.tips-print .tips-docs .section-header { margin-bottom: 16px; }
  body.tips-print .tips-print-id { display: block; margin: 16px 0 0; font-size: 0.82rem; line-height: 1.5; }
}

/* ---------- PHONES: NO ZOOM, NO SIDEWAYS SCROLL ----------
   iPhone Safari zooms in when a form field's text is under 16px and stays
   zoomed, so the page then slides left and right while scrolling. Fields are
   16px on phones. overflow-x: clip on html (not just body) also keeps Safari
   from scrolling sideways; clip, unlike hidden, doesn't make body a scroll
   container. */
@media (max-width: 768px) {
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="hidden"]),
  select,
  textarea { font-size: 16px !important; }
}
@supports (overflow-x: clip) {
  html, body { overflow-x: clip; }
}
