/*==================================================
                RESET
==================================================*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: #f5f3ef;
    color: #333;
}

img {
    width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

/*==================================================
                VARIABLES
==================================================*/

:root {
    --verde: #6d8e3d;
    --verde-hover: #5a7733;
    --marron: #7b5a39;
    --dorado: #d1ab45;
    --gris: #efefef;
    --texto: #363636;
    --sombra: 0 10px 30px rgba(0, 0, 0, .08);
    --radio: 16px;
}

/*==================================================
                HEADER
==================================================*/

header {
    background: #fff;
    box-shadow: var(--sombra);
    position: sticky;
    top: 0;
    z-index: 999;
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 24px;
    color: var(--marron);
    cursor: pointer;
    padding: 10px;
}

.top-bar {
    width: 95%;
    margin: auto;
    padding: 15px 0;
    display: grid;
    grid-template-columns: 320px 1fr 250px;
    gap: 25px;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    width: 82px;
}

.logo h1 {
    font-size: 28px;
    line-height: 30px;
    color: var(--marron);
}

.logo span {
    font-size: 22px;
    color: var(--verde);
    font-weight: 700;
}

.banner-top img {
    height: 95px;
    border-radius: 12px;
    object-fit: cover;
}

.header-right {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.weather-top {
    background: var(--verde);
    color: #fff;
    border-radius: 10px;
    text-align: center;
    padding: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
}

.search input {
    width: 100%;
    border: none;
    background: #efefef;
    border-radius: 10px;
    padding: 12px 15px;
    font-size: 15px;
    outline: none;
}

/*==================================================
                LAYOUT
==================================================*/

.container {
    width: 95%;
    margin: 25px auto;
    display: grid;
    grid-template-columns: 260px 1fr 300px;
    gap: 25px;
}

/*==================================================
                SIDEBAR
==================================================*/

aside, .sidebar {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--sombra);
    height: max-content;
    position: sticky;
    top: 120px;
    z-index: 9999;
}

aside ul, .sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

aside li, .sidebar li {
    border-radius: 10px;
    transition: .25s;
    color: var(--texto);
    font-weight: 500;
}

aside li a, .sidebar li a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 13px 15px;
    border-radius: 10px;
    color: var(--texto);
    text-decoration: none;
    width: 100%;
}

aside li:hover, .sidebar li:hover {
    background: #ece6dd;
}

aside li i:first-child, .sidebar li i:first-child {
    width: 22px;
    text-align: center;
    font-size: 17px;
}

aside li.active, .sidebar li.active {
    background: var(--marron);
}

aside li.active a, .sidebar li.active a {
    color: white;
    font-weight: 600;
}

aside li.active:hover, .sidebar li.active:hover {
    background: var(--marron);
}

/*==================================================
            SUBMENUS
==================================================*/

.has-submenu > a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.has-submenu > a div {
    display: flex;
    align-items: center;
    gap: 15px;
}

.fa-chevron-down {
    transition: .30s;
}

.rotate {
    transform: rotate(180deg);
}

.submenu {
    display: none;
    list-style: none;
    margin-left: 20px;
    margin-bottom: 10px;
    animation: fadeMenu .3s ease;
}

.submenu.open {
    display: block;
}

.submenu li a {
    display: block;
    padding: 8px 12px;
    font-size: 14px;
    color: #666;
    border-radius: 8px;
    transition: .2s;
}

.submenu li a:hover {
    color: var(--verde);
    background: #f5f3ef;
}

@keyframes fadeMenu {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*==================================================
                    MAIN
==================================================*/

main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/*==================================================
                    HERO
==================================================*/

.hero {
    display: grid;
    grid-template-columns: 2fr 320px;
    gap: 20px;
    align-items: start;
}

.hero-left {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    box-shadow: var(--sombra);
}

.hero-left img {
    height: 500px;
    object-fit: cover;
    transition: .4s;
}

.hero-left:hover img {
    transform: scale(1.03);
}

.overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 35px;
    color: white;
    background: linear-gradient(
        to top,
        rgba(0,0,0,.85),
        rgba(0,0,0,.2),
        transparent
    );
}

.overlay span {
    display: inline-block;
    background: var(--dorado);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    margin-bottom: 15px;
}

.overlay h2 {
    font-size: 38px;
    line-height: 42px;
    margin-bottom: 12px;
}

.overlay p {
    font-size: 18px;
}

/*==================================================
                HERO RIGHT
==================================================*/

.hero-right {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.card {
    background: white;
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--sombra);
}

.card h3 {
    color: var(--marron);
    margin-bottom: 18px;
    font-size: 22px;
}

.card ul {
    list-style: none;
}

.card li {
    padding: 10px 0;
    border-bottom: 1px solid #ececec;
    font-size: 15px;
}

.card li:last-child {
    border: none;
}

/* Card Clima */
#weather-card h1 {
    font-size: 42px;
    color: var(--verde);
    margin: 5px 0;
}

#weather-card p {
    color: #666;
    font-size: 15px;
    text-transform: capitalize;
}

/*==================================================
                ÚLTIMAS NOTICIAS
==================================================*/

.ultimas {
    margin-top: 10px;
}

.ultimas h2 {
    font-size: 32px;
    color: var(--marron);
    margin-bottom: 25px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.news-grid article {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--sombra);
    transition: .3s;
}

.news-grid article:hover {
    transform: translateY(-6px);
}

.news-grid img {
    height: 210px;
    object-fit: cover;
}

.news-content {
    padding: 20px;
}

.news-content span {
    color: var(--verde);
    font-size: 13px;
    font-weight: 600;
    display: block;
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 21px;
    margin-bottom: 10px;
    color: #222;
}

.news-content p {
    color: #666;
    font-size: 15px;
    line-height: 1.5;
}

/*==================================================
            CATEGORÍAS COMERCIOS
==================================================*/

.categorias {
    margin-top: 20px;
}

.categorias h2 {
    color: var(--marron);
    font-size: 30px;
    margin-bottom: 20px;
}

.categorias-slider {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 18px;
}

.categoria {
    background: #fff;
    border-radius: 18px;
    padding: 30px 15px;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    gap: 18px;
    box-shadow: var(--sombra);
    transition: .3s;
    cursor: pointer;
}

.categoria:hover {
    transform: translateY(-6px);
}

.categoria i {
    font-size: 52px;
    color: var(--verde);
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.categoria span {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

/*==================================================
                BANNER CENTRAL
==================================================*/

.banner-horizontal {
    margin: 15px 0 5px;
}

.banner-horizontal img {
    height: 180px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: var(--sombra);
}

/*==================================================
            NOTICIAS REGIONALES
==================================================*/

.regionales {
    margin-top: 10px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-title h2 {
    font-size: 30px;
    color: var(--marron);
}

.section-title a {
    color: var(--verde);
    font-weight: 600;
}

/*==================================================
                SIDEBAR DERECHO
==================================================*/

.right-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.widget {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--sombra);
}

.widget h3 {
    color: var(--marron);
    margin-bottom: 15px;
    font-size: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #f0f0f0;
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 8px 0;
    border-bottom: 1px solid #ececec;
    font-size: 15px;
}

.widget li:last-child {
    border-bottom: none;
}

.ad img {
    border-radius: 16px;
    box-shadow: var(--sombra);
}

/*=========================================
        INFORMACIÓN ÚTIL
==========================================*/

.estado-servicios {
    list-style: none;
    margin-top: 8px;
}

.estado-servicios li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #ececec;
    font-size: 15px;
}

.estado-servicios li:last-child {
    border: none;
}

.ok {
    color: #2ecc71;
    font-size: 18px;
    font-weight: bold;
}

.alerta {
    color: #f1c40f;
    font-size: 18px;
    font-weight: bold;
}

.error {
    color: #e74c3c;
    font-size: 18px;
    font-weight: bold;
}

.actualizado {
    margin-top: 13px;
    font-size: 11px;
    color: #888;
    text-align: center;
    font-style: italic;
}

/*=========================================
        HORARIOS DE COLECTIVOS
==========================================*/

.colectivos {
    list-style: none;
    margin: 0;
    padding: 0;
}

.colectivos li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #ececec;
}

.colectivos li:last-child {
    border-bottom: none;
}

.colectivos div {
    font-size: 13px;
    color: #333;
}

.colectivos strong {
    color: var(--marron);
}

/*=========================================
        OVERLAY MENÚ MÓVIL
==========================================*/

.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: none;
    z-index: 9998;
}

.menu-overlay.active {
    display: block;
}

/*==================================================
                FOOTER
==================================================*/

footer {
    margin-top: 60px;
    background: var(--marron);
    color: white;
    padding: 25px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 15px;
}

footer strong {
    color: var(--dorado);
}

/*==================================================
                ANIMACIONES
==================================================*/

.hero,
.card,
.widget,
.news-grid article,
.categoria,
.ad {
    animation: fade .5s ease;
}

@keyframes fade {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*==================================================
                SCROLLBAR
==================================================*/

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #ededed;
}

::-webkit-scrollbar-thumb {
    background: var(--verde);
    border-radius: 20px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--marron);
}

.lista-comercios {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 15px;
}

.comercio-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    border-left: 4px solid #0056b3;
}

.comercio-info h3 {
    margin: 0 0 5px 0;
    font-size: 1.1rem;
    color: #222;
}

.rubro-tag {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    font-size: 0.8rem;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 5px;
}

.comercio-info p {
    margin: 3px 0 0 0;
    font-size: 0.9rem;
    color: #666;
}

.btn-wa {
    background-color: #25d366;
    color: white;
    padding: 8px 14px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-wa:hover {
    background-color: #1ebc57;
}

.categoria.active-cat {
    background-color: #0056b3;
    color: #ffffff;
}