/* ==========================================================================
   RESET & VARIABLES - REGLA CROMÁTICA 60-30-10
   ========================================================================== */
:root {
  /* 60% FONDO DOMINANTE */

  --bg-primary: #F8F9FA;
  --bg-secondary: #FFFFFF;
  --bg-dark: #0F172A;
  
  /* 30% ESTRUCTURA Y TARJETAS DE SERVICIO */
  --color-card: #1E293B;
  --color-card-light: #334155;
  --text-main: #334155;
  --text-dark: #0F172A;
  --text-muted: #64748B;
  
  /* 10% ACENTO Y HIGHLIGHT (BOTONES Y ELEMENTOS CLAVE) */
  --accent: #06B6D4;
  --accent-hover: #0284C7;
  --accent-light: #E0F2FE;

  /* BORDES Y SOMBRAS */
  --border-color: #E2E8F0;
  --radius: 12px;
  --shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  color: #0f172a;
}

.copyright-text {
  color: #FFFFFF; /* Reemplaza este código por el color que prefieras (ej. gris suave, blanco, etc.) */
}

html {
  scroll-behavior: smooth;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.6;
}

/* ==========================================================================
   LAYOUT & UTILITIES
   ========================================================================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.section-padding {
  padding: 30px 0;
}

/* Opción 1: Tu degradado original (Claro en el centro, sombras suaves arriba y abajo) */
.bg-degrade-principal {
  background: linear-gradient(to bottom, #bfbfbf73 0%, #f7f4f4 50%, #bfbfbfc2 100%);
}

/* Opción 2: Un degradado más luminoso (Blanco arriba, gris perla al centro, blanco abajo) */
.bg-degrade-intalaciones {
  background: linear-gradient(to bottom, #bfbfbfc2 0%, #bfbfbfd7 50%, #f8f9fa 100%);
}

/* Opción 3: Un degradado elegante y profundo (Gris suave arriba, blanco al medio, gris sutil abajo) */
.bg-degrade-process {
  background: linear-gradient(to bottom, #f8f9fa  0%, #bfbfbfd7 50%, #ebebebcc 100%);
}

/* Opción 4: Un degradado cálido/neutro (Tonos arena/gris muy sutiles de 3 pasos) */
.bg-degrade-certificates {
  background: linear-gradient(to bottom, #ebebebcc 0%, #bfbfbfc2 50%, #e9ecef 100%);
}

/* Opción 4:*/
.bg-degrade-faq {
  background: linear-gradient(to bottom, #e9ecef 0%, #bfbfbf73 50%, #e9ecef 100%);  
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px auto;
}

.section-header h2 {
  font-size: 2.2rem;
  color: var(--text-dark);
  margin-bottom: 12px;
}

.section-header p {
  color: #000000;
  font-size: 1.05rem;
}

.collage-container {
  /* Rompe los márgenes del contenedor padre para abarcar todo el ancho de la pantalla */
  width: 100vw !important;
  position: relative;
  left: 101%;
  right: 50%;
  margin-left: -50vw !important;
  margin-right: -50vw !important;
  
  overflow: hidden;
  background: #080808;
  padding: 0px 0;
  box-sizing: border-radius;
}

.collage-track {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  width: max-content !important;
  animation: scroll 25s linear infinite;
}

.collage-item {
  width: 700px !important; /* Ajusta el ancho individual de cada tarjeta aquí */
  height: 450px !important;
  padding: 0 10px;
  flex-shrink: 0 !important;
}

.collage-item img {
  width: 102%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  background: #1a1a1a;
}

@keyframes scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ==========================================================================
   BOTONES
   ========================================================================== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-size: 0.95rem;
  text-align: center;
}

.btn-primary {
  background-color: var(--color-card);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--color-card-light);
}

/* Hero Visual Showcase */
.hero-visual {
  position: relative;
}

.visual-card-wrapper {
  position: relative;
  background: #FFFFFF;
  padding: 1rem;
}

.hero-img-main {
  width: 100%;
  height: 400px;
  object-fit: flex;
  border-radius: var(--radius-md);
}

.btn-accent {
  background-color: #0d0089;
  color: #FFFFFF;
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.35);
}

/* ==========================================================================
   HEADER & NAVBAR
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  z-index: 1000;
  border-bottom: 1px solid var(--border-color);
  padding: 15px 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-image-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background-color: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #FFFFFF;
  border: 1px solid rgb(13 0 137);
  border-radius: 8px;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--text-dark);
  line-height: 1.2;
}

.brand-subtitle {
  font-size: 0.75rem;
  color: #0d0089;
  font-weight: 600;
}

.brand-text.white .brand-title {
  color: #FFFFFF;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  text-decoration: none;
  color: #000000;
  font-weight: 500;
  transition: var(--transition);
}

.nav-link:hover {
  color: var(--accent-hover);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--text-dark);
  border-radius: 2px;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  padding: 20px 0;
  background: linear-gradient(to bottom, #ffffff 0%, #bfbfbf26 50%, #bfbfbf73 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.badge {
  display: inline-block;
  padding: 6px 12px;
  background-color: #0d0089;
  color: #FFFFFF;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 20px;
  margin-bottom: 16px;
}

.hero-content h1 {
  font-size: 2.8rem;
  color: var(--text-dark);
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.1rem;
  color: #000000;
  margin-bottom: 30px;
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  gap: 30px;
  border-top: 1px solid var(--border-color);
  padding-top: 20px;
}

.stat-item strong {
  display: block;
  font-size: 1.4rem;
  color: var(--text-dark);
}

.stat-item span {
  font-size: 0.85rem;
  color: #000000;
}

.hero-card {
  background: linear-gradient(135deg, #FFFFFF 0%, var(--accent-light) 100%);
  padding: 3px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #0f172a;
}

.hero-card h3 {
  margin-bottom: 20px;
  color: var(--text-dark);
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: #000000;
}

.form-group input:focus,
.form-group select:focus {
  border-color: var(--accent);
}

/* ==========================================================================
   SERVICIOS
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* 1. Tarjeta modificada para recortar la imagen */
.service-card {
    background: linear-gradient(135deg, #FFFFFF 0%, var(--accent-light) 100%);
    padding: 0 0 30px 0; /* Quitamos el padding superior (arriba: 0) */
    border-radius: var(--radius);
    border: 1px solid #0f172a;
    transition: var(--transition);
    overflow: hidden; /* <-- VITAL: Corta la imagen dentro del border-radius */
}

/* 2. Contenedor de la imagen superior */
.card-image-wrapper {
    width: 100%;
    height: 180px; /* Ajusta la altura que prefieras para la foto */
    background-color: #e2e8f0; /* Fondo gris mientras carga la imagen */
    overflow: hidden;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Evita que la foto se deforme */
    object-position: center;
    display: block;
}

/* 3. Padding interno para el contenido de la tarjeta */
.service-card .card-icon,
.service-card h3,
.service-card p,
.service-card .card-list {
    padding-left: 30px;
    padding-right: 30px;
}

.service-card .card-icon {
    margin-top: 20px; /* Separación entre la foto y el ícono */
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.card-icon {
  font-size: 2.2rem;
  margin-bottom: 16px;
}

.service-card h3 {
  color: var(--text-dark);
  margin-bottom: 12px;
}

.service-card p {
  color: #000000;
  font-size: 0.95rem;
  margin-bottom: 16px;
}

.card-list {
  list-style: none;
}

.card-list li {
  font-size: 0.88rem;
  position: relative;
  padding-left: 18px;
  margin-bottom: 8px;
  color: #000000;
}

.card-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #0d0089;
  font-weight: bold;
}

.horizontal-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

/* ==========================================================================
   SHOWCASE / GALERÍA
   ========================================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.image-placeholder {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  background-color: #b6cbed;
  overflow: hidden;
}

.placeholder-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-item:hover .placeholder-img {
  transform: scale(1.05);
}

.image-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(transparent, rgb(13 0 137));
  color: #FFFFFF;
  font-size: 0.9rem;
  font-weight: 600;
}

/* ==========================================================================
   PROCESO
   ========================================================================== */
.process {
  background-color: var(--bg-secondary);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.step-card {
  padding: 30px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #FFFFFF 0%, var(--accent-light) 100%);
  border: 1px solid #0f172a;
}

.step-number {
  font-size: 2rem;
  font-weight: 800;
  color: #0d0089;
  margin-bottom: 12px;
}

.step-card h3 {
  color: var(--text-dark);
  margin-bottom: 10px;
}

.step-card p {
  color: #000000;
  font-size: 0.95rem;
}

/* ==========================================================================
   CERTIFICADOS
   ========================================================================== */
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.cert-card {
    background: linear-gradient(135deg, #FFFFFF 0%, var(--accent-light) 100%);
    padding: 0 0 30px 0;
    border-radius: var(--radius);
    border: 1px solid #0f172a;
    transition: var(--transition);
    overflow: hidden;
}

.cert-card:hover {
  box-shadow: var(--shadow);
}

.cert-image-wrapper {
  width: 100%;
  height: 200px;
  background-color: var(--bg-primary);
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px dashed var(--border-color);
}

.cert-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.cert-card h4 {
  color: var(--text-dark);
  margin-bottom: 8px;
  padding-left: 30px;
}

.cert-card p {
  font-size: 0.88rem;
  color: #000000;
  padding-left: 30px;
}

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 12px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  padding: 18px 20px;
  text-align: left;
  background: linear-gradient(135deg, #FFFFFF 0%, var(--accent-light) 100%);
  border: 1px solid #0f172a;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding: 0 20px;
  background-color: var(--bg-primary);
}

.faq-answer p {
  padding: 16px 0;
  color: #000000;
  font-size: 0.95rem;
}

.faq-item.active .faq-answer {
  max-height: 200px;
  background: linear-gradient(135deg, #FFFFFF 0%, var(--accent-light) 100%);
}

.faq-item.active .faq-question span {
  transform: rotate(45deg);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer {
  background-color: var(--bg-dark);
  color: #94A3B8;
  padding-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1.5fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid #1E293B;
}

.footer-socials {
  display: flex;
  gap: 0.75rem;
  padding: 15px 0;
}

.social-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #06b6d4;
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f8fbf9;
  transition: all var(--transition-fast);
}

.social-icon:hover {
  background: #06b6d4;
  border-color: var(--color-terracotta);
  color: #0f172a;
  transform: translateY(-2px);
}

.brand-col p {
  margin-top: 16px;
  font-size: 0.9rem;
}

.footer-col h4 {
  color: #06b6d4;
  margin-bottom: 16px;
}

.footer-col ul {
  list-style: none;
}

.footer-col ul li {
  margin-bottom: 8px;
}

.footer-col ul a {
  color: #FFFFFF;
  text-decoration: none;
  transition: var(--transition);
}

.footer-col ul a:hover {
  color: var(--accent);
}

.footer-col p {
  font-size: 0.9rem;
  margin-bottom: 8px;
  color: #FFFFFF;
}

.footer-bottom {
  padding: 20px 0;
  font-size: 0.85rem;
}

.footer-bottom-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.legal-links a {
  color: #FFFFFF;
  text-decoration: none;
  margin-left: 16px;
}

.legal-links a:hover {
  color: #FFFFFF;
}

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */
@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: var(--bg-secondary);
    flex-direction: column;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: none;
  }

  .nav-menu.active {
    display: flex;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 12px;
  }

  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }

  .legal-links a {
    margin: 0 8px;
  }
}

/* Indicador visual de que la tarjeta es interactiva */
.cert-card {
    cursor: pointer;
}

/* Estilos del modal/ventana emergente */
.cert-modal {
    display: none; 
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}

/* Imagen dentro del modal (completa y sin recortes) */
.cert-modal-content {
max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    cursor: zoom-in; /* Lupa con ícono de suma */
    transition: transform 0.25s ease, max-width 0.25s ease;
}

/* Estado cuando la imagen tiene zoom aplicado */
.cert-modal-content.zoomed {
    max-width: none;
    max-height: none;
    transform: scale(1.6); /* Nivel de acercamiento (ajustable) */
    cursor: zoom-out; /* Lupa con ícono de resta */
}

/* Evita que el clic en la imagen cierre el modal negro */
.cert-modal-content-wrapper {
    overflow: auto; /* Permite desplazarse si la imagen supera la pantalla con zoom */
    max-width: 95vw;
    max-height: 95vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Botón de cierre (X) */
.cert-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #ffffff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}