/* =======================================================
   MEJORAS DE TIPOGRAFÍA - GREMIA 2025
   Tamaño base de texto aumentado a 16px para mejor legibilidad
   Aplicado globalmente a todo el sitio web
   VERSIÓN SUPER-REFORZADA - Máxima especificidad contra Bootstrap
   TÍTULOS RESTAURADOS A TAMAÑOS ORIGINALES
======================================================= */

/* REGLAS ULTRA-ESPECÍFICAS CONTRA BOOTSTRAP */
/* Párrafo específico problemático en index.html */
#quienes-somos .container .row .col-lg-7 p.text-muted,
.section#quienes-somos .container .row .col-lg-7 p.text-muted,
.section.bg-light#quienes-somos .container .row .col-lg-7 p.text-muted {
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #6c757d !important;
}

/* Todos los párrafos text-muted con máxima especificidad */
html body .section .container .row .col-lg-7 p.text-muted,
html body .container .row .col-lg-7 p.text-muted,
html body .row .col-lg-7 p.text-muted,
html body .col-lg-7 p.text-muted {
    font-size: 16px !important;
    line-height: 1.6 !important;
}

/* Texto base del sitio - MÁXIMA PRIORIDAD */
html body {
    font-size: 16px !important;
    line-height: 1.6 !important;
}

/* Párrafos principales - SUPER REFORZADO */
html body p:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6),
html body .text-muted:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6),
html body .container p:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6),
html body .row p:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6),
html body .col p:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6),
html body .col-lg-7 p:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6),
html body .section p:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6),
html body .section .text-muted:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
    font-size: 16px !important;
    line-height: 1.6 !important;
}

/* Bootstrap override específico - SOLO PARA TEXTO, NO TÍTULOS */
.container p:not(.title-heading):not(.service-title),
.row p:not(.title-heading):not(.service-title),
.col p:not(.title-heading):not(.service-title),
.col-sm-12 p:not(.title-heading):not(.service-title),
.col-lg-7 p:not(.title-heading):not(.service-title),
.text-muted:not(.title-heading):not(.service-title) {
    font-size: 16px !important;
    line-height: 1.6 !important;
}

/* ===== REGLAS SUPER-ESPECÍFICAS PARA PÁRRAFOS PROBLEMÁTICOS ===== */
/* Estas reglas tienen máxima especificidad para vencer a Bootstrap */

/* Párrafo principal de index.html - FUERZA BRUTA */
body .section.bg-light#quienes-somos .container .row.mt-5.align-items-center .col-lg-7 p.text-muted,
body .section#quienes-somos .container .row.mt-5.align-items-center .col-lg-7 p.text-muted,
body #quienes-somos .container .row .col-lg-7 p.text-muted,
body .bg-light .container .row .col-lg-7 p.text-muted {
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #6c757d !important;
}

/* Todos los párrafos de todas las secciones - FUERZA MÁXIMA */
html body div.section div.container div.row div[class*="col"] p:not(.title-heading):not(.service-title),
html body section.section div.container div.row div[class*="col"] p:not(.title-heading):not(.service-title),
html body .section .container .row [class*="col"] p:not(.title-heading):not(.service-title) {
    font-size: 16px !important;
    line-height: 1.6 !important;
}

/* Text-muted específico con todos los selectores posibles */
html body div.section div.container div.row div[class*="col"] p.text-muted:not(.title-heading):not(.service-title),
html body section.section div.container div.row div[class*="col"] p.text-muted:not(.title-heading):not(.service-title),
html body .section .container .row [class*="col"] p.text-muted:not(.title-heading):not(.service-title),
html body [class*="bg-"] .container .row [class*="col"] p.text-muted:not(.title-heading):not(.service-title) {
    font-size: 16px !important;
    line-height: 1.6 !important;
    color: #6c757d !important;
}

/* Regla de último recurso - aplica a TODOS los elementos text-muted */
html body * {
    font-size: inherit !important;
}

html body *.text-muted:not(.title-heading):not(.service-title) {
    font-size: 16px !important;
    line-height: 1.6 !important;
}

/* Texto con clase .text-muted - REFORZADO */
.text-muted:not(.title-heading):not(.service-title),
body .text-muted:not(.title-heading):not(.service-title),
.container .text-muted:not(.title-heading):not(.service-title),
.section .text-muted:not(.title-heading):not(.service-title) {
    font-size: 16px !important;
    line-height: 1.6 !important;
}

/* Descripciones en cards */
.card-text {
    font-size: 16px !important;
    line-height: 1.6;
}

/* Enlaces del navbar */
.navbar-nav .nav-link {
    font-size: 16px !important;
}

/* Enlaces del footer */
.footer-list li,
.footer-list li a {
    font-size: 16px !important;
    line-height: 1.6;
}

/* Texto de servicios */
.service-subtitle {
    font-size: 16px !important;
    line-height: 1.6;
}

/* Texto descriptivo en general */
.f-17 {
    font-size: 16px !important;
}

/* Texto en contadores */
.counter-box p {
    font-size: 16px !important;
    line-height: 1.6;
}

/* Texto en formularios */
.form-control {
    font-size: 16px !important;
}

/* Labels de formularios */
.form-label,
label {
    font-size: 16px !important;
}

/* Texto en tablas */
.table td,
.table th {
    font-size: 16px !important;
}

/* Texto en listas */
ul li,
ol li {
    font-size: 16px !important;
    line-height: 1.6;
}

/* Texto en breadcrumbs */
.breadcrumb-item {
    font-size: 16px !important;
}

/* Texto de descripción en modal */
.modal-body p {
    font-size: 16px !important;
    line-height: 1.6;
}

/* Texto de copyright */
.footer-alt p {
    font-size: 16px !important;
}

/* Texto en blog/biblioteca */
.blog-content p {
    font-size: 16px !important;
    line-height: 1.6;
}

/* Descripciones en home */
.home-desc {
    font-size: 16px !important; /* Un poco más grande para la descripción principal */
    line-height: 1.6;
}

/* Texto en junta directiva */
.team-content p {
    font-size: 16px !important;
    line-height: 1.6;
}

/* Texto en proyectos */
.project-content p {
    font-size: 16px !important;
    line-height: 1.6;
}

/* Texto en socios */
.partner-content p {
    font-size: 16px !important;
    line-height: 1.6;
}

/* Texto en problemática */
.problem-content p {
    font-size: 16px !important;
    line-height: 1.6;
}

/* Texto en encuentro por el agua */
.event-content p {
    font-size: 16px !important;
    line-height: 1.6;
}

/* Texto en biblioteca digital */
.library-content p {
    font-size: 16px !important;
    line-height: 1.6;
}

/* Texto en contacto */
.contact-content p {
    font-size: 16px !important;
    line-height: 1.6;
}

/* Ajustes para mantener jerarquía visual */
h1 { font-size: 2.5rem !important; }
h2 { font-size: 2rem !important; }
h3 { font-size: 1.75rem !important; }
h4 { font-size: 1.5rem !important; }
h5 { font-size: 1.25rem !important; }
h6 { font-size: 1.1rem !important; }

/* Botones mantienen su tamaño apropiado */
.btn {
    font-size: 16px !important;
}

/* Enlaces "Leer más" */
.read-more {
    font-size: 16px !important;
}

/* Texto en tabs y accordions */
.nav-tabs .nav-link,
.accordion-button {
    font-size: 16px !important;
}

/* Texto en tooltips y popovers */
.tooltip-inner,
.popover-body {
    font-size: 16px !important;
}

/* Responsive: En móviles mantener legibilidad */
@media (max-width: 768px) {
    body {
        font-size: 16px !important;
    }
    
    .home-desc {
        font-size: 15px !important;
    }
    
    /* Asegurar que en móviles el texto sea siempre legible */
    p, .text-muted, .card-text {
        font-size: 16px !important;
    }
}

@media (max-width: 576px) {
    /* En pantallas muy pequeñas mantener 14px mínimo */
    body, p, .text-muted {
        font-size: 16px !important;
    }
}

/* Clases específicas de GREMIA - mantener estructura */
.title-heading {
    /* Los títulos mantienen su tamaño actual */
}

.service-title {
    /* Los títulos de servicios mantienen su tamaño */
}

/* Ajuste específico para textos muy pequeños */
small,
.small {
    font-size: 12px !important; /* Mantener small text legible pero diferenciado */
    line-height: 1.5;
}

/* Text utilities de Bootstrap - override */
.fs-6 {
    font-size: 16px !important;
}

/* Asegurar que el texto de descarga sea visible */
.download-text {
    font-size: 16px !important;
}

/* Texto en alerts y notificaciones */
.alert {
    font-size: 16px !important;
}

/* Texto en pagination */
.page-link {
    font-size: 16px !important;
}

/* Final override para asegurar aplicación */
* {
    /* Solo aplicar a elementos de texto, no a todos */
}

/* Elementos específicos que deben mantener 14px */
span:not(.counter-value):not(.counter-symbol),
div:not(.counter-display) {
    /* Solo aplicar font-size si el elemento no tiene un tamaño específico definido */
}

/* Asegurar que los íconos no se vean afectados */
i, .mdi {
    font-size: inherit !important;
}

/* ===== RESTAURACIÓN DE TÍTULOS A TAMAÑOS ORIGINALES ===== */
/* Estos títulos deben mantener sus tamaños Bootstrap originales */

/* Títulos principales - TAMAÑOS BOOTSTRAP ORIGINALES */
h1, .h1 {
    font-size: calc(1.375rem + 1.5vw) !important;
    font-weight: 500 !important;
}

h2, .h2 {
    font-size: calc(1.325rem + 0.9vw) !important;
    font-weight: 500 !important;
}

h3, .h3 {
    font-size: calc(1.3rem + 0.6vw) !important;
    font-weight: 500 !important;
}

h4, .h4 {
    font-size: calc(1.275rem + 0.3vw) !important;
    font-weight: 500 !important;
}

h5, .h5 {
    font-size: 1.25rem !important;
    font-weight: 500 !important;
}

h6, .h6 {
    font-size: 1rem !important;
    font-weight: 500 !important;
}

/* Títulos específicos del tema GREMIA */
.title-heading {
    font-size: calc(1.3rem + 0.6vw) !important;
    font-weight: 600 !important;
    color: inherit !important;
}

.service-title {
    font-size: 1.25rem !important;
    font-weight: 500 !important;
    color: inherit !important;
}

/* En responsive mantener títulos proporcionados */
@media (min-width: 1200px) {
    h1, .h1 { font-size: 2.5rem !important; }
    h2, .h2 { font-size: 2rem !important; }
    h3, .h3 { font-size: 1.75rem !important; }
    h4, .h4 { font-size: 1.5rem !important; }
    .title-heading { font-size: 1.75rem !important; }
}

/* Footer titles específicos */
.footer-list-title,
h4.footer-list-title {
    font-size: 1.125rem !important;
    font-weight: 600 !important;
}

/* Navbar brand/logo text */
.navbar-brand {
    font-size: 1.25rem !important;
}

/* Asegurar que los títulos NO sean afectados por reglas de texto general */
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
.title-heading,
.service-title,
.footer-list-title {
    /* Excluir explícitamente de reglas de párrafos */
}
