/**
 * =====================================================
 * STYLES.CSS - Estilos personalizados del sitio Novell
 * =====================================================
 * 
 * Este archivo complementa TailwindCSS con:
 * - Variables CSS custom (colores y temas)
 * - Estilos base y reset
 * - Animaciones y transiciones personalizadas
 * - Efectos hover para tarjetas e imágenes
 * - Estilos para componentes específicos (FAQ, modales, etc.)
 * - Scrollbar personalizado
 */

/* ===== VARIABLES CSS (CUSTOM PROPERTIES) ===== */
/**
 * Variables de color que pueden reutilizarse en todo el proyecto.
 * Usa formato RGB sin paréntesis para permitir transparencias con rgb(var(--color) / alpha)
 */
:root {
  --color-primary: 15 23 42;        /* Slate-900: Color principal oscuro */
  --color-accent: 37 99 235;        /* Blue-600: Color de acento (Azul Metalizado) */
}

/* ===== ESTILOS BASE Y RESET ===== */
/**
 * Reset básico para eliminar márgenes, padding y aplicar box-sizing uniforme.
 * box-sizing: border-box hace que padding y border se incluyan en el width/height.
 */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/**
 * Comportamiento de scroll suave para toda la página.
 * Útil para enlaces internos (anclas) como #servicios.
 */
html {
  scroll-behavior: smooth;
}

/**
 * Estilos base del body:
 * - Fuente: Inter (cargada desde Google Fonts)
 * - Colores: Usando variables CSS definidas arriba
 */
body {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  background: rgb(var(--color-background));
  color: rgb(var(--color-foreground));
  overflow-x: hidden; /* Previene scroll horizontal no deseado en móviles */
}

/**
 * Desactiva el scroll del body cuando un modal está abierto
 */
body.modal-open {
  overflow: hidden;
  padding-right: 10px; /* Previene el salto al desaparecer la barra de scroll */
}

/* ===== NAVEGACIÓN ===== */
/**
 * Estilo para el enlace de navegación activo (página actual).
 * Aplica color de acento y peso de fuente mayor.
 */
.nav-link-active {
  color: rgb(var(--color-accent));
  font-weight: 600;
}
.nav-link {

font-size:1.2em;
}

/* ===== TEXT GRADIENT ===== */
/* Utilidad para aplicar un degradado azul brillante al texto. */
.text-gradient {
  background: linear-gradient(to right, #91a2b9, #6678b6, #1441d3); /* De cyan-200 a blue-800 para máximo contraste */
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-emphasis-color: transparent;
}


/* ===== EFECTO OVERLAY EN IMÁGENES ===== */
/**
 * Contenedor de imagen con efecto overlay oscuro al hacer hover.
 * Se usa en las tarjetas de obras y productos.
 */
.image-overlay {
  position: relative;
  overflow: hidden;
}

/**
 * Pseudo-elemento que crea un gradiente oscuro sobre la imagen.
 * Empieza invisible (opacity: 0) y se hace visible al hover.
 */
.image-overlay::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.7) 100%);
  opacity: 0;
  transition: opacity 0.3s;
}

/**
 * Al hacer hover sobre el contenedor, el overlay se hace visible.
 */
.image-overlay:hover::after {
  opacity: 1;
}

/* ===== SCROLLBAR PERSONALIZADO ===== */
/**
 * Estilos para el scrollbar en navegadores WebKit (Chrome, Safari, Edge).
 * Mantiene el diseño consistente con la paleta de colores del sitio.
 */
::-webkit-scrollbar {
  width: 10px;  /* Ancho de la barra de scroll */
}

/**
 * Track (pista) del scrollbar: Fondo claro.
 */ 
::-webkit-scrollbar-track { 
  background: #1e293b; /* slate-800 */ 
} 
 
/** 
 * Thumb (deslizador) del scrollbar: Color de acento. 
 */ 
::-webkit-scrollbar-thumb { 
  background: #3b82f6; /* blue-500 */ 
  border-radius: 5px; 
}

/**
 * Hover en el thumb: Cambia al color de acento.
 */
::-webkit-scrollbar-thumb:hover {
  background: rgb(var(--color-accent));
}

/* ===== TÍTULOS DE SECCIÓN ===== */
/**
 * Efecto decorativo para títulos de sección.
 * Agrega una línea decorativa debajo del título con gradiente.
 */
.section-title {
  position: relative;
  display: inline-block;
}

/**
 * Pseudo-elemento que crea la línea decorativa.
 * - Ancho: 80px
 * - Alto: 4px
 * - Gradiente de transparente a color de acento y de vuelta a transparente
 * - Centrado horizontalmente
 */
.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);  /* Centra horizontalmente */
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, transparent, rgb(var(--color-accent)), transparent);
}

/* ===== CARRUSEL INFINITO (MARQUEE) ===== */
/**
 * Animación para desplazar los logos horizontalmente.
 * Mueve el contenedor desde 0 hasta -50% de su ancho.
 * Como duplicamos los elementos, al llegar al -50% (mitad exacta),
 * salta instantáneamente a 0, creando un bucle perfecto.
 */
@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.animate-scroll {
  display: flex;
  width: max-content; /* El ancho se ajusta al contenido total */
  animation: scroll 40s linear infinite; /* 40s para una velocidad suave */
}

.animate-scroll:hover {
  animation-play-state: paused; /* Se detiene al pasar el mouse */
}

/* Animación flotante continua (ideal para imágenes hero o componentes aislados) */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}
.floating {
  animation: float 6s ease-in-out infinite;
}

/* ===== SEGMENTED CONTROL (FILTROS PREMIUM APPLE STYLE) ===== */
.segmented-control {
  position: relative;
  display: inline-flex;
  background-color: #1e293b; /* bg-slate-800 */
  border-radius: 9999px;
  padding: 0.375rem; /* p-1.5 */
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none;  /* IE and Edge */
}
.segmented-control::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

.sliding-pill { /* bg-blue-600 */
  position: absolute;
  top: 0.375rem;
  bottom: 0.375rem;
  left: 0;
  background-color: #0f172a; /* bg-slate-900 */
  border-radius: 9999px;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bounce effect */
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

/* ===== OFF-CANVAS MODAL (CATÁLOGO PREMIUM) ===== */

/* Backdrop (Fondo oscuro) */
.modal-backdrop {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* Panel Lateral */
.offcanvas-panel {
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.offcanvas-panel.is-open {
  transform: translateX(0);
}

/* ===== CALCULADORA DE FRIGORÍAS PREMIUM ===== */

/* Ocultar flechas de inputs numéricos nativos */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Estilo Premium para Range Sliders */
input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  background: transparent;
  height: 6px;
  border-radius: 999px;
  outline: none;
  position: relative;
  z-index: 10;
}

input[type=range]::-webkit-slider-runnable-track {
  width: 100%;
  height: 8px;
  background: #334155; /* slate-700 */
  border-radius: 999px;
  border: none;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  height: 24px;
  width: 24px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #2563eb; /* blue-600 para coincidir con la marca */
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  margin-top: -8px;
  cursor: grab;
  transition: transform 0.1s ease, box-shadow 0.2s ease;
}

input[type=range]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
  box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.25);
}

input[type=range]::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(0.95);
}

/* Relleno Azul Dinámico del Slider */
.slider-progress {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 0;
  height: 8px;
  background: #2563eb; /* blue-600 */
  border-radius: 999px;
  pointer-events: none;
  z-index: 5;
}

/* ===== CALCULADORA GAUGE (MEDIDOR GRÁFICO) ===== */
.gauge-track {
  fill: none;
  stroke: #1e293b; /* slate-800 */
  stroke-width: 12;
}
.gauge-progress {
  fill: none;
  stroke: url(#gauge-gradient);
  stroke-width: 12;
  stroke-linecap: round;
  transform-origin: 50% 50%;
  transform: rotate(-90deg);
  transition: stroke-dashoffset 0.7s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ===== GALERÍA DE PRODUCTO (Ocultar scrollbar) ===== */
.hide-scrollbar {
  -ms-overflow-style: none;  /* IE y Edge */
  scrollbar-width: none;  /* Firefox */
}

.hide-scrollbar::-webkit-scrollbar {
  display: none; /* Chrome, Safari y Opera */
}
