/* ==========================================================================
   Stats Counter Styles - Limpio y aislado
   ========================================================================== */

.messive-wrapper-counter {
    box-sizing: border-box;
}

.messive-wrapper-counter *,
.messive-wrapper-counter *::before,
.messive-wrapper-counter *::after {
    box-sizing: inherit;
}

/* ==========================================================================
   Estilo 1 y Estilo 2 (Logo superior, contenido inferior)
   ========================================================================== */
#mega_count_bar .mega_count_img img,
.mega_count_bar .mega_count_img img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

#mega_count_bar .mega_count_img,
.mega_count_bar .mega_count_img {
    padding-bottom: 5px;
    text-align: center;
}

#mega_count_bar .mega_count_content h3,
.mega_count_bar .mega_count_content h3 {
    text-align: center;
    margin: 5px;
    margin-top: 0;
    line-height: 1.3;
}

#mega_count_bar .mega_count_content span,
.mega_count_bar .mega_count_content span {
    margin: 0;
}

#mega_count_bar h3,
.mega_count_bar h3 {
    font-size: 30px;
    font-weight: 500;
}

#mega_count_bar hr,
.mega_count_bar hr {
    width: 30px;
    height: 2px;
    background: #8e8e8e;
    display: block;
    margin: 4px auto;
    border: none;
}

/* ==========================================================================
   Estilo 3 (Logo a la izquierda, contenido a la derecha)
   ========================================================================== */
#mega_count_bar_2,
.mega_count_bar_2 {
    display: table;
    width: 100%;
}

#mega_count_bar_2 .mega_count_img,
.mega_count_bar_2 .mega_count_img {
    text-align: left;
    display: table-cell;
    vertical-align: middle;
}

#mega_count_bar_2 .mega_count_img img,
.mega_count_bar_2 .mega_count_img img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

#mega_count_bar_2 i,
.mega_count_bar_2 i {
    display: block;
    text-align: center;
}

#mega_count_bar_2 .mega_count_content,
.mega_count_bar_2 .mega_count_content {
    text-align: left;
    display: table-cell;
    vertical-align: middle;
    padding-left: 15px;
}

#mega_count_bar_2 .mega_count_content h3,
#mega_count_bar_2 .mega_count_content p,
.mega_count_bar_2 .mega_count_content h3,
.mega_count_bar_2 .mega_count_content p {
    text-align: left;
}

#mega_count_bar_2 h3,
.mega_count_bar_2 h3 {
    font-size: 30px;
    font-weight: 500;
    margin: 5px 0;
}

/* ==========================================================================
   Estilo 4 (Contenido a la izquierda, logo a la derecha)
   ========================================================================== */
#mega_count_bar_3,
.mega_count_bar_3 {
    display: table;
    width: 100%;
}

#mega_count_bar_3 .mega_count_img,
.mega_count_bar_3 .mega_count_img {
    text-align: left;
    display: table-cell;
    vertical-align: middle;
}

#mega_count_bar_3 .mega_count_img img,
.mega_count_bar_3 .mega_count_img img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

#mega_count_bar_3 i,
.mega_count_bar_3 i {
    display: block;
    text-align: center;
}

#mega_count_bar_3 .mega_count_content,
.mega_count_bar_3 .mega_count_content {
    text-align: left;
    display: table-cell;
    vertical-align: middle;
    padding-right: 15px;
    padding-top: 10px;
}

#mega_count_bar_3 .mega_count_content h3,
#mega_count_bar_3 .mega_count_content p,
.mega_count_bar_3 .mega_count_content h3,
.mega_count_bar_3 .mega_count_content p {
    text-align: left;
    margin: 0;
}

#mega_count_bar_3 h3,
.mega_count_bar_3 h3 {
    font-size: 30px;
    font-weight: 500;
    margin: 5px 0;
    margin-right: 0;
    padding-top: 10px;
}

/* ==========================================================================
   Estilo 5 (Logo centrado)
   ========================================================================== */
#mega_count_bar_4 .mega_count_img img,
.mega_count_bar_4 .mega_count_img img {
    display: block;
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

#mega_count_bar_4 .mega_count_img,
.mega_count_bar_4 .mega_count_img {
    text-align: center;
}

#mega_count_bar_4 .mega_count_content h3,
.mega_count_bar_4 .mega_count_content h3 {
    text-align: center;
}

#mega_count_bar_4 h3,
.mega_count_bar_4 h3 {
    font-size: 30px;
    font-weight: 500;
    margin: 5px 0;
}

#mega_count_bar_4 p,
.mega_count_bar_4 p {
    font-size: 22px;
    padding-bottom: 6px;
}

/* ==========================================================================
   Modo sin elemento visual (solo cifra y título con posiciones dinámicas)
   ========================================================================== */
.messive-wrapper-counter.mvc-no-visual {
    width: 100%;
}

.messive-wrapper-counter.mvc-no-visual .mvc-counter-flex-wrap {
    width: 100%;
    box-sizing: border-box;
}

.messive-wrapper-counter.mvc-no-visual .mvc-counter-flex-wrap.mvc-pos-bottom {
    flex-direction: column;
    gap: 6px;
}

.messive-wrapper-counter.mvc-no-visual .mvc-counter-flex-wrap.mvc-pos-top {
    flex-direction: column;
    gap: 6px;
}

.messive-wrapper-counter.mvc-no-visual .mvc-counter-flex-wrap.mvc-pos-left {
    flex-direction: row;
    gap: 15px;
    flex-wrap: wrap;
}

.messive-wrapper-counter.mvc-no-visual .mvc-counter-flex-wrap.mvc-pos-right {
    flex-direction: row;
    gap: 15px;
    flex-wrap: wrap;
}

.messive-wrapper-counter.mvc-no-visual .mvc-counter-title {
    margin: 0;
    line-height: 1.2;
}

.messive-wrapper-counter.mvc-no-visual .mvc-number-wrapper {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
}

/* ==========================================================================
   Iconos tipograficos (Font Awesome) - Proteccion total contra sobrescritura de temas
   ========================================================================== */
.mega_count_img i,
#mega_count_bar .mega_count_img i,
#mega_count_bar_2 .mega_count_img i,
#mega_count_bar_3 .mega_count_img i,
#mega_count_bar_4 .mega_count_img i,
.messive-wrapper-counter .mega_count_img i {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", FontAwesome, sans-serif !important;
    font-style: normal !important;
    font-variant: normal !important;
    font-weight: 900 !important;
    text-rendering: auto !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    line-height: 1 !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    vertical-align: middle !important;
    color: #0f71ca; /* Color corporativo EMASESA por defecto */
}

/* Soporte para iconos Regular (peso 400) */
.mega_count_img i.fa-regular,
.mega_count_img i.far {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free" !important;
    font-weight: 400 !important;
}

/* Soporte para iconos Brands (marcas comerciales) */
.mega_count_img i.fa-brands,
.mega_count_img i.fab {
    font-family: "Font Awesome 6 Brands", "Font Awesome 5 Brands" !important;
    font-weight: 400 !important;
}

/* Asegurar que el pseudoelemento herede la tipografia */
.mega_count_img i:before,
.mega_count_img i::before {
    font-family: inherit !important;
    font-weight: inherit !important;
    font-style: inherit !important;
    line-height: inherit !important;
    display: inline-block !important;
}

#mega_count_bar_2 .mega_count_img i,
.mega_count_bar_2 .mega_count_img i {
    margin-left: 0 !important;
    margin-right: auto !important;
}

#mega_count_bar_3 .mega_count_img i,
.mega_count_bar_3 .mega_count_img i {
    margin-left: auto !important;
    margin-right: 0 !important;
}
