/* =========================================
   OVISOFT - NEO-TECH DESIGN SYSTEM
   =========================================
   Modern, professional, and tech-focused design.
*/

/* 
   VARIABLES GLOBALES (:root)
   -----------------------------------------
*/
:root {
  /* Paleta de Colores - Neo-Tech */
  --color-primary: #2563eb;
  /* Electric Blue: Vibrante y moderno */
  --color-primary-dark: #1d4ed8;
  /* Darker shade for hover */
  --color-secondary: #0f172a;
  /* Deep Navy: Elegante y serio */
  --color-accent: #06b6d4;
  /* Cyan: Toques tecnológicos */

  --color-bg: #f8fafc;
  /* Slate 50: Fondo principal limpio */
  --color-bg-alt: #ffffff;
  /* Blanco puro para tarjetas/secciones */
  --color-surface: #ffffff;
  /* Superficies de tarjetas */

  --color-text: #334155;
  /* Slate 700: Texto principal legible */
  --color-text-heading: #0f172a;
  /* Slate 900: Títulos oscuros */
  --color-text-light: #f1f5f9;
  /* Slate 100: Texto sobre fondos oscuros */
  --color-text-muted: #64748b;
  /* Slate 500: Texto secundario */

  /* Tipografía */
  --font-heading: "Outfit", sans-serif;
  /* Geométrica y moderna */
  --font-body: "Outfit", sans-serif;
  /* Consistencia visual */

  /* Espaciado y Bordes */
  --section-padding: 120px;
  --border-radius: 16px;
  /* Bordes más redondeados */
  --border-radius-sm: 8px;

  /* Glassmorphism & Sombras */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: 1px solid rgba(255, 255, 255, 0.5);
  --glass-blur: blur(12px);

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
    0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
    0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-color: 0 20px 25px -5px rgba(37, 99, 235, 0.15),
    0 10px 10px -5px rgba(37, 99, 235, 0.1);

  /* Transiciones */
  --transition-base: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   RESET Y ESTILOS BASE
   =========================================
*/
body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-text-heading);
  letter-spacing: -0.02em;
  /* Tight tracking for modern look */
}

h1 {
  font-weight: 800;
}

h2 {
  font-weight: 700;
}

a {
  text-decoration: none;
  color: var(--color-primary);
  transition: var(--transition-base);
}

a:hover {
  color: var(--color-primary-dark);
}

/* Clases de utilidad */
.section-padding {
  padding: var(--section-padding) 0;
}

.bg-alt {
  background-color: var(--color-bg-alt);
}

.text-gradient {
  background: linear-gradient(135deg,
      var(--color-primary) 0%,
      var(--color-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* =========================================
   COMPONENTES UI
   =========================================
*/

/* Botones */
.btn {
  padding: 12px 28px;
  border-radius: 50px;
  /* Pill shape */
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: var(--transition-base);
  border: none;
}

.btn-primary-custom {
  background: linear-gradient(135deg,
      var(--color-primary) 0%,
      var(--color-primary-dark) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
  color: white;
}

.btn-outline-custom {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
}

.btn-outline-custom:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
  color: white;
  transform: translateY(-2px);
}

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

.btn-outline-primary:hover {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* Tarjetas (Glassmorphism & Modern) */
.card-custom {
  background: var(--color-surface);
  border: 1px solid rgba(226, 232, 240, 0.8);
  border-radius: var(--border-radius);
  padding: 32px;
  transition: var(--transition-base);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.card-custom:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-color);
  border-color: rgba(37, 99, 235, 0.3);
}

/* Glass Panel Utility */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
}

/* Inputs */
.form-control-custom {
  background-color: var(--color-bg-alt);
  border: 1px solid #e2e8f0;
  padding: 16px 20px;
  border-radius: var(--border-radius-sm);
  color: var(--color-text);
  font-size: 1rem;
  transition: var(--transition-base);
}

.form-control-custom:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
  outline: none;
}

/* =========================================
   NAVBAR
   =========================================
*/
.navbar-custom {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: var(--transition-base);
}

.navbar-brand {
  font-weight: 800;
  color: var(--color-secondary) !important;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.nav-link {
  color: var(--color-text) !important;
  font-weight: 500;
  margin: 0 12px;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

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

/* =========================================
   HERO SECTION
   =========================================
*/
.hero-section {
  position: relative;
  height: 100vh;
  min-height: 700px;
  display: flex;
  align-items: center;
  color: white;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Modern Gradient Overlay */
  background: linear-gradient(135deg,
      rgba(15, 23, 42, 0.95) 0%,
      rgba(30, 58, 138, 0.8) 100%);
  z-index: -1;
}

.hero-content h1 {
  font-size: 4rem;
  color: white;
  margin-bottom: 24px;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.hero-content p {
  font-size: 1.25rem;
  margin-bottom: 48px;
  opacity: 0.9;
  max-width: 600px;
  font-weight: 300;
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2.8rem;
  }
}

/* =========================================
   SECCIONES ESPECÍFICAS
   =========================================
*/

/* Icon Boxes */
.icon-box {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg,
      rgba(37, 99, 235, 0.1) 0%,
      rgba(6, 182, 212, 0.1) 100%);
  color: var(--color-primary);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin-bottom: 24px;
  transition: var(--transition-base);
}

.card-custom:hover .icon-box,
.card-iker:hover .icon-box {
  background: linear-gradient(135deg,
      var(--color-primary) 0%,
      var(--color-accent) 100%);
  color: white;
  transform: scale(1.1) rotate(5deg);
}

/* Footer */
.footer {
  background-color: var(--color-secondary);
  color: var(--color-text-light);
  padding: 100px 0 40px;
}

.footer h5 {
  color: white;
  font-weight: 700;
  margin-bottom: 24px;
}

.footer a {
  color: #94a3b8;
  transition: color 0.2s;
}

.footer a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 60px;
  padding-top: 30px;
  color: #64748b;
}

/* =========================================
   EFECTO AARON IKER (UPDATED FOR NEO-TECH)
   =========================================
*/
:root {
  --iker-card-bg: #ffffff;
  --iker-card-border: #e2e8f0;
  --iker-card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --iker-card-shadow-hover: 0 20px 25px -5px rgba(37, 99, 235, 0.15);

  --iker-icon-bg: rgba(37, 99, 235, 0.08);
  --iker-icon-color: var(--color-primary);
  --iker-icon-hover-bg: var(--color-primary);
  --iker-icon-hover-color: #ffffff;

  --iker-shine-opacity: 0.4;
  --iker-shine-gradient: conic-gradient(from 205deg at 50% 50%,
      rgba(37, 99, 235, 0) 0deg,
      rgba(37, 99, 235, 0.1) 25deg,
      rgba(6, 182, 212, 0.1) 295deg,
      rgba(37, 99, 235, 0) 360deg);

  --iker-tile-color: rgba(37, 99, 235, 0.05);
  --iker-line-color: rgba(15, 23, 42, 0.03);
}

.card-iker {
  background-color: var(--iker-card-bg);
  padding: 32px;
  border-radius: var(--border-radius);
  border: 1px solid var(--iker-card-border);
  box-shadow: var(--iker-card-shadow);
  position: relative;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  z-index: 1;
}

.card-iker:hover {
  border-color: rgba(37, 99, 235, 0.4);
  box-shadow: var(--iker-card-shadow-hover);
  transform: translateY(-8px);
}

/* Reutilizar estilos internos del efecto Iker (shine, tiles, lines) del archivo original, 
   ya que las variables se encargan de la actualización visual. */
.card-iker .icon-box {
  width: 64px;
  height: 64px;
  background-color: var(--iker-icon-bg);
  color: var(--iker-icon-color);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  margin: 0 auto 24px auto;
  transition: var(--transition-base);
  position: relative;
  z-index: 2;
}

.card-iker:hover .icon-box {
  background: linear-gradient(135deg,
      var(--color-primary) 0%,
      var(--color-accent) 100%);
  color: var(--iker-icon-hover-color);
  transform: scale(1.1) rotate(5deg);
}

.card-iker h4,
.card-iker p {
  position: relative;
  z-index: 2;
}

.card-iker .shine {
  position: absolute;
  inset: 0;
  background: var(--iker-shine-gradient);
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
  z-index: 1;
  pointer-events: none;
}

.card-iker:hover .shine {
  opacity: var(--iker-shine-opacity);
}

.card-iker .background {
  position: absolute;
  inset: 0;
  overflow: hidden;
  mask-image: radial-gradient(circle at 60% 5%,
      black 0%,
      black 15%,
      transparent 60%);
  -webkit-mask-image: radial-gradient(circle at 60% 5%,
      black 0%,
      black 15%,
      transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.card-iker .background .tiles {
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card-iker:hover .background .tiles {
  opacity: 1;
}

.card-iker .background .tiles .tile {
  position: absolute;
  background-color: var(--iker-tile-color);
  animation-duration: 8s;
  animation-iteration-count: infinite;
  opacity: 0;
}

.card-iker:hover .background .tiles .tile {
  animation-name: tile;
}

/* Tile Positions (Mismos que original) */
.card-iker .tile-1 {
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
}

.card-iker .tile-2 {
  top: 0;
  left: 0;
  width: 1px;
  height: 100%;
}

.card-iker .tile-3 {
  top: 0;
  left: 50%;
  width: 1px;
  height: 100%;
}

.card-iker .tile-4 {
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
}

.card-iker .tile-5 {
  top: 0;
  left: 25%;
  width: 1px;
  height: 100%;
  animation-delay: 2s;
}

.card-iker .tile-6 {
  top: 0;
  left: 75%;
  width: 1px;
  height: 100%;
  animation-delay: 2s;
}

.card-iker .tile-7 {
  top: 25%;
  left: 0;
  width: 100%;
  height: 1px;
  animation-delay: 2s;
}

.card-iker .tile-8 {
  top: 75%;
  left: 0;
  width: 100%;
  height: 1px;
  animation-delay: 2s;
}

.card-iker .tile-9 {
  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
  background-color: transparent;
  border: 1px solid var(--iker-tile-color);
  animation-delay: 4s;
}

.card-iker .tile-10 {
  top: 20%;
  left: 20%;
  width: 60%;
  height: 60%;
  background-color: transparent;
  border: 1px solid var(--iker-tile-color);
  border-radius: 8px;
  animation-delay: 6s;
}

.card-iker .background .line {
  position: absolute;
  inset: 0;
  opacity: 0.4;
  background-color: var(--iker-line-color);
}

.card-iker .line-1 {
  top: 0;
  left: 33%;
  width: 1px;
  height: 100%;
}

.card-iker .line-2 {
  top: 0;
  left: 66%;
  width: 1px;
  height: 100%;
}

.card-iker .line-3 {
  top: 33%;
  left: 0;
  width: 100%;
  height: 1px;
}

.card-iker .line-4 {
  top: 66%;
  left: 0;
  width: 100%;
  height: 1px;
}

@keyframes tile {

  0%,
  12.5%,
  100% {
    opacity: 1;
  }

  25%,
  87.5% {
    opacity: 0;
  }
}

/* =========================================
   IMÁGENES Y MEDIOS
   ========================================= */
.img-product-card {
  /* aspect-ratio reserva el espacio antes de cargar la imagen,
     eliminando el layout shift (CLS) cuando las imágenes
     tienen tamaños originales distintos. */
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  object-position: top;
  /* para screenshots de UI muestra la parte superior */
  border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.img-feature {
  height: 450px;
  width: 100%;
  object-fit: cover;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

/* Gallery Carousel Styles */
.img-gallery-main {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.img-gallery-thumb {
  width: 100%;
  height: 80px;
  object-fit: cover;
  cursor: pointer;
  transition: opacity var(--transition-base), transform var(--transition-base);
}

.img-gallery-thumb:hover {
  opacity: 1 !important;
  transform: scale(1.05);
}

/* Flechas del carousel pegadas a las orillas */
#productGallery .carousel-control-prev,
#productGallery .carousel-control-next {
  width: 40px;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  border-radius: 50%;
  height: 40px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.8;
  transition: opacity var(--transition-base), background var(--transition-base);
}

#productGallery .carousel-control-prev {
  left: 1px;
}

#productGallery .carousel-control-next {
  right: 1px;
}

#productGallery .carousel-control-prev:hover,
#productGallery .carousel-control-next:hover {
  opacity: 1;
  background: rgba(37, 99, 235, 0.8);
}

#productGallery .carousel-control-prev-icon,
#productGallery .carousel-control-next-icon {
  width: 16px;
  height: 16px;
}

/* Responsive Gallery */
@media (max-width: 992px) {
  .img-gallery-main {
    height: 400px;
  }
}

@media (max-width: 768px) {
  .img-gallery-main {
    height: 300px;
  }

  .img-gallery-thumb {
    height: 60px;
  }
}

@media (max-width: 576px) {
  .img-gallery-main {
    height: 250px;
  }

  .img-gallery-thumb {
    height: 50px;
  }
}

/* =========================================
   CLIENTES MARQUEE (UPDATED)
   ========================================= */
.marquee-container {
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  mask-image: linear-gradient(to right,
      transparent,
      black 10%,
      black 90%,
      transparent);
  -webkit-mask-image: linear-gradient(to right,
      transparent,
      black 10%,
      black 90%,
      transparent);
}

.marquee-content {
  display: inline-flex;
  padding: 10px 0;
  /* Espacio para que el hover y la sombra no se corten */
  animation: marquee 40s linear infinite;
  /* Slower for elegance */
}

.client-item {
  flex: 0 0 auto;
  width: 220px;
  margin: 0 24px;
  text-align: center;
  opacity: 0.6;
  transition: var(--transition-base);
  padding: 30px;
  border-radius: var(--border-radius);
  background-color: white;
  border: 1px solid #f1f5f9;
  box-shadow: var(--shadow-sm);
}

.client-item:hover {
  opacity: 1;
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}

.client-logo {
  height: 60px;
  width: 100%;
  object-fit: contain;
  margin-bottom: 15px;
  filter: grayscale(100%);
  transition: var(--transition-base);
}

.client-item:hover .client-logo {
  filter: grayscale(0%);
}

@keyframes marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* =========================================
   SECCIÓN CONTACTO (UPDATED)
   ========================================= */
.bg-custom-blue {
  background: linear-gradient(135deg,
      var(--color-primary) 0%,
      var(--color-secondary) 100%);
}

.bg-custom-product {
  background: linear-gradient(135deg,
      var(--color-secondary) 0%,
      var(--color-primary-dark) 100%);
}

.bg-custom-product h1,
.bg-custom-product h2,
.bg-custom-product p {
  color: white !important;
}
/* ===================================================
   BLOG POST CONTENT (Quill editor output)
   Fix: Quill sets inline `width` attributes on images
   that override max-width. Use width:100% !important
   to force override + overflow:hidden on the container
   as a hard clip fallback.
=================================================== */

/* Contenedor: clip duro para cualquier elemento desbordado */
.blog-content {
    overflow: hidden;
    word-break: break-word;
}

/* Imágenes — width:100% overrides inline width attribute;
   max-width:100% overrides inline style="width:..." */
.blog-content img,
.blog-content video,
.blog-content iframe,
.blog-content embed {
    width: 100% !important;        /* anula atributo HTML width="..." */
    max-width: 100% !important;    /* anula style="width:..." de Quill */
    height: auto !important;
    display: block;
    border-radius: 0.375rem;
    margin-block: 1rem;
    box-sizing: border-box;
}

/* Quill también envuelve imágenes en <div class="ql-align-..."> */
.blog-content .ql-align-center,
.blog-content .ql-align-right,
.blog-content .ql-align-left {
    overflow: hidden;
    max-width: 100%;
}

.blog-content p {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.blog-content h1, .blog-content h2, .blog-content h3,
.blog-content h4, .blog-content h5, .blog-content h6 {
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.blog-content blockquote {
    border-left: 4px solid var(--color-primary, #0d6efd);
    padding: 0.75rem 1.25rem;
    background-color: var(--color-surface, #f8f9fa);
    border-radius: 0 0.375rem 0.375rem 0;
    margin: 1.5rem 0;
    font-style: italic;
}

.blog-content pre, .blog-content code {
    background: #1e1e2e;
    color: #cdd6f4;
    border-radius: 0.375rem;
    padding: 0.2em 0.4em;
    font-size: 0.9em;
}

.blog-content pre {
    padding: 1rem 1.25rem;
    overflow-x: auto;
    white-space: pre-wrap;
}

.blog-content ul, .blog-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}
