/* ============================================================
   INSIGHT LATAM – CSS OPTIMIZADO Y MODERNO
   ============================================================ */

/* ===== VARIABLES Y CONFIGURACIÓN GLOBAL ===== */
:root {
  --brand-blue: #0071bc;
  --brand-green: #8cc63f;
  --ink-950: #0b1220;
  --ink-900: #0f172a;
  --ink-700: #334155;
  --ink-500: #64748b;
  --ink-300: #cbd5e1;
  --ink-100: #f1f5f9;
  --white: #ffffff;
  
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 10px;
  
  --shadow-sm: 0 6px 18px rgba(2, 6, 23, 0.08);
  --shadow-md: 0 12px 30px rgba(2, 6, 23, 0.12);
  --shadow-lg: 0 20px 60px rgba(2, 6, 23, 0.16);
  --ring: 0 0 0 4px rgba(0, 113, 188, 0.18);
  
  --transition: all 0.3s ease;
  --transition-fast: all 0.2s ease;
}

/* ===== RESET Y CONFIGURACIÓN BASE ===== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  color: var(--ink-900);
  background: var(--white);
  font-family: "Lato", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--brand-blue);
  text-decoration: none;
  transition: var(--transition-fast);
}

a:hover {
  color: #005c94;
  text-decoration: underline;
}

.section {
  padding: clamp(40px, 6vw, 96px) 0;
}

/* ===== COMPONENTES DE CARGA ===== */
#page-loader {
  background: rgba(255, 255, 255, 0.96);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cssload-spinner {
  transform: scale(0.9);
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.08));
}

/* ===== HEADER Y NAVEGACIÓN ===== */
.rd-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(2, 6, 23, 0.06);
  box-shadow: var(--shadow-sm);
}

/* Estructura del header */
.rd-navbar-main-outer,
.rd-navbar-panel {
  padding: 6px 0;
  margin: 0;
}

.section.page-header {
  padding: 0;
}

.rd-navbar-main {
  min-height: auto;
  height: auto;
}

.rd-navbar-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 16px;
  min-height: 80px;
}

/* Logo */
.rd-navbar-brand .brand__logo-dark {
  height: 120px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-left: 10px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
  background: rgba(0, 113, 188, 0.05);
  border: 2px solid transparent;
}

.rd-navbar-brand .brand__name {
  margin: 20px;
  padding: 0;
  display: flex;
  align-items: center;
}

/* Login mejorado */
.login-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  margin-left: 1200px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  text-decoration: none;
  background: rgba(0, 113, 188, 0.05);
  border: 2px solid transparent;
}

.login-link:hover {
  background: rgba(0, 113, 188, 0.1);
  border-color: rgba(0, 113, 188, 0.2);
  text-decoration: none;
  transform: translateY(-1px);
}

.login-icon {
  font-size: 3rem;
  color: var(--brand-blue);
}

.login-text {
  font-size: 1rem;
  font-weight: 700;
  color: var(--brand-blue);
  white-space: nowrap;
}

/* Menú principal */
.rd-navbar-nav-wrap[style*="background-color"] {
  background: linear-gradient(90deg, var(--brand-blue), #005c94);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  padding: 0 clamp(12px, 5vw, 200px);
}

.rd-navbar-nav-wrap .navbar-nav.rd-navbar-nav > li > a {
  position: relative;
  display: inline-block;
  padding: 0.8rem 1rem;
  color: var(--white);
  font-weight: 700;
  letter-spacing: 0.2px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.rd-navbar-nav-wrap .navbar-nav.rd-navbar-nav > li > a:hover {
  color: #e5f2ff;
  background: rgba(255, 255, 255, 0.08);
}

/* Subrayado animado mejorado */
.rd-navbar-nav-wrap .navbar-nav.rd-navbar-nav > li > a::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.35rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #7dd3fc, var(--white));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.rd-navbar-nav-wrap .navbar-nav.rd-navbar-nav > li > a:hover::after {
  transform: scaleX(1);
}

/* Dropdown moderno */
.dropdown-menu.desplegable {
  margin-top: 0.4rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(2, 6, 23, 0.08);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  animation: dropdownIn 0.2s ease-out both;
}

@keyframes dropdownIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-item {
  padding: 0.75rem 1rem;
  font-weight: 600;
  color: var(--ink-900);
  transition: var(--transition-fast);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-item:last-child {
  border-bottom: none;
}

.dropdown-item:hover {
  background: rgba(140, 198, 63, 0.1);
  color: #062e00;
}

/* Accesibilidad */
a:focus,
button:focus,
[role="button"]:focus,
.dropdown-item:focus {
  outline: none;
  box-shadow: var(--ring);
  border-radius: var(--radius-sm);
}

/* ===== COMPONENTES DE CONTENIDO ===== */
/* Tipografía mejorada */
.heading-1 {
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  font-weight: 800;
  color: var(--ink-900);
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.heading-2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1.2;
}

.heading-3 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  color: var(--ink-900);
  line-height: 1.3;
}

.quote-big .q {
  font-size: clamp(1.125rem, 2.1vw, 1.375rem);
  color: var(--ink-700);
  font-style: italic;
  line-height: 1.6;
  border-left: 4px solid var(--brand-green);
  padding-left: 1.5rem;
  margin: 1.5rem 0;
}

.divider {
  height: 3px;
  width: 80px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-green));
  border-radius: 2px;
  margin: 2rem 0;
}

p, li {
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ink-700);
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  margin-top: 0;
}

/* Componentes de medios */
.thumb-line video {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* Carrusel mejorado */
.slick-wrap {
  padding: 2rem 0;
}

.slick-style-1 .thumb-ann__image {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
}

.slick-style-1 .thumb-ann__image:hover {
  transform: scale(1.02);
}

.thumb-ann__caption {
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 1.5rem;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.8));
  backdrop-filter: blur(10px);
  color: var(--ink-900);
}

.thumb-ann__title {
  margin: 0 0 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
}

.thumb-ann__text {
  margin: 0;
  color: var(--ink-700);
  font-size: 0.95rem;
}

.slick-dots li button:before {
  font-size: 10px;
  opacity: 0.5;
}

.slick-dots li.slick-active button:before {
  color: var(--brand-blue);
  opacity: 1;
}

/* Secciones especiales */
.parallax-container.bg-image-dark {
  background-color: var(--ink-950);
}

.parallax-container .parallax-content {
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.6));
  padding: clamp(60px, 8vw, 120px) 0;
}

.container-xxl.bg-primary {
  background: linear-gradient(135deg, var(--brand-blue), #005c94);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 3rem 0;
}

.container-xxl.bg-primary .text-white {
  opacity: 0.95;
}

.container-xxl.bg-primary h2 {
  color: var(--brand-green);
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* ===== COMPONENTES DE BOTONES ===== */
.button,
.button-ujarak,
.button-primary-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  font-weight: 700;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  font-size: 1rem;
}

.button,
.button-ujarak {
  background: var(--brand-blue);
  color: var(--white);
  box-shadow: 0 10px 24px rgba(0, 113, 188, 0.2);
}

.button:hover,
.button-ujarak:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(0, 113, 188, 0.3);
  background: #005c94;
}

.button-primary-outline {
  background: transparent;
  color: var(--brand-blue);
  border-color: var(--brand-blue);
}

.button-primary-outline:hover {
  background: var(--brand-blue);
  color: var(--white);
  transform: translateY(-2px);
}

/* ===== FOOTER MEJORADO ===== */
footer.bg-gray-darker {
  background: var(--ink-950);
  color: var(--ink-300);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 3rem 0 1.5rem;
}

footer .cont {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

footer .column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

footer .column:not(:first-child):not(:last-child) {
  align-items: center;
}

footer .column ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

footer .column ul li {
  margin-bottom: 0.5rem;
}

footer .column ul li a {
  color: var(--ink-300);
  text-decoration: none;
  padding: 0.5rem 0;
  display: block;
  transition: var(--transition-fast);
  border-radius: var(--radius-sm);
}

footer .column ul li a:hover {
  color: var(--white);
  background: rgba(255, 255, 255, 0.05);
  padding-left: 0.5rem;
}

footer .list-icons.list-inline-sm {
  display: flex;
  gap: 1rem;
  justify-content: center;
  align-items: center;
  margin: 1rem 0;
}

footer .icon {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: var(--transition);
  color: var(--ink-300);
  text-decoration: none;
}

footer .icon:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
}

.rights {
  color: var(--ink-500);
  font-size: 0.9rem;
  text-align: center;
  margin-top: 2rem;
}

/* ===== DISEÑO RESPONSIVE MEJORADO ===== */
@media (max-width: 1199.98px) {
  .rd-navbar-nav-wrap[style*="background-color"] {
    padding: 0 2rem;
  }
}

@media (max-width: 991.98px) {
  .rd-navbar-brand .brand__logo-dark {
    height: 50px;
  }
  
  .login-icon {
    font-size: 1.75rem;
  }
  
  .login-text {
    font-size: 0.9rem;
  }
  
  .rd-navbar-nav-wrap[style*="background-color"] {
    padding: 0 1rem;
  }
  
  .thumb-ann__caption {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    padding: 1rem;
  }
  
  footer .cont {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  footer .column {
    align-items: center;
  }
}

@media (max-width: 767.98px) {
  .section {
    padding: clamp(30px, 5vw, 60px) 0;
  }
  
  .heading-1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
  }
  
  .rd-navbar-panel {
    padding: 8px 12px;
    min-height: 70px;
  }
  
  .login-link {
    padding: 6px 12px;
  }
}

@media (max-width: 575.98px) {
  .login-text {
    display: none;
  }
  
  .login-link {
    padding: 8px;
  }
  
  .button,
  .button-ujarak,
  .button-primary-outline {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  
  footer .icon {
    width: 40px;
    height: 40px;
  }
}

/* ===== UTILIDADES ADICIONALES ===== */
.text-gradient {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-green));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-green));
}

.shadow-card {
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.shadow-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* Animaciones suaves */
.fade-in {
  animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estados de carga mejorados */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid var(--brand-blue);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}