:root {
    --color-primary: #94C11F;
    --color-primary-rgb: 148, 193, 31;
}

.ad-banner-img{
    margin-bottom: 10px;
}
/* Contenedor flexible para mantenerlos en línea */
.search-input-group {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 600px; /* O el ancho que prefieras */
    margin: 0 auto;
    position: relative;
    border-bottom: 2px solid #94C11F;
}

/* El input crece para ocupar el espacio */
#CercaParaula {
    flex: 1;
    border: none;
    background: transparent;
    padding: 10px 15px;
    outline: none;
    color: #49556C; /* Ajusta según tu fondo */
}

/* El botón se queda pegado a la derecha */
.search-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #49556C; /* Ajusta según tu fondo */
}

/* Quitar la X nativa de los inputs tipo search en Chrome/Safari */
#CercaParaula::-webkit-search-decoration,
#CercaParaula::-webkit-search-cancel-button,
#CercaParaula::-webkit-search-results-button,
#CercaParaula::-webkit-search-results-decoration {
    display: none;
}

/* marge del banner superior vers el menu */
.mbs{ padding-top:130px; }

/* === CONTENEDOR DEL MEGAMENU ========================= */
.main-menu__dropdown.megamenu {
    position: absolute !important;
    left: 1% !important;
    transform: translateX(-50%) !important;
    top: 100% !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    background: #fff !important;
    padding: 15px 25px !important;
    gap: 25px !important;
    width: auto !important;
    max-width: 90vw !important;
    border: 1px solid #ddd !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
    z-index: 9999 !important;
}

/* === COLUMNA: SOLO COMARCA =========================== */
.megamenu-column {
    min-width: 160px !important;
    list-style: none !important;
    position: relative !important;
}

.zona-toggle {
    font-weight: bold;
    font-size: 15px;
    display: block;
    padding: 4px 0;
    cursor: pointer;
    color: #222;
}

.zona-toggle:hover {
    color: #94C11F;
}

/* === SUBMENÚ DE POBLACIONES (ESCONDIDO) =============== */
.megamenu-item {
    margin-bottom: 15px;
    position: relative; /* necesario */
}

.poblacions-submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: 0;
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px 15px;
    min-width: 180px;
    max-height: 260px;
    overflow-y: auto;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    z-index: 9999;
}

/* Hover SOLO en esta comarca */
.megamenu-item:hover > .poblacions-submenu {
    display: block;
}

/* Poblacions relacionades (pàgina comarca) */
.poblacions-comarca-wrap {
    margin-top: 3.5rem;
}

.poblacions-comarca-list.tag-list {
    gap: 14px 16px;
}

.poblacions-comarca-list .tag-link {
    display: inline-block;
    margin: 0;
    padding: 5px 18px;
    border: 1px solid #d7d7d7;
    border-radius: 50px;
    background-color: #fff;
    color: #646464;
    font-size: 0.9375rem;
    line-height: 1.4;
    text-transform: none;
    text-decoration: none;
    transition: all 0.3s ease;
}

.poblacions-comarca-list .tag-link:hover {
    color: #94C11F;
    border-color: #94C11F;
    background-color: #f7fbee;
}


/*******/
.rt-sidebar-section-layout-2 { padding-top: 150px; }
.columns-container {
    display: flex;
    gap: 1rem; /* Espaciado entre columnas */
}

li .main-menu__nav {
    display: flex; /* Asegura que los hijos se alineen en la misma línea */
    align-items: center; /* Centra verticalmente los hijos dentro del li */
    white-space: nowrap; /* Evita el salto de línea */
    overflow: hidden;
    text-overflow: ellipsis;
}
li .main-menu__nav a {
    text-decoration: none; /* Opcional: elimina el subrayado del enlace */
    color: inherit; /* Hereda el color del texto del padre */
    margin-right: 8px; /* Espaciado entre el enlace y el span */
}
li .main-menu__nav small {
    font-size: 0.9em; /* Ajusta el tamaño del texto del contador */
    color: gray; /* Define un color diferenciado para el contador */
    display: inline; /* Asegura que esté en línea con el enlace */
    white-space: nowrap; /* Evita saltos de línea en el contador */
}

.column {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1; /* Las columnas ocuparán el mismo ancho */
}


.coloreado .rt-categories a:after{ background-color: rgba(255,255,255,0); }
.coloreado .rt-categories li:nth-child(1) {
    background-color: #94C11F;
}

.coloreado .rt-categories li:nth-child(2) {
    background-color: #0388A6; /* Naranja */
}

.coloreado .rt-categories li:nth-child(3) {
    background-color: #A3D9D3; /* Amarillo */
}

.coloreado .rt-categories li:nth-child(4) {
    background-color: #F2865E; /* Verde */
}

.coloreado .rt-categories li:nth-child(5) {
    background-color: #F26A4B; /* Turquesa */
}

.coloreado .rt-categories li:nth-child(6) {
    background-color: #D0C2B0; /* Azul */
}

.coloreado .rt-categories li:nth-child(7) {
    background-color: #DBCDA4; /* Violeta */
}

.coloreado .rt-categories li:nth-child(8) {
    background-color: #6B4945; /* Rosa */
}

.coloreado .rt-categories li:nth-child(9) {
    background-color: #E89275; /* Fucsia */
}

.coloreado .rt-categories li:nth-child(10) {
    background-color: #9CBCB7; /* Rojo oscuro */
}

.rt-post-grid-xl .post-img > a:not(.post-cat) {
    display: block;
    width: 100%;
}

.rt-post-grid-xl .post-img img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 200px;
    object-fit: cover;
}

.rt-post-grid-xl .post-img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.28);
    pointer-events: none;
    z-index: 1;
}

.rt-post-grid-xl .post-img .post-cat {
    z-index: 2;
}

@media (min-width: 359px) { .mbs{ padding-top:0px; } }
@media (min-width: 640px)  { .mbs{ padding-top:0px; } }  /* tablet pequeño */
@media (min-width: 768px)  { .mbs{ padding-top:0px; } }  /* tablet */
@media (min-width: 1024px) { .mbs{ padding-top:90px; } }  /* desktop */
@media (min-width: 1400px) { .mbs{ padding-top:130px; } }  /* desktop grande */

.social-connection a {
    justify-content: center;
}

/* tablets en orientación horizontal */
@media only screen 
  and (min-device-width: 768px) 
  and (max-device-width: 1366px) 
  and (orientation: landscape) {
    
/*    .mbs {
        padding-top: 170px;
    }*/

}

.site-branding img {
    height: 50px;
    width: auto;
    max-width: 390px;
}

.mobile-menu-bar .logo img {
    height: 40px;
    width: auto;
    max-width: 280px;
}

.footer-logo img {
    height: 72px;
    width: auto;
    max-width: 200px;
}

.sense-noticies {
    padding: 1.5rem 0;
    color: #6c6f72;
}

.post-gallery {
    margin-bottom: 40px;
}

.post-gallery .post-img {
    margin-bottom: 12px;
    border-radius: var(--border-radius-xs);
}

.post-gallery .post-img img {
    width: 100%;
    height: auto;
    border-radius: var(--border-radius-xs);
}

.post-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.post-gallery-item {
    display: block;
}

.post-gallery-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--border-radius-xs);
}

@media (max-width: 575px) {
    .post-gallery-thumbs {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Cierre del menú lateral: círculo (el tema deja el alto comentado y queda ovalado) */
.offcanvas-menu-wrap .offcanvas-content .offcanvas-header .close-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 50%;
    flex-shrink: 0;
    line-height: 1;
}

.offcanvas-menu-wrap .offcanvas-content .offcanvas-header .close-btn a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
}

