/* === DUNIPROD - Custom Stylesheet === */

/* 1. Variables CSS */
:root {
  /* Colores Primarios */
  --verde-primario: #2ECC71;
  --verde-hover: #27AE60;
  --verde-oscuro: #1E8449;
  /* Colores Secundarios */
  --amarillo-acento: #F1C40F;
  --amarillo-hover: #F39C12;
  /* Colores de Acento */
  --naranja-acento: #E67E22;
  --naranja-hover: #D68910;
  /* Colores de Soporte */
  --verde-whatsapp: #25D366;
  --blanco: #FFFFFF;
  --gris-texto: #2C3E50;
  --gris-claro: #566573;
  --gris-texto-footer: #adb5bd;
  --fondo-seccion: #F8F9FA;
  --footer-bg: #2C3E50;
  
  /* Tipografía */
  --font-primaria: 'Poppins', sans-serif;
}

/* 2. Reset y Base */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Offset para fixed navbar */
}

body {
  font-family: var(--font-primaria);
  font-weight: 400;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--gris-texto);
  background-color: var(--blanco);
  padding-top: 80px; /* Offset para fixed navbar */
}

/* 3. Tipografía Global */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primaria);
  font-weight: 700;
  color: var(--gris-texto);
}

h1.display-3 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.2;
}

h2.section-title {
  font-size: 2.75rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  position: relative;
  padding-bottom: 1rem;
}

h2.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background-color: var(--verde-primario);
}
/* Alineación izquierda para sección Quienes Somos */
#quienes-somos h2.section-title::after {
  left: 0;
  transform: translateX(0);
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

p.lead {
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--gris-claro);
}

/* 4. Componentes (Botones, Cards, Navbar) */

.btn {
  font-family: var(--font-primaria);
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 50px;
  transition: all 0.3s ease;
  letter-spacing: 0.5px;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1rem;
}

.btn-primary {
  background-color: var(--verde-primario);
  border-color: var(--verde-primario);
}
.btn-primary:hover {
  background-color: var(--verde-hover);
  border-color: var(--verde-hover);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(46, 204, 113, 0.3);
}

.btn-outline-light {
  color: var(--blanco);
  border-color: var(--blanco);
}
.btn-outline-light:hover {
  background-color: var(--blanco);
  color: var(--gris-texto);
  transform: translateY(-3px);
}

.btn-secundario {
  background-color: var(--amarillo-acento);
  border-color: var(--amarillo-acento);
  color: var(--gris-texto);
}
.btn-secundario:hover {
  background-color: var(--amarillo-hover);
  border-color: var(--amarillo-hover);
  color: var(--gris-texto);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(241, 196, 15, 0.3);
}

.btn-plataforma {
  background-color: var(--naranja-acento);
  border-color: var(--naranja-acento);
  color: var(--blanco);
}
.btn-plataforma:hover {
  background-color: var(--naranja-hover);
  border-color: var(--naranja-hover);
  color: var(--blanco);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 5px 15px rgba(230, 126, 34, 0.3);
}

/* Navbar */
#main-navbar {
  background: var(--blanco);
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  height: 80px;
  transition: all 0.3s ease;
}
#main-navbar .navbar-brand img {
  max-height: 50px;
  transition: all 0.3s ease;
}
#main-navbar .nav-link {
  font-weight: 600;
  color: var(--gris-claro);
  margin: 0 0.5rem;
  position: relative;
}
#main-navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--verde-primario);
  transition: width 0.3s ease;
}
#main-navbar .nav-link:hover,
#main-navbar .nav-link.active {
  color: var(--verde-primario);
}
#main-navbar .nav-link:hover::after,
#main-navbar .nav-link.active::after {
  width: 70%;
}

/* Navbar Scrolled */
#main-navbar.scrolled {
  height: 60px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
#main-navbar.scrolled .navbar-brand img {
  max-height: 40px;
}
#main-navbar.scrolled .nav-link {
  font-size: 0.95rem;
}

/* 5. Layout Sections */

.section-padding {
  padding: 80px 0;
}
.section-padding-sm {
  padding: 60px 0;
}

/* Hero */
#hero {
  min-height: 90vh;
  position: relative;
  background-color: var(--gris-texto); /* Fallback */
  /* Reemplazar con imagen real */
  background-image: linear-gradient(rgba(44,62,80,0.85), rgba(44,62,80,0.85)), 
                    url('http://diuniversalcheck.com/wp-content/uploads/2024/03/WhatsApp-Image-2024-03-19-at-6.19.30-PM.jpeg');
  background-size: cover;
  background-position: center center;
  background-attachment: fixed; /* Parallax */
  color: var(--blanco);
}
#hero h1 {
  color: var(--blanco);
  /* Efecto Gradiente */
  background: linear-gradient(135deg, var(--blanco) 60%, var(--amarillo-acento) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-fill-color: transparent;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}
#hero .sub-heading {
  font-weight: 400;
  opacity: 0.8;
  display: block;
  font-size: 2.5rem;
  background: none; /* Reset gradient */
  -webkit-text-fill-color: initial; /* Reset gradient */
  text-shadow: none;
  color: var(--blanco);
}
#hero .h2-subtitle {
  color: var(--blanco);
  font-weight: 400;
  font-size: 1.5rem;
  opacity: 0.9;
}
#hero .sgs-logo {
  filter: grayscale(100%) brightness(1.5);
  opacity: 0.8;
  transition: all 0.3s ease;
  width: 100px;
  height: auto;
}
#hero .sgs-logo:hover {
  filter: none;
  opacity: 1;
  transform: scale(1.05);
}

/* Quienes Somos */
#quienes-somos {
  background: var(--fondo-seccion);
}
.feature-card {
  background: var(--blanco);
  padding: 2.5rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  height: 100%;
  text-align: center;
}
.feature-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.1);
  border-bottom: 3px solid var(--verde-primario);
}
.feature-card .feature-icon {
  font-size: 3rem;
  color: var(--verde-primario);
  margin-bottom: 1.5rem;
}
.feature-card h4 {
  font-weight: 600;
  color: var(--gris-texto);
  margin-bottom: 0.5rem;
}
.feature-card p {
  color: var(--gris-claro);
  font-size: 0.9rem;
}

/* Sobre Nosotros (Tabs) */
#sobre-nosotros .nav-tabs {
  border-bottom: none;
}
#sobre-nosotros .nav-link {
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--gris-claro);
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  transition: all 0.3s ease;
}
#sobre-nosotros .nav-link.active {
  color: var(--verde-primario);
  border-bottom-color: var(--verde-primario);
  background-color: transparent;
}
#sobre-nosotros .nav-link:hover {
  color: var(--verde-hover);
}
#sobre-nosotros .tab-content {
  background: var(--fondo-seccion);
  padding: 2.5rem;
  border-radius: 15px;
  min-height: 250px;
}
#sobre-nosotros .tab-content ul li {
  margin-bottom: 0.5rem;
  color: var(--gris-claro);
}

/* Clientes */
#clientes {
  background: var(--fondo-seccion);
}
.clients-slider img {
  max-height: 70px;
  width: auto;
  filter: grayscale(100%);
  opacity: 0.6;
  transition: all 0.3s ease;
}
.clients-slider img:hover {
  filter: none;
  opacity: 1;
  transform: scale(1.1);
}
.clients-slider .swiper-pagination-bullet-active {
  background-color: var(--verde-primario);
}

/* Servicios */
.service-card {
  background: var(--blanco);
  border: 1px solid #e9ecef;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
  height: 100%;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
}
.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 40px rgba(46,204,113,0.15);
  border-color: var(--verde-primario);
}
.service-card .service-card-icon {
  font-size: 3rem;
  color: var(--naranja-acento);
  margin-bottom: 1.5rem;
  transition: color 0.3s ease;
}
.service-card:hover .service-card-icon {
  color: var(--verde-primario);
}
.service-card h3 {
  margin-bottom: 1rem;
}
.service-card p {
  color: var(--gris-claro);
  margin-bottom: 1.5rem;
}
.service-card .cta-link {
  font-weight: 600;
  color: var(--verde-primario);
  text-decoration: none;
  transition: all 0.3s ease;
}
.service-card .cta-link i {
  margin-left: 5px;
  transition: transform 0.3s ease;
}
.service-card:hover .cta-link {
  color: var(--verde-hover);
}
.service-card:hover .cta-link i {
  transform: translateX(5px);
}

/* Footer */
.footer {
  background-color: var(--footer-bg);
  color: var(--gris-texto-footer);
  padding: 80px 0 0 0;
}
.footer-heading {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--blanco);
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-contact-list li {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.footer-contact-list i {
  color: var(--verde-primario);
  margin-right: 1rem;
  margin-top: 5px;
  width: 20px;
  text-align: center;
}
.footer-links li {
  margin-bottom: 0.75rem;
}
.footer-links a {
  color: var(--gris-texto-footer);
  text-decoration: none;
  transition: all 0.3s ease;
}
.footer-links a:hover {
  color: var(--verde-primario);
  padding-left: 5px;
}
.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--gris-claro);
  color: var(--gris-claro);
  margin-right: 0.5rem;
  text-decoration: none;
  transition: all 0.3s ease;
}
.social-icons a:hover {
  background-color: var(--verde-primario);
  border-color: var(--verde-primario);
  color: var(--blanco);
  transform: scale(1.1);
}
.footer-bottom {
  background-color: rgba(0,0,0,0.2);
  padding: 1.5rem 0;
  margin-top: 60px;
}
.footer-bottom p {
  margin: 0;
  font-size: 0.9rem;
}

/* 6. Utilidades */

.text-primario {
  color: var(--verde-primario);
}

/* 7. Animaciones (WhatsApp) */

.whatsapp-flotante {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 30px;
  right: 30px;
  background-color: var(--verde-whatsapp);
  color: var(--blanco);
  border-radius: 50px;
  font-size: 30px;
  line-height: 60px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  z-index: 1000;
  animation: pulse 2s infinite;
  transition: all 0.3s ease;
}
.whatsapp-flotante:hover {
  background-color: #1EBE57;
  transform: scale(1.1);
  animation: none;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.7) }
  70% { box-shadow: 0 0 0 15px rgba(37,211,102,0) }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0) }
}

/* Accesibilidad */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--verde-primario);
  color: white;
  padding: 8px;
  z-index: 9999;
  display: none;
  transition: top 0.3s;
}
.skip-link:focus {
  top: 0;
}


/* 8. Media Queries (Mobile First) */

/* Medium (md) - 768px-991px (Tablets) */
@media (max-width: 991.98px) {
  html {
    scroll-padding-top: 60px;
  }
  body {
    padding-top: 60px;
  }
  #main-navbar {
    height: 60px;
  }
  #main-navbar .navbar-brand img {
    max-height: 40px;
  }
  .navbar-collapse {
    background: var(--blanco);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 1rem;
    margin-top: 0.5rem;
  }
  .btn-plataforma {
    margin-top: 1rem;
    width: 100%;
  }

  h1.display-3 {
    font-size: 2.5rem;
  }
  #hero .sub-heading {
    font-size: 1.8rem;
  }
  h2.section-title {
    font-size: 2rem;
  }
  
  .section-padding {
    padding: 60px 0;
  }
  
  #quienes-somos .feature-card {
    padding: 1.5rem;
  }
  
  .footer {
    text-align: center;
  }
  .footer-contact-list li {
    justify-content: center;
  }
  .footer-contact-list i {
    margin-top: 5px;
  }
  .footer-heading {
    margin-top: 2rem;
  }
}

/* Extra Small (xs) - 320px-575px */
@media (max-width: 575.98px) {
  h1.display-3 {
    font-size: 2.1rem;
  }
  #hero .sub-heading {
    font-size: 1.5rem;
  }
  #hero .h2-subtitle {
    font-size: 1.1rem;
  }
  .btn-lg {
    width: 100%;
  }
  
  h2.section-title::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .feature-card {
    margin-bottom: 1rem;
  }

  #sobre-nosotros .nav-link {
    font-size: 1rem;
    padding: 0.5rem;
  }
  #sobre-nosotros .tab-content {
    padding: 1.5rem;
  }
  #sobre-nosotros .tab-content .d-flex {
    flex-direction: column;
    align-items: center !important;
    text-align: center;
  }
  #sobre-nosotros .tab-content i {
    margin-right: 0 !important;
    margin-bottom: 1rem;
  }
  
  .whatsapp-flotante {
    width: 50px;
    height: 50px;
    font-size: 24px;
    line-height: 50px;
    bottom: 20px;
    right: 20px;
  }
}