
/* ==========================================
   LOCALIAPLUS - PORTADA
   HERO PANORÁMICO
   ========================================== */

.mdx-front-page {
    width: 100%;
}

.mdx-front-page .mdx-hero {
    position: relative;
    isolation: isolate;
    display: flex;
    align-items: center;
    min-height: 540px;
    padding: 65px 24px;

    background-color: #173a56;
    background-image:
        linear-gradient(
            90deg,
            rgba(3, 20, 38, .78) 0%,
            rgba(3, 20, 38, .45) 55%,
            rgba(3, 20, 38, .18) 100%
        ),
        url("../images/mdx-hero.webp");

    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.mdx-front-page .mdx-hero-inner {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.mdx-front-page .mdx-hero-content {
    max-width: 750px;
    margin-bottom: 34px;
}

.mdx-front-page .mdx-hero-content h1 {
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(36px, 4vw, 60px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.035em;
}

.mdx-front-page .mdx-hero-content h1 span {
    display: block;
    color: #69b9ff;
}

.mdx-front-page .mdx-hero-content p {
    max-width: 650px;
    margin: 0;
    color: #fff;
    font-size: clamp(17px, 1.8vw, 23px);
    line-height: 1.5;
}

/* Buscador flotante sobre la fotografía */

.mdx-front-page .mdx-hero-search {
    display: grid;
    grid-template-columns:
        minmax(0, 1.3fr)
        minmax(0, 1fr)
        minmax(0, 1fr)
        155px;

    align-items: center;
    gap: 0;

    width: 100%;
    padding: 12px;

    background: #fff;
    border-radius: 14px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .22);
}

.mdx-front-page .mdx-hero-search-field {
    min-width: 0;
    padding: 8px 16px;
    border-right: 1px solid #e4e9ef;
}

.mdx-front-page .mdx-hero-search-field label {
    display: block;
    margin-bottom: 6px;
    color: #304c69;
    font-size: 12px;
    font-weight: 700;
}

.mdx-front-page .mdx-hero-search-field input,
.mdx-front-page .mdx-hero-search-field select {
    display: block;
    width: 100%;
    min-width: 0;
    height: 35px;
    padding: 4px 6px;

    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;

    color: #253e59;
    font-size: 14px;
    font-family: inherit;
}

.mdx-front-page .mdx-hero-search-field input:focus,
.mdx-front-page .mdx-hero-search-field select:focus {
    outline: 2px solid #1675c5;
    outline-offset: 2px;
}

.mdx-front-page .mdx-hero-search-button {
    min-height: 64px;
    padding: 12px 18px;
    border: 0;
    border-radius: 9px;

    background: #0864b2;
    color: #fff;

    font-family: inherit;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.mdx-front-page .mdx-hero-search-button:hover {
    background: #084e8b;
}

/* Adaptación para tabletas */

@media (max-width: 900px) {

    .mdx-front-page .mdx-hero {
        min-height: 560px;
    }

    .mdx-front-page .mdx-hero-search {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .mdx-front-page .mdx-hero-search-field {
        border-right: 0;
        border-bottom: 1px solid #e4e9ef;
    }

    .mdx-front-page .mdx-hero-search-button {
        min-height: 54px;
    }
}

/* Adaptación para móviles */

@media (max-width: 600px) {

    .mdx-front-page .mdx-hero {
        min-height: 620px;
        padding: 45px 18px;
        background-position: center;
    }

    .mdx-front-page .mdx-hero-content {
        margin-bottom: 26px;
    }

    .mdx-front-page .mdx-hero-content h1 {
        font-size: clamp(32px, 8vw, 42px);
    }

    .mdx-front-page .mdx-hero-content p {
        font-size: 16px;
    }

    .mdx-front-page .mdx-hero-search {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px;
    }

    .mdx-front-page .mdx-hero-search-field {
        padding: 7px 12px;
    }

    .mdx-front-page .mdx-hero-search-button {
        width: 100%;
        min-height: 52px;
    }
}

/* ========================================
   PORTADA: NEGOCIOS RECIÉN INCORPORADOS
======================================== */

.mdx-front-recent {
    padding: 48px 24px 60px;
    background: #f7f9fc;
}

.mdx-front-recent-inner {
    max-width: 1180px;
    margin: 0 auto;
}

.mdx-front-recent-header {
    margin-bottom: 22px;
}

.mdx-front-recent-header h2 {
    margin: 0;
    color: #173a56;
    font-size: 26px;
    font-weight: 750;
}

.mdx-front-recent-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.mdx-front-listing-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-radius: 10px;
    background: #173a56;
}

.mdx-front-listing-card::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 38%;
    background: linear-gradient(
        to bottom,
        rgba(5, 26, 48, 0) 0%,
        rgba(5, 26, 48, 0.45) 45%,
        rgba(5, 26, 48, 0.90) 100%
    );
    pointer-events: none;
}

.mdx-front-listing-link {
    position: relative;
    display: block;
    color: #fff;
    text-decoration: none;
}

.mdx-front-listing-image {
    aspect-ratio: 5 / 3;
    overflow: hidden;
    border-radius: 0;
    background: #173a56;
}

.mdx-front-listing-title {
    position: absolute;
    z-index: 1;
    bottom: 30px;
    left: 16px;
    right: 16px;
    margin: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.mdx-front-listing-category {
    position: absolute;
    z-index: 1;
    bottom: 12px;
    left: 16px;
    right: 16px;
    margin: 0;
    color: #a9d7ff;
    font-size: 13px;
    line-height: 1.3;
}

.mdx-front-listing-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.mdx-front-listing-image {
    aspect-ratio: 5 / 3;
    overflow: hidden;
    border-radius: 10px;
    background: #e6edf4;
}

.mdx-front-listing-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.mdx-front-listing-link:hover img {
    transform: scale(1.04);
}

.mdx-front-listing-title {
    margin: 10px 0 0;
    color: #173a56;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.mdx-front-listing-link:hover .mdx-front-listing-title {
    color: #0864b2;
}

.mdx-front-recent-empty {
    color: #52677c;
}

/* Tabletas */
@media (max-width: 900px) {
    .mdx-front-recent-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }
}

/* Móviles */
@media (max-width: 600px) {
    .mdx-front-recent {
        padding: 34px 18px 44px;
    }

    .mdx-front-recent-header h2 {
        font-size: 23px;
    }

    .mdx-front-recent-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

    .mdx-front-listing-title {
        font-size: 14px;
    }
}

.mdx-front-listing-category {
    display: block;
    margin-top: 4px;
    color: #60758a;
    font-size: 13px;
    line-height: 1.4;
}

/* Textos blancos sobre las fotografías */

.mdx-front-recent .mdx-front-listing-title,
.mdx-front-recent .mdx-front-listing-link:hover .mdx-front-listing-title {
    color: #ffffff;
}

.mdx-front-recent .mdx-front-listing-category {
    color: #ffffff;
}

/* ========================================
   PORTADA: EXPLORA POR CATEGORÍA
======================================== */

.mdx-front-categories {
    padding: 48px 24px 64px;
    background: #ffffff;
}

.mdx-front-categories-inner {
    max-width: 1180px;
    margin: 0 auto;
}

.mdx-front-categories-inner h2 {
    margin: 0 0 24px;
    color: #173a56;
    font-size: 26px;
    font-weight: 750;
}

.mdx-front-categories-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.mdx-front-category-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 78px;
    padding: 16px;
    border: 1px solid #e2e9f0;
    border-radius: 12px;
    background: #f8fafc;
    color: #173a56;
    text-decoration: none;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.mdx-front-category-card:hover {
    background: #eef6ff;
    border-color: #8dc3ef;
    transform: translateY(-2px);
}

.mdx-front-category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #e4f1fc;
    color: #0864b2;
    font-size: 25px;
}

.mdx-front-category-name {
    min-width: 0;
    color: #173a56;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}

/* Tabletas */
@media (max-width: 900px) {
    .mdx-front-categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Móviles */
@media (max-width: 600px) {
    .mdx-front-categories {
        padding: 36px 18px 48px;
    }

    .mdx-front-categories-inner h2 {
        font-size: 23px;
    }

    .mdx-front-categories-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .mdx-front-category-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 9px;
        min-height: 112px;
        padding: 12px;
    }

    .mdx-front-category-icon {
        flex-basis: 38px;
        width: 38px;
        height: 38px;
        font-size: 23px;
    }

    .mdx-front-category-name {
        font-size: 13px;
    }
}

/* ==========================================
   PORTADA: NOVEDADES DE TU COMUNIDAD
   ========================================== */

.mdx-front-publications {
    padding: 48px 24px 64px;
    background: #ffffff;
}

.mdx-front-publications-inner {
    max-width: 1180px;
    margin: 0 auto;
}

.mdx-front-publications-inner > h2 {
    margin: 0 0 24px;
    color: #173a56;
    font-size: 26px;
    font-weight: 750;
    line-height: 1.3;
}

.mdx-front-publications-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.mdx-front-publication-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #e2e9f0;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(20, 55, 85, 0.06);
    transition: transform .2s ease, box-shadow .2s ease;
}

.mdx-front-publication-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(20, 55, 85, 0.12);
}

.mdx-front-publication-card > a {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
    padding: 0 0 20px;
    color: inherit;
    text-decoration: none;
}

.mdx-front-publication-card h3 {
    margin: 0 18px;
}

.mdx-front-publication-card h3 {
    margin: 0;
    color: #173a56;
    font-size: 16px;
    font-weight: 750;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.mdx-front-publication-card p {
    margin: 0 18px;
    padding-top: 0;
    color: #64748b;
    font-size: 13px;
    line-height: 1.4;
}

@media (max-width: 900px) {
    .mdx-front-publications-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .mdx-front-publications {
        padding: 36px 18px 48px;
    }

    .mdx-front-publications-inner > h2 {
        font-size: 23px;
    }

    .mdx-front-publications-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }
}

/* Imagen de las tarjetas de novedades */

.mdx-front-publication-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 0;
    background: #f5f5f5;
}

.mdx-front-publication-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

/* ==========================================
   NOVEDADES: DISEÑO EDITORIAL
   ========================================== */

.mdx-front-publication-card > a {
    gap: 0;
    padding: 0;
}

.mdx-front-publication-image {
    height: 180px;
    flex-shrink: 0;
}

.mdx-front-publication-content {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 18px;
    flex: 1;
}

.mdx-front-publication-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.mdx-front-publication-type {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 6px;
    background: #e5f2ff;
    color: #0864b2;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
}

.mdx-front-publication-category {
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
}

.mdx-front-publication-content h3 {
    margin: 0;
    color: #173a56;
    font-size: 16px;
    font-weight: 750;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.mdx-front-publication-business {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #e8edf3;
}

.mdx-front-publication-business p {
    margin: 0;
    padding: 0;
}

.mdx-front-publication-business-name {
    color: #173a56 !important;
    font-size: 13px;
    font-weight: 650;
}

.mdx-front-publication-business-name::before {
    content: "▣";
    margin-right: 8px;
    color: #0864b2;
}

.mdx-front-publication-location {
    color: #64748b;
    font-size: 12px;
}

.mdx-front-publication-location::before {
    content: "⌖";
    margin-right: 8px;
    color: #64748b;
}