/* -------------------------------------------------------------
 * Lorenzo Construcciones - Estilos CSS Premium & Modernos
 * Diseño basado en Blocksy Renovation con toques de Glassmorphism
 * ------------------------------------------------------------- */

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

/* --- variables del sistema de diseño (design tokens) --- */
:root {
  --color-primary: hsl(24, 95%, 50%);       /* Naranja Arquitectónico */
  --color-primary-hover: hsl(24, 95%, 43%);
  --color-secondary: hsl(218, 23%, 15%);    /* Gris Carbón Oscuro */
  --color-dark: hsl(218, 23%, 11%);
  --color-light: hsl(210, 20%, 98%);
  --color-white: hsl(0, 0%, 100%);
  --color-accent: hsl(38, 92%, 50%);        /* Oro Cálido */
  
  --text-dark: hsl(218, 23%, 18%);
  --text-muted: hsl(215, 15%, 50%);
  
  --font-headers: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
  --shadow-orange: 0 10px 25px rgba(240, 98, 30, 0.3);
  
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 24px;
  --radius-round: 50%;
  
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  
  --max-width: 1200px;
}

/* --- estilos base & reset --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background-color: var(--color-light);
  line-height: 1.6;
  overflow-x: hidden;
}

body.no-scroll {
  overflow: hidden;
}

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

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

ul {
  list-style: none;
}

/* --- barra de desplazamiento personalizada --- */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--color-light);
}
::-webkit-scrollbar-thumb {
  background: var(--color-secondary);
  border: 2px solid var(--color-light);
  border-radius: var(--radius-sm);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-primary);
}

/* --- botones & componentes comunes --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  font-family: var(--font-headers);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-normal);
  border: 2px solid transparent;
  gap: 8px;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  box-shadow: var(--shadow-orange);
}

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

.btn-secondary {
  background-color: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
  background-color: var(--color-white);
  color: var(--color-secondary);
  border-color: var(--color-white);
  transform: translateY(-2px);
}

.btn-outline-dark {
  background-color: transparent;
  color: var(--color-secondary);
  border-color: var(--color-secondary);
}

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

/* --- encabezado de sección --- */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.section-subtitle {
  font-family: var(--font-headers);
  color: var(--color-primary);
  text-transform: uppercase;
  font-size: 14px;
  letter-spacing: 2px;
  font-weight: 700;
  margin-bottom: 12px;
  display: block;
}

.section-title {
  font-family: var(--font-headers);
  font-size: 36px;
  font-weight: 700;
  color: var(--color-secondary);
  line-height: 1.2;
}

.section-desc {
  color: var(--text-muted);
  margin-top: 15px;
  font-size: 17px;
}

/* --- HEADER & NAVEGACION --- */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: var(--transition-normal);
  padding: 20px 0;
}

header.scrolled {
  background-color: rgba(30, 41, 59, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  padding: 12px 0;
  box-shadow: var(--shadow-md);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-headers);
  font-size: 24px;
  font-weight: 800;
  color: var(--color-white);
}

.logo img {
  width: 150px;
  height: auto;
  display: block;
  filter: brightness(0) invert(1); /* Convierte el logo en blanco puro para máximo contraste */
}

.logo span {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  font-family: var(--font-headers);
  font-weight: 500;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
}

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

/* Selector de Idiomas (Oculto pero funcional en background) */
.lang-switcher {
  display: none !important;
}

.lang-btn {
  background: none;
  border: none;
  padding: 6px 12px;
  font-family: var(--font-headers);
  font-weight: 600;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  border-radius: 4px;
  transition: var(--transition-fast);
}

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

/* Botón Hamburguesa móvil */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 30px;
  height: 24px;
  position: relative;
}

.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--color-white);
  border-radius: 3px;
  position: absolute;
  transition: var(--transition-normal);
}

.mobile-menu-toggle span:nth-child(1) { top: 0; }
.mobile-menu-toggle span:nth-child(2) { top: 10px; }
.mobile-menu-toggle span:nth-child(3) { top: 20px; }

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

/* --- HERO SECTION --- */
.hero {
  position: relative;
  background-color: var(--color-secondary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 140px;
  padding-bottom: 120px;
  overflow: hidden;
}

/* Imagen de fondo con opacidad */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(135deg, rgba(30, 41, 59, 0.92) 20%, rgba(30, 41, 59, 0.7) 100%),
                    url('https://images.unsplash.com/photo-1600585154340-be6161a56a0c?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  z-index: 1;
}

.hero-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 50px;
}

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

.hero-tag {
  background-color: rgba(240, 98, 30, 0.15);
  border-left: 3px solid var(--color-primary);
  padding: 6px 16px;
  font-family: var(--font-headers);
  font-weight: 600;
  font-size: 14px;
  color: var(--color-primary);
  display: inline-block;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-content h1 {
  font-family: var(--font-headers);
  font-size: 56px;
  line-height: 1.1;
  font-weight: 800;
  margin-bottom: 24px;
}

.hero-content p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
  max-width: 520px;
}

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

/* Bloque decorativo estilo Blocksy */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: flex-end;
}

.overlapping-card-box {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  max-width: 440px;
  border-top: 6px solid var(--color-primary);
  position: relative;
  z-index: 3;
}

.overlapping-card-box h3 {
  font-family: var(--font-headers);
  font-size: 24px;
  color: var(--color-secondary);
  margin-bottom: 16px;
  font-weight: 700;
}

.overlapping-card-box p {
  color: var(--text-muted);
  margin-bottom: 24px;
  font-size: 15px;
}

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

.overlapping-item {
  display: flex;
  gap: 15px;
}

.overlapping-icon {
  background-color: rgba(240, 98, 30, 0.1);
  color: var(--color-primary);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  font-weight: 700;
}

.overlapping-item h4 {
  font-family: var(--font-headers);
  color: var(--color-secondary);
  font-size: 16px;
  margin-bottom: 4px;
}

.overlapping-item p {
  margin: 0;
  font-size: 13px;
}

/* --- TARJETAS DE SERVICIOS OVERLAPPING (DEBAJO DEL HERO) --- */
.overlapping-features {
  max-width: var(--max-width);
  margin: -60px auto 100px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  position: relative;
  z-index: 10;
}

.feature-card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  padding: 40px 30px;
  box-shadow: var(--shadow-md);
  transition: var(--transition-normal);
  border-bottom: 4px solid transparent;
  display: flex;
  flex-direction: column;
}

.feature-card:hover {
  transform: translateY(-10px);
  border-bottom-color: var(--color-primary);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 60px;
  height: 60px;
  background-color: rgba(240, 98, 30, 0.08);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: var(--color-primary);
  font-size: 28px;
}

.feature-card h3 {
  font-family: var(--font-headers);
  font-size: 20px;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 12px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

/* --- COMPARACIÓN ANTES/DESPUÉS (SLIDER DRAG) --- */
.before-after-section {
  padding: 100px 0;
  background-color: var(--color-white);
}

.ba-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  align-items: center;
  gap: 60px;
}

.ba-content h2 {
  font-family: var(--font-headers);
  font-size: 40px;
  color: var(--color-secondary);
  font-weight: 700;
  margin-top: 10px;
  margin-bottom: 20px;
  line-height: 1.2;
}

.ba-content p {
  color: var(--text-muted);
  font-size: 16px;
  margin-bottom: 30px;
}

/* Contenedor del Slider */
.ba-slider-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  user-select: none;
  cursor: ew-resize;
}

.ba-slider-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

/* Imagen Antes (Background) */
.background-img {
  z-index: 1;
}

/* Imagen Después (Foreground con ancho ajustable) */
.foreground-img {
  z-index: 2;
  width: 50%;
  height: 100%;
  overflow: hidden;
}

.foreground-img img {
  width: 100%;
  max-width: none;
}

/* Etiquetas */
.slider-label {
  position: absolute;
  top: 20px;
  background-color: rgba(30, 41, 59, 0.85);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: var(--color-white);
  padding: 6px 14px;
  font-family: var(--font-headers);
  font-weight: 600;
  font-size: 12px;
  border-radius: var(--radius-sm);
  z-index: 5;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.label-before {
  right: 20px;
}

.label-after {
  left: 20px;
}

/* Barra de control (Divider) */
.slider-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background-color: var(--color-white);
  z-index: 6;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.slider-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background-color: var(--color-primary);
  color: var(--color-white);
  border-radius: var(--radius-round);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  pointer-events: none;
  border: 4px solid var(--color-white);
  transition: transform var(--transition-fast);
}

.ba-slider-container.dragging .slider-button {
  transform: translate(-50%, -50%) scale(1.1);
  background-color: var(--color-secondary);
}

/* --- SECCIÓN SERVICIOS --- */
.services-section {
  padding: 100px 0;
  background-color: var(--color-light);
}

.services-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.service-item-card {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 25px;
  transition: var(--transition-normal);
}

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

.srv-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(240, 98, 30, 0.1);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 24px;
  flex-shrink: 0;
}

.srv-info h3 {
  font-family: var(--font-headers);
  font-size: 22px;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 12px;
}

.srv-info p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 20px;
}

.srv-link {
  display: inline-flex;
  align-items: center;
  color: var(--color-primary);
  font-family: var(--font-headers);
  font-weight: 600;
  font-size: 14px;
  gap: 6px;
  cursor: pointer;
}

.srv-link:hover {
  color: var(--color-primary-hover);
}

/* --- SECCIÓN SOBRE NOSOTROS & METRICAS --- */
.about-section {
  padding: 100px 0;
  background-color: var(--color-white);
}

.about-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-visual {
  position: relative;
  display: flex;
}

.about-img-box {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  z-index: 1;
}

.about-badge {
  position: absolute;
  bottom: -30px;
  right: -30px;
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 30px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 2;
  text-align: center;
  font-family: var(--font-headers);
  border: 4px solid var(--color-white);
}

.about-badge span {
  font-size: 40px;
  font-weight: 800;
  display: block;
  line-height: 1;
}

.about-badge p {
  font-size: 14px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
}

.about-info h2 {
  font-family: var(--font-headers);
  font-size: 40px;
  color: var(--color-secondary);
  font-weight: 700;
  margin-top: 10px;
  margin-bottom: 24px;
}

.about-p1 {
  font-size: 18px;
  color: var(--color-secondary);
  font-weight: 500;
  margin-bottom: 20px;
}

.about-p2 {
  color: var(--text-muted);
  margin-bottom: 40px;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 30px;
}

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

.stat-number {
  font-family: var(--font-headers);
  font-size: 36px;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
}

/* --- SECCIÓN PORTAFOLIO / PROYECTOS --- */
.portfolio-section {
  padding: 100px 0;
  background-color: var(--color-light);
}

.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 50px;
  flex-wrap: wrap;
}

.filter-btn {
  background-color: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--color-secondary);
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-headers);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.filter-btn.active, .filter-btn:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  border-color: var(--color-primary);
  box-shadow: var(--shadow-orange);
}

.portfolio-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.portfolio-item {
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: opacity 0.3s ease, transform var(--transition-normal);
}

.portfolio-item.fade-out {
  opacity: 0;
  transform: scale(0.95);
}

.portfolio-img-box {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}

.portfolio-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.portfolio-item:hover .portfolio-img-box img {
  transform: scale(1.1);
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(30, 41, 59, 0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-normal);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-overlay-btn {
  background-color: var(--color-primary);
  color: var(--color-white);
  width: 50px;
  height: 50px;
  border-radius: var(--radius-round);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: var(--shadow-orange);
}

.portfolio-info {
  padding: 24px;
}

.portfolio-info h4 {
  font-family: var(--font-headers);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 6px;
}

.portfolio-info p {
  color: var(--text-muted);
  font-size: 13px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 1px;
}

/* --- SECCIÓN TESTIMONIOS --- */
.testimonials-section {
  padding: 100px 0;
  background-color: var(--color-white);
}

.testimonials-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.testimonial-card {
  background-color: var(--color-light);
  border-radius: var(--radius-md);
  padding: 40px;
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.quote-icon {
  font-size: 48px;
  color: rgba(240, 98, 30, 0.12);
  line-height: 1;
  position: absolute;
  top: 24px;
  left: 30px;
}

.testimonial-card p {
  font-size: 15px;
  font-style: italic;
  color: var(--color-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  position: relative;
  z-index: 2;
}

.testimonial-author {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 15px;
}

.author-avatar {
  width: 44px;
  height: 44px;
  background-color: var(--color-primary);
  border-radius: var(--radius-round);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headers);
  font-weight: 700;
  color: var(--color-white);
}

.author-meta h5 {
  font-family: var(--font-headers);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-secondary);
}

.author-meta span {
  font-size: 12px;
  color: var(--text-muted);
}

/* --- SECCIÓN CONTACTO --- */
.contact-section {
  padding: 100px 0;
  background-color: var(--color-secondary);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
}

.contact-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  position: relative;
  z-index: 2;
}

.contact-info-side h2 {
  font-family: var(--font-headers);
  font-size: 40px;
  font-weight: 700;
  margin-top: 10px;
  margin-bottom: 20px;
  line-height: 1.2;
}

.contact-info-side p {
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 40px;
  font-size: 16px;
}

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

.contact-detail-item {
  display: flex;
  gap: 20px;
}

.cd-icon {
  width: 50px;
  height: 50px;
  background-color: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  font-size: 22px;
  flex-shrink: 0;
}

.cd-text h4 {
  font-family: var(--font-headers);
  font-size: 16px;
  margin-bottom: 4px;
}

.cd-text p {
  margin: 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

/* Formulario */
.contact-form-side {
  background-color: rgba(255, 255, 255, 0.03);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 40px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group-full {
  grid-column: span 2;
}

.form-group label {
  font-family: var(--font-headers);
  font-size: 14px;
  font-weight: 500;
}

.form-group input, .form-group select, .form-group textarea {
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  color: var(--color-white);
  font-family: var(--font-body);
  font-size: 14px;
  transition: var(--transition-fast);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background-color: rgba(255, 255, 255, 0.08);
}

.form-group select option {
  background-color: var(--color-secondary);
  color: var(--color-white);
}

.form-status {
  padding: 15px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 14px;
  display: none;
}

.form-status.success {
  background-color: rgba(76, 175, 80, 0.15);
  border: 1px solid #4CAF50;
  color: #4CAF50;
}

/* --- DIALOG MODAL NATIVO --- */
dialog {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-width: 500px;
  width: 90%;
  margin: auto;
  padding: 0;
  overflow: hidden;
}

dialog::backdrop {
  background-color: rgba(15, 23, 42, 0.8);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.modal-header {
  background-color: var(--color-secondary);
  color: var(--color-white);
  padding: 24px 30px;
  position: relative;
}

.modal-header h3 {
  font-family: var(--font-headers);
  font-size: 22px;
  font-weight: 700;
}

.modal-content-body {
  padding: 30px;
}

.modal-content-body p {
  color: var(--text-dark);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 30px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
}

/* Dialog open animations */
dialog[open] {
  animation: showModal 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* --- FOOTER --- */
footer {
  background-color: var(--color-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 80px 0 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand .logo {
  margin-bottom: 20px;
}

.footer-brand p {
  font-size: 15px;
  margin-bottom: 24px;
}

.footer-socials {
  display: flex;
  gap: 15px;
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-round);
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

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

.footer-links h3, .footer-info h3 {
  font-family: var(--font-headers);
  color: var(--color-white);
  font-size: 18px;
  margin-bottom: 24px;
  font-weight: 700;
}

.footer-links-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links-list a:hover {
  color: var(--color-primary);
  padding-left: 5px;
}

.footer-hours-block p {
  font-size: 14px;
  line-height: 1.8;
}

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

/* --- WIDGET WHATSAPP FLOTANTE --- */
.wa-widget {
  position: fixed;
  bottom: 90px;
  right: 30px;
  z-index: 999;
}

.wa-widget-toggle {
  background-color: #25D366;
  color: var(--color-white);
  width: 60px;
  height: 60px;
  border-radius: var(--radius-round);
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-normal);
  font-size: 28px;
  position: relative;
}

.wa-widget-toggle:hover {
  transform: scale(1.08);
}

/* Tooltip de ayuda */
.wa-tooltip {
  position: absolute;
  right: 75px;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--color-white);
  color: var(--color-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  font-family: var(--font-headers);
  pointer-events: none;
  animation: bounceTooltip 3s infinite;
}

@keyframes bounceTooltip {
  0%, 100% { transform: translateY(-50%) translateX(0); }
  50% { transform: translateY(-50%) translateX(-5px); }
}

/* Caja de chat flotante */
.wa-widget-box {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 320px;
  background-color: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: var(--transition-normal);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.wa-widget-box.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.wa-box-header {
  background-color: #075E54;
  color: var(--color-white);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  position: relative;
}

.wa-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-round);
  background-color: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.wa-header-info h4 {
  font-family: var(--font-headers);
  font-size: 15px;
  font-weight: 700;
}

.wa-header-info span {
  font-size: 11px;
  opacity: 0.8;
}

.wa-widget-close {
  position: absolute;
  top: 20px;
  right: 20px;
  cursor: pointer;
  opacity: 0.7;
}

.wa-widget-close:hover {
  opacity: 1;
}

.wa-box-body {
  padding: 24px;
  background-color: #E5DDD5;
}

.wa-bubble {
  background-color: var(--color-white);
  padding: 12px 16px;
  border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md);
  color: var(--color-secondary);
  font-size: 13px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
  margin-bottom: 20px;
}

.wa-box-body .btn {
  width: 100%;
  background-color: #25D366;
  color: var(--color-white);
}

.wa-box-body .btn:hover {
  background-color: #128C7E;
}

/* --- RESPONSIVIDAD (MEDIA QUERIES) --- */

@media (max-width: 991px) {
  .section-title {
    font-size: 30px;
  }
  
  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }
  
  .hero-content h1 {
    font-size: 42px;
  }
  
  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .hero-visual {
    justify-content: center;
  }
  
  .overlapping-features {
    grid-template-columns: 1fr;
    margin-top: 40px;
  }
  
  .ba-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
  }
  
  .about-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  /* Toggle Menú Hamburguesa */
  .mobile-menu-toggle {
    display: block;
    z-index: 1100;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--color-secondary);
    flex-direction: column;
    padding: 100px 40px;
    align-items: flex-start;
    justify-content: flex-start;
    transition: var(--transition-normal);
    box-shadow: -10px 0 30px rgba(0,0,0,0.2);
    z-index: 1050;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links a {
    font-size: 18px;
    color: var(--color-white);
  }
  
  .nav-links .btn {
    width: 100%;
    margin-top: 20px;
  }
  
  .nav-links .lang-switcher {
    margin-top: 20px;
    width: 100%;
    justify-content: space-around;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .form-group-full {
    grid-column: span 1;
  }
  
  .about-badge {
    bottom: -15px;
    right: -15px;
    padding: 15px 25px;
  }
  
  .about-badge span {
    font-size: 28px;
  }
}

/* --- BOTÓN VOLVER ARRIBA --- */
.scroll-to-top-btn {
  position: fixed;
  bottom: 170px; /* Colocado de forma alineada sobre el botón de WhatsApp */
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--color-secondary);
  color: var(--color-white);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-round);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: var(--transition-normal);
  z-index: 998;
}

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

.scroll-to-top-btn:hover {
  background-color: var(--color-primary);
  color: var(--color-white);
  transform: translateY(-5px);
  box-shadow: var(--shadow-orange);
}

/* --- PRE-LOADER ANIMADO --- */
.preloader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader-overlay.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-spinner-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.preloader-logo-reveal {
  animation: pulseLogo 1.5s infinite ease-in-out;
  color: var(--color-primary);
}

@keyframes pulseLogo {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 15px var(--color-primary)); }
}

.preloader-bar {
  width: 140px;
  height: 3px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.preloader-progress {
  width: 100%;
  height: 100%;
  background-color: var(--color-primary);
  position: absolute;
  top: 0;
  left: -100%;
  animation: loadingBar 1.5s infinite ease-in-out;
}

@keyframes loadingBar {
  0% { left: -100%; }
  50% { left: 0%; }
  100% { left: 100%; }
}

/* --- SECCIÓN PREGUNTAS FRECUENTES (FAQ) --- */
.faq-section {
  padding: 100px 0;
  background-color: var(--color-white);
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.faq-item {
  background-color: var(--color-light);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition-normal);
}

.faq-item:hover {
  box-shadow: var(--shadow-sm);
  border-color: rgba(240, 98, 30, 0.1);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 24px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-headers);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-secondary);
  gap: 20px;
  transition: var(--transition-fast);
}

.faq-question:focus {
  outline: none;
}

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

.faq-icon {
  font-size: 16px;
  color: var(--color-primary);
  transition: transform var(--transition-normal);
  font-weight: 500;
}

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

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

.faq-item.active .faq-answer {
  padding-bottom: 24px;
}

.faq-answer p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

/* --- BANNER DE COOKIES --- */
.cookie-consent-banner {
  position: fixed;
  bottom: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 600px;
  background-color: rgba(30, 41, 59, 0.95);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  display: flex;
  z-index: 100000;
  box-shadow: var(--shadow-lg);
  transition: bottom 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-consent-banner.show {
  bottom: 24px;
}

.cookie-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 20px;
}

.cookie-content p {
  color: var(--color-white);
  font-size: 13px;
  margin: 0;
  line-height: 1.5;
}

.cookie-content .btn {
  padding: 8px 18px;
  font-size: 13px;
  flex-shrink: 0;
}

@media (max-width: 576px) {
  .cookie-content {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 12px;
  }
}
