/* ==========================================================================
   ALIANCO INGENIERÍA - SISTEMA DE DISEÑO & ESTILOS PREMIUM
   ========================================================================== */

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

:root {
  /* Paleta de Colores (Modo Claro por Defecto) */
  --bg-primary: hsl(210, 20%, 98%);
  --bg-secondary: hsl(210, 16%, 93%);
  --bg-card: hsl(0, 0%, 100%);
  --text-primary: hsl(220, 15%, 13%);
  --text-secondary: hsl(220, 10%, 45%);
  --border-color: hsl(210, 14%, 88%);
  --shadow-color: rgba(0, 0, 0, 0.06);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
  
  /* Colores de Acento Comunes */
  --color-emerald: hsl(160, 84%, 39%);
  --color-emerald-light: hsl(160, 84%, 45%);
  --color-emerald-dark: hsl(160, 84%, 30%);
  
  --color-orange: hsl(24, 95%, 53%);
  --color-orange-light: hsl(24, 95%, 60%);
  --color-orange-dark: hsl(24, 95%, 45%);
  
  --color-slate: hsl(215, 25%, 27%);
  --color-slate-light: hsl(215, 20%, 40%);
  
  /* Fuentes */
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Transiciones */
  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Scrollbar standard properties */
  scrollbar-width: thin;
  scrollbar-color: var(--text-secondary) var(--bg-secondary);
  
  color-scheme: light dark;
}

/* Variables para Modo Oscuro (Paso 1: Media query del sistema) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: hsl(222, 47%, 7%);
    --bg-secondary: hsl(222, 47%, 4%);
    --bg-card: hsl(222, 47%, 10%);
    --text-primary: hsl(210, 40%, 98%);
    --text-secondary: hsl(215, 20%, 65%);
    --border-color: hsl(222, 30%, 15%);
    --shadow-color: rgba(0, 0, 0, 0.4);
    --glass-bg: rgba(15, 23, 42, 0.7);
    --glass-border: rgba(255, 255, 255, 0.05);
  }
}

/* Variables para Modo Oscuro (Paso 2: Override manual por clase JS) */
html.dark {
  --bg-primary: hsl(222, 47%, 7%);
  --bg-secondary: hsl(222, 47%, 4%);
  --bg-card: hsl(222, 47%, 10%);
  --text-primary: hsl(210, 40%, 98%);
  --text-secondary: hsl(215, 20%, 65%);
  --border-color: hsl(222, 30%, 15%);
  --shadow-color: rgba(0, 0, 0, 0.4);
  --glass-bg: rgba(15, 23, 42, 0.7);
  --glass-border: rgba(255, 255, 255, 0.05);
}

/* Variables para Modo Claro (Override manual por clase JS) */
html.light {
  --bg-primary: hsl(210, 20%, 98%);
  --bg-secondary: hsl(210, 16%, 93%);
  --bg-card: hsl(0, 0%, 100%);
  --text-primary: hsl(220, 15%, 13%);
  --text-secondary: hsl(220, 10%, 45%);
  --border-color: hsl(210, 14%, 88%);
  --shadow-color: rgba(0, 0, 0, 0.06);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px; /* Para compensar la barra de navegación */
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Scrollbar Legacy WebKit fallback */
@supports not (scrollbar-color: auto) {
  ::-webkit-scrollbar {
    width: 10px;
    height: 10px;
  }
  ::-webkit-scrollbar-track {
    background: var(--bg-secondary);
  }
  ::-webkit-scrollbar-thumb {
    background: var(--text-secondary);
    border-radius: 5px;
    border: 2px solid var(--bg-secondary);
  }
  ::-webkit-scrollbar-thumb:hover {
    background: var(--color-slate-light);
  }
}

/* Tipografía y Títulos */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.25;
}

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

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

/* Componentes de Diseño y Reutilizables */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 100px 0;
  position: relative;
}

.section-title-wrapper {
  text-align: center;
  margin-bottom: 60px;
}

.section-tag {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-emerald);
  text-transform: uppercase;
  letter-spacing: 3px;
  display: block;
  margin-bottom: 12px;
}

.section-title {
  font-size: 40px;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.text-gradient-emerald {
  background: linear-gradient(135deg, var(--color-emerald), var(--color-emerald-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 16px;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background-color: var(--color-emerald);
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  background-color: var(--color-emerald-light);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

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

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

/* ==========================================================================
   BARRA DE NAVEGACIÓN (HEADER)
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--glass-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  transition: padding var(--transition-normal), background-color var(--transition-normal);
  padding: 16px 0;
}

.header.scrolled {
  padding: 10px 0;
  box-shadow: 0 4px 30px var(--shadow-color);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-container {
  height: 50px;
  display: flex;
  align-items: center;
}

.logo-img {
  height: 100%;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-secondary);
  position: relative;
  padding: 8px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-emerald);
  transition: width var(--transition-normal);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.mobile-menu-cta {
  display: none !important;
}

/* Selector de Tema Moderno */
.theme-toggle-btn {
  background: none;
  border: none;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  transition: all var(--transition-fast);
}

.theme-toggle-btn:hover {
  background-color: var(--border-color);
  transform: scale(1.05);
}

.theme-toggle-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.theme-toggle-btn .sun-icon {
  display: none;
}

html.dark .theme-toggle-btn .moon-icon {
  display: none;
}

html.dark .theme-toggle-btn .sun-icon {
  display: block;
}

/* Botón Hamburguesa móvil */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  z-index: 1001;
}

.hamburger-line {
  display: block;
  width: 24px;
  height: 2px;
  margin: 5px auto;
  background-color: var(--text-primary);
  transition: transform var(--transition-normal), opacity var(--transition-normal);
}

/* ==========================================================================
   SECCIÓN HERO (INICIO)
   ========================================================================== */
.hero {
  min-height: 100vh;
  padding-top: 120px;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background-color: #0f172a; /* Fondo base muy oscuro para que la imagen resalte */
}

.hero-bg-wrapper {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.45; /* Contraste óptimo */
  filter: brightness(0.9);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.4) 0%, rgba(15, 23, 42, 0.85) 100%);
  z-index: 2;
}

.hero .container {
  position: relative;
  z-index: 3;
}

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

.hero-content {
  color: white;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-emerald-light);
  margin-bottom: 24px;
  backdrop-filter: blur(4px);
}

.hero-tag::before {
  content: '';
  width: 8px;
  height: 8px;
  background-color: var(--color-emerald-light);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--color-emerald-light);
}

.hero-title {
  font-size: 64px;
  line-height: 1.1;
  font-weight: 900;
  color: white;
  margin-bottom: 24px;
  letter-spacing: -1.5px;
}

.hero-title span {
  display: block;
}

.hero-description {
  font-size: 20px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 40px;
  max-width: 580px;
}

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

.hero-btn-secondary {
  border-color: rgba(255, 255, 255, 0.3);
  color: white;
}

.hero-btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Indicador de Desplazamiento */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.mouse-icon {
  width: 24px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 12px;
  position: relative;
}

.mouse-wheel {
  width: 4px;
  height: 8px;
  background-color: var(--color-emerald-light);
  border-radius: 2px;
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  animation: scrollMouse 1.8s infinite ease-in-out;
}

@keyframes scrollMouse {
  0% { transform: translate(-50%, 0); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translate(-50%, 14px); opacity: 0; }
}

/* ==========================================================================
   SECCIÓN MÉTRICAS CLAVE (ESTADÍSTICAS)
   ========================================================================== */
.stats {
  padding: 60px 0;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: relative;
  z-index: 5;
  margin-top: -40px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  box-shadow: 0 -20px 40px rgba(0,0,0,0.1);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.stat-card {
  text-align: center;
  padding: 20px;
}

.stat-number {
  font-family: var(--font-title);
  font-size: 48px;
  font-weight: 900;
  color: var(--color-emerald);
  margin-bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.stat-number span {
  background: linear-gradient(135deg, var(--color-emerald), var(--color-emerald-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: 1px;
}

.stat-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ==========================================================================
   SECCIÓN SERVICIOS
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.service-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 40px;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px var(--shadow-color);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--color-emerald), var(--color-orange));
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px var(--shadow-color);
  border-color: transparent;
}

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

.service-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: var(--radius-sm);
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--color-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-normal);
}

.service-card:hover .service-icon-wrapper {
  background-color: var(--color-emerald);
  color: white;
  transform: scale(1.05);
}

.service-icon-wrapper svg {
  width: 32px;
  height: 32px;
  fill: currentColor;
}

.service-title {
  font-size: 24px;
  font-weight: 800;
}

.service-desc {
  color: var(--text-secondary);
  font-size: 15px;
}

.service-list {
  list-style: none;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
}

.service-list-item svg {
  width: 16px;
  height: 16px;
  fill: var(--color-emerald);
  flex-shrink: 0;
  margin-top: 3px;
}

.service-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 14px;
  color: var(--color-emerald);
}

.service-link svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: transform var(--transition-fast);
}

.service-card:hover .service-link svg {
  transform: translateX(4px);
}

/* ==========================================================================
   SECCIÓN NOSOTROS
   ========================================================================== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-images-stack {
  position: relative;
  height: 480px;
}

.about-img-large {
  width: 85%;
  height: 380px;
  border-radius: var(--radius-md);
  object-fit: cover;
  box-shadow: 0 20px 40px var(--shadow-color);
}

.about-img-small {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 55%;
  height: 240px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 8px solid var(--bg-primary);
  box-shadow: 0 20px 40px var(--shadow-color);
  transition: border var(--transition-normal);
}

.about-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-desc-highlight {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  border-left: 4px solid var(--color-emerald);
  padding-left: 20px;
}

.about-desc {
  color: var(--text-secondary);
  font-size: 16px;
}

.about-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 12px;
}

.pillar-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.pillar-icon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background-color: rgba(249, 115, 22, 0.1);
  color: var(--color-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pillar-icon-box svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.pillar-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.pillar-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ==========================================================================
   SECCIÓN PROYECTOS
   ========================================================================== */
.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}

.filter-btn {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 14px;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  background-color: var(--color-emerald);
  border-color: var(--color-emerald);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

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

.portfolio-item {
  background-color: var(--bg-card);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 15px var(--shadow-color);
  transition: transform var(--transition-normal), opacity var(--transition-normal), box-shadow var(--transition-normal);
  opacity: 1;
}

.portfolio-item.hidden {
  display: none;
  opacity: 0;
}

.portfolio-img-box {
  position: relative;
  height: 250px;
  overflow: hidden;
}

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

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

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  opacity: 0;
  transition: opacity var(--transition-normal);
  display: flex;
  align-items: flex-end;
  padding: 24px;
}

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

.portfolio-overlay-text {
  color: white;
}

.portfolio-category-tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-orange-light);
  letter-spacing: 1.5px;
  margin-bottom: 4px;
  display: block;
}

.portfolio-title-white {
  font-size: 20px;
  font-weight: 700;
}

.portfolio-details {
  padding: 24px;
}

.portfolio-tag {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-emerald);
  margin-bottom: 8px;
  display: inline-block;
}

.portfolio-item-title {
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}

.portfolio-desc {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ==========================================================================
   SECCIÓN CONTACTO & EMPLEO
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 48px;
}

.contact-info-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  box-shadow: 0 4px 20px var(--shadow-color);
}

.contact-info-title {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: -10px;
}

.contact-info-desc {
  color: var(--text-secondary);
  font-size: 14px;
}

.contact-method-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.contact-icon-box {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background-color: rgba(16, 185, 129, 0.1);
  color: var(--color-emerald);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon-box svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.contact-method-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.contact-method-value {
  font-size: 14px;
  color: var(--text-secondary);
}

.contact-method-value a:hover {
  color: var(--color-emerald);
}

.recruitment-card {
  margin-top: auto;
  background-color: var(--bg-secondary);
  border-radius: var(--radius-sm);
  padding: 24px;
  border-left: 4px solid var(--color-orange);
}

.recruitment-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.recruitment-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Formulario */
.contact-form-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 48px;
  box-shadow: 0 4px 20px var(--shadow-color);
}

.form-title {
  font-size: 28px;
  font-weight: 800;
  margin-bottom: 24px;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

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

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

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input, .form-textarea {
  width: 100%;
  padding: 14px 18px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.form-input:focus, .form-textarea:focus {
  border-color: var(--color-emerald);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.1);
  outline: none;
  background-color: var(--bg-card);
}

.form-textarea {
  height: 140px;
  resize: vertical;
}

.form-submit-btn {
  width: 100%;
  padding: 16px;
  font-size: 16px;
}

/* ==========================================================================
   FOOTER (PIE DE PÁGINA)
   ========================================================================== */
.footer {
  background-color: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 60px 0 30px 0;
  transition: background-color var(--transition-normal);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  height: 48px;
  align-self: flex-start;
}

.footer-tagline {
  color: var(--text-secondary);
  font-size: 14px;
  max-width: 320px;
}

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

.social-link {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

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

.social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.footer-nav-title {
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 20px;
}

.footer-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-nav-link {
  font-size: 14px;
  color: var(--text-secondary);
}

.footer-nav-link:hover {
  color: var(--color-emerald);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid var(--border-color);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ==========================================================================
   TOAST NOTIFICATIONS SYSTEM
   ========================================================================== */
#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
}

.toast {
  background-color: var(--bg-card);
  border-left: 4px solid var(--color-emerald);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 320px;
  max-width: 450px;
  pointer-events: auto;
  animation: toastIn var(--transition-normal) forwards;
  transition: all var(--transition-normal);
}

.toast.hide {
  animation: toastOut var(--transition-normal) forwards;
}

.toast-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.toast-icon.success { color: var(--color-emerald); }
.toast-icon.error { color: var(--color-orange); }

.toast-icon svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

.toast-content {
  flex-grow: 1;
}

.toast-title {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 2px;
}

.toast-message {
  font-size: 13px;
  color: var(--text-secondary);
}

.toast-close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color var(--transition-fast);
}

.toast-close-btn:hover {
  color: var(--text-primary);
}

.toast-close-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

@keyframes toastIn {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes toastOut {
  from { transform: scale(1); opacity: 1; }
  to { transform: scale(0.9); opacity: 0; }
}

/* ==========================================================================
   ANIMACIONES AL SCROLL (BASELINE & FALLBACK)
   ========================================================================== */
.js-enabled .reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--transition-slow), transform var(--transition-slow);
}

.js-enabled .reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   RESPONSIVIDAD (DISEÑO MÓVIL)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-title { font-size: 52px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .about-grid { gap: 40px; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .section { padding: 60px 0; }
  
  /* Header y Menú Móvil */
  .nav-btn-cotizar {
    display: none !important;
  }

  .mobile-menu-cta {
    display: inline-block !important;
    margin-top: 10px;
    width: 100%;
    text-align: center;
  }

  .mobile-nav-toggle {
    display: block;
  }
  
  .nav-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background-color: var(--bg-card);
    flex-direction: column;
    padding: 100px 40px;
    gap: 32px;
    box-shadow: -10px 0 30px var(--shadow-color);
    transition: right var(--transition-normal);
    z-index: 1000;
  }
  
  .nav-menu.open {
    right: 0;
  }
  
  /* Hamburguesa cruz */
  .mobile-nav-toggle.open .hamburger-line:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .mobile-nav-toggle.open .hamburger-line:nth-child(2) {
    opacity: 0;
  }
  .mobile-nav-toggle.open .hamburger-line:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Grid layouts */
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-description { margin-inline: auto; }
  .hero-btns { justify-content: center; }
  
  .services-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
  .about-images-stack { height: 320px; max-width: 450px; margin: 0 auto 30px auto; }
  .about-img-large { height: 260px; }
  .about-img-small { height: 160px; }
  
  .portfolio-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-form { grid-template-columns: 1fr; }
  .form-group-full { grid-column: span 1; }
  
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 38px; }
  .hero-btns { flex-direction: column; }
  .stats-grid { grid-template-columns: 1fr; }
  .section-title { font-size: 30px; }
  .service-card { padding: 24px; }
}

/* ==========================================================================
   BOTÓN FLOTANTE DE WHATSAPP (CONVERSIÓN PREMIUM)
   ========================================================================== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: hsl(142, 70%, 45%);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 14px;
  transition: all var(--transition-normal);
  animation: pulseWhatsapp 2s infinite;
}

.whatsapp-float:hover {
  background-color: hsl(142, 70%, 50%);
  transform: translateY(-4px) scale(1.03);
  box-shadow: 0 8px 25px rgba(34, 197, 94, 0.5);
  color: white;
}

.whatsapp-icon-wrapper {
  width: 24px;
  height: 24px;
  fill: currentColor;
  display: flex;
  align-items: center;
  justify-content: center;
}

.whatsapp-icon-wrapper svg {
  width: 100%;
  height: 100%;
}

@keyframes pulseWhatsapp {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    box-shadow: 0 0 0 12px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 16px;
    right: 16px;
    padding: 12px;
  }
  .whatsapp-text {
    display: none;
  }
}

/* ==========================================================================
   MODAL DE GALERÍA DE IMÁGENES (SERPENTINA DE TRABAJOS LOCATIVOS)
   ========================================================================== */
.gallery-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.gallery-modal.open {
  opacity: 1;
  pointer-events: auto;
}

.gallery-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10, 15, 30, 0.9);
  backdrop-filter: blur(8px);
}

.gallery-modal-content {
  position: relative;
  width: 90%;
  max-width: 900px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px 24px 24px 24px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  transform: scale(0.95);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 10001;
}

.gallery-modal.open .gallery-modal-content {
  transform: scale(1);
}

.gallery-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  cursor: pointer;
  transition: all var(--transition-normal);
}

.gallery-close-btn:hover {
  background: var(--color-emerald);
  color: white;
  transform: rotate(90deg);
}

.gallery-close-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.gallery-slider-wrapper {
  position: relative;
  width: 100%;
  height: 450px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #060a12;
}

@media (max-width: 768px) {
  .gallery-slider-wrapper {
    height: 280px;
  }
  .gallery-modal-content {
    padding: 36px 12px 16px 12px;
  }
}

.gallery-slides-container {
  width: 100%;
  height: 100%;
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-slide {
  min-width: 100%;
  height: 100%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.gallery-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  user-select: none;
}

.gallery-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(10, 15, 30, 0.7);
  border: 1px solid var(--border-color);
  color: white;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  z-index: 10;
}

.gallery-nav-btn:hover {
  background: var(--color-emerald);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.gallery-nav-btn.prev-btn {
  left: 16px;
}

.gallery-nav-btn.next-btn {
  right: 16px;
}

.gallery-nav-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

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

.gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--border-color);
  cursor: pointer;
  transition: all var(--transition-normal);
}

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

.gallery-caption {
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  text-align: center;
}


