/* ====================================================
   CASA IDEAL — Global Stylesheet
   Paleta: Azul Marino #14213D | Terracota #CB997E | Crema #F8F6F1
   ==================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── CSS Custom Properties ─── */
:root {
  --navy: #14213D;
  --navy-light: #1E3A5F;
  --terra: #CB997E;
  --terra-dark: #A67C5B;
  --cream: #F8F6F1;
  --cream-dark: #EEE9E0;
  --white: #FFFFFF;
  --gray-100: #F3F4F6;
  --gray-300: #D1D5DB;
  --gray-500: #6B7280;
  --gray-700: #374151;
  --green-wa: #25D366;
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .10);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, .12);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, .16);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.25s ease;
}

/* ─── Reset & Base ─── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--gray-700);
  line-height: 1.65;
  overflow-x: hidden;
  max-width: 100vw;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ─── Typography ─── */
h1,
h2,
h3,
h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.2;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 700;
}

h3 {
  font-size: clamp(1.15rem, 2.5vw, 1.6rem);
  font-weight: 600;
}

p {
  font-size: 1rem;
  line-height: 1.75;
}

/* ─── Layout ─── */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 768px) {
  .container {
    padding: 0 16px;
  }
}

.section {
  padding: 80px 0;
}

.section--alt {
  background: var(--cream);
}

.section--dark {
  background: var(--navy);
  color: var(--white);
}

.section--dark h1,
.section--dark h2,
.section--dark h3 {
  color: var(--white);
}

.section-label {
  display: inline-block;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 12px;
}

.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.section-header p {
  color: var(--gray-500);
  margin-top: 12px;
  font-size: 1.05rem;
}

/* ─── Buttons ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: var(--terra);
  color: var(--white);
  border-color: var(--terra);
}

.btn-primary:hover {
  background: var(--terra-dark);
  border-color: var(--terra-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(203, 153, 126, .4);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, .6);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, .1);
  border-color: var(--white);
}

.btn-navy {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

.btn-navy:hover {
  background: var(--navy-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-whatsapp {
  background: var(--green-wa);
  color: var(--white);
  border-color: var(--green-wa);
}

.btn-whatsapp:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 211, 102, .35);
}

.btn-lg {
  padding: 18px 40px;
  font-size: 1.1rem;
}

.btn-sm {
  padding: 10px 22px;
  font-size: .9rem;
}

/* ─── Cards & Glassmorphism ─── */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 32px;
  border: 1px solid var(--gray-100);
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.glass-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 20px;
  box-shadow: 0 8px 32px 0 rgba(20, 33, 61, 0.15);
}

.glass-card--dark {
  background: rgba(20, 33, 61, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

/* ─── Grids ─── */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

@media (max-width: 900px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ─── Badge / Pill ─── */
.badge {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
  background: var(--cream-dark);
  color: var(--navy);
}

.badge--terra {
  background: rgba(203, 153, 126, .15);
  color: var(--terra-dark);
}

/* ─── Nav Header ─── */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(20, 33, 61, .96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  transition: background var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
}

.logo span {
  color: var(--terra);
}

.logo-img {
  width: auto;
  height: 56px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-img--footer {
  width: auto;
  height: 68px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-links a {
  padding: 8px 14px;
  border-radius: 6px;
  color: rgba(255, 255, 255, .8);
  font-size: .9rem;
  font-weight: 500;
  transition: all var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(255, 255, 255, .08);
}

.nav-cta {
  margin-left: 12px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border: none;
  background: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: all .3s;
}

.mobile-nav {
  display: none;
  background: var(--navy);
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.mobile-nav.open {
  display: block;
}

.mobile-nav a {
  display: block;
  padding: 14px 24px;
  color: rgba(255, 255, 255, .85);
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  transition: color var(--transition);
}

.mobile-nav a:hover {
  color: var(--terra);
}

@media (max-width:768px) {
  .nav-links {
    display: none;
  }

  .hamburger {
    display: flex;
  }
}

/* ─── Footer ─── */
#site-footer {
  background: var(--navy);
  color: rgba(255, 255, 255, .7);
  padding: 60px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
  margin-bottom: 24px;
}

@media (max-width:900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width:500px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand .logo {
  margin-bottom: 14px;
}

.footer-brand p {
  font-size: .9rem;
  line-height: 1.7;
  max-width: 280px;
}

.footer-col h4 {
  font-family: var(--font-body);
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--white);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: rgba(255, 255, 255, .65);
  font-size: .9rem;
  margin-bottom: 8px;
  transition: color var(--transition);
}

.footer-col a:hover {
  color: var(--terra);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: .8rem;
  color: rgba(255, 255, 255, .45);
}

.footer-bottom a {
  color: rgba(255, 255, 255, .55);
}

.footer-bottom a:hover {
  color: var(--terra);
}

/* ─── WhatsApp Floating Button ─── */
#wa-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--green-wa);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 6px 24px rgba(37, 211, 102, .5);
  transition: all var(--transition);
  animation: pulse-wa 2.5s infinite;
}

#wa-float:hover {
  transform: scale(1.12);
  box-shadow: 0 10px 32px rgba(37, 211, 102, .6);
}

@keyframes pulse-wa {

  0%,
  100% {
    box-shadow: 0 6px 24px rgba(37, 211, 102, .5);
  }

  50% {
    box-shadow: 0 6px 36px rgba(37, 211, 102, .75);
  }
}

/* ─── Hero (shared) ─── */
.page-hero {
  padding: 140px 0 80px;
  background:
    linear-gradient(135deg, rgba(20, 33, 61, .78) 0%, rgba(20, 33, 61, .60) 60%, rgba(20, 33, 61, .72) 100%),
    url('../img/sma_calle.jpg') center center / cover no-repeat;
  text-align: center;
  color: var(--white);
}

.page-hero h1 {
  color: var(--white);
  margin-bottom: 16px;
}

.page-hero p {
  color: rgba(255, 255, 255, .8);
  max-width: 640px;
  margin: 0 auto;
  font-size: 1.1rem;
}

/* ─── Form Styles ─── */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--gray-700);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--navy-light);
  box-shadow: 0 0 0 3px rgba(30, 58, 95, .12);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ─── Trust badges ─── */
.trust-bar {
  background: var(--white);
  padding: 28px 0;
  border-top: none;
  border-bottom: 1px solid var(--gray-100);
  box-shadow: 0 4px 24px rgba(20, 33, 61, .06);
}

.trust-items {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .88rem;
  font-weight: 600;
  color: var(--navy);
  padding: 10px 32px;
  letter-spacing: .01em;
}

.trust-item svg {
  color: var(--terra);
  flex-shrink: 0;
}

.trust-item+.trust-item {
  border-left: 1px solid var(--gray-100);
}

/* ─── Step / Process ─── */
.step-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding: 28px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--cream-dark);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.step-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 700;
}

.step-content h3 {
  margin-bottom: 6px;
}

.step-content p {
  font-size: .95rem;
  color: var(--gray-500);
}

/* ─── Divider ─── */
.divider {
  width: 56px;
  height: 3px;
  background: var(--terra);
  border-radius: 2px;
  margin: 14px auto 0;
}

.divider--left {
  margin-left: 0;
}

/* ─── Utilities ─── */
.text-center {
  text-align: center;
}

.text-right {
  text-align: right;
}

.mt-8 {
  margin-top: 8px;
}

.mt-16 {
  margin-top: 16px;
}

.mt-24 {
  margin-top: 24px;
}

.mt-32 {
  margin-top: 32px;
}

.mt-48 {
  margin-top: 48px;
}

.mb-8 {
  margin-bottom: 8px;
}

.mb-16 {
  margin-bottom: 16px;
}

.mb-24 {
  margin-bottom: 24px;
}

.mb-32 {
  margin-bottom: 32px;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.gap-16 {
  gap: 16px;
}

.gap-24 {
  gap: 24px;
}

.w-full {
  width: 100%;
}

.text-terra {
  color: var(--terra);
}

.text-navy {
  color: var(--navy);
}

.text-muted {
  color: var(--gray-500);
}

/* ─── Accordion (FAQ) ─── */
.accordion {
  border: 1px solid var(--gray-100);
  border-radius: var(--radius);
  overflow: hidden;
}

.accordion-item {
  border-bottom: 1px solid var(--gray-100);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 28px;
  background: var(--white);
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  text-align: left;
  transition: background var(--transition);
}

.accordion-btn:hover {
  background: var(--cream);
}

.accordion-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--cream-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--terra);
  transition: transform var(--transition);
}

.accordion-item.open .accordion-icon {
  transform: rotate(45deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
  padding: 0 28px;
  color: var(--gray-500);
  font-size: .97rem;
  line-height: 1.75;
}

.accordion-item.open .accordion-body {
  max-height: 400px;
  padding: 0 28px 22px;
}

/* ─── Simulator ─── */
.sim-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 48px;
  border: 1px solid var(--cream-dark);
}

.sim-result-box {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 36px 40px;
}

.sim-result-box h3 {
  color: var(--white);
  margin-bottom: 24px;
}

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.result-row:last-child {
  border-bottom: none;
}

.result-label {
  font-size: .9rem;
  color: rgba(255, 255, 255, .7);
}

.result-value {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--terra);
}

.result-value--sm {
  font-size: 1.2rem;
}

/* Input range custom */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  background: var(--cream-dark);
  border-radius: 3px;
  outline: none;
  border: none;
  cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .2);
  border: 3px solid var(--white);
  transition: background var(--transition);
}

input[type=range]:hover::-webkit-slider-thumb {
  background: var(--terra);
}

/* ─── Plan pill selector ─── */
.plan-selector {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}

.plan-pill {
  flex: 1;
  text-align: center;
  padding: 18px 12px;
  border-radius: var(--radius);
  border: 2px solid var(--gray-300);
  cursor: pointer;
  transition: all var(--transition);
  font-weight: 600;
  color: var(--gray-500);
}

.plan-pill:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.plan-pill.selected {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.plan-pill strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.4rem;
  color: inherit;
}

/* ─── Map placeholder (aesthetic) ─── */
.map-placeholder {
  background: linear-gradient(145deg, #e8f0fe, #dbeafe);
  border-radius: var(--radius);
  height: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: var(--navy-light);
  border: 2px dashed #93c5fd;
}

.map-placeholder p {
  font-size: 1rem;
  color: var(--navy);
  margin-top: 12px;
  font-weight: 600;
}

/* ─── Location card ─── */
.loc-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  padding: 36px 28px;
  transition: transform var(--transition);
}

.loc-card:hover {
  transform: translateY(-5px);
}

.loc-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(203, 153, 126, .2) 0%, transparent 70%);
}

.loc-card h3 {
  color: var(--white);
  position: relative;
}

.loc-card p {
  color: rgba(255, 255, 255, .7);
  position: relative;
  font-size: .92rem;
  margin-top: 8px;
}

.loc-number {
  position: absolute;
  top: 20px;
  right: 20px;
  font-family: var(--font-head);
  font-size: 4rem;
  font-weight: 700;
  color: rgba(255, 255, 255, .07);
  line-height: 1;
}

/* ─── Highlight box ─── */
.highlight-box {
  background: linear-gradient(135deg, var(--terra) 0%, var(--terra-dark) 100%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 48px 40px;
}

.highlight-box h2 {
  color: var(--white);
}

.highlight-box p {
  color: rgba(255, 255, 255, .85);
}

/* ─── Scroll animations ─── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: none;
}

/* ─── Page top offset ─── */
main {
  padding-top: 80px;
}

/* ─── Logo SVG ─── */
.logo-img {
  width: auto;
  height: 76px;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-img--footer {
  width: 72px;
  height: 72px;
}

/* ─── Galería de Proyectos ─── */
.gallery-section {
  padding: 100px 0;
  background: var(--white);
  overflow: hidden;
}

.gallery-container {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 70px;
  /* Mucho espacio para las flechas */
}

.gallery-wrapper {
  position: relative;
  /* Ya no usamos flex aquí para evitar interferencias con el track */
  width: 100%;
}

.gallery-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  /* Firefox */
  padding: 20px 0;
  cursor: grab;
  flex-wrap: nowrap;
  /* Garantizar que no se envuelvan */
}

.gallery-track::-webkit-scrollbar {
  display: none;
  /* Chrome, Safari, Opera */
}

.gallery-track:active {
  cursor: grabbing;
}

.gallery-item {
  flex: 0 0 400px;
  height: 500px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 24px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
  color: #ffffff !important;
  opacity: 0;
  transition: opacity var(--transition), transform var(--transition);
  transform: translateY(10px);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
  transform: translateY(0);
}

.gallery-overlay h3 {
  color: #ffffff !important;
  margin-bottom: 8px;
  font-size: 1.5rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
  font-weight: 700;
  font-family: var(--font-head);
}

.gallery-overlay p {
  color: #ffffff !important;
  font-size: 0.95rem;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
  line-height: 1.5;
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: #14213d !important;
  border: none;
  border-radius: 50%;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  cursor: pointer !important;
  z-index: 9999 !important;
  transition: all 0.3s ease;
  color: #ffffff !important;
  pointer-events: auto !important;
}

.gallery-nav-btn:hover {
  background: #CB997E !important;
  transform: translateY(-50%) scale(1.1);
}

.gallery-nav-btn svg {
  pointer-events: none;
}

.gallery-nav-btn--prev {
  left: 0;
}

.gallery-nav-btn--next {
  right: 0;
}

@media (max-width: 1024px) {
  .gallery-item {
    flex: 0 0 320px;
    height: 400px;
  }

  .gallery-nav-btn {
    display: none;
    /* Native scroll is better on mobile */
  }
}

@media (max-width: 768px) {
  .gallery-section {
    padding: 60px 0;
  }

  .gallery-track {
    gap: 16px;
  }

  .gallery-item {
    flex: 0 0 280px;
    height: 350px;
  }
}

/* ─── Responsividad Maestra (Refinada) ─── */
@media (max-width: 991px) {
  .header-inner {
    padding: 0 10px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }

  .page-hero {
    padding: 80px 0 40px !important;
    text-align: center;
  }

  h1 {
    font-size: 2.1rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .section-header {
    text-align: center;
  }

  .section-header .divider {
    margin: 20px auto !important;
  }

  .divider--left {
    margin: 20px auto !important;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr !important;
    gap: 32px;
  }

  /* Hero adaptation */
  #hero h1 {
    font-size: 2.1rem !important;
    max-width: 100% !important;
    text-align: center;
  }

  #hero p {
    font-size: 1.02rem !important;
    text-align: center;
  }

  #hero div[style*="gap:48px"] {
    gap: 16px !important;
    justify-content: center !important;
  }

  .trust-bar {
    padding: 10px 0;
  }

  .trust-items {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .trust-item {
    width: 100%;
    border-left: none !important;
    border-bottom: 1px solid var(--gray-100);
    padding: 14px 16px;
    justify-content: center;
  }

  .trust-item:last-child {
    border-bottom: none;
  }

  .sim-card {
    padding: 24px;
  }

  .sim-result-box {
    padding: 24px;
    margin-top: 24px;
  }

  .plan-selector {
    flex-direction: column;
    gap: 12px;
  }

  .plan-pill {
    padding: 12px;
  }

  .mobile-nav {
    top: 60px;
  }

  /* Catch-all for grid styles defined inline in HTML */
  .container>div[style*="display:grid"],
  .container>div[style*="display: grid"],
  .section div[style*="display:grid"],
  .section div[style*="display: grid"],
  .contact-immersive div[style*="display:grid"],
  .contact-immersive div[style*="display: grid"],
  form div[style*="display:grid"],
  form div[style*="display: grid"] {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .glass-card {
    padding: 24px !important;
  }

  .glass-card--dark {
    padding: 24px !important;
  }

  /* Specific section fixes emphasizing colors and mobile readability */
  .section[style*="sma_calle.jpg"],
  .section[style*="sma_panorama.jpg"] {
    padding: 70px 0 !important;
  }

  .section[style*="sma_calle.jpg"] h2 {
    font-size: 1.9rem !important;
    text-align: center;
  }

  .section[style*="sma_calle.jpg"] .fade-up[style*="background:#ffffff"] {
    padding: 32px 24px !important;
  }

  /* WhatsApp card in contact page */
  div[style*="background:linear-gradient"][style*="#128C7E"] {
    padding: 32px 20px !important;
    border-radius: 20px !important;
  }

  div[style*="background:linear-gradient"][style*="#128C7E"] h2 {
    font-size: 1.8rem !important;
  }

  .footer-brand {
    text-align: center;
    margin-bottom: 24px;
  }

  .logo-img--footer {
    margin: 0 auto 16px;
    width: 64px;
    height: 64px;
  }

  /* Prevent text overflow in headers and buttons */
  p, a, button {
    word-break: break-word;
    white-space: normal;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem !important;
  }

  h2 {
    font-size: 1.5rem !important;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 14px 20px !important;
    white-space: normal;
    text-align: center;
  }

  .header-inner {
    height: 64px;
    font-size: 0.9rem;
  }

  .logo-img {
    width: auto;
    height: 60px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    text-align: center;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  #wa-float {
    bottom: 20px !important;
    right: 20px !important;
    width: 48px;
    height: 48px;
  }

  .contact-immersive {
    padding: 140px 0 80px !important;
  }

  /* Fix for hero stats */
  div[style*="justify-content:space-between"] {
    gap: 8px !important;
    justify-content: center !important;
  }

  div[style*="justify-content:space-between"] > div {
    font-size: 0.8rem;
    flex: 1 1 0;
    text-align: center;
  }

  /* Galería SMA — solo 1 foto en móvil */
  .sma-photo-grid {
    grid-template-columns: 1fr !important;
    height: 240px !important;
  }

  .sma-photo-extra {
    display: none !important;
  }
}