 :root {
 /* ==========================
  PALETA MINECO (PRINCIPAL)
  ========================== */

  --mineco-navy: #192854;
  --mineco-blue: #4993CC;
  --mineco-light: #88C0D5;

  /* ==========================
  PALETA RPSC (SECUNDARIA)
  ========================== */

  --rpsc-primary: #007A96;
  --rpsc-secondary: #009EDE;

  /* ==========================
  NEUTROS
  ========================== */

  --white: #FFFFFF;

  --gray-100: #F8FAFC;
  --gray-200: #E2E8F0;
  --gray-500: #64748B;
  --gray-700: #334155;

  --text-light: rgba(255, 255, 255, .90);
}

/* =======================================================
HERO MODERNO RPSC
======================================================= */

.hero-rpsc-modern {
  position: relative;
  padding: 100px 0 60px;
  overflow: hidden; 
  background: linear-gradient(180deg, #2a407a 0%, var(--mineco-navy) 100%);
  display: flex;
  align-items: center;
}

@media (min-width: 992px) {
  .hero-rpsc-modern {
    padding: 140px 0 100px;
    min-vh: 75vh;
  }
}

.hero-rpsc-modern::before {
  content: '';
  position: absolute;
  width: 700px;
  height: 700px;
  border-radius: 50%;
  background: rgba(136, 192, 213, .10);
  top: -300px;
  right: -200px;
}

.hero-rpsc-modern::after {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(73, 147, 204, .08);
  bottom: -250px;
  left: -150px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 50px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .20);
  color: white;
  backdrop-filter: blur(12px);
  font-weight: 600;
}

.hero-title {
  color: var(--white);
  font-weight: 800;
  font-size: calc(1.8rem + 1.5vw);
  line-height: 1.2;
}

.hero-title span {
  color: var(--rpsc-secondary);
  display: block;
}

.hero-description {
  color: var(--text-light);
  font-size: calc(1rem + 0.2vw);
}

.btn-rpsc-outline {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .05);
  padding: 14px 28px;
}

.btn-rpsc-outline:hover {
  background: rgba(255, 255, 255, .12);
  color: var(--white);
}

.floating-card {
  position: absolute;
  background:rgba(255, 255, 255, .95);
  backdrop-filter: blur(15px);
  padding: 14px 18px;
  border-radius: 16px;
  font-weight: 600;
  box-shadow:
      0 15px 40px rgba(0, 0, 0, .12);
  z-index: 50;
}

.card-1 {
  top: 8%;
  left: -35px;
}

.card-2 {
  bottom: 18%;
  left: -25px;
}

.card-3 {
  top: 60%;
  right: -35px;
}

.floating-card i {
  color: var(--mineco-navy);
  margin-right: 8px;
}


/* ==================================================
   ENCABEZADOS INSTITUCIONALES
================================================== */

.section-header-rpsc,
.section-header-rpsc * {
    text-align: left;
    max-width:none;
    margin:0;
}

.section-badge{
    display:inline-flex;
    align-items:left;
    gap:8px;
    padding:8px 18px;
    border-radius:50px;
    background:rgba(0,122,150,.08);
    color:var(--rpsc-primary);
    font-size:.82rem;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.8px;
    margin-bottom:18px;
}

.section-title-rpsc{
    display: block;
    width: 100%;
    text-align: left !important;
    margin: 0 0 15px 0;
    font-size:clamp(2rem,4vw,3rem);
    font-weight:800;
    color:var(--mineco-navy);
    line-height:1.15;
    margin-bottom:15px;
    position:relative;
}


.section-subtitle-rpsc {
    display: block;               /* Cambiado de inline-flex a block para corregir el salto de línea */
    text-align: left;             /* Asegura que el texto se alinee al extremo izquierdo */
    max-width: 700px;             /* Mantiene el límite de ancho que ya tenías */
    margin: 0 0 1.5rem 0;         /* Elimina el 'auto' que lo centraba y le da un margen inferior */
    color: var(--gray-500);       /* Mantiene tus colores del tema */
    font-size: 1.05rem;           /* Mantiene tu tamaño de fuente */
    line-height: 1.8;             /* Mantiene el interlineado original */
}

/* ==========================================================================
   SECCIÓN DE ACCIONES RÁPIDAS
   ========================================================================== */
.quick-services-modern {
    background-color: var(--white);
    margin-top: -30px;
    position: relative;
    z-index: 20;
    padding-bottom: 40px;
}

.border-top-connector-hybrid {
    border-top: 4px solid var(--mineco-navy);
}

.visual-flow-indicator-hybrid {
    position: absolute;
    top: -4px;
    left: 10%;
    height: 50px;
    width: 2px;
    z-index: 5;
}

.flow-line-hybrid {
    height: 100%;
    width: 100%;
    background: linear-gradient(to bottom, var(--mineco-blue), var(--rpsc-primary));
}

.flow-pulse-node-hybrid {
    width: 8px;
    height: 8px;
    background-color: var(--rpsc-secondary);
    border-radius: 50%;
    position: absolute;
    bottom: -4px;
    left: -3px;
    box-shadow: 0 0 0 4px rgba(0, 158, 222, 0.25);
}

/* ARQUITECTURA DE TARJETAS FLUIDAS */
.card-flow-hybrid {
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: inherit;
    background-color: var(--gray-100);
    border-radius: 14px;
    border: 1px solid var(--gray-200);
    padding: 2.2rem 1.8rem;
    height: 100%;
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-hybrid-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.icon-box-premium-hybrid {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: all 0.3s ease;
}

.card-header-meta-hybrid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* TARJETA MAESTRA PSC: ALTA JERARQUÍA Y HOVER PRESTIGIO (CORREGIDO) */
.corporate-master-card-hybrid {
    background-color: var(--white) !important;
    border: 1px solid var(--gray-200) !important;
    /* Borde de acento oficial del RPSC */
    border-left: 5px solid var(--rpsc-primary) !important;
    box-shadow: 0 10px 25px rgba(25, 40, 84, 0.03) !important;
    z-index: 3;
    /* Transiciones matemáticas explícitas para evitar saltos de color o bordes negros bruscos */
    transition: 
        transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
        border-left-color 0.4s ease, 
        border-left-width 0.25s cubic-bezier(0.16, 1, 0.3, 1),
        box-shadow 0.4s ease !important;
}

.text-corporate-primary {
    background-color: rgba(0, 122, 150, 0.06) !important;
    color: var(--rpsc-primary) !important;
    border: 1px solid rgba(0, 122, 150, 0.1);
    transition: all 0.3s ease;
}

.badge-status-online-corporate {
    background-color: rgba(16, 185, 129, 0.06);
    color: #0d9488;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 4px; 
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.ping-dot-corporate {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    display: inline-block;
}

.card-premium-title-corporate {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--mineco-navy);
    line-height: 1.35;
    margin-bottom: 0.85rem;
    transition: color 0.3s ease;
}

.card-premium-text-corporate {
    color: #4a5568;
    font-size: 0.92rem;
    line-height: 1.65;
}

.border-top-corporate {
    border-top: 1px solid var(--gray-200) !important;
    transition: border-color 0.3s ease;
}

.action-text-corporate {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--rpsc-primary);
    transition: color 0.25s ease;
}

.arrow-corporate-holder {
    color: var(--rpsc-primary);
    font-size: 1.1rem;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
    display: flex;
    align-items: center;
}

/* MICRO-INTERACCIONES INTERACTIVAS DEL HOVER MÁSTER */
.corporate-master-card-hybrid:hover {
    transform: translateY(-5px);
    /* Mantiene la limpieza del contenedor perimetral, pero ensancha el lateral con el color secundario */
    border-color: var(--gray-200) !important;
    border-left: 8px solid var(--rpsc-secondary) !important; 
    /* Profundidad orgánica difuminada estilo sombra flotante */
    box-shadow: 0 20px 35px rgba(25, 40, 84, 0.07) !important;
}

/* El escudo de seguridad pasa a formato activo sólido institucional */
.corporate-master-card-hybrid:hover .text-corporate-primary {
    background-color: var(--rpsc-primary) !important;
    color: var(--white) !important;
    border-color: var(--rpsc-primary);
}

/* El título adopta una presencia corporativa ligeramente más marcada sin llegar a negro puro */
.corporate-master-card-hybrid:hover .card-premium-title-corporate {
    color: #001233; 
}

/* El separador inferior acompaña la transición cromática */
.corporate-master-card-hybrid:hover .border-top-corporate {
    border-top-color: rgba(0, 122, 150, 0.15) !important;
}

/* El bloque de acción se desplaza e invita orgánicamente al clic */
.corporate-master-card-hybrid:hover .action-text-corporate {
    color: var(--rpsc-secondary);
    text-shadow: 0 2px 8px rgba(0, 122, 150, 0.15);
}

.corporate-master-card-hybrid:hover .arrow-corporate-holder {
    transform: translateX(6px);
    color: var(--rpsc-secondary);
}


/* ESTILOS COMPLEMENTARIOS (MANTENIENDO EL EQUILIBRIO VISUAL)*/

/* MARCO LEGAL */
.context-legal-card-hybrid {
    background: linear-gradient(135deg, var(--mineco-navy) 0%, #111c3a 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.text-legal-context {
    background: rgba(73, 147, 204, 0.15) !important;
    color: var(--mineco-blue) !important;
    border: 1px solid rgba(73, 147, 204, 0.2);
}

.badge-legal-pill-hybrid {
    background: rgba(136, 192, 213, 0.12);
    border: 1px solid rgba(136, 192, 213, 0.2);
    color: var(--mineco-light);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 5px 12px;
    border-radius: 30px;
    font-weight: 700;
}

.context-law-issuer-hybrid {
    color: var(--mineco-light);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    display: block;
}

.text-white-opacity {
    color: rgba(255, 255, 255, 0.85) !important;
}

.text-mineco-light {
    color: var(--mineco-light) !important;
}

.btn-icon-legal-context {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    color: var(--white) !important;
    border-radius: 8px !important;
}

.card-premium-title-hybrid {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.3;
}

.card-premium-text-hybrid {
    font-size: 0.92rem;
    line-height: 1.6;
}

/* COMPONENTES APILADOS (DERECHA) */
.standard-card-hybrid {
    padding: 1.5rem 1.8rem;
}

.text-navy-theme-hybrid .icon-box-premium-hybrid {
    background: rgba(25, 40, 84, 0.06);
    color: var(--mineco-navy);
}

.text-blue-theme-hybrid .icon-box-premium-hybrid {
    background: rgba(73, 147, 204, 0.08);
    color: var(--mineco-blue);
}

.card-premium-title-sm-hybrid {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--mineco-navy);
    margin-bottom: 0.3rem;
}

.card-premium-text-sm-hybrid {
    color: var(--gray-500);
    font-size: 0.88rem;
    line-height: 1.5;
}

/* FOOTERS COMUNES SECCIONES SECUNDARIAS */
.card-premium-footer-hybrid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.2rem;
    border-top: 1px dashed var(--gray-200);
    padding-top: 0.8rem;
}

.action-trigger-text-hybrid {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--rpsc-primary);
    transition: all 0.35s ease;
}

.arrow-icon-holder-hybrid {
    width: 32px;
    height: 32px;
    background-color: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mineco-navy);
    font-size: 0.85rem;
    transition: all 0.35s cubic-bezier(0.25, 1, 0.5, 1);
    border: 1px solid var(--gray-200);
}

/* HOVER COMPONENTES SECUNDARIOS */
.card-flow-hybrid:not(.corporate-master-card-hybrid):hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(25, 40, 84, 0.06);
    border-color: rgba(25, 40, 84, 0.15);
}

.card-flow-hybrid:hover .arrow-icon-holder-hybrid {
    background-color: var(--mineco-navy);
    color: var(--white);
    border-color: var(--mineco-navy);
    transform: translateX(3px);
}

.context-legal-card-hybrid:hover .action-trigger-text-hybrid {
    color: var(--white) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.text-navy-theme-hybrid:hover .icon-box-premium-hybrid {
    background-color: var(--mineco-navy);
    color: var(--white);
}

.text-blue-theme-hybrid:hover .icon-box-premium-hybrid {
    background-color: var(--mineco-blue);
    color: var(--white);
}



/* ===================================================
HERO SHOWCASE SLIDER
=================================================== */

.hero-slider-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.hero-slider-wrapper {
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #0a0a1a;
    position: relative;
}

#heroShowcase {
    width: 100%;
    position: relative;
}

#heroShowcase .carousel-inner {
    width: 100%;
    position: relative;
}

#heroShowcase .carousel-item {
    width: 100%;
    position: relative;
    overflow: hidden;
}

.slide-image-container {
    width: 100%;
    position: relative;
    padding-top: 56.25%;
    background: #0a0a1a;
    overflow: hidden;
}

.slide-image-container .hero-slider-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Desktop: 16:9 */
@media (min-width: 992px) {
    .slide-image-container {
        padding-top: 56.25%; /* 16:9 */
    }
}

/* Tablet: 4:3 */
@media (max-width: 991px) and (min-width: 577px) {
    .slide-image-container {
        padding-top: 75%; /* 4:3 */
    }
}

/* Móvil: 3:4 (vertical) */
@media (max-width: 576px) {
    .hero-slider-wrapper,
    .carousel-inner,
    .carousel-item {
        min-height: auto !important; 
        height: auto !important;   
    }

    .hero-slider-image {
        width: 100%;
        height: auto !important;    
        object-fit: contain;       
        object-position: center; 
        display: block;
    }
}

/* 2:3 - más vertical */
@media (max-width: 380px) {
    .slide-image-container {
        padding-top: 150%; 
    }
}

/* BOTONES DE NAVEGACIÓN */

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 44px;
    height: 44px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    background-color: var(--rpsc-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-nav:hover {
    background-color: #007A96; /* Un tono un poco más oscuro para el hover */
    transform: translateY(-50%) scale(1.1); /* Ligero aumento al pasar el mouse */
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.slider-prev {
    left: 12px;
}

.slider-next {
    right: 12px;
}

@media (max-width: 576px) {
    .slider-nav {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }
    
    .slider-prev {
        left: 8px;
    }
    
    .slider-next {
        right: 8px;
    }
}

/* CONTENIDO SUPERPUESTO */

.hero-slide-content {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    padding: 20px 24px;
    background: linear-gradient(180deg, 
        rgba(0, 0, 0, 0.1) 0%, 
        rgba(0, 0, 0, 0.8) 100%
    );
    border-radius: 12px;
    color: white;
    z-index: 10;
}

@media (max-width: 576px) {
    .hero-slide-content {
        bottom: 12px;
        left: 12px;
        right: 12px;
        padding: 12px 16px;
    }
    
    .hero-slide-content h3 {
        font-size: 1rem;
    }
    
    .hero-slide-content p {
        font-size: 0.8rem;
        margin-bottom: 0;
    }
    
    .slide-tag {
        font-size: 0.7rem;
        padding: 3px 10px;
    }
}


/* ==================================================
BARRA INSTITUCIONAL
================================================== */
.institutional-bar {
    background-color: var(--white);
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-200);
}

.institutional-logos {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}


.institutional-logos img{
  transition:
      transform 0.3s ease,
      filter 0.3s ease;
}



.institutional-logos img:hover{
  transform: scale(1.08);
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.15));
}

.logo-mineco{
  height: 60px;
  width: auto;
}

.logo-rpsc{
  height: 75px;
  width: auto;
}

.logo-rpsc:hover{
  transform: scale(1.12);
}

.logo-viceministerio{
  height: 85px;
  width: auto;
}

/* ==================================================
NAVBAR MODERNO
================================================== */

.navbar-modern {
    background-color: var(--white);
    padding: 15px 0;
    box-shadow: 0 4px 12px rgba(25, 40, 84, 0.03);
}

.navbar-modern .nav-link {
    color: var(--gray-700) !important;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 8px 12px !important;
    transition: color 0.25s ease;
}


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

.navbar-modern .nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 3px;
  border-radius: 20px;
  background: var(--rpsc-primary);
  transition: .3s;
}

.navbar-modern .nav-link:hover::after {
  width: 100%;
}

/* ==================================================
   BOTONES HEADER - DISEÑO PREMIUM 2026
   ================================================== */

.btn-rpsc-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    font-weight: 650;
    font-size: 14.5px;
    letter-spacing: 0.01em;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-rpsc-header {
    background: linear-gradient(135deg, var(--rpsc-secondary) 0%, var(--rpsc-primary) 100%);
    color: var(--white);
}

.btn-rpsc-header:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 20px rgba(0, 158, 222, 0.3);
}

.btn-rpsc-secondary {
    background: #253975 !important;
    color: var(--white) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

.btn-rpsc-secondary:hover {
    background:  var(--mineco-navy) !important;
    box-shadow: 0 10px 20px rgba(0, 158, 222, 0.3);
}

/* Asegura que el contenedor de acciones distribuya el espacio correctamente */
.header-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 0;
}

.header-actions-container {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important; /* Mantiene todo en una línea a toda costa */
    gap: 10px; /* Espacio entre los botones */
}

/* Ajuste del botón para alineación interna perfecta */
.btn-rpsc-header {
    display: inline-flex;      /* Flex para alinear icono y texto */
    align-items: center;       /* Centrado vertical del contenido */
    justify-content: center;   /* Centrado horizontal del contenido */
    padding: 10px 24px;
    border-radius: 10px;
    font-weight: 650;
    font-size: 14.5px;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Ajuste específico para centrar en dispositivos móviles */
@media (max-width: 991px) {
    .header-actions {
        display: flex;
        flex-direction: column; 
        align-items: center;    /* Centrado horizontal del grupo de botones */
        justify-content: center;
        gap: 12px;
        margin-top: 25px;
        width: 100%;
    }

    .btn-rpsc-header {
        /* 1. Altura controlada */
        height: 42px;           
        padding: 0 20px;        /* Padding horizontal en lugar de vertical */
        
        /* 2 y 3. Centrado forzado */
        display: flex !important;
        align-items: center !important;     /* Centrado vertical */
        justify-content: center !important; /* Centrado horizontal */
        
        width: 100%;
        max-width: 280px;       /* Evita que el botón sea demasiado ancho */
        text-align: center;
        
        /* Ajuste de tipografía para evitar desbordes */
        font-size: 14px;
        line-height: 1;         /* Elimina espacio extra de línea */
    }
}
/* ==========================================================================
   AJUSTES RESPONSIVOS CRÍTICOS (HASTA 1366PX - IPAD PRO Y LAPTOPS)
   ========================================================================== */
@media (max-width: 1366px) {
    .institutional-logos img {
        max-height: 38px;
    }
    
    .navbar-modern .nav-link {
        font-size: 0.88rem;
        padding: 6px 8px !important;
    }
    
    .btn-rpsc-header {
        padding: 6px 12px;
        font-size: 0.82rem;
    }
}

@media (max-width: 991px) {
    .institutional-logos {
        justify-content: center;
        gap: 20px;
    }
    
    .institutional-logos img {
        max-height: 35px;
    }

    .header-actions {
        flex-direction: column;
        width: 100%;
        margin-top: 15px;
        gap: 8px;
    }

    .btn-rpsc-header {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 1366px) {
    /* 1. Forzamos a que el contenedor global pierda la propiedad fija */
    #header-wrapper,
    #mainHeader,
    .navbar-modern {
        position: relative !important; /* Cambia de 'fixed/sticky' a flujo natural */
        top: auto !important;
        left: auto !important;
        width: 100% !important;
        box-shadow: none !important;
    }

    /* 2. En caso de que estés usando la clase utilitaria de Bootstrap 'fixed-top' 
       en el HTML, esta regla de CSS la neutralizará de forma segura en tablets/móviles */
    .fixed-top {
        position: relative !important;
        top: auto !important;
    }

    /* 3. Ajuste de espaciado en el Hero: 
       Al dejar de ser flotante el menú, el Hero ya no necesita un padding superior 
       tan exagerado para no quedar escondido detrás de los logos. */
    .hero-rpsc-modern {
        padding-top: 60px !important; 
        padding-bottom: 60px !important;
    }
}

/* Ajuste fino extra para teléfonos inteligentes */
@media (max-width: 576px) {
    .hero-rpsc-modern {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }
}

@media (max-width: 1200px) {
    .header-actions-container {
        gap: 5px; /* Reduce el espacio entre botones en pantallas medianas */
    }
    .btn-rpsc-header {
        padding: 6px 10px !important; /* Botones un poco más compactos */
        font-size: 12px !important;
    }
}


/* ==================================================
SLIDE DASHBOARD 
================================================== */

.slide-dashboard {
  position: relative;
  width: 100%;
  height: auto; 
}

.slide-dashboard img{
  width:100%;
  height:auto;
  display:block;
}

.dashboard-value {
  position: absolute;
  font-weight: 800;
  color: var(--mineco-navy); 
  font-size: calc(0.9rem + 1.2vw); 
  white-space: nowrap;
  transform: translate(-50%, -50%); 
}

.valor-certificados{
  position:absolute;
  top:30%;
  left:50%;
  transform:translate(-50%,-50%);
  font-size:clamp(1.8rem,5vw,4.5rem);
  font-weight:800;
  color:#17823b;
  z-index:9999;
  line-height:1;
}

.valor-hojas{
  position:absolute;
  top:63%;
  left:35%;
  transform:translate(-50%,-50%);
  font-size:clamp(.8rem,2vw,1.75rem);
  font-weight:400;
  color:#17823b;
  z-index:9999;
}

.valor-co2{
  position:absolute;
  top:63%;
  left:77%;
  transform:translate(-50%,-50%);
  font-size:clamp(.8rem,2vw,1.75rem);
  font-weight:400;
  color:#0059d6;
  z-index:9999;
}

@media (max-width: 576px) {
  .hero-slider-wrapper {
    border-radius: 12px;
  }
  .dashboard-value {
    font-size: calc(0.8rem + 1vw);
  }
}

@media (max-width: 767.98px) {
  .hero-slider-wrapper {
    border-radius: 12px;
  }
  
  .dashboard-value {
    font-size: calc(0.6rem + 1.2vw) !important;
  }
}

@media (max-width: 480px) {
  .hero-slider-wrapper {
    height: 200px; 
  }
}
/* =======================================================
HERO SLIDER BOTONES PARA CARRUSEL DE IMÁGENES
======================================================= */

.hero-slider-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.hero-slider-controls{
  display:flex;
  justify-content:center;
  align-items:center;
  gap:14px;
  margin-top:18px;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 50; 
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3); 
    backdrop-filter: blur(10px);
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-nav:hover {
  background-color: var(--rpsc-secondary);
  border-color: var(--rpsc-secondary);
  transform: translateY(-50%) scale(1.1);
}

.slider-prev { left: -25px; }
.slider-next { right: -25px; }

.slider-nav i{
  font-size:0.95rem;
}

.slider-nav {
        width: 35px;
        height: 35px;
        background: rgba(0, 0, 0, 0.4); /* Fondo más visible en pantallas pequeñas */
    }
    
    .slider-prev { left: 5px; }
    .slider-next { right: 5px; }


/* =======================    VARIABLES GLOBALES ======================= */
:root {
  --color-primary: #007A96;
  --color-secondary: #ffc107;
  --color-light: #f8f9fa;
  --color-dark: #343a40;
  --heading-color: #102a49;
  --accent-color: #14529d;
  --contrast-color: #ffffff;
}

/* =======================    BODY Y TIPOGRAFÍA ======================= */
body {
  font-family: 'Roboto', sans-serif;
  color: var(--color-dark);
  background-color: var(--color-light);
  scroll-behavior: smooth;
  margin: 0;
  padding-top: 114px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  /* topbar 44px + header 70px */
}

main {
  height: auto !important;
  min-height: 0 !important;
  flex: 1 0 auto;
  display: block;
  position: relative;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.footer-modern {
  flex-shrink: 0;
}

/* =======================    TOPBAR (desktop/tablet) ======================= */
.topbar {
  background: var(--color-primary);
  color: var(--color-light);
  font-size: 0.95rem;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 2050;
  margin-top: 0 !important;
  padding-top: 10px;
}

.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.topbar a {
  color: var(--color-light);
  text-decoration: none;
  transition: color 0.25s;
  margin-right: 0.6rem;
}

.topbar a:hover {
  color: var(--color-secondary);
}

/* Responsive Topbar para móviles */
@media (max-width: 768px) {
  .topbar {
    flex-direction: column !important;
    padding: 4px 6px !important;
    font-size: 0.7rem !important;
    line-height: 1 !important;
    text-align: center;
    height: auto !important;
  }

  .topbar .container {
    flex-direction: column !important;
    align-items: center !important;
    gap: 2px !important;
  }

  .topbar div:first-child {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1px !important;
  }

  .topbar div:first-child a {
    font-size: 0.7rem !important;
    margin: 0 !important;
  }

  .topbar div:last-child a {
    font-size: 0.75rem !important;
    margin: 0 1.5px !important;
  }

  .topbar span {
    display: none !important;
    /* Oculta los separadores | */
  }

  .topbar a {
    font-size: 0.75rem;
  }

  .topbar div:last-child i {
    font-size: 0.85rem;
  }

  .topbar .container,
  .logo-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }
}

/* --- Estilos base --- */
#header-wrapper {
    display: block;
    width: 100%;
    background-color: var(--white);
    position: relative;
    z-index: 1030;
}

#mainHeader {
    position: sticky;
    top: 44px;
    width: 100%;
    z-index: 2040;
    background-color: #fff;
    transition: background-color 0.3s ease;
}

/* --- MODO INSTITUCIONAL (Cambio de color) --- */
#header-wrapper.header-institucional #mainHeader {
    background-color: var(--mineco-navy) !important;
}

/* --- Ajustes del Navbar en Modo Institucional --- */
#header-wrapper.header-institucional .navbar .nav-link {
    color: var(--white) !important;
}

#header-wrapper.header-institucional .navbar .nav-link:hover,
#header-wrapper.header-institucional .navbar .nav-link.active {
    color: var(--mineco-light) !important;
}

.navbar-collapse .header-actions {
    display: flex;
    align-items: center;
    flex-wrap: nowrap; /* Mantiene todo en una línea */
    flex-shrink: 0;    /* Evita que se encoja agresivamente */
}

/* 1. Ajuste al contenedor del Navbar para que maneje el espacio */
.navbar .container {
    display: flex;
    flex-wrap: wrap; /* Permite que los elementos bajen a la siguiente línea si no caben */
    align-items: center;
}

/* 2. El menú de navegación se vuelve más flexible */
.navbar-collapse {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

/* 3. Ajuste crítico: Evitar que los enlaces se encimen */
.navbar-nav {
    flex-direction: row;
    flex-wrap: wrap; /* Si el idioma es largo, los enlaces bajan */
    justify-content: center;
}

/* 4. Separación absoluta para botones y traductor */
.header-actions, 
.custom-translate-wrapper {
    flex-shrink: 0; /* IMPEDIR que los botones se encojan */
    margin-left: 10px;
}

/* 5. Punto de ruptura (breakpoint) avanzado */
@media (max-width: 1200px) {
    .navbar-nav .nav-link {
        padding-left: 5px !important;
        padding-right: 5px !important;
        font-size: 12px; /* Reducción de fuente para idiomas largos */
    }
  #mainHeader .navbar > .container {
        flex-wrap: wrap !important;
    }

    /* Forzar el menú a la segunda fila */
    .navbar-collapse {
        flex-basis: 100% !important;
        order: 2; /* Asegura que aparezca después de los elementos principales */
        margin-top: 15px;
        padding-top: 10px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Asegurar que el contenedor de acciones se mantenga alineado */
    .header-actions-container {
        width: 100%;
        justify-content: center !important;
        margin-top: 10px;
    }
}


#header-wrapper.header-institucional .navbar-toggler-icon {
    filter: invert(1);
}

/* --- Botones (Para que no pierdan su tamaño original) --- */
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center; /* Centra verticalmente los botones */
}

.btn-rpsc-header {
    display: inline-block;
    padding: 8px 18px; /* Mantén tu padding original */
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
}

/* Ajuste de botones en modo institucional */
#header-wrapper.header-institucional .btn-rpsc-header {
    background-color: var(--rpsc-secondary);
    color: var(--white);
}

/* =======================    BOTONES ======================= */
.btn-login {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  border-radius: 8px;
  font-weight: 600;
  transition: background-color 0.3s, box-shadow 0.3s;
}

.btn-login:hover {
  background-color: #0d3b66;
  box-shadow: 0 4px 10px rgba(16, 78, 139, 0.4);
}

.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary:hover {
  background-color: #005f73;
  box-shadow: 0 4px 10px rgba(0, 122, 150, 0.4);
}

.btn-outline {
  display: inline-block;
  padding: 0.5rem 1.2rem;
  border: 2px solid var(--color-primary);
  background-color: #fff;
  border-radius: 30px;
  color: var(--color-primary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.btn-outline.active {
  background-color: var(--color-primary) !important;
  border-color: var(--color-primary) !important;
  color: var(--contrast-color) !important;
  box-shadow: 0 4px 8px rgba(0, 122, 150, 0.2);
}

.btn-outline:hover,
.btn-outline:focus {
  background-color: var(--color-primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline:active {
  transform: translateY(0);
  background-color: #009bbf;
  border-color: #009bbf;
}

.hero-buttons .btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  padding: 12px 28px;
  /* ajusta a tu diseño */
  font-size: 1rem;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.hero-buttons .btn-primary:hover {
  background-color: #005f73;
  box-shadow: 0 4px 10px rgba(0, 122, 150, 0.4);
}

/* ==========================================================================
   MENÚ FLOTANTE INSTITUCIONAL 
   ========================================================================== */
#floatingMenu {
    position: fixed;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    width: auto;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 16px 12px;
    border-radius: 40px;
    box-shadow: 0 25px 50px rgba(25, 40, 84, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

#floatingMenu ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

#floatingMenu ul::-webkit-scrollbar {
    display: none;
}

#floatingMenu ul li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    color: var(--mineco-navy);
    text-decoration: none;
    position: relative;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#floatingMenu ul li a:hover,
#floatingMenu ul li a.active {
    background-color: var(--mineco-navy);
    color: var(--white) !important;
}

/* Tooltips laterales en Escritorio */
#floatingMenu ul li a::after {
    content: attr(data-label);
    position: absolute;
    right: 60px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background: var(--mineco-navy);
    color: var(--white);
    padding: 6px 14px;
    font-size: 0.82rem;
    font-weight: 500;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#floatingMenu ul li a:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

@media (max-width: 1366px) {
    #floatingMenu {
        position: fixed !important;
        
        /* 1. Reset absoluto de coordenadas verticales previas */
        top: auto !important;
        right: auto !important;
        max-height: none !important;
        
        /* 2. Forzado estricto al centro inferior de la pantalla */
        left: 50% !important;
        bottom: 24px !important;
        transform: translate(-50%, 0) !important; /* Centrado físico por hardware */
        
        /* 3. Dimensionamiento del contenedor móvil */
        width: calc(100% - 48px) !important;
        max-width: 440px !important;
        border-radius: 24px !important;
        padding: 10px 16px !important;
        box-shadow: 0 -10px 35px rgba(25, 40, 84, 0.18) !important;
    }

    #floatingMenu ul {
        display: flex !important;
        flex-direction: row !important; /* Cambia a barra horizontal */
        justify-content: space-around !important;
        align-items: center !important;
        width: 100% !important;
        gap: 0 !important;
    }

    #floatingMenu ul li {
        flex: 1 !important;
        display: flex !important;
        justify-content: center !important;
    }

    #floatingMenu ul li a {
        width: 42px !important;
        height: 42px !important;
        border-radius: 50% !important;
        font-size: 1rem !important;
    }

    /* Neutralización total de tooltips para pantallas táctiles */
    #floatingMenu ul li a::after {
        display: none !important;
        content: none !important;
    }
}

@media (max-width: 1024px) and (orientation: portrait) {
    #floatingMenu {
        position: fixed !important;
        bottom: 20px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%) !important;
        width: calc(100% - 40px) !important;
        max-width: 420px !important;
    }
}

@media (max-width: 576px) {
    #floatingMenu {
        bottom: 16px !important;
        width: calc(100% - 32px) !important;
        max-width: 380px !important;
        padding: 8px 12px !important;
        border-radius: 20px !important;
    }

    #floatingMenu ul li a {
        width: 38px !important;
        height: 38px !important;
        font-size: 0.95rem !important;
    }
}

@media (max-width: 360px) {
    #floatingMenu {
        bottom: 10px !important;
        width: calc(100% - 20px) !important;
        padding: 6px 8px !important;
    }
    
    #floatingMenu ul li a {
        width: 34px !important;
        height: 34px !important;
    }
}

/* =======================     HERO / SECCIÓN PRINCIPAL     ======================= */
.hero.section {
  padding: 60px 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9f0fb 100%);
  text-align: center;
}

.hero .subtitle {
  color: var(--color-primary);
  font-weight: 500;
  display: block;
  margin-bottom: 12px;
  font-size: 1rem;
}

.hero h1,
.hero h2 {
  color: var(--color-primary);
  font-weight: 700;
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 12px;
}

.hero p {
  max-width: 820px;
  margin: 0 auto 18px;
  color: #495057;
}

.hero-buttons a,
.hero-buttons .btn-outline {
  margin: 10px;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  transition: transform 0.3s;
}

.hero-buttons a:hover,
.hero-buttons .btn-outline:hover {
  transform: translateY(-3px);
}

/* =======================     ABOUT / LOGROS     ======================= */
.about-modern {
  position: relative;
  background: linear-gradient(135deg, #f8f9fa 60%, #eaf6f9);
  padding: 100px 0;
}

.about-modern h2 {
  color: var(--color-primary);
  font-weight: 800;
  margin-bottom: 0.8rem;
  font-size: 2rem;
}

.about-modern h5 {
  color: #444;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.about-modern p {
  color: #555;
  line-height: 1.6;
  text-align: justify;
}

.stats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
}

.stat-box {
  flex: 1 1 30%;
  background: #fff;
  border-radius: 16px;
  padding: 1.5rem 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: all 0.4s ease;
}

.stat-box:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.stat-box i {
  color: var(--color-primary);
  font-size: 2rem;
  margin-bottom: 0.3rem;
  display: block;
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--color-primary);
  transition: color 0.3s ease;
}

.stat-box:hover .stat-number {
  color: #009bbf;
}

.stat-box p {
  font-size: 0.95rem;
  color: #555;
  margin-top: 0.3rem;
}

/* Imagen institucional */
.image-container {
  position: relative;
  overflow: visible;
}

.main-image {
  border-radius: 18px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.6s ease;
}

.image-container:hover .main-image {
  transform: scale(1.05);
}

/* Elemento flotante decorativo */
.floating-shape {
  position: absolute;
  width: 220px;
  height: 220px;
  background: radial-gradient(circle at center, rgba(0, 122, 150, 0.15), transparent 70%);
  top: -40px;
  right: -60px;
  border-radius: 50%;
  animation: floatAnim 6s ease-in-out infinite alternate;
  z-index: -1;
}

#floatingMenu ul li .menu-title {
  font-weight: 700;
  font-size: 1rem;
  padding: 0.6rem 1rem;
  background-color: transparent;
  cursor: default;
  margin-bottom: 5px;
}

#floatingMenu ul li.special-title-item .menu-title-special {
  display: block;
  color: var(--color-primary);
  font-weight: 800;
  font-size: 1.05rem;
  padding: 0.6rem 1rem;
  background-color: #e6f6f9;
  border-bottom: 1px solid rgba(0, 122, 150, 0.1);
  cursor: default;
  margin-bottom: 5px;
}

#floatingMenu ul li.special-title-item a:hover {
  background-color: transparent;
  color: var(--color-primary);
}

@keyframes floatAnim {
  from {
    transform: translateY(0px);
  }

  to {
    transform: translateY(20px);
  }
}

/* =======================================================
   MATERIAL INFORMATIVO
   ======================================================= */
.badge-institutional {
    background: rgba(0, 122, 150, 0.08);
    color: var(--rpsc-primary);
    padding: 6px 16px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.title-underline {
    width: 50px;
    height: 4px;
    background: var(--rpsc-secondary);
    margin: 12px auto 0;
    border-radius: 10px;
}

.material-float-card {
    background: transparent;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-frame-container {
    position: relative;
    padding: 12px;
    background: var(--white);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(25, 40, 84, 0.05);
    margin-bottom: -30px; 
    z-index: 2;
    transition: all 0.4s ease;
}

.image-graphic-box {
    position: relative;
    width: 100%;
    height: 220px; /* Puedes ajustar esta altura según tu preferencia */
    overflow: hidden;
    border-radius: 12px; /* Opcional: para redondear esquinas */
    margin-bottom: 15px;
}

/* Fuerza a la imagen a llenar el espacio */
.image-graphic-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Clave para evitar pixeleo por deformación */
    object-position: center; /* Asegura que lo más importante de la imagen esté centrado */
    display: block;
    transition: transform 0.5s ease;
}

/* Efecto de zoom suave igual al de servicios */
.material-float-card:hover .image-graphic-box img {
    transform: scale(1.05);
}

.material-float-card:hover .image-graphic-box img {
    transform: scale(1.03);
}

.card-tag-floating {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(25, 40, 84, 0.85);
    color: var(--white);
    backdrop-filter: blur(4px);
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 8px;
    z-index: 3;
}

.card-body-floating {
    background: var(--white);
    border-radius: 24px;
    padding: 50px 24px 28px 24px; 
    box-shadow: 0 15px 35px rgba(25, 40, 84, 0.07);
    border-bottom: 4px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    z-index: 1;
    transition: all 0.4s ease;
}

.card-title-clean {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--mineco-navy);
    margin-bottom: 10px;
}

.card-title-clean span {
    color: var(--rpsc-primary);
}

.card-body-floating p {
    font-size: 0.9rem;
    color: var(--gray-500);
    line-height: 1.55;
    margin-bottom: 24px;
}

.btn-clean-action {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--gray-100);
    color: var(--mineco-navy);
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.btn-clean-action i {
    font-size: 1rem;
    transition: transform 0.3s ease;
    color: var(--rpsc-primary);
}

/* =======================================================
   COMPORTAMIENTOS HOVER (ANIMACIONES INTERACTIVAS)
   ======================================================= */

.material-float-card:hover {
    transform: translateY(-5px);
}

/* Elevación del marco de la imagen al hacer hover */
.material-float-card:hover .image-frame-container {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 122, 150, 0.12);
}

.material-float-card:hover .image-graphic-box img {
    transform: scale(1.04);
}

/* Resalte del cuerpo de la tarjeta */
.material-float-card:hover .card-body-floating {
    border-bottom-color: var(--rpsc-primary);
    box-shadow: 0 20px 45px rgba(25, 40, 84, 0.12);
}

/* Cambio de estilo del botón */
.material-float-card:hover .btn-clean-action {
    background: var(--rpsc-primary);
    color: var(--white);
}

.material-float-card:hover .btn-clean-action i {
    transform: translateX(4px);
    color: var(--white);
}

/* Ajustes para Responsivo Móvil */
@media (max-width: 767px) {
    .image-frame-container {
        margin-bottom: -20px;
    }
    .card-body-floating {
        padding: 40px 20px 24px 20px;
    }
}

/* =======================     CHATBOT     ======================= */
.chatbot-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  /* asegura que esté sobre todo */
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #007A96;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: background-color 0.3s, transform 0.3s;
}

.chatbot-button:hover {
  transform: scale(1.05);
}

/* Ajustes para móviles */
@media (max-width: 768px) {
  .chatbot-button {
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
  }

  /* 🔧 Topbar completamente responsive - versión ultra compacta */
  .topbar {
    flex-direction: column !important;
    padding: 4px 6px !important;
    font-size: 0.7rem !important;
    line-height: 1 !important;
    text-align: center;
    height: auto !important;
  }

  .topbar .container {
    flex-direction: column !important;
    align-items: center !important;
    gap: 2px !important;
  }

  .topbar div:first-child {
    flex-direction: column !important;
    align-items: center !important;
    gap: 1px !important;
  }

  .topbar div:first-child a {
    font-size: 0.7rem !important;
    margin: 0 !important;
  }

  .topbar div:last-child a {
    font-size: 0.75rem !important;
    margin: 0 1.5px !important;
  }

  .topbar span {
    display: none !important;
    /* Oculta los separadores | */
  }

  .topbar a {
    font-size: 0.75rem;
    /* más pequeño */
  }

  .topbar div:last-child i {
    font-size: 0.85rem;
    /* íconos más pequeños */
  }

  .topbar .container,
  .logo-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }
}

/* =======================     FOOTER     ======================= */
.footer-modern {
  background: linear-gradient(135deg, var(--mineco-navy),#163c69);
  color: #fff;
  padding: 60px 5% 30px;
  font-family: 'Lato', sans-serif;
  text-align: left;
}

.container-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: start;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  line-height: 1.6;
}

.footer-col h5{
    color:#fff;
    font-weight:700;
    margin-bottom:1rem;
    position:relative;
}

.footer-col p,
.footer-col a {
  color: #f1f1f1;
  font-size: 14px;
  margin-bottom: 4px;
  text-decoration: none;
}

.footer-col a:hover {
  color: #00a3e0;
}

.social-icons a{
    width:42px;
    height:42px;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:rgba(255,255,255,.10);
    color:var(--white);
    transition:all .3s ease;
}

.social-icons a:hover{
    background:var(--mineco-blue);
    color:var(--white);
    transform:translateY(-3px);
    box-shadow:0 8px 20px rgba(73,147,204,.35);
}

.social-icons a{
    width:42px;
    height:42px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    background:rgba(255,255,255,.08);
    color:#fff;
    transition:.3s;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top:1.25rem;
  margin-top:2rem;
  text-align: center;
  font-size: 13px;
  color: #ccc;
}

.map-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-secondary);
  font-weight: 500;
}

.map-link:hover {
  color: #fff;
  text-decoration: underline;
}

.footer-link{
    color:var(--rpsc-accent);
    text-decoration:none;
    font-weight:600;
}

.footer-link:hover{
    color:#fff;
}

/* =======================    RESPONSIVE AJUSTES ======================= */
@media (max-width: 992px) {

  #mainHeader {
    position: fixed;
    /* mantener fixed en responsive */
    top: 44px;
    /* sigue debajo del topbar */
  }

  .navbar-nav {
    text-align: center;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: calc(var(--topbar-height, 50px) + 70px);
    /* 70px = header */
  }

  .topbar {
    height: auto;
    padding: 8px 12px;
    flex-direction: column;
    align-items: center;
    gap: 2px;
  }

  #mainHeader {
    position: fixed;
    top: 44px;
    /* justo debajo del topbar */
    width: 100%;
    z-index: 2040;
  }

.content-wrapper {
  margin-top: 0;
}

  .logo-wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 100%;
    justify-content: center;
  }
}

/* =======================    PRELOADER ======================= */
#preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #ffffff;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#preloader::after {
  content: "";
  width: 50px;
  height: 50px;
  border: 5px solid #007A96;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* =======================================    NUEVOS MÓDULOS CSS (Redes Sociales y Categorías)    ======================================= */
/* --- D. Módulo de Redes Sociales --- */
.social-icons-line {
  /* Mantenemos los íconos grandes pero sin fondo para la limpieza */
  margin-top: 15px;
}

.social-icon-item {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 45px;
  height: 45px;
  border: 1px solid #ddd;
  /* Borde sutil */
  border-radius: 50%;
  /* Circular */
  color: #444;
  /* Ícono en color oscuro por defecto */
  font-size: 1.2rem;
  transition: all 0.3s;
}

.social-icon-item:hover {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  color: #fff;
  /* Inversión de color al hacer hover */
}

/* --- E. Módulo de Categorías --- */
.categories-list-line {
  padding: 0;
  margin: 0;
}

.categories-list-line li {
  padding: 8px 0;
  border-bottom: 1px dotted #ccc;
  /* Separador de puntos sutil */
  list-style: none;
}

.categories-list-line li:last-child {
  border-bottom: none;
}

.categories-list-line li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: var(--color-headings);
  /* Texto en color oscuro para alto contraste */
  font-weight: 600;
  transition: color 0.2s;
}

.categories-list-line li a:hover {
  color: var(--color-primary);
  /* Acento al hacer hover */
}

.category-name {
  font-size: 0.95rem;
}

.category-count {
  font-size: 0.85rem;
  color: #999;
  font-weight: 400;
}


/* ------------------------------------------------------------------
   NAVBAR-BRAND (logos)
------------------------------------------------------------------ */
#mainHeader .navbar-brand {
  flex: 0 0 auto;
  padding: 0;
  margin-right: 0;
  /* El ms-auto del wrapper empuja el menú */
}

.logo-wrapper {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 0;
}

.logo-img {
  height: 65px;
  max-height: 65px;
  width: auto;
  display: block;
  transition: transform 0.3s ease;
}

.logo-img:hover {
  transform: scale(1.05);
}

/* Separación entre logo Mineco y logo RPSC */
.logo-separator {
  margin-right: 1.5rem;
}

/* ------------------------------------------------------------------
   NAVBAR-COLLAPSE: ocupa el espacio restante, nunca se desborda
------------------------------------------------------------------ */
#mainNavbarCollapse {
  flex: 1 1 0%;
  min-width: 0;
  justify-content: flex-end;
}

/* Wrapper interno: alinea nav-links y botón en una fila */
.navbar-content-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-end;
  width: 100%;
  min-width: 0;
}

/* Lista de enlaces: se comprime, pero no oculta el botón */
.navbar-nav {
  flex-wrap: nowrap;
  min-width: 0;
  flex-shrink: 1;
  /* cede espacio al botón si hace falta */
}

.navbar-nav .nav-link {
  color: var(--color-dark);
  font-weight: 500;
  font-size: 15px;
  padding: 10px 12px !important;
  transition: all 0.3s ease;
  position: relative;
  white-space: nowrap;
}

/* Botón Capacítate: siempre visible, nunca comprimido ni tapado */
.capacitate-wrapper {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: 0.75rem;
}

.capacitate-btn {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  padding: 8px 18px;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.capacitate-btn:hover {
  background-color: #005f73;
  box-shadow: 0 4px 10px rgba(0, 122, 150, 0.4);
  transform: translateY(-2px);
}

.capacitate-btn i {
  margin-right: 6px;
  pointer-events: none;
}

/* Botón hamburguesa */
.navbar-toggler {
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==================================================================
   BREAKPOINT 992px – 1199px
   Bootstrap expande el menú aquí (navbar-expand-lg).
   El espacio es justo: logos más pequeños, nav-links comprimidos.
================================================================== */
@media (min-width: 992px) and (max-width: 1199px) {

  /* Logos más pequeños para liberar espacio */
  .logo-img {
    height: 48px;
    max-height: 48px;
  }

  .logo-separator {
    margin-right: 0.75rem;
  }

  /* Nav-links comprimidos */
  .navbar-nav .nav-link {
    padding: 8px 6px !important;
    font-size: 13px;
  }

  /* Botón: sin ícono, más compacto */
  .capacitate-wrapper {
    margin-left: 0.4rem;
  }

  .capacitate-btn {
    padding: 6px 11px;
    font-size: 13px;
  }

  .capacitate-btn i {
    display: none;
    /* Oculta ícono para ganar ~30px */
  }
}

/* ==================================================================
   BREAKPOINT 1200px+
   Espacio suficiente — tamaños completos
================================================================== */
@media (min-width: 1200px) {

  .logo-img {
    height: 65px;
    max-height: 65px;
  }

  .logo-separator {
    margin-right: 1.5rem;
  }

  .navbar-nav .nav-link {
    padding: 10px 12px !important;
    font-size: 15px;
  }

  .capacitate-wrapper {
    margin-left: 1rem;
  }

  .capacitate-btn {
    padding: 9px 20px;
    font-size: 15px;
  }

  .capacitate-btn i {
    display: inline;
    margin-right: 6px;
  }
}

/* ==================================================================
   BREAKPOINT ≤ 991px
   Menú colapsado (hamburguesa) — layout vertical
================================================================== */
@media (max-width: 991px) {

  .navbar-collapse {
        padding: 20px;
        border-top: 1px solid #ddd;
    }

  /* Collapse abierto: ocupa todo el ancho */
  .navbar-collapse.show,
  .navbar-collapse.collapsing {
    width: 100%;
  }

  .header-actions-container {
        flex-direction: column !important; /* Apila botones en vertical */
        gap: 15px !important;
        margin-top: 20px !important;
        width: 100% !important;
    }

    .header-actions, .custom-translate-wrapper {
        width: 100% !important; /* Ocupan todo el ancho del móvil */
        display: flex !important;
        justify-content: center !important;
    }

  .navbar-content-wrapper {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 0;
  }

  .navbar-nav {
    flex-direction: column;
    width: 100%;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
  }

  .navbar-nav .nav-item {
    width: 100%;
    border-bottom: 1px solid #eee;
  }

  .navbar-nav .nav-link {
    padding: 11px 0 !important;
    text-align: center;
    width: 100%;
    font-size: 15px;
  }

  .capacitate-wrapper {
    width: 100%;
    margin-left: 0;
    margin-top: 0.75rem;
    justify-content: center;
    flex-shrink: unset;
  }

  .capacitate-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
    padding: 9px 20px;
  }

  .capacitate-btn i {
    display: inline;
    margin-right: 6px;
  }

  .menu-item::after {
    bottom: 2px;
    left: 25%;
    width: 0;
  }

  .menu-item:hover::after,
  .menu-item.active::after {
    width: 50%;
  }

  #header-wrapper {
        position: sticky !important;
        top: 0 !important;
        width: 100%;
        z-index: 1020 !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    #mainHeader, .navbar-modern {
        position: relative !important;
        top: 0 !important;
    }
   
}

/* Ajuste para Tablets y Plegables (Resolución horizontal hasta 1200px) */
@media (max-width: 1200px) {
    .navbar-collapse {
        flex-basis: 100%;
        flex-grow: 1;
        align-items: center;
        background: var(--mineco-navy); /* Asegura contraste */
        padding: 15px;
        margin-top: 10px;
        border-radius: 8px;
    }

    .navbar-nav {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }
    
    .header-actions-container {
        flex-direction: column; /* Apila botones verticalmente en tablets */
        width: 100%;
        margin-top: 15px;
    }
}



/* Estilo base para el enlace activo */
.navbar-nav .nav-link.active {
    color: var(--rpsc-primary) !important; /* O el color corporativo que prefieras */
    font-weight: 700;
}

/* Subrayado decorativo para el estado activo */
.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--rpsc-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link.active::after {
    width: 70%; /* El subrayado aparece cuando está activo */
}

/* ==================================================================
   BREAKPOINT ≤ 576px — móviles pequeños
================================================================== */
@media (max-width: 576px) {

  .logo-img {
    height: 38px;
    max-height: 38px;
  }

  .logo-separator {
    margin-right: 0.5rem;
  }

  .navbar-nav .nav-link {
    font-size: 14px;
    padding: 10px 0 !important;
  }

  .capacitate-btn {
    font-size: 14px;
    padding: 8px 16px;
  }
}

@media (max-width: 991px) {
    .navbar-nav .nav-link.active {
        background-color: rgba(0, 122, 150, 0.05); 
    }
    
    .navbar-nav .nav-link.active::after {
        display: none;
    }
}

/*1. VARIABLES Y RESET LOCALES
   ========================================================================== */
.decoration-none {
  text-decoration: none !important;
}

@keyframes glass-shimmer {
  0% {
    left: -150%;
  }

  50% {
    left: 150%;
  }

  100% {
    left: 150%;
  }
}

/* ==========================================================================
   2. SECCIÓN HERO E INTEGRACIÓN
   ========================================================================== */
.hero-integration-section {
  display: flex;
  align-items: center;
  padding: 60px 0;
  background: linear-gradient(135deg, #ffffff 0%, #f1f7f9 100%);
}

.main-title {
  color: var(--heading-color);
  font-size: 3.2rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.text-accent {
  color: var(--color-primary);
}

.subtitle-badge {
  display: inline-block;
  background-color: rgba(0, 122, 150, 0.1);
  color: var(--color-primary);
  padding: 8px 16px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* ==========================================================================
   3. SISTEMA BENTO GRID
   ========================================================================== */
.bento-item {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 1.5rem;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.main-item {
  background: white;
  border-bottom: 5px solid var(--color-secondary);
}

.bento-number {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--color-primary);
  margin: 0;
}

.secondary-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
}

.secondary-item i {
  font-size: 1.8rem;
}

.secondary-item .val {
  font-size: 1.2rem;
  font-weight: 700;
  display: block;
}

.secondary-item .lab {
  font-size: 0.75rem;
  color: #666;
}

/* Footers y Estados dentro del Bento */
.bento-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.bento-footer p {
  margin: 0;
  padding: 0;
  display: inline-block;
  font-size: 0.75rem;
  line-height: 1;
  color: #666;
}

.status-dot {
  flex-shrink: 0;
  height: 8px;
  width: 8px;
  background-color: #198754;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 8px #198754;
  animation: pulse-green 2s infinite;
}

/* Bordes específicos del grid */
.border-success-custom {
  border-top: 4px solid #198754;
}

.border-primary-custom {
  border-top: 4px solid var(--color-primary);
}

/* ==========================================================================
   4. SECCIÓN SERVICIOS MODERNOS (REDISEÑO EN COLUMNAS - TARJETAS)
   ========================================================================== */
.services-graphic-grid {
    margin-top: 20px;
}

.visual-service-card {
    background: var(--white);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 35px rgba(25, 40, 84, 0.04);
    border: 1px solid var(--gray-200);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.service-graphic-media {
    position: relative;
    overflow: hidden;
    height: 200px; 
    width: 100%;
}

.service-graphic-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.media-overlay-gradient {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(25, 40, 84, 0.3) 0%, rgba(0, 122, 150, 0.1) 100%);
    mix-blend-mode: multiply;
}

.media-icon-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 44px;
    height: 44px;
    background: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.12);
    z-index: 2;
}

.item-primary .media-icon-badge i { color: var(--rpsc-primary); }
.item-navy .media-icon-badge i { color: var(--mineco-navy); }
.item-secondary .media-icon-badge i { color: var(--rpsc-secondary); }

.service-graphic-content {
    padding: 24px; 
}

.service-meta-tag {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    display: inline-block;
}
.text-primary-color { color: var(--rpsc-primary); }
.text-navy-color { color: var(--mineco-navy); }
.text-secondary-color { color: var(--rpsc-secondary); }

.service-graphic-content h4 {
    color: var(--mineco-navy);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.service-graphic-content p {
    color: var(--gray-500);
    font-size: 0.88rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.visual-cost-badge {
    background: var(--gray-100);
    border-radius: 12px;
    padding: 10px 16px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
}
.cost-item {
    display: flex;
    flex-direction: column;
}
.cost-label {
    font-size: 0.65rem;
    color: var(--gray-500);
    text-transform: uppercase;
}
.cost-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--mineco-navy);
}
.cost-divider {
    width: 1px;
    height: 24px;
    background: var(--gray-300);
}

.border-top-dashed {
    border-top: 1px dashed var(--gray-300);
}

.btn-visual-action {
    padding: 11px 20px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    border-radius: 6px;
}

.btn-visual-outline {
    border: 2px solid var(--rpsc-secondary);
    color: var(--rpsc-secondary);
    background: transparent;
}
.btn-visual-outline:hover {
    background: var(--rpsc-secondary);
    color: var(--white);
}

.visual-service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 40px rgba(25, 40, 84, 0.08);
}

.visual-service-card:hover .service-graphic-media img {
    transform: scale(1.05);
}

.item-primary:hover { border-color: rgba(0, 122, 150, 0.3); }
.item-navy:hover { border-color: rgba(25, 40, 84, 0.3); }
.item-secondary:hover { border-color: rgba(0, 180, 160, 0.3); }

/* POLÍTICA DE PRIVACIDAD EN TARJETA */
.service-privacy-anchor {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid transparent;
    color: var(--gray-500);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all .3s ease;
}

.service-privacy-anchor:hover {
    background: rgba(0, 0, 0, 0.07);
    color: var(--rpsc-primary);
}

.service-privacy-anchor i {
    font-size: .85rem;
    color: var(--rpsc-primary);
}

.btn-rpsc-primary-color {
    background: var(--rpsc-primary);
    border: 2px solid var(--rpsc-primary);
    color: var(--white) !important; 
}
.btn-rpsc-primary-color:hover {
    background: var(--mineco-navy);
    border-color: var(--mineco-navy);
}

.btn-rpsc-secondary-color {
    background: var(--rpsc-secondary);
    border: 2px solid var(--rpsc-secondary);
    color: var(--white) !important;
}
.btn-rpsc-secondary-color:hover {
    background: var(--mineco-navy);
    border-color: var(--mineco-navy);
}

/* ==========================================================================
   5. SECCIÓN APP Y MOCKUP
   ========================================================================== */

.app-section-modern {
    background: linear-gradient(135deg, var(--gray-100) 0%, #EBF4F8 100%);
    position: relative;
    overflow: hidden;
}

/* Badge de la Sección */
.app-badge-modern {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 50px;
    background: rgba(0, 122, 150, 0.08);
    color: var(--rpsc-primary);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
}

/* Títulos y Descripciones */
.app-title-modern {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--mineco-navy);
    line-height: 1.15;
}

.app-title-modern span {
    color: var(--rpsc-primary);
}

.app-description-modern {
    color: var(--gray-700);
    font-size: 1.05rem;
    line-height: 1.7;
}

/* Grid de Características Interactivas */
.app-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.feature-card-modern {
    display: flex;
    gap: 15px;
    background: var(--white);
    padding: 20px;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(25, 40, 84, 0.04);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.feature-card-modern:hover {
    transform: translateY(-3px);
    border-left-color: var(--rpsc-secondary);
    box-shadow: 0 15px 35px rgba(25, 40, 84, 0.09);
}

.feature-icon-box {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: rgba(0, 158, 222, 0.1);
    color: var(--rpsc-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.feature-text-box h6 {
    font-weight: 700;
    color: var(--mineco-navy);
    margin-bottom: 4px;
    font-size: 0.98rem;
}

.feature-text-box p {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin: 0;
    line-height: 1.4;
}

/* Mockup de Smartphone Realista (Sin imágenes externas pesadas) */
.phone-showcase-container {
    position: relative;
    display: inline-block;
    margin: 0 auto;
}

.phone-glow-effect {
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(73, 147, 204, 0.15) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

.smartphone-frame {
    position: relative;
    width: 280px;
    height: 560px;
    background: #111827;
    border: 11px solid #374151;
    border-radius: 30px;
    box-shadow: 0 30px 60px rgba(25, 40, 84, 0.25);
    overflow: hidden; /* Esto es vital: recorta lo que sobresale */
    z-index: 2;
    display: inline-block;
}

.app-screen-img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: top center; 
    display: block;
}

/* Botones de las Tiendas (Estilo Premium) */
.store-buttons-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    z-index: 5;
    position: relative;
}

.store-btn-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #000000 !important; /* Forzamos el fondo negro original de ambas tiendas */
    color: var(--white) !important;
    padding: 10px 24px;
    border-radius: 10px; /* Bordes ligeramente menos redondeados, más fiel al diseño original */
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 190px;
    text-align: left;
}

.store-btn-modern i {
    font-size: 2rem;
    color: #FFFFFF !important;
}

.store-btn-text {
    display: flex;
    flex-direction: column;
}

.store-btn-text span {
    font-size: 0.68rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #FFFFFF !important;
}

.store-btn-text strong {
    font-size: 1.05rem;
    font-weight: 600;
    color: #FFFFFF !important;
}

.store-btn-modern:hover {
    background: #1A1A1A !important; /* Un gris sumamente oscuro, simulando el botón real */
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Contenedor envolvente para darle una base visual */
.app-privacy-wrapper {
    margin-top: 1.8rem;
    display: inline-block;
}

.app-privacy-anchor-modern {
    font-size: 0.88rem;
    color: var(--mineco-navy) !important; /* Usamos el color corporativo en vez de gris */
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: rgba(25, 40, 84, 0.04); /* Un fondo grisáceo/azul muy sutil */
    border-radius: 30px; /* Bordes redondeados tipo píldora */
    border: 1px dashed rgba(25, 40, 84, 0.15); /* Borde punteado elegante */
}

/* Comportamiento al pasar el cursor */
.app-privacy-anchor-modern:hover {
    color: var(--rpsc-primary) !important;
    background: rgba(0, 122, 150, 0.08);
    border-color: rgba(0, 122, 150, 0.3);
    transform: translateY(-1px);
}

/* Color específico para el icono de escudo dentro del enlace */
.app-privacy-anchor-modern i {
    font-size: 1rem;
    color: var(--rpsc-primary);
}

/* =======================================================
   RESPONSIVE APP SECTION
======================================================= */
@media (max-width: 991px) {
    .app-section-modern {
        text-align: center;
        padding: 60px 0;
    }
    .app-badge-modern {
        justify-content: center;
    }
    .feature-card-modern {
        text-align: left;
    }
    .smartphone-frame {
        width: 250px;
        height: 500px;
        margin-top: 20px;
    }
}

/* ==========================================================================
   6. BOTONES Y COMPONENTES DE ACCIÓN
   ========================================================================== */
.hero-buttons-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Primario Custom */
.btn-primary-custom {
  display: inline-block;
  background-color: var(--color-primary);
  color: white;
  padding: 14px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 122, 150, 0.3);
}

.btn-primary-custom:hover {
  background-color: #005f73;
  transform: translateY(-3px);
  color: white;
}

/* Outline Custom */
.btn-outline-custom {
  padding: 14px 30px;
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
}

/* Ámbar / Validador */
.btn-validator-amber {
  display: inline-block;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white !important;
  padding: 14px 30px;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.3);
  border: none;
}

.btn-validator-amber:hover {
  transform: translateY(-3px);
  filter: brightness(1.1);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
  color: white !important;
}

/* Shimmer Effect */
.btn-shimmer {
  position: relative !important;
  overflow: hidden !important;
}

.btn-shimmer::after {
  content: "";
  position: absolute;
  top: 0;
  height: 100%;
  width: 150px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-20deg);
  animation: glass-shimmer 6s infinite;
}

/* Botones de Tienda (Legacy y Modernos) */
.store-buttons,
.store-buttons-modern {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.store-buttons {
  margin-bottom: 30px;
}

.store-btn img {
  height: 48px;
  transition: all .25s ease;
}

.store-btn img:hover {
  transform: translateY(-3px) scale(1.03);
}

.store-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 12px;
  padding: 10px 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  text-decoration: none;
  color: #333;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
  transition: all .25s ease;
}

.store-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.store-card i {
  font-size: 22px;
}

.store-card span {
  font-size: .7rem;
  display: block;
  color: #777;
  line-height: 1;
}

.store-card strong {
  font-size: .9rem;
}

.store-card.google i {
  color: #34a853;
}

.store-card.apple i {
  color: #000;
}

/* ==========================================================================
   7. TARJETAS DE PRESTADORES Y REFERENCIAS
   ========================================================================== */
.provider-highlight-card {
  display: block;
  background: linear-gradient(to right, #ffffff, #f8fdff);
  border-left: 5px solid var(--color-primary) !important;
  padding: 1rem 1.2rem;
  transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.provider-highlight-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08) !important;
  background: #ffffff;
}

.icon-badge-accent {
  width: 45px;
  height: 45px;
  background: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.4rem;
  box-shadow: 0 4px 10px rgba(0, 122, 150, 0.2);
}

.badge-number {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}

.arrow-circle {
  width: 30px;
  height: 30px;
  background: #f0f4f5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  transition: 0.3s;
}

.provider-highlight-card:hover .arrow-circle {
  background: var(--color-primary);
  color: white;
}

.sources-reference-box {
  background: rgba(0, 0, 0, 0.02);
  border: 1px dashed #d1d1d1;
}

.sources-reference-box p {
  font-size: 0.68rem;
  line-height: 1.2;
  color: #777;
}

/* ==========================================================================
   8. RESPONSIVO (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 991px) {
  .main-title {
    font-size: 2.2rem;
  }

  .hero-integration-section {
    text-align: center;
    padding-top: 40px;
  }

  .app-title {
    font-size: 2rem;
    text-align: center;
  }

  .app-description {
    text-align: center;
    margin: auto;
  }

  .app-features {
    grid-template-columns: 1fr;
  }

  .store-buttons,
  .store-buttons-modern {
    justify-content: center;
  }
}

/* ==========================================================================
   RANGO INTERMEDIO: 992px – 1199px
   Cubre tabletas grandes y monitores medianos que antes quedaban sin reglas
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1199px) {

  /* Hero e integración */
  .main-title {
    font-size: 2.6rem;
  }

  .hero-integration-section {
    padding: 50px 0;
  }

  .app-title {
    font-size: 2.2rem;
  }

  .app-description {
    max-width: 420px;
  }

  .app-features {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Body y header */
  body {
    padding-top: 114px;
  }

  #mainHeader {
    position: fixed;
    top: 44px;
  }

  /* Footer */
  .container-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  /* Stat boxes */
  .stat-box {
    flex: 1 1 45%;
  }

  /* Cards grid */
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .info-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  /* Menú flotante */
  #floatingMenu {
    right: 12px;
  }
}

/* ==========================================================================
   POLÍTICAS DE PRIVACIDAD APP
   ========================================================================== */

.app-privacy-link {
  font-size: 0.8rem;
}

.app-privacy-anchor {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: rgba(0,0,0,.04);
  border-radius: 20px;
  color: #555;
  font-size: .85rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all .3s ease;
}

.app-privacy-anchor:hover {
  background: rgba(0,0,0,.08);
  border-color: #ddd;
  color: #000;
}

/* BACKDROP */

.privacy-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

/* CONTENEDOR */

.privacy-modal-content {
  width: 90%;
  max-width: 700px;
  background: white;
  border-radius: 14px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
  animation: modalFade .35s ease;
  overflow: hidden;
}

/* HEADER */

.privacy-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid #eee;
  background: linear-gradient(135deg, #f8f9fa, #ffffff);
}

.privacy-header h4 {
  margin: 0;
  font-weight: 600;
  color: #333;
}

/* BOTON CERRAR */

.privacy-close {
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #666;
}

.privacy-close:hover {
  color: #000;
}

/* BODY */

.privacy-body {
  padding: 25px;
  max-height: 60vh;
  overflow-y: auto;
  font-size: 0.95rem;
  line-height: 1.6;
}

.privacy-body h6 {
  margin-top: 18px;
  font-weight: 600;
}

.privacy-anchor {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: rgba(0, 0, 0, 0.04);
  /* Fondo sutil */
  border-radius: 20px;
  color: #555 !important;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  border: 1px solid transparent;
}

.privacy-anchor:hover {
  background: rgba(0, 0, 0, 0.08);
  border-color: #ddd;
  color: #000 !important;
}

/* ANIMACION */

@keyframes modalFade {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   ESCRITORIO GRANDE: 1200px en adelante
   Estilos para resoluciones altas que no tenían cobertura explícita
   ========================================================================== */
@media (min-width: 1200px) {

  /* Hero */
  .main-title {
    font-size: 3.2rem;
  }

  .hero-integration-section {
    padding: 60px 0;
  }

  .app-title {
    font-size: 2.6rem;
  }

  .app-description {
    max-width: 500px;
  }

  .app-features {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Grids de tarjetas */
  .cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
  }

  .info-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
  }

  /* Footer */
  .container-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
  }

  /* Stat boxes */
  .stat-box {
    flex: 1 1 30%;
  }
}

/* ==========================================================================
   RED DE SEGURIDAD GLOBAL
   Previene desbordamientos en cualquier resolución
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  overflow-x: hidden;
  max-width: 100%;
}

img,
video,
iframe,
embed,
object {
  max-width: 100%;
  height: auto;
}

/* ==========================================================================
   ESTILOS EXTRAÍDOS DE navigation.blade.php
   (panel de administración — navbar Tailwind)
   ========================================================================== */

/* Navbar del panel: tres columnas (logo | título | usuario) */
/* En resoluciones intermedias el título se comprime sin solaparse */
@media (min-width: 640px) and (max-width: 1199px) {
  .nav-title {
    font-size: 0.95rem;
    letter-spacing: 0.04em;
  }
}

@media (max-width: 639px) {
  .nav-title {
    font-size: 0.85rem;
    letter-spacing: 0.02em;
  }
}


/* ==========================================================================
   ALERTAS EMERGENTES EN LA PÁGINA 
   ========================================================================== */
/* 1. CONTENEDOR Y ESTRUCTURA DE LA ALERTA (1000px) */
.toast-container {
  width: 600px !important;
  max-width: 95vw !important;
  z-index: 9999;
}

.custom-alert-toast {
  width: 600px !important;
  max-width: 100% !important;
  border: none !important;
  border-radius: 12px !important;
  /* Aplicación del color principal solicitado */
  border-top: 6px solid #102a49 !important;
  box-shadow: 0 20px 60px rgba(16, 42, 73, 0.25) !important;
  display: none;
  overflow: hidden;
}

.bg-navy-light {
  background-color: #f4f7fa !important;
  border-bottom: 1px solid #e2e8f0 !important;
  padding: 12px 20px !important;
}

/* Icono de cabecera en azul principal */
.custom-alert-toast .toast-header .bi-info-circle-fill {
  color: #102a49 !important;
}

.custom-alert-toast .toast-header strong {
  color: #102a49 !important;
  font-weight: 700;
}

.toast-body {
  padding: 2.5rem !important;
  background-color: #ffffff;
}

/* Título de documento institucional */
.custom-alert-toast .toast-body h6 {
  color: #102a49 !important;
  font-size: 1.75rem !important;
  font-weight: 800 !important;
  text-align: center !important;
  margin-bottom: 2rem !important;
}

/* 2. CONTENEDOR DEL PDF */
.pdf-container {
  display: flex;
  justify-content: center;
  align-items: center;
  background: #f8f9fa;
  border: 1px solid #edf2f7;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 1.5rem;
}

.pdf-container canvas {
  width: 100% !important;
  height: auto !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
  border-radius: 4px;
}

/* 3. BOTÓN ESPECÍFICO DE LA ALERTA (No afecta al resto del sitio) */
.button-wrapper {
  margin-top: 25px;
  display: flex;
  justify-content: center;
  padding-bottom: 5px;
}

.btn-alert-document {
  width: 320px !important;
  padding: 12px 24px !important;
  background-color: transparent !important;
  color: #102a49 !important;
  border: 2px solid #102a49 !important;
  font-weight: 700 !important;
  font-size: 0.9rem !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
}

.btn-alert-document:hover {
  background-color: #102a49 !important;
  color: #ffffff !important;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(16, 42, 73, 0.2);
}

.btn-alert-document i {
  font-size: 1.25rem;
  color: #102a49 !important;
  /* Rojo PDF estándar */
  margin-right: 12px;
  transition: color 0.3s ease;
}

.btn-alert-document:hover i {
  color: #ffffff !important;
}

.toast.fade.hide {
    pointer-events: none;
}

.toast-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.5); 
  backdrop-filter: blur(4px);           
  z-index: 9999;                       
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.toast-overlay:has(.toast.show) {
  opacity: 1;
  pointer-events: auto;
}

.toast-container-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  max-width: 90%;
  width: 450px;
  overflow: visible; 
}

.custom-alert-toast {
  width: 100% !important;
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3) !important;
  background-color: var(--white) !important;
  border-radius: 16px !important;
  overflow: hidden;
}

.custom-alert-toast.show {
  animation: slideInFromRight 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.custom-alert-toast.show:nth-child(2) {
  animation-delay: 0.15s;
}
.custom-alert-toast.show:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes slideInFromRight {
  0% {
    transform: translateX(120%);
    opacity: 0;
  }
  100% {
    transform: translateX(0);    
    opacity: 1;
  }
}

@media (max-width: 1199px) {
  .floating-card {
    display: none !important; 
  }
}

/* ==========================================================================
   LECTURA DE CONTENIDO EN VOZ ALTA
   ========================================================================== */
.btn-lectura-flotante {
    position: fixed !important;
    bottom: 30px !important;
    left: 30px !important;
    z-index: 99999 !important;
    background-color: var(--mineco-navy, #1a2a4a) !important;
    color: var(--white, #ffffff) !important;
    border: 2px solid var(--white, #ffffff) !important;
    padding: 12px 25px !important;
    border-radius: 50px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5) !important;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1) !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    visibility: visible !important;
    opacity: 1 !important;
    will-change: transform;
    /* Evita que el botón se salga de la pantalla en dispositivos muy pequeños */
    max-width: 90vw !important;
    white-space: nowrap !important;
}

.btn-lectura-flotante:hover {
    background-color: var(--rpsc-primary, #007a96) !important;
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 25px rgba(0, 122, 150, 0.5) !important;
}

.btn-lectura-flotante.leyendo {
    background-color: var(--rpsc-secondary, #e67e22) !important;
    border-color: var(--rpsc-secondary, #e67e22) !important;
    color: var(--white, #ffffff) !important;
}

.btn-lectura-flotante.pausado {
    background-color: #64748B !important;
    border-color: #64748B !important;
}

.btn-lectura-flotante:focus {
    outline: 3px solid var(--rpsc-secondary, #e67e22) !important;
    outline-offset: 2px !important;
}

/* ===== PANTALLAS MEDIANAS (tablets) ===== */
@media (max-width: 768px) {
    .btn-lectura-flotante {
        bottom: 20px !important;
        left: 20px !important;
        padding: 10px 22px !important;
        font-size: 14px !important;
        gap: 8px !important;
    }
}

/* ===== PANTALLAS PEQUEÑAS (móviles) ===== */
@media (max-width: 576px) {
    .btn-lectura-flotante {
        bottom: 15px !important;
        left: 15px !important;
        padding: 8px 16px !important;
        font-size: 12px !important;
        gap: 6px !important;
        border-radius: 40px !important;
        box-shadow: 0 3px 15px rgba(0, 0, 0, 0.6) !important;
    }

    .btn-lectura-flotante i {
        font-size: 14px !important;
    }
}

/* ===== PANTALLAS MUY PEQUEÑAS (ej. < 400px) ===== */
@media (max-width: 400px) {
    .btn-lectura-flotante {
        bottom: 10px !important;
        left: 10px !important;
        padding: 6px 12px !important;
        font-size: 11px !important;
        gap: 5px !important;
        border-radius: 30px !important;
    }
}

/* ===== GARANTIZAR QUE EL BOTÓN NO SEA OCULTADO POR OTROS ELEMENTOS ===== */
.btn-lectura-flotante * {
    pointer-events: none !important; /* Permite que el clic pase al botón, no a los hijos */
}
.btn-lectura-flotante i,
.btn-lectura-flotante span {
    pointer-events: none !important;
}


/* ==========================================================================
   Google Translate
   ========================================================================== */
.custom-translate-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--mineco-navy);
    border: 1px solid var(--mineco-blue);
    padding: 0 12px; 
    border-radius: 4px;
    height: 38px;
    width: auto; 
    max-width: 180px; 
    cursor: pointer;
    border-left: 2px solid rgba(255,255,255,0.2);
    flex-shrink: 0 !important;
    margin-left: 0 !important;
}

.custom-translate-wrapper:hover {
    background: var(--mineco-blue);
    border-color: var(--white);
}

.translate-label {
    color: var(--white);
    font-size: 13px; 
    font-weight: 500;
    pointer-events: none;
    display: flex;
    align-items: center;
    gap: 6px; 
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis; 
}

.goog-te-combo {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    opacity: 0 !important;
    cursor: pointer !important;
    z-index: 10;
}

#google_translate_element {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    z-index: 20; 
}

.goog-te-gadget {
    font-size: 0 !important;
    color: transparent !important;
}

.goog-te-gadget-simple {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
}

@media (max-width: 992px) {
    .custom-translate-wrapper {
        margin-top: 10px;
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   NAVBAR EN DOS FILAS (menú | acciones) PARA TABLETS Y PANTALLAS MEDIANAS
   ============================================================ */
@media (min-width: 992px) and (max-width: 1400px) {
  /* El contenedor del collapse permite wrap para separar menú y acciones */
  .navbar-collapse {
    flex-wrap: wrap !important;
    justify-content: center !important;
  }

  /* El menú ocupa el 100% del ancho en su propia fila */
  .navbar-nav {
    flex: 0 0 100% !important;
    justify-content: center !important;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
  }

  /* Contenedor de acciones: ocupa el 100% pero en una sola línea */
  .header-actions-container {
    flex: 0 0 100% !important;
    display: flex !important;
    flex-wrap: nowrap !important;           /* ← Cambio clave: no envolver */
    justify-content: center !important;
    align-items: center !important;
    gap: 8px 12px !important;              /* Espacio entre elementos */
    margin-top: 10px !important;
    padding-top: 10px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }

  /* Botones: se encogen si es necesario */
  .header-actions {
    display: flex !important;
    flex-wrap: nowrap !important;           /* Asegurar una línea */
    gap: 6px !important;
    flex-shrink: 1 !important;              /* Permitir que se reduzcan */
  }

  .btn-rpsc-header {
    padding: 6px 12px !important;           /* Más compacto */
    font-size: 0.8rem !important;           /* Reducir fuente */
    white-space: nowrap !important;
  }

  /* Traductor: no se encoge, se mantiene al final */
  .custom-translate-wrapper {
    flex-shrink: 0 !important;              /* Evita que se comprima */
    max-width: 150px !important;            /* Un poco más estrecho */
    height: 34px !important;                /* Altura ajustada */
    padding: 0 8px !important;
  }

  .translate-label {
    font-size: 11px !important;             /* Reducir texto */
    gap: 4px !important;
  }

  /* Ajuste para los enlaces del menú (opcional) */
  .navbar-nav .nav-link {
    padding: 6px 10px !important;
    font-size: 0.9rem !important;
  }
}

@media (min-width: 992px) and (max-width: 1400px) {
  /* Contenedor principal de acciones: forzar una fila */
  .header-actions-container {
    display: flex !important;
    flex-flow: row nowrap !important;      /* ← una sola línea */
    justify-content: center !important;
    align-items: center !important;
    gap: 8px 12px !important;
    width: 100% !important;
  }

  /* Botones: se encogen si es necesario */
  .header-actions {
    display: flex !important;
    flex-flow: row nowrap !important;
    gap: 6px !important;
    flex: 0 1 auto !important;             /* permite reducir su ancho */
    min-width: 0 !important;               /* permite que se encojan */
  }

  .btn-rpsc-header {
    padding: 4px 8px !important;           /* más compacto */
    font-size: 0.7rem !important;          /* texto más pequeño */
    white-space: nowrap !important;
    min-width: 0 !important;
  }

  /* Traductor: se mantiene fijo al final */
  .custom-translate-wrapper {
    flex: 0 0 auto !important;             /* no se encoge */
    max-width: 120px !important;           /* ancho limitado */
    height: 28px !important;
    padding: 0 6px !important;
  }

  .translate-label {
    font-size: 10px !important;
    gap: 3px !important;
  }

  /* Si aún así no cabe, oculta el texto "Idioma" en pantallas más estrechas */
  @media (max-width: 1150px) {
    .translate-label .bi-translate + .label-text {
      display: none !important;
    }
    .custom-translate-wrapper {
      max-width: 80px !important;
    }
  }
}
