

/* ==================================================
   CHILE MUNICIPAL
   Diario digital de los municipios de Chile
   Plantilla Joomla 6
   Version: 0.1.0
   ================================================== */

@charset "UTF-8";

/* VARIABLES CORPORATIVAS */

:root {
    --cm-blue: #15365c;
    --cm-blue-dark: #102844;
    --cm-red: #c92335;
    --cm-white: #ffffff;
    --cm-black: #111111;
    --cm-gray: #666666;
    --cm-gray-light: #f5f5f5;
    --cm-border: #dddddd;

    --cm-font-body: Arial, Helvetica, sans-serif;
    --cm-font-headline: Georgia, "Times New Roman", serif;

    --cm-max-width: 1320px;
    --cm-spacing: 24px;
    --cm-radius: 4px;
}

/* CONFIGURACION GENERAL */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    background: var(--cm-white);
    color: var(--cm-black);
    font-family: var(--cm-font-body);
    font-size: 16px;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--cm-blue);
    text-decoration: none;
}

a:hover {
    color: var(--cm-red);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
    outline: 3px solid var(--cm-red);
    outline-offset: 3px;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    line-height: 1.2;
}

h1,
h2,
h3 {
    font-family: var(--cm-font-headline);
}

p {
    margin: 0 0 1rem;
}

/* CONTENEDOR PRINCIPAL */

.cm-container {
    width: calc(100% - 40px);
    max-width: var(--cm-max-width);
    margin-inline: auto;
}

.cm-site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.cm-main {
    flex: 1;
    padding-top: 24px;
    padding-bottom: 40px;
}

/* ACCESIBILIDAD */

.cm-skip-link {
    position: absolute;
    top: -100px;
    left: 15px;
    z-index: 9999;
    padding: 12px 20px;
    color: var(--cm-white);
    background: var(--cm-blue);
}

.cm-skip-link:focus {
    top: 15px;
}

/* BARRA SUPERIOR */

.cm-topbar {
    background: var(--cm-blue-dark);
    color: var(--cm-white);
    padding: 7px 0;
    font-size: 13px;
}

.cm-topbar a {
    color: var(--cm-white);
}

/* ENCABEZADO CORPORATIVO */

.cm-header {
    background: var(--cm-white);
    padding: 30px 0;
    border-bottom: 1px solid var(--cm-border);
}

.cm-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.cm-brand {
    display: inline-flex;
    flex-direction: column;
    color: var(--cm-blue);
}

.cm-brand:hover {
    color: var(--cm-blue);
}

.cm-brand-title {
    font-family: var(--cm-font-headline);
    font-size: clamp(32px, 5vw, 58px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1.5px;
    text-transform: uppercase;
}

.cm-brand-subtitle {
    margin-top: 7px;
    color: var(--cm-gray);
    font-size: 15px;
    letter-spacing: 0.3px;
}

.cm-header-modules {
    max-width: 100%;
}

/* NAVEGACION PRINCIPAL */

.cm-navigation {
    background: var(--cm-blue);
    border-bottom: 4px solid var(--cm-red);
}

.cm-navigation ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
}

.cm-navigation li {
    position: relative;
    margin: 0;
}

.cm-navigation a {
    display: block;
    padding: 14px 18px;
    color: var(--cm-white);
    font-size: 15px;
    font-weight: 600;
}

.cm-navigation a:hover,
.cm-navigation a:focus-visible,
.cm-navigation .active > a {
    background: var(--cm-red);
    color: var(--cm-white);
}

.cm-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--cm-blue);
    z-index: 100;
}

.cm-navigation li:hover > ul,
.cm-navigation li:focus-within > ul {
    display: block;
}

/* BUSCADORES */

.cm-search-area {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    padding-block: 20px;
}

.cm-general-search,
.cm-municipal-search {
    padding: 12px;
    background: var(--cm-gray-light);
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius);
}

.cm-search-area input,
.cm-search-area select {
    width: 100%;
    padding: 10px 12px;
    background: var(--cm-white);
    border: 1px solid var(--cm-border);
    border-radius: var(--cm-radius);
    font: inherit;
}

/* BOTONES Y FORMULARIOS */

button,
.btn {
    font: inherit;
    cursor: pointer;
}

.btn-primary {
    display: inline-block;
    padding: 10px 18px;
    background: var(--cm-blue);
    color: var(--cm-white);
    border: 1px solid var(--cm-blue);
    border-radius: var(--cm-radius);
}

.btn-primary:hover {
    background: var(--cm-blue-dark);
    color: var(--cm-white);
}

/* ULTIMAS NOTICIAS */

.cm-breaking-news {
    padding: 9px 0;
    background: var(--cm-red);
    color: var(--cm-white);
}

.cm-breaking-news a {
    color: var(--cm-white);
}

/* ESPACIOS PUBLICITARIOS */

.cm-advertising {
    margin-block: 24px;
    text-align: center;
}

.cm-advertising img {
    display: block;
    margin-inline: auto;
}

/* DISTRIBUCION DEL CONTENIDO */

.cm-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--cm-spacing);
}

.cm-content-grid:has(> .cm-sidebar-right) {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
}

.cm-content-grid:has(> .cm-sidebar-left) {
    grid-template-columns: minmax(200px, 250px) minmax(0, 1fr);
}

.cm-content-grid:has(> .cm-sidebar-left):has(> .cm-sidebar-right) {
    grid-template-columns:
        minmax(180px, 230px)
        minmax(0, 1fr)
        minmax(220px, 300px);
}

.cm-content,
.cm-sidebar-left,
.cm-sidebar-right {
    min-width: 0;
}

.cm-sidebar-left,
.cm-sidebar-right {
    overflow-wrap: anywhere;
}

.cm-featured,
.cm-content-top,
.cm-content-bottom,
.cm-regional-news,
.cm-municipal-news {
    margin-bottom: 32px;
}

/* TITULOS DE SECCIONES */

.cm-main .moduletable > h3,
.cm-main .module-title {
    padding-bottom: 10px;
    margin-bottom: 20px;
    border-bottom: 3px solid var(--cm-red);
    color: var(--cm-blue);
    font-size: 25px;
}

/* ARTICULOS Y NOTICIAS */

.com-content-article h1,
.item-page h1 {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    color: var(--cm-black);
    margin-bottom: 18px;
}

.com-content-article,
.item-page {
    overflow-wrap: anywhere;
}

.com-content-article__body {
    font-size: 18px;
    line-height: 1.75;
}

.article-info {
    color: var(--cm-gray);
    font-size: 13px;
    margin-bottom: 18px;
}

.article-info dd {
    margin: 0;
}

.item-image img {
    display: block;
    width: 100%;
}

.blog-item {
    border-bottom: 1px solid var(--cm-border);
    padding-bottom: 24px;
    margin-bottom: 24px;
}

.blog-item h2 {
    font-size: 26px;
}

.blog-item h2 a {
    color: var(--cm-black);
}

.blog-item h2 a:hover {
    color: var(--cm-red);
}

.blog-items {
    display: grid;
    gap: 24px;
}

/* PAGINACION */

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 0;
    list-style: none;
}

.page-link {
    display: block;
    padding: 8px 14px;
    border: 1px solid var(--cm-border);
}

.page-item.active .page-link {
    background: var(--cm-blue);
    color: var(--cm-white);
}

/* PIE DE PAGINA */

.cm-footer {
    margin-top: auto;
    padding: 35px 0 20px;
    background: var(--cm-blue-dark);
    color: var(--cm-white);
    border-top: 4px solid var(--cm-red);
}

.cm-footer a {
    color: var(--cm-white);
}

.cm-footer a:hover {
    text-decoration: underline;
}

.cm-footer-top,
.cm-footer-content {
    padding-bottom: 24px;
}

.cm-copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.25);
    padding-top: 18px;
    text-align: center;
    font-size: 13px;
}

/* VISTA SIMPLIFICADA */

.cm-component {
    padding-block: 25px;
}

/* TABLETS */

@media (max-width: 1024px) {

    .cm-content-grid:has(> aside) {
        grid-template-columns: minmax(0, 1fr);
    }

    .cm-content {
        grid-row: 1;
    }

    .cm-navigation a {
        padding: 12px 14px;
    }
}

/* TELEFONOS MOVILES */

@media (max-width: 767px) {

    :root {
        --cm-spacing: 16px;
    }

    .cm-container {
        width: calc(100% - 28px);
    }

    .cm-header {
        padding: 22px 0;
    }

    .cm-header-inner {
        justify-content: center;
        text-align: center;
    }

    .cm-brand-subtitle {
        font-size: 12px;
    }

    .cm-search-area {
        grid-template-columns: minmax(0, 1fr);
    }

    .cm-navigation a {
        padding: 10px 12px;
        font-size: 13px;
    }

    .cm-navigation ul ul {
        position: static;
        min-width: 0;
    }

    .cm-main {
        padding-top: 18px;
    }

    .com-content-article__body {
        font-size: 17px;
    }

    .blog-item h2 {
        font-size: 23px;
    }

    .cm-footer {
        text-align: center;
    }
}

/* PREFERENCIAS DE ACCESIBILIDAD */

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* MENU RESPONSIVO */

.cm-menu-toggle {
    display: none;
    padding: 12px 18px;
    background: transparent;
    color: var(--cm-white);
    border: 0;
    font-size: 16px;
    font-weight: 600;
}

@media (max-width: 767px) {

    .cm-navigation-ready .cm-menu-toggle {
        display: block;
        width: 100%;
        text-align: left;
    }

    .cm-navigation-ready > .cm-container {
        display: none;
    }

    .cm-navigation-ready.cm-menu-open > .cm-container {
        display: block;
    }

    .cm-navigation ul {
        flex-direction: column;
    }

    .cm-navigation a {
        padding: 12px 15px;
    }
}
