@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

/* --- DESIGN SYSTEM TOKENS --- */
:root {
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;

  /* Color Palette - Warm Architectural Theme (Casona Sforza Inspired) */
  --bg-main: #111215;
  --bg-card: rgba(25, 27, 31, 0.7);
  --bg-card-solid: #1d1f24;
  --bg-accent-trans: rgba(211, 107, 84, 0.08);
  --primary: #d36b54;       /* Terracotta Clay */
  --primary-light: #e57d64; /* Glowing Clay */
  --secondary: #d4b28c;     /* Sandy Ochre */
  --accent-glow: rgba(211, 107, 84, 0.25);
  
  --text-main: #fcfaf7;
  --text-muted: #9fa4ac;
  --text-dark: #121315;
  
  --border: rgba(211, 107, 84, 0.15);
  --border-hover: rgba(211, 107, 84, 0.4);
  --border-glass: rgba(255, 255, 255, 0.05);

  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 30px rgba(211, 107, 84, 0.15);

  --transition-smooth: all 0.45s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: rgba(211, 107, 84, 0.3);
  border-radius: 5px;
  border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

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

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

/* Base Headings */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

section {
  padding: 100px 24px;
  max-width: 1300px;
  margin: 0 auto;
  position: relative;
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* Section Title */
.section-header {
  margin-bottom: 30px;
  text-align: center;
}

.section-header .tag {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--secondary);
  font-weight: 600;
  margin-bottom: 8px;
  display: inline-block;
}

.section-header h2 {
  font-size: 2.2rem;
  color: var(--text-main);
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 2px;
  background: var(--primary);
}

/* Decorative Background Orbs */
.bg-glow-orb {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, rgba(211, 107, 84, 0) 70%);
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.6;
}

/* --- NAVIGATION BAR --- */
.header-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(17, 18, 21, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: var(--transition-smooth);
}

.header-nav.scrolled {
  background: rgba(17, 18, 21, 0.95);
  box-shadow: var(--shadow-sm);
  padding: 10px 0;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo svg {
  fill: var(--primary);
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  padding: 8px 0;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition-fast);
}

.nav-links a:hover {
  color: var(--text-main);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-cta {
  background: var(--primary);
  color: var(--text-dark);
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9rem;
  transition: var(--transition-fast);
  box-shadow: 0 4px 10px rgba(211, 107, 84, 0.2);
}

.nav-cta:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(211, 107, 84, 0.3);
}

/* --- SIDE DOTS NAVIGATION --- */
.side-dots-nav {
  position: fixed;
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-smooth);
}

.side-dots-nav.visible {
  opacity: 1;
  pointer-events: auto;
}

.side-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(211, 107, 84, 0.4);
  background: transparent;
  cursor: pointer;
  transition: var(--transition-fast);
  position: relative;
}

.side-dot::after {
  content: attr(data-tooltip);
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%) translateX(10px);
  background: rgba(17, 18, 21, 0.95);
  border: 1px solid var(--border);
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
}

.side-dot:hover {
  border-color: var(--primary-light);
  transform: scale(1.15);
}

.side-dot:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.side-dot.active {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 0 10px rgba(211, 107, 84, 0.6);
  transform: scale(1.3);
}

/* --- SCROLL SNAPPING SYSTEM (DESKTOP) --- */
@media (min-width: 1025px) and (min-height: 700px) {
  html {
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    overflow-y: scroll;
    height: 100%;
  }

  body {
    height: 100%;
  }

  section {
    scroll-snap-align: start;
    height: 100vh;
    min-height: 100vh;
    padding: 100px 24px 40px 24px; /* leaves room at the top for header */
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-sizing: border-box;
  }

  section .container {
    height: auto;
    max-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero {
    padding-top: 110px;
    padding-bottom: 20px;
  }
}

/* --- HERO SECTION --- */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 50px;
  align-items: center;
  margin-bottom: 40px;
}

.hero-content h1 {
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 20px;
  color: var(--text-main);
}

.hero-content h1 span {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-content p {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 30px;
  max-width: 580px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-accent-trans);
  border: 1px solid var(--border);
  border-radius: 100px;
  color: var(--primary-light);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 20px;
}

.hero-actions {
  display: flex;
  gap: 16px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--primary);
  color: var(--text-dark);
  box-shadow: 0 4px 20px rgba(211, 107, 84, 0.25);
}

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(211, 107, 84, 0.4);
}

.btn-secondary {
  border: 1px solid var(--border);
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.02);
}

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-3px);
}

/* Elegant Vector Arch Overlay in Hero */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-arch-vector {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1.7;
  border: 2px dashed rgba(211, 107, 84, 0.2);
  border-radius: 160px 160px 0 0; /* Semi-circle cúpula */
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-glow);
}

.hero-arch-vector::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(211, 107, 84, 0.06), transparent);
  pointer-events: none;
}

.hero-arch-image {
  width: 100%;
  height: 90%;
  object-fit: cover;
  border-radius: 140px 140px 0 0;
  box-shadow: var(--shadow-lg);
  transition: var(--transition-smooth);
}

.hero-arch-vector:hover .hero-arch-image {
  transform: scale(1.05);
}

/* --- QUICK STATS FLOATER --- */
.quick-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.stat-item {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border);
  padding-right: 20px;
}

.stat-item:last-child {
  border-right: none;
  padding-right: 0;
}

.stat-val {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.stat-desc {
  font-size: 0.8rem;
  color: var(--text-main);
  margin-top: 4px;
  font-weight: 500;
}

/* --- FICHA TECNICA SECTION --- */
.ficha-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.ficha-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px 24px;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.ficha-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  opacity: 0;
  transition: var(--transition-fast);
}

.ficha-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.ficha-card:hover::before {
  opacity: 1;
}

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--bg-accent-trans);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary-light);
  margin-bottom: 20px;
}

.ficha-card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
  color: var(--text-main);
}

.ficha-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.ficha-card .detail-badge {
  display: inline-block;
  margin-top: 14px;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--secondary);
  font-weight: 600;
}

/* --- OBJETIVOS SECTION --- */
.goals-container {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}

.goals-visual {
  position: relative;
}

.goals-showcase-box {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.goals-showcase-box img {
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  height: 280px;
  width: 100%;
  object-fit: cover;
}

.goals-overlay-tag {
  position: absolute;
  bottom: 35px;
  right: 35px;
  background: rgba(17, 18, 21, 0.9);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
  max-width: 180px;
}

.goals-overlay-tag p {
  font-size: 0.75rem;
  color: var(--secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.goals-overlay-tag span {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.goals-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.goal-card {
  display: flex;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  transition: var(--transition-smooth);
}

.goal-card:hover {
  background: var(--bg-card-solid);
  border-color: var(--border);
  transform: translateX(5px);
}

.goal-number {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  opacity: 0.7;
  line-height: 1;
}

.goal-info h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.goal-info p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* --- DISTRIBUCION DE ESPACIOS --- */
.space-layout-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
  align-items: center;
}

.space-menu {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.space-tab-button {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  text-align: left;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.space-tab-button.active {
  background: var(--bg-card-solid);
  border-color: var(--primary);
  box-shadow: var(--shadow-glow);
}

.space-tab-label {
  display: flex;
  flex-direction: column;
}

.space-tab-label .lvl-tag {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 2px;
}

.space-tab-label .lvl-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-main);
}

.space-tab-button.active .lvl-title {
  color: var(--primary-light);
}

.space-tab-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 4px;
  max-height: 0;
  overflow: hidden;
  transition: var(--transition-smooth);
  opacity: 0;
}

.space-tab-button.active .space-tab-desc {
  max-height: 80px;
  opacity: 1;
  margin-top: 8px;
}

.space-tab-arrow {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition-fast);
}

.space-tab-button.active .space-tab-arrow {
  background: var(--primary);
  color: var(--text-dark);
  transform: rotate(90deg);
}

.space-viewer {
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.space-viewer-image-container {
  width: 100%;
  height: 260px;
  overflow: hidden;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  background: #161719;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.space-viewer-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--transition-smooth);
}

.space-viewer-img.zoom-fit {
  object-fit: cover;
}

.space-viewer:hover .space-viewer-img {
  transform: scale(1.03);
}

.space-viewer-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.space-viewer-text h3 {
  font-size: 1.25rem;
  margin-bottom: 4px;
}

.space-viewer-text p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- INTERACTIVE 3D VISOR SECTION --- */
.visor-3d-container {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.canvas-wrapper {
  width: 100%;
  height: 420px;
  background: #161719;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.canvas-wrapper canvas {
  width: 100%;
  height: 100%;
  outline: none;
}

.visor-instructions {
  position: absolute;
  bottom: 20px;
  left: 20px;
  background: rgba(17, 18, 21, 0.85);
  border: 1px solid var(--border-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

.visor-instructions span {
  color: var(--primary-light);
  font-weight: 600;
}

.visor-3d-details {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.visor-3d-details h3 {
  font-size: 1.6rem;
  color: var(--text-main);
}

.visor-3d-details p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.visor-controls-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.visor-control-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm);
  padding: 14px;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: left;
  background: none;
  font-family: inherit;
  color: inherit;
}

.visor-control-card:hover {
  border-color: var(--border-hover);
  background: rgba(255, 255, 255, 0.02);
}

.visor-control-card.active {
  border-color: var(--primary);
  background: var(--bg-accent-trans);
}

.visor-control-card h4 {
  font-size: 0.85rem;
  color: var(--primary-light);
  margin-bottom: 4px;
}

.visor-control-card p {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.3;
}

/* --- PROPUESTAS VISUALES (RENDERS GRID) --- */
.renders-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}

.render-card {
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 1.35 / 1;
  background: #161719;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

/* Specific layout adjustments to create a beautiful grid template */
.render-card.col-3 {
  grid-column: span 3;
}
.render-card.col-2 {
  grid-column: span 2;
}
.render-card.col-4 {
  grid-column: span 4;
}

.render-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.render-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 20px;
  background: linear-gradient(to top, rgba(17, 18, 21, 0.9) 0%, rgba(17, 18, 21, 0.4) 70%, transparent 100%);
  opacity: 0;
  transform: translateY(10px);
  transition: var(--transition-smooth);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.render-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.render-card:hover img {
  transform: scale(1.08);
}

.render-card:hover .render-card-overlay {
  opacity: 1;
  transform: translateY(0);
}

.render-info-text h3 {
  font-size: 1.05rem;
  margin-bottom: 2px;
  color: var(--text-main);
}

.render-info-text p {
  color: var(--secondary);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.render-action-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
}

/* --- SCROLLER SNAP CAROUSEL (INSPIRATION) --- */
.gallery-section {
  max-width: 100%;
  padding-left: 0;
  padding-right: 0;
}

.gallery-section .section-header {
  padding: 0 24px;
}

.gallery-container {
  position: relative;
  width: 100%;
  margin-top: 15px;
}

/* The Scroller */
.gallery-scroller {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 15px 24px 25px 24px;
  scrollbar-width: none; /* Hide standard firefox scrollbar */
}

.gallery-scroller::-webkit-scrollbar {
  display: none; /* Hide Webkit scrollbar */
}

/* Gallery Item */
.gallery-item {
  flex: 0 0 380px;
  height: 270px;
  scroll-snap-align: center;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  background: #1a1c20;
  border: 1px solid var(--border-glass);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
}

/* Scroll-driven animations on desktop */
@media (min-width: 1025px) {
  .gallery-item {
    animation: carouselAnimate auto linear both;
    animation-timeline: view(inline);
  }
}

@keyframes carouselAnimate {
  0% {
    transform: scale(0.92);
    opacity: 0.6;
    filter: blur(2px);
  }
  50% {
    transform: scale(1.0);
    opacity: 1;
    filter: blur(0);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
  }
  100% {
    transform: scale(0.92);
    opacity: 0.6;
    filter: blur(2px);
  }
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

.gallery-item-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 16px;
  background: linear-gradient(to top, rgba(17, 18, 21, 0.95), transparent);
  color: var(--text-main);
  transform: translateY(5px);
  opacity: 0.9;
  transition: var(--transition-smooth);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item-caption h4 {
  font-size: 1rem;
  margin-bottom: 2px;
}

.gallery-item-caption p {
  font-size: 0.78rem;
  color: var(--secondary);
}

/* Carousel Indicators and Controls */
.gallery-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 10px;
  padding: 0 24px;
}

.gallery-arrow-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: rgba(25, 27, 31, 0.6);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.gallery-arrow-btn:hover {
  background: var(--primary);
  color: var(--text-dark);
  border-color: var(--primary);
}

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

.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition: var(--transition-fast);
}

.gallery-dot.active {
  background: var(--primary);
  width: 20px;
  border-radius: 4px;
}

/* --- CUESTIONARIO SECTION (ACCORDION) --- */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
  max-height: 58vh;
  overflow-y: auto;
  padding-right: 8px;
}

.faq-card {
  background: var(--bg-card);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.faq-card:hover {
  border-color: var(--border);
}

.faq-card.open {
  background: var(--bg-card-solid);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

.faq-trigger {
  padding: 18px 24px;
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  gap: 20px;
}

.faq-trigger span {
  flex: 1;
}

.faq-q-num {
  color: var(--primary);
  font-weight: 700;
  margin-right: 6px;
}

.faq-icon-wrapper {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.faq-card.open .faq-icon-wrapper {
  background: var(--primary);
  color: var(--text-dark);
  transform: rotate(45deg);
}

.faq-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
  opacity: 0;
  padding: 0 24px;
}

.faq-card.open .faq-content {
  max-height: 220px;
  opacity: 1;
  padding-bottom: 18px;
}

.faq-answer-box {
  border-left: 2px solid var(--primary);
  padding-left: 16px;
  margin-top: 8px;
}

.faq-answer-label {
  font-size: 0.72rem;
  color: var(--secondary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}

.faq-answer-text {
  color: var(--text-main);
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.4;
}

/* --- LIGHTBOX MODAL --- */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(11, 12, 14, 0.95);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 90%;
  max-height: 85%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.lightbox-img {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--radius-sm);
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.7);
  object-fit: contain;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #111;
}

.lightbox-caption {
  color: var(--text-main);
  margin-top: 15px;
  text-align: center;
  font-family: var(--font-display);
}

.lightbox-caption h3 {
  font-size: 1.2rem;
  margin-bottom: 2px;
}

.lightbox-caption p {
  color: var(--secondary);
  font-size: 0.8rem;
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 2.2rem;
  cursor: pointer;
  transition: var(--transition-fast);
}

.lightbox-close:hover {
  color: var(--primary);
}

/* --- FOOTER --- */
footer {
  border-top: 1px solid var(--border);
  padding: 50px 24px;
  background: #0d0e10;
  position: relative;
  overflow: hidden;
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 50px;
}

.footer-info h3 {
  font-size: 1.3rem;
  margin-bottom: 12px;
}

.footer-info p {
  color: var(--text-muted);
  font-size: 0.85rem;
  max-width: 320px;
  margin-bottom: 16px;
}

.footer-links-col h4 {
  font-size: 0.9rem;
  text-transform: uppercase;
  color: var(--secondary);
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

.footer-links-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links-col a {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-links-col a:hover {
  color: var(--primary-light);
}

.footer-bottom {
  max-width: 1200px;
  margin: 30px auto 0 auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* --- RESPONSIVE ADJUSTMENTS --- */
@media (max-width: 1024px) {
  .hero-content h1 {
    font-size: 2.8rem;
  }
  .ficha-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .visor-3d-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .renders-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .render-card.col-3, .render-card.col-4 {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  section {
    padding: 60px 20px;
  }
  .header-nav {
    padding: 10px 0;
  }
  .nav-links {
    display: none; /* Hide navigation links on mobile */
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-arch-vector {
    max-width: 260px;
    margin: 0 auto;
  }
  .quick-stats-row {
    grid-template-columns: repeat(2, 1fr);
    padding: 20px;
  }
  .stat-item {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-right: 0;
    padding-bottom: 12px;
  }
  .stat-item:nth-child(3), .stat-item:nth-child(4) {
    border-bottom: none;
    padding-bottom: 0;
  }
  .ficha-grid {
    grid-template-columns: 1fr;
  }
  .goals-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .space-layout-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .renders-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .render-card.col-2, .render-card.col-3, .render-card.col-4 {
    grid-column: span 2;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}

/* Custom 3D Viewer Toggle styling */
#btn-toggle-measures:not(.active) .toggle-indicator {
  background-color: var(--text-muted) !important;
}
