/* =========================================================
   BONZI NEWS
   ESTILOS PRINCIPALES
   ========================================================= */

:root {

    --blue-dark: #071a33;
    --blue: #0d3b66;
    --blue-light: #1d6fa5;

    --cyan: #19b5d8;

    --red: #e63946;

    --white: #ffffff;

    --gray-50: #f5f7fa;
    --gray-100: #edf1f5;
    --gray-200: #dce3ea;
    --gray-500: #697586;
    --gray-700: #344054;
    --gray-900: #172033;

    --shadow:
        0 12px 35px rgba(7, 26, 51, 0.10);

    --radius: 16px;

    --container: 1180px;
}


/* =========================================================
   RESET
   ========================================================= */

* {

    margin: 0;

    padding: 0;

    box-sizing: border-box;

}


html {

    scroll-behavior: smooth;

}


body {

    font-family:
        "Segoe UI",
        Tahoma,
        Geneva,
        Verdana,
        sans-serif;

    color: var(--gray-900);

    background: var(--white);

    line-height: 1.6;

}


a {

    color: inherit;

    text-decoration: none;

}


button,
a {

    -webkit-tap-highlight-color: transparent;

}


/* =========================================================
   CONTENEDOR
   ========================================================= */

.container {

    width:
        min(
            calc(100% - 32px),
            var(--container)
        );

    margin-inline: auto;

}


/* =========================================================
   HEADER
   ========================================================= */

.site-header {

    position: sticky;

    top: 0;

    z-index: 1000;

    background:
        rgba(255, 255, 255, 0.97);

    box-shadow:
        0 2px 18px
        rgba(7, 26, 51, 0.08);

}


.header-main {

    background: var(--white);

}


/*
|--------------------------------------------------------------------------
| HEADER CONTAINER
|--------------------------------------------------------------------------
|
| Se utiliza una estructura flexible estable.
| El área de acciones tiene un ancho reservado
| para evitar que la navegación se desplace cuando
| JavaScript cambia el estado de sesión.
|
*/

.header-container {

    min-height: 82px;

    display: grid;

    grid-template-columns:
        auto
        minmax(0, 1fr)
        auto;

    align-items: center;

    column-gap: 24px;

}


/* =========================================================
   LOGO
   ========================================================= */

.logo {

    display: inline-flex;

    align-items: baseline;

    font-size: 2rem;

    font-weight: 900;

    letter-spacing: -1.5px;

    white-space: nowrap;

    flex-shrink: 0;

}


.logo-bonzi {

    color: var(--blue-dark);

}


.logo-news {

    color: var(--red);

    margin-left: 4px;

}


/* =========================================================
   NAVEGACIÓN
   ========================================================= */

.main-nav {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 4px;

    margin-left: 0;

    width: 100%;

}


.main-nav a {

    position: relative;

    padding: 10px 12px;

    color: var(--gray-700);

    font-size: 0.92rem;

    font-weight: 700;

    transition:
        0.2s ease;

}


.main-nav a::after {

    content: "";

    position: absolute;

    left: 12px;

    right: 12px;

    bottom: 2px;

    height: 3px;

    border-radius: 5px;

    background: var(--red);

    transform:
        scaleX(0);

    transition:
        0.2s ease;

}


.main-nav a:hover,
.main-nav a.active {

    color: var(--blue);

}


.main-nav a:hover::after,
.main-nav a.active::after {

    transform:
        scaleX(1);

}


/* =========================================================
   BOTONES HEADER
   ========================================================= */

.header-actions {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 8px;

    /*
     * Reservamos espacio suficiente para:
     * foto + nombre + notificaciones + cerrar sesión
     */

    width: 270px;

    min-width: 270px;

    min-height: 42px;

    flex-shrink: 0;

}


.btn-login,
.btn-register,
.btn-primary,
.btn-outline {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 42px;

    padding: 0 18px;

    border-radius: 10px;

    font-size: 0.88rem;

    font-weight: 800;

    transition:
        0.2s ease;

}


.btn-login {

    color: var(--blue);

    border:
        1px solid
        var(--gray-200);

}


.btn-login:hover {

    border-color:
        var(--blue-light);

    background:
        #f2f8fc;

}


.btn-register,
.btn-primary {

    color: var(--white);

    background:
        var(--red);

}


.btn-register:hover,
.btn-primary:hover {

    background:
        #c92735;

    transform:
        translateY(-2px);

}


/* =========================================================
   MENU MOBILE
   ========================================================= */

.menu-toggle {

    display: none;

    width: 44px;

    height: 44px;

    margin-left: auto;

    border: 0;

    border-radius: 10px;

    background:
        var(--gray-100);

    cursor: pointer;

}


.menu-toggle span {

    display: block;

    width: 22px;

    height: 2px;

    margin: 4px auto;

    background:
        var(--blue-dark);

    transition:
        0.2s ease;

}


.menu-toggle.open span:nth-child(1) {

    transform:
        translateY(6px)
        rotate(45deg);

}


.menu-toggle.open span:nth-child(2) {

    opacity: 0;

}


.menu-toggle.open span:nth-child(3) {

    transform:
        translateY(-6px)
        rotate(-45deg);

}


/* =========================================================
   BARRA ÚLTIMO MOMENTO
   ========================================================= */

.breaking-bar {

    color: var(--white);

    background:
        var(--blue-dark);

}


.breaking-container {

    min-height: 36px;

    display: flex;

    align-items: center;

    gap: 12px;

    overflow: hidden;

}


.breaking-label {

    flex-shrink: 0;

    padding:
        4px 9px;

    border-radius: 5px;

    background:
        var(--red);

    font-size: 0.68rem;

    font-weight: 900;

    letter-spacing: 0.8px;

}


.breaking-container p {

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;

    font-size: 0.8rem;

}


/* =========================================================
   HERO
   ========================================================= */

.hero {

    padding:
        42px 0 25px;

    background:
        linear-gradient(
            180deg,
            #f5f8fb 0%,
            #ffffff 100%
        );

}


.hero-grid {

    display: grid;

    grid-template-columns:
        minmax(0, 1.65fr)
        minmax(280px, 0.8fr);

    gap: 22px;

}


.hero-main {

    position: relative;

    min-height: 460px;

    overflow: hidden;

    border-radius:
        var(--radius);

    background:
        var(--blue-dark);

    box-shadow:
        var(--shadow);

}


.hero-image {

    position: absolute;

    inset: 0;

}


.image-placeholder {

    width: 100%;

    height: 100%;

    min-height: 460px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-direction: column;

    gap: 8px;

    color:
        rgba(255, 255, 255, 0.75);

    background:
        radial-gradient(
            circle at 70% 30%,
            rgba(25, 181, 216, 0.38),
            transparent 35%
        ),
        linear-gradient(
            135deg,
            #092849,
            #0d3b66
        );

}


.image-placeholder span {

    font-size: 5rem;

}


.image-placeholder small {

    font-size: 0.8rem;

    opacity: 0.7;

}


.hero-overlay {

    position: absolute;

    left: 0;

    right: 0;

    bottom: 0;

    padding:
        80px
        38px
        35px;

    color:
        var(--white);

    background:
        linear-gradient(
            0deg,
            rgba(3, 15, 30, 0.95),
            rgba(3, 15, 30, 0.05)
        );

}


.category {

    display: inline-flex;

    align-items: center;

    width: fit-content;

    padding:
        4px 9px;

    border-radius: 5px;

    font-size: 0.67rem;

    font-weight: 900;

    letter-spacing: 0.7px;

}


.category-news {

    color: #0b5176;

    background: #d8f3fb;

}


.category-breaking {

    color: #8d1721;

    background: #ffdce0;

}


.category-neighbors {

    color: #125b3b;

    background: #d9f6e8;

}


.hero-overlay h1 {

    max-width: 760px;

    margin:
        12px 0 8px;

    font-size:
        clamp(
            2rem,
            4vw,
            3.35rem
        );

    line-height: 1.05;

    letter-spacing: -1.5px;

}


.hero-overlay p {

    max-width: 680px;

    color:
        rgba(255, 255, 255, 0.82);

}


.read-more {

    display: inline-flex;

    align-items: center;

    gap: 8px;

    margin-top: 18px;

    font-weight: 800;

}


.read-more:hover,
.light-link:hover {

    text-decoration:
        underline;

}


/* =========================================================
   HERO SECUNDARIO
   ========================================================= */

.hero-side {

    display: flex;

    flex-direction: column;

    gap: 22px;

}


.mini-news {

    flex: 1;

    display: grid;

    grid-template-columns:
        105px
        1fr;

    gap: 18px;

    padding: 20px;

    border:
        1px solid
        var(--gray-200);

    border-radius:
        var(--radius);

    background:
        var(--white);

    box-shadow:
        var(--shadow);

}


.mini-image {

    min-height: 130px;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 12px;

    font-size: 2.5rem;

    background:
        var(--gray-100);

}


.mini-news h2 {

    margin:
        8px 0;

    font-size: 1.18rem;

    line-height: 1.25;

}


.mini-news a,
.card-content a,
.market-content a {

    color:
        var(--blue-light);

    font-size: 0.85rem;

    font-weight: 800;

}


/* =========================================================
   SECCIONES
   ========================================================= */

.section {

    padding:
        72px 0;

}


.section-dark {

    color:
        var(--white);

    background:
        var(--blue-dark);

}


.marketplace-section {

    background:
        var(--gray-50);

}


.section-heading {

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 30px;

}


.section-heading h2 {

    margin-top: 2px;

    font-size:
        clamp(
            1.65rem,
            3vw,
            2.3rem
        );

    line-height: 1.1;

    letter-spacing: -0.8px;

}


.section-heading-light h2 {

    color:
        var(--white);

}


.section-kicker {

    color:
        var(--red);

    font-size: 0.7rem;

    font-weight: 900;

    letter-spacing: 1.2px;

}


.view-all {

    color:
        var(--blue-light);

    font-size: 0.9rem;

    font-weight: 800;

}


.section-heading-light .view-all {

    color:
        #74d6ed;

}


/* =========================================================
   NOTICIAS
   ========================================================= */

.news-grid {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 22px;

}


.news-card {

    overflow: hidden;

    border:
        1px solid
        var(--gray-200);

    border-radius:
        var(--radius);

    background:
        var(--white);

    box-shadow:
        0 8px 25px
        rgba(7, 26, 51, 0.06);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;

}


.news-card:hover,
.market-card:hover,
.neighbor-card:hover {

    transform:
        translateY(-5px);

    box-shadow:
        var(--shadow);

}


.card-image {

    height: 185px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 3.4rem;

    background:
        linear-gradient(
            135deg,
            #eaf2f7,
            #dbeaf2
        );

}


.card-content {

    padding: 20px;

}


.card-content h3 {

    margin:
        10px 0 8px;

    font-size: 1.18rem;

    line-height: 1.25;

}


.card-content p {

    margin-bottom: 15px;

    color:
        var(--gray-500);

    font-size: 0.9rem;

}


/* =========================================================
   PRIMICIAS
   ========================================================= */

.featured-grid {

    display: grid;

    grid-template-columns:
        1.25fr
        1fr;

    gap: 24px;

}


.featured-card {

    overflow: hidden;

    border-radius:
        var(--radius);

    background:
        #0d2b4d;

}


.featured-image {

    height: 235px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 5rem;

    background:
        radial-gradient(
            circle at 70% 40%,
            rgba(25, 181, 216, 0.35),
            transparent 35%
        ),
        #123a61;

}


.featured-content {

    padding: 25px;

}


.featured-content h3 {

    margin:
        10px 0;

    font-size: 1.65rem;

    line-height: 1.15;

}


.featured-content p {

    color:
        rgba(255, 255, 255, 0.72);

}


.light-link {

    display: inline-flex;

    gap: 8px;

    align-items: center;

    margin-top: 18px;

    font-weight: 800;

}


.featured-list {

    display: flex;

    flex-direction: column;

    gap: 18px;

}


.featured-small {

    display: grid;

    grid-template-columns:
        55px
        1fr;

    gap: 15px;

    padding: 23px;

    border:
        1px solid
        rgba(255, 255, 255, 0.1);

    border-radius:
        var(--radius);

    background:
        rgba(255, 255, 255, 0.055);

}


.featured-number {

    color:
        rgba(255, 255, 255, 0.25);

    font-size: 1.8rem;

    font-weight: 900;

}


.featured-small h3 {

    margin:
        8px 0;

    font-size: 1.05rem;

}


.featured-small a {

    color:
        #74d6ed;

    font-size: 0.84rem;

    font-weight: 800;

}


/* =========================================================
   VECINOS
   ========================================================= */

.neighbors-grid {

    display: grid;

    grid-template-columns:
        repeat(2, 1fr);

    gap: 22px;

}


.neighbor-card {

    overflow: hidden;

    display: grid;

    grid-template-columns:
        190px
        1fr;

    border:
        1px solid
        var(--gray-200);

    border-radius:
        var(--radius);

    background:
        var(--white);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;

}


.neighbor-image {

    min-height: 240px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 3.5rem;

    background:
        linear-gradient(
            135deg,
            #eaf8f1,
            #d9eee4
        );

}


.neighbor-content {

    padding: 20px;

}


.user-line {

    display: flex;

    align-items: center;

    gap: 10px;

}


.avatar {

    width: 38px;

    height: 38px;

    display: grid;

    place-items: center;

    border-radius: 50%;

    color:
        var(--white);

    background:
        var(--blue);

    font-weight: 900;

}


.user-line strong,
.user-line span {

    display: block;

}


.user-line strong {

    font-size: 0.88rem;

}


.user-line span {

    color:
        var(--gray-500);

    font-size: 0.75rem;

}


.neighbor-content > p {

    margin:
        18px 0;

    color:
        var(--gray-700);

    font-size: 0.92rem;

}


.post-actions {

    display: flex;

    gap: 14px;

    padding-top: 13px;

    border-top:
        1px solid
        var(--gray-100);

    color:
        var(--gray-500);

    font-size: 0.8rem;

    font-weight: 700;

}


/* =========================================================
   CTA COMUNIDAD
   ========================================================= */

.community-cta {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 25px;

    margin-top: 30px;

    padding: 28px;

    border-radius:
        var(--radius);

    background:
        #eef6fb;

}


.community-cta h3 {

    margin:
        4px 0;

    font-size: 1.35rem;

}


.community-cta p {

    color:
        var(--gray-500);

    font-size: 0.9rem;

}


/* =========================================================
   CLASIFICADOS
   ========================================================= */

.market-grid {

    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 22px;

}


.market-card {

    overflow: hidden;

    border:
        1px solid
        var(--gray-200);

    border-radius:
        var(--radius);

    background:
        var(--white);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;

}


.market-image {

    height: 180px;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 4rem;

    background:
        #edf4f8;

}


.market-content {

    padding: 21px;

}


.market-tag {

    color:
        var(--red);

    font-size: 0.68rem;

    font-weight: 900;

    letter-spacing: 0.8px;

}


.market-content h3 {

    margin:
        8px 0;

    font-size: 1.2rem;

    line-height: 1.2;

}


.market-content p {

    min-height: 48px;

    margin-bottom: 13px;

    color:
        var(--gray-500);

    font-size: 0.88rem;

}


/* =========================================================
   CTA FINAL
   ========================================================= */

.cta-section {

    padding:
        65px 0;

    color:
        var(--white);

    background:
        linear-gradient(
            120deg,
            #092849,
            #0d3b66
        );

}


.cta-content {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 35px;

}


.cta-content h2 {

    margin:
        4px 0 8px;

    font-size:
        clamp(
            1.8rem,
            4vw,
            2.8rem
        );

    line-height: 1.1;

}


.cta-content p {

    max-width: 680px;

    color:
        rgba(255, 255, 255, 0.76);

}


.cta-actions {

    display: flex;

    flex-shrink: 0;

    gap: 10px;

}


.btn-outline {

    color:
        var(--white);

    border:
        1px solid
        rgba(255, 255, 255, 0.3);

}


.btn-outline:hover {

    background:
        rgba(255, 255, 255, 0.1);

}


/* =========================================================
   FOOTER
   ========================================================= */

.site-footer {

    color:
        rgba(255, 255, 255, 0.75);

    background:
        #041426;

}


.footer-grid {

    display: grid;

    grid-template-columns:
        2fr
        1fr
        1fr;

    gap: 50px;

    padding:
        52px 0;

}


.footer-logo .logo-bonzi {

    color:
        var(--white);

}


.footer-brand p {

    max-width: 340px;

    margin-top: 12px;

    font-size: 0.88rem;

}


.footer-column {

    display: flex;

    flex-direction: column;

    gap: 8px;

}


.footer-column h3 {

    margin-bottom: 8px;

    color:
        var(--white);

    font-size: 0.95rem;

}


.footer-column a {

    width: fit-content;

    font-size: 0.85rem;

    transition:
        0.2s ease;

}


.footer-column a:hover {

    color:
        #74d6ed;

}


.footer-bottom {

    border-top:
        1px solid
        rgba(255, 255, 255, 0.08);

}


.footer-bottom p {

    padding:
        18px 0;

    font-size: 0.76rem;

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1050px) {

    .header-container {

        column-gap: 15px;

    }

    .logo {

        font-size: 1.8rem;

    }

    .main-nav {

        gap: 0;

    }

    .main-nav a {

        padding-inline: 8px;

        font-size: 0.84rem;

    }

    .main-nav a::after {

        left: 8px;

        right: 8px;

    }

    .header-actions {

        width: 180px;

        min-width: 180px;

    }

    .header-actions .btn-login {

        display: none;

    }

    .hero-grid {

        grid-template-columns: 1fr;

    }

    .hero-main {

        min-height: 430px;

    }

    .hero-side {

        display: grid;

        grid-template-columns:
            repeat(2, 1fr);

    }

    .news-grid,
    .market-grid {

        grid-template-columns:
            repeat(2, 1fr);

    }

    .news-card:last-child,
    .market-card:last-child {

        grid-column:
            1 / -1;

    }

    .featured-grid {

        grid-template-columns:
            1fr;

    }

    .neighbors-grid {

        grid-template-columns:
            1fr;

    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 760px) {

    .container {

        width:
            min(
                calc(100% - 24px),
                var(--container)
            );

    }

    .header-container {

        min-height: 68px;

        display: flex;

        align-items: center;

        gap: 0;

    }

    .logo {

        font-size: 1.65rem;

    }

    .menu-toggle {

        display: block;

    }

    .main-nav {

        position: absolute;

        top: 68px;

        left: 0;

        right: 0;

        display: none;

        flex-direction: column;

        align-items: stretch;

        gap: 0;

        padding:
            10px
            12px
            14px;

        border-top:
            1px solid
            var(--gray-200);

        background:
            var(--white);

        box-shadow:
            0 12px 20px
            rgba(7, 26, 51, 0.12);

    }

    .main-nav.open {

        display: flex;

    }

    .main-nav a {

        padding:
            13px 12px;

        border-radius: 8px;

    }

    .main-nav a:hover,
    .main-nav a.active {

        background:
            var(--gray-50);

    }

    .main-nav a::after {

        display: none;

    }

    .breaking-container {

        min-height: 34px;

    }

    .hero {

        padding-top: 20px;

    }

    .hero-main {

        min-height: 475px;

    }

    .image-placeholder {

        min-height: 475px;

    }

    .hero-overlay {

        padding:
            75px
            22px
            25px;

    }

    .hero-overlay h1 {

        font-size: 2rem;

        letter-spacing: -0.8px;

    }

    .hero-overlay p {

        font-size: 0.88rem;

    }

    .hero-side {

        display: flex;

    }

    .mini-news {

        grid-template-columns:
            85px
            1fr;

    }

    .mini-image {

        min-height: 105px;

    }

    .section {

        padding:
            52px 0;

    }

    .section-heading {

        align-items:
            flex-start;

        flex-direction:
            column;

        gap: 9px;

        margin-bottom: 22px;

    }

    .section-heading .view-all {

        align-self:
            flex-start;

    }

    .news-grid,
    .market-grid {

        grid-template-columns:
            1fr;

    }

    .news-card:last-child,
    .market-card:last-child {

        grid-column:
            auto;

    }

    .featured-image {

        height: 190px;

    }

    .featured-content {

        padding: 20px;

    }

    .featured-content h3 {

        font-size: 1.4rem;

    }

    .featured-small {

        padding: 18px;

    }

    .neighbor-card {

        grid-template-columns:
            1fr;

    }

    .neighbor-image {

        min-height: 170px;

    }

    .community-cta {

        align-items:
            flex-start;

        flex-direction:
            column;

        padding: 22px;

    }

    .cta-content {

        align-items:
            flex-start;

        flex-direction:
            column;

    }

    .cta-actions {

        width: 100%;

        flex-direction:
            column;

    }

    .cta-actions a {

        width: 100%;

    }

    .footer-grid {

        grid-template-columns:
            1fr 1fr;

        gap: 30px;

        padding:
            40px 0;

    }

    .footer-brand {

        grid-column:
            1 / -1;

    }


    /*
    |--------------------------------------------------------------------------
    | HEADER MOBILE
    |--------------------------------------------------------------------------
    */

    .header-actions {

        display: flex !important;

        align-items: center;

        gap: 5px;

        width: auto;

        min-width: 0;

        min-height: 40px;

        margin-left: auto;

    }

    .header-actions .btn-login {

        display: inline-flex !important;

    }

    .header-actions .btn-register {

        display: none !important;

    }

}


/* =========================================================
   CELULARES PEQUEÑOS
   ========================================================= */

@media (max-width: 430px) {

    .hero-main,
    .image-placeholder {

        min-height: 500px;

    }

    .hero-overlay h1 {

        font-size: 1.75rem;

    }

    .mini-news {

        grid-template-columns:
            70px
            1fr;

        padding: 14px;

        gap: 12px;

    }

    .mini-image {

        min-height: 90px;

        font-size: 2rem;

    }

    .mini-news h2 {

        font-size: 1rem;

    }

    .card-image,
    .market-image {

        height: 155px;

    }

    .footer-grid {

        grid-template-columns:
            1fr;

    }

    .footer-brand {

        grid-column:
            auto;

    }

}


/* =========================================================
   HEADER MOBILE
   ========================================================= */

@media (max-width: 768px) {

    .header-actions {

        display: flex !important;

        align-items: center;

        gap: 5px;

        margin-left: auto;

        width: auto;

        min-width: 0;

    }

    .header-actions .btn-login {

        display: inline-flex !important;

    }

    .header-actions .btn-register {

        display: none !important;

    }


    .site-header .logo {

        font-size: 1.65rem;

    }

    .site-header .logo-imagen {

        height: 1.5rem !important;

        max-height: 1.5rem !important;

        max-width: 34px !important;

        margin-right: 5px;

    }

}