/* ===========================================
   PROFESSIONAL ENHANCEMENTS FOR NQN SURVEY
   =========================================== */

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

/* Variables CSS para consistencia */
:root {
  --primary-color: #004CA5;
  --secondary-color: #6A6A6A;
  --accent-color: #f7931e;
  --text-dark: #000000;
  --text-light: #f4f6f8;
  --white: #ffffff;
  --shadow-light: 0 2px 10px rgba(0, 0, 0, 0.08);
  --shadow-medium: 0 4px 20px rgba(0, 0, 0, 0.12);
  --shadow-heavy: 0 8px 30px rgba(0, 0, 0, 0.15);
  --border-radius: 12px;
  --border-radius-large: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================================
    GLOBAL ENHANCEMENTS
    =========================================== */

body {
  font-family: 'Inter', 'Poppins', sans-serif;
  line-height: 1.6;
  scroll-behavior: smooth;
  padding-top: 80px; /* Compensar el header fijo */
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: #003d84;
}

/* ===========================================
     HEADER ENHANCEMENTS
     =========================================== */

.header-area {
  backdrop-filter: blur(10px);
  background: linear-gradient(135deg, rgba(33, 39, 65, 0.95) 0%, rgba(33, 39, 65, 0.98) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  width: 100%;
}

.header-area .main-nav .nav li a {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  transition: var(--transition);
}

.header-area .main-nav .nav li a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transition: var(--transition);
}

.header-area .main-nav .nav li a:hover::before {
  left: 100%;
}

.header-area .main-nav .nav li:last-child a {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
  box-shadow: var(--shadow-medium);
  transform: translateY(-2px);
  transition: var(--transition);
}

.header-area .main-nav .nav li:last-child a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-heavy);
}

/* ===========================================
    BANNER ENHANCEMENTS
    =========================================== */

.swiper-container {
  border-radius: var(--border-radius-large);
  overflow: hidden;
  box-shadow: var(--shadow-heavy);
}

.slide-inner {
  position: relative;
}

.slide-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 76, 165, 0.3) 0%, rgba(0, 0, 0, 0.4) 100%);
  z-index: 1;
}

.header-text {
  position: relative;
  z-index: 2;
}

.header-text h2 {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease-out;
}

.header-text p {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease-out 0.2s both;
}

.orange-button a {
  background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  transform: translateY(0);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.orange-button a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition);
}

.orange-button a:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-heavy);
}

.orange-button a:hover::before {
  left: 100%;
}

/* ===========================================
    RIPPLE EFFECT
    =========================================== */

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: scale(0);
  animation: ripple-animation 0.6s linear;
  pointer-events: none;
}

@keyframes ripple-animation {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ===========================================
    SERVICES ENHANCEMENTS
    =========================================== */

.services .service-item {
  border-radius: var(--border-radius);
  background: linear-gradient(135deg, var(--white) 0%, #f8f9fa 100%);
  box-shadow: var(--shadow-light);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transform: translateY(0);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.services .service-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
  transform: scaleX(0);
  transition: var(--transition);
}

.services .service-item:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-heavy);
}

.services .service-item:hover::before {
  transform: scaleX(1);
}

.services .service-item img {
  border-radius: var(--border-radius);
  transition: var(--transition);
  filter: grayscale(20%);
}

.services .service-item:hover img {
  filter: grayscale(0%);
  transform: scale(1.05);
}

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

.services .service-item:hover i {
  transform: scale(1.1) rotate(5deg);
}

/* Estilos específicos para carteles de atención personalizada y soluciones ágiles */
.services .service-item:has(i.fas.fa-user),
.services .service-item:has(i.fas.fa-puzzle-piece),
.services .service-item.white-card {
  background: #ffffff !important;
  border: 2px solid var(--primary-color);
  color: #000000 !important;
}

.services .service-item:has(i.fas.fa-user):hover,
.services .service-item:has(i.fas.fa-puzzle-piece):hover,
.services .service-item.white-card:hover {
  background: #ffffff !important;
  border-color: var(--accent-color);
  color: #000000 !important;
  transform: translateY(-8px);
  box-shadow: var(--shadow-heavy);
}

/* Asegurar que los íconos y textos sean negros en los carteles blancos */
.services .service-item.white-card i,
.services .service-item.white-card h4,
.services .service-item.white-card p {
  color: #000000 !important;
}

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

/* ===========================================
    CTA SECTION ENHANCEMENTS
    =========================================== */

section.simple-cta {
  position: relative;
  overflow: hidden;
}

section.simple-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 76, 165, 0.8) 0%, rgba(0, 0, 0, 0.7) 100%);
  z-index: 1;
}

section.simple-cta .container {
  position: relative;
  z-index: 2;
}

section.simple-cta h4 {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  animation: slideInLeft 1s ease-out;
}

/* ===========================================
    ABOUT SECTION ENHANCEMENTS
    =========================================== */

section.about-us .naccs .menu div {
  border-radius: var(--border-radius);
  background: linear-gradient(135deg, var(--white) 0%, #f8f9fa 100%);
  box-shadow: var(--shadow-light);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transform: translateY(0);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

/* Mejoras para las pestañas de servicios en detalle */
.service-details .naccs .menu div {
  border-radius: var(--border-radius);
  background: var(--white);
  box-shadow: var(--shadow-light);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transform: translateY(0);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  margin: 0 5px;
  padding: 15px 20px;
  color: var(--text-dark);
}

.service-details .naccs .menu div:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
  background: #f0f0f0;
  color: var(--text-dark);
}

.service-details .naccs .menu div.active {
  background: #f0f0f0;
  color: var(--text-dark);
  box-shadow: var(--shadow-medium);
}

/* Mejoras para el contenido de las pestañas */
.service-details .nacc li {
  margin-bottom: 30px;
}

.service-details .nacc .left-image {
  margin-bottom: 25px;
}

.service-details .nacc .left-image img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  max-width: 100%;
  height: auto;
  transition: var(--transition);
}

.service-details .nacc .left-image img:hover {
  transform: scale(1.02);
}

.service-details .nacc .right-content {
  padding-left: 20px;
}

.service-details .nacc .right-content h4 {
  color: #000000 !important;
  margin-bottom: 20px;
  font-size: 24px;
  font-weight: 600;
}

.service-details .nacc .right-content p {
  color: #000000 !important;
  margin-bottom: 20px;
  line-height: 1.8;
  font-size: 16px;
}

.service-details .nacc .right-content span {
  display: block;
  color: #000000 !important;
  margin-bottom: 10px;
  padding-left: 20px;
  position: relative;
  font-size: 15px;
  line-height: 1.6;
}

.service-details .nacc .right-content span::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-color);
  font-weight: bold;
}

.service-details .nacc .right-content .last-span {
  margin-bottom: 0;
}

/* Forzar color negro en todo el contenido de las pestañas */
.service-details .nacc .right-content * {
  color: #000000 !important;
}

.service-details .nacc .right-content h4,
.service-details .nacc .right-content p,
.service-details .nacc .right-content span,
.service-details .nacc .right-content div {
  color: #000000 !important;
}

section.about-us .naccs .menu div::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  opacity: 0;
  transition: var(--transition);
  z-index: -1;
}

section.about-us .naccs .menu div:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
  color: var(--white);
}

section.about-us .naccs .menu div:hover::before {
  opacity: 1;
}

section.about-us .naccs .menu div.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: var(--white);
  box-shadow: var(--shadow-medium);
}

/* ===========================================
    CALCULATOR SECTION ENHANCEMENTS
    =========================================== */

.calculator {
  background: linear-gradient(135deg, #f8f9fa 0%, var(--white) 100%);
  border-radius: var(--border-radius-large);
  box-shadow: var(--shadow-light);
  margin: 40px 0;
  padding: 40px;
}

.calculator .left-image img {
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  transition: var(--transition);
}

.calculator .left-image img:hover {
  transform: scale(1.02);
}

/* ===========================================
     PARTNERS SECTION ENHANCEMENTS
     =========================================== */

/* Título de la sección de partners */
.partners-title {
  color: var(--primary-color) !important;
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 30px;
  position: relative;
  text-align: center;
}

.partners-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--primary-color);
  border-radius: 2px;
}

.partners .item {
  background: var(--white);
  border-radius: var(--border-radius);
  padding: 60px 20px;
  margin: 15px;
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 160px; /* Altura fija para todos los contenedores */
}

/* Asegurar que los contenedores de Bootstrap tengan el espaciado correcto */
.partners .col-lg-2,
.partners .col-sm-4,
.partners .col-6 {
  padding: 0 5px;
  margin-bottom: 20px;
}

.partners .item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.partners .item img {
  transition: var(--transition);
  border-radius: 8px;
  max-width: 100%;
  max-height: 80px; /* Altura máxima fija para todas las imágenes */
  width: auto;
  height: auto;
  object-fit: contain; /* Mantiene la proporción de la imagen */
}

.partners .item:hover img {
  transform: scale(1.1);
}

/* ===========================================
    FOOTER ENHANCEMENTS
    =========================================== */

footer {
  background: linear-gradient(135deg, var(--text-dark) 0%, #1a1f2e 100%);
  border-top: 3px solid var(--primary-color);
}

footer p {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===========================================
    WELCOME MESSAGE
    =========================================== */

.welcome-message {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.5s ease-out;
}

.welcome-content {
  background: var(--white);
  padding: 40px;
  border-radius: var(--border-radius-large);
  text-align: center;
  max-width: 400px;
  box-shadow: var(--shadow-heavy);
  animation: slideInUp 0.5s ease-out 0.2s both;
}

.welcome-content h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
  font-size: 24px;
}

.welcome-content p {
  color: var(--text-dark);
  margin-bottom: 25px;
  line-height: 1.6;
}

.welcome-content button {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  color: var(--white);
  border: none;
  padding: 12px 30px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition);
}

.welcome-content button:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-medium);
}

/* ===========================================
    ANIMATIONS
    =========================================== */

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

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

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* ===========================================
    LOADING STATES
    =========================================== */

body:not(.loaded) {
  overflow: hidden;
}

body:not(.loaded) .service-item,
body:not(.loaded) .section-heading {
  opacity: 0;
  transform: translateY(30px);
}

/* ===========================================
    RESPONSIVE ENHANCEMENTS
    =========================================== */

@media (max-width: 768px) {
  :root {
    --border-radius: 8px;
    --border-radius-large: 12px;
  }
  
  body {
    padding-top: 70px; /* Menos padding en móviles */
  }
  
  .header-area {
    padding: 10px 0;
  }
  
  .services .service-item {
    margin-top: 20px;
    padding: 30px 20px;
  }
  
  .header-text h2 {
    font-size: 28px;
    line-height: 1.3;
  }
  
  .orange-button a {
    padding: 12px 24px;
    font-size: 14px;
  }
  
  .welcome-content {
    margin: 20px;
    padding: 30px 20px;
  }
  
  /* Mejoras para pestañas de servicios en móviles */
  .service-details .naccs .menu div {
    margin: 0 2px;
    padding: 10px 15px;
    font-size: 14px;
  }
  
  .service-details .nacc .left-image {
    margin-bottom: 20px;
    text-align: center;
  }
  
  .service-details .nacc .left-image img {
    max-width: 80%;
    height: auto;
  }
  
  .service-details .nacc .right-content {
    padding-left: 0;
    padding-top: 20px;
  }
  
  .service-details .nacc .right-content h4 {
    font-size: 20px;
    margin-bottom: 15px;
  }
  
  .service-details .nacc .right-content p {
    font-size: 14px;
    margin-bottom: 15px;
  }
  
  .service-details .nacc .right-content span {
    font-size: 13px;
    margin-bottom: 8px;
  }
  
  /* Ajustes para partners en móviles */
  .partners-title {
    font-size: 24px;
    margin-bottom: 20px;
  }
  
  .partners-title::after {
    width: 60px;
    height: 2px;
  }
  
  .partners .item {
    height: 140px;
    padding: 50px 15px;
    margin: 10px;
  }
  
  .partners .col-lg-2,
  .partners .col-sm-4,
  .partners .col-6 {
    padding: 0 3px;
    margin-bottom: 15px;
  }
  
  .partners .item img {
    max-height: 60px;
  }
}

/* ===========================================
    LOADING ANIMATIONS
    =========================================== */

.service-item {
  animation: fadeInUp 0.6s ease-out;
}

.service-item:nth-child(1) { animation-delay: 0.1s; }
.service-item:nth-child(2) { animation-delay: 0.2s; }
.service-item:nth-child(3) { animation-delay: 0.3s; }
.service-item:nth-child(4) { animation-delay: 0.4s; }
.service-item:nth-child(5) { animation-delay: 0.5s; }
.service-item:nth-child(6) { animation-delay: 0.6s; }

/* ===========================================
    HOVER EFFECTS FOR IMAGES
    =========================================== */

.service-item img {
  position: relative;
  overflow: hidden;
}

.service-item img::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0, 76, 165, 0.2) 0%, rgba(247, 147, 30, 0.2) 100%);
  opacity: 0;
  transition: var(--transition);
}

.service-item:hover img::after {
  opacity: 1;
}

/* ===========================================
    TEXT ENHANCEMENTS
    =========================================== */

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

.section-heading h4::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
  border-radius: 2px;
}

/* ===========================================
    BUTTON ENHANCEMENTS
    =========================================== */

.orange-button, .green-button {
  position: relative;
  overflow: hidden;
}

.orange-button a, .green-button a {
  position: relative;
  z-index: 1;
  font-weight: 600;
  letter-spacing: 0.5px;
}

/* ===========================================
    SCROLL INDICATOR
    =========================================== */

.scroll-indicator {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color) 0%, var(--accent-color) 100%);
  z-index: 9999;
  transition: width 0.3s ease;
}

/* ===========================================
    FOCUS STATES FOR ACCESSIBILITY
    =========================================== */

a:focus, button:focus, input:focus, textarea:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===========================================
    KEYBOARD NAVIGATION
    =========================================== */

.keyboard-navigation *:focus {
  outline: 3px solid var(--accent-color) !important;
  outline-offset: 2px !important;
}

/* ===========================================
    SLOW CONNECTION OPTIMIZATIONS
    =========================================== */

.slow-connection * {
  animation: none !important;
  transition: none !important;
}

.slow-connection .service-item {
  opacity: 1 !important;
  transform: none !important;
}

/* ===========================================
    PRINT STYLES
    =========================================== */

@media print {
  .header-area,
  .orange-button,
  .swiper-button-next,
  .swiper-button-prev,
  .welcome-message,
  .scroll-indicator {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  .service-item {
    break-inside: avoid;
    margin-bottom: 20px;
  }
}

/* ===========================================
    DARK MODE SUPPORT (FUTURE)
    =========================================== */

@media (prefers-color-scheme: dark) {
  :root {
    --text-dark: #f4f6f8;
    --white: #1a1f2e;
    --shadow-light: 0 2px 10px rgba(255, 255, 255, 0.1);
    --shadow-medium: 0 4px 20px rgba(255, 255, 255, 0.15);
    --shadow-heavy: 0 8px 30px rgba(255, 255, 255, 0.2);
  }
}

/* ===========================================
    HIGH CONTRAST MODE
    =========================================== */

@media (prefers-contrast: high) {
  :root {
    --primary-color: #000080;
    --accent-color: #ff6600;
    --text-dark: #000000;
    --white: #ffffff;
  }
  
  .service-item {
    border: 2px solid var(--primary-color);
  }
  
  .orange-button a {
    border: 2px solid var(--accent-color);
  }
}

/* ===========================================
    REDUCED MOTION
    =========================================== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .service-item {
    opacity: 1 !important;
    transform: none !important;
  }
}
