
/* =========================================================
   MATEMATICAZ EXPLORER
   ========================================================= */

.mz-explorer,
.mz-publish {
    margin: 28px 0 50px;
}


/* HERO */

.mz-explorer-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 24px;
}


.mz-explorer-eyebrow,
.mz-publish-header > span {
    color: #2563eb;

    font-size: 10px;
    font-weight: 850;

    letter-spacing: .11em;
}


.mz-explorer-hero h1,
.mz-publish-header h1 {
    margin: 6px 0 8px;

    color: #0f172a;

    font-size: clamp(30px, 4vw, 48px);
    font-weight: 900;

    letter-spacing: -1.5px;
}


.mz-explorer-hero p,
.mz-publish-header p {
    margin: 0;

    color: #64748b;

    font-size: 15px;
}


.mz-explorer-publish {
    min-height: 46px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 0 18px;

    border-radius: 13px;

    background:
        linear-gradient(
            110deg,
            #2563eb,
            #4f46e5
        );

    color: #fff !important;

    font-size: 13px;
    font-weight: 800;

    text-decoration: none !important;

    box-shadow:
        0 10px 25px
        rgba(37,99,235,.20);
}


/* FILTRO */

.mz-explorer-filters {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-bottom: 24px;
}


.mz-explorer-filters label {
    color: #64748b;

    font-size: 11px;
    font-weight: 800;
}


.mz-explorer-filters select {
    min-height: 40px;

    padding: 0 36px 0 13px;

    border: 1px solid #dbe4f0;
    border-radius: 10px;

    background: #fff;

    color: #334155;

    font-weight: 700;
}


/* =========================================================
   MASONRY
   ========================================================= */

.mz-explorer-grid {
    columns: 4 270px;

    column-gap: 18px;
}


.mz-explorer-card {
    display: inline-block;

    width: 100%;

    margin: 0 0 18px;

    overflow: hidden;

    break-inside: avoid;

    border: 1px solid #e2e8f0;
    border-radius: 18px;

    background: #fff;

    box-shadow:
        0 7px 25px
        rgba(15,23,42,.055);

    transition:
        transform .18s ease,
        box-shadow .18s ease;
}


.mz-explorer-card:hover {
    transform: translateY(-3px);

    box-shadow:
        0 17px 40px
        rgba(15,23,42,.11);
}


/* IMAGEN */

.mz-explorer-image {
    height: 270px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    padding: 10px;

    box-sizing: border-box;

    background:
        linear-gradient(
            145deg,
            #f8fafc,
            #eef2f7
        );

    text-decoration: none !important;
}


.mz-explorer-image img {
    display: block;

    width: auto;
    height: auto;

    max-width: 100%;
    max-height: 100%;

    object-fit: contain;

    border-radius: 9px;

    transition:
        transform .20s ease;
}


.mz-explorer-card:hover
.mz-explorer-image img {
    transform: scale(1.025);
}


/* CARD */

.mz-explorer-card-body {
    padding: 14px 15px 15px;
}


.mz-explorer-course {
    display: inline-flex;

    margin-bottom: 7px;

    padding: 4px 8px;

    border-radius: 999px;

    background: #eff6ff;

    color: #2563eb !important;

    font-size: 9px;
    font-weight: 850;

    text-decoration: none !important;
}


.mz-explorer-card h2 {
    margin: 0 0 9px;

    font-size: 15px;
    font-weight: 850;

    line-height: 1.35;
}


.mz-explorer-card h2 a {
    color: #0f172a !important;

    text-decoration: none !important;
}


.mz-explorer-card h2 a:hover {
    color: #2563eb !important;
}


.mz-explorer-meta {
    display: flex;
    flex-wrap: wrap;

    gap: 5px;

    color: #94a3b8;

    font-size: 10px;
}


.mz-explorer-meta a {
    color: #64748b !important;

    font-weight: 700;
}


.mz-explorer-stats {
    display: flex;

    gap: 14px;

    margin-top: 12px;
    padding-top: 10px;

    border-top: 1px solid #edf2f7;

    color: #64748b;

    font-size: 10px;
}


/* =========================================================
   PUBLICAR
   ========================================================= */

.mz-publish-header {
    margin-bottom: 28px;
}


.mz-publish-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0,1fr));

    gap: 16px;
}


.mz-publish-card {
    min-height: 110px;

    display: grid;

    grid-template-columns:
        46px minmax(0,1fr) 30px;

    align-items: center;

    gap: 14px;

    padding: 20px;

    border: 1px solid #e2e8f0;
    border-radius: 17px;

    background: #fff;

    color: #0f172a !important;

    text-decoration: none !important;

    box-shadow:
        0 7px 25px
        rgba(15,23,42,.05);

    transition:
        transform .16s ease,
        border-color .16s ease,
        box-shadow .16s ease;
}


.mz-publish-card:hover {
    transform: translateY(-3px);

    border-color: #bfdbfe;

    box-shadow:
        0 15px 35px
        rgba(15,23,42,.10);
}


.mz-publish-symbol {
    width: 46px;
    height: 46px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background: #eff6ff;

    color: #2563eb;

    font-family: Georgia, serif;

    font-size: 25px;
}


.mz-publish-card strong {
    display: block;

    font-size: 15px;
    font-weight: 850;
}


.mz-publish-card p {
    margin: 5px 0 0;

    color: #64748b;

    font-size: 11px;
    line-height: 1.45;
}


.mz-publish-arrow {
    color: #94a3b8;

    font-size: 22px;
}


.mz-publish-login,
.mz-explorer-empty {
    padding: 40px;

    border: 1px dashed #cbd5e1;
    border-radius: 18px;

    background: #f8fafc;

    text-align: center;

    color: #64748b;
}


/* HEADER PUBLISH BUTTON */

.mz-header-publish {
    min-height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 15px;

    border-radius: 11px;

    background: rgba(255,255,255,.94);

    color: #1d4ed8 !important;

    font-size: 13px;
    font-weight: 850;

    text-decoration: none !important;
}


/* TABLET */

@media (max-width: 950px) {

    .mz-publish-grid {
        grid-template-columns:
            repeat(2, minmax(0,1fr));
    }

}


/* MOBILE */

@media (max-width: 650px) {

    .mz-explorer-hero {
        align-items: stretch;

        flex-direction: column;
    }


    .mz-explorer-publish {
        width: 100%;

        box-sizing: border-box;
    }


    .mz-explorer-grid {
        columns: 2 150px;

        column-gap: 10px;
    }


    .mz-explorer-card {
        margin-bottom: 10px;

        border-radius: 13px;
    }


    .mz-explorer-card-body {
        padding: 11px;
    }


    .mz-publish-grid {
        grid-template-columns: 1fr;
    }

.mz-explorer-image {
        height: 220px;
        padding: 7px;
    }

}


@media (max-width: 420px) {

    .mz-explorer-grid {
        columns: 1;
    }

}



/* =========================================================
   MATEMATICAZ EXPLORER 1.2
   ========================================================= */


/* SECCIONES */

.mz-explorer-sections {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0,1fr));

    gap: 12px;

    margin: 26px 0 20px;
}


.mz-explorer-section {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 14px 16px;

    border:
        1px solid #e2e8f0;

    border-radius: 15px;

    background: #fff;

    color: #475569 !important;

    text-decoration: none !important;

    transition:
        transform .16s ease,
        border-color .16s ease,
        background .16s ease,
        box-shadow .16s ease;
}


.mz-explorer-section:hover {
    transform:
        translateY(-2px);

    border-color: #bfdbfe;

    box-shadow:
        0 9px 25px
        rgba(15,23,42,.06);
}


.mz-explorer-section.is-active {
    border-color: #93c5fd;

    background:
        linear-gradient(
            145deg,
            #eff6ff,
            #f5f3ff
        );

    box-shadow:
        0 8px 25px
        rgba(37,99,235,.08);
}


.mz-section-icon {
    width: 43px;
    height: 43px;

    flex: 0 0 43px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    background: #eef4ff;

    color: #2563eb;

    font-family:
        Georgia,
        serif;

    font-size: 23px;
}


.mz-explorer-section strong {
    display: block;

    color: #0f172a;

    font-size: 13px;
    font-weight: 850;
}


.mz-explorer-section small {
    display: block;

    margin-top: 3px;

    color: #94a3b8;

    font-size: 10px;
    font-weight: 600;
}



/* TOOLBAR */

.mz-explorer-tools {
    margin-bottom: 20px;

    padding: 14px;

    border:
        1px solid #e2e8f0;

    border-radius: 16px;

    background:
        rgba(255,255,255,.88);

    box-shadow:
        0 7px 25px
        rgba(15,23,42,.04);
}


.mz-explorer-search {
    display: grid;

    grid-template-columns:
        minmax(280px, 1fr)
        auto;

    gap: 12px;

    align-items: end;
}


.mz-search-box {
    height: 44px;

    display: flex;
    align-items: center;

    overflow: hidden;

    border:
        1px solid #dbe4f0;

    border-radius: 12px;

    background: #fff;
}


.mz-search-icon {
    padding-left: 14px;

    color: #94a3b8;

    font-size: 21px;
}


.mz-search-box input {
    flex: 1;

    min-width: 0;

    height: 100%;

    padding: 0 12px;

    border: 0 !important;

    outline: 0;

    box-shadow: none !important;

    background: transparent;

    color: #0f172a;

    font-size: 13px;
}


.mz-search-box button {
    height: 34px;

    margin-right: 5px;

    padding: 0 15px;

    border: 0;
    border-radius: 9px;

    background: #2563eb;

    color: #fff;

    font-size: 11px;
    font-weight: 800;

    cursor: pointer;
}


.mz-course-select {
    display: flex;
    flex-direction: column;

    gap: 4px;
}


.mz-course-select label {
    color: #94a3b8;

    font-size: 9px;
    font-weight: 800;

    text-transform: uppercase;
}


.mz-course-select select {
    min-width: 220px;
    height: 44px;
}


/* ORDEN */

.mz-explorer-sort {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;

    margin-top: 12px;
}


.mz-explorer-sort a {
    min-height: 34px;

    display: inline-flex;
    align-items: center;

    padding: 0 12px;

    border-radius: 999px;

    background: #f8fafc;

    color: #64748b !important;

    font-size: 10px;
    font-weight: 800;

    text-decoration: none !important;
}


.mz-explorer-sort a:hover {
    background: #eff6ff;

    color: #2563eb !important;
}


.mz-explorer-sort a.is-active {
    background: #0f172a;

    color: #fff !important;
}


/* RESULTADOS */

.mz-explorer-results-info {
    margin: 8px 0 15px;

    color: #94a3b8;

    font-size: 11px;
}


.mz-explorer-results-info strong {
    color: #475569;
}


/* TARJETA */

.mz-explorer-image {
    position: relative;
}


.mz-image-open {
    position: absolute;

    left: 50%;
    bottom: 13px;

    transform:
        translate(-50%, 8px);

    opacity: 0;

    padding: 7px 11px;

    border-radius: 999px;

    background:
        rgba(15,23,42,.88);

    color: #fff;

    font-size: 9px;
    font-weight: 800;

    pointer-events: none;

    transition:
        opacity .18s ease,
        transform .18s ease;
}


.mz-explorer-card:hover
.mz-image-open {
    opacity: 1;

    transform:
        translate(-50%,0);
}



/* PAGINACIÓN */

.mz-explorer-pagination {
    display: grid;

    grid-template-columns:
        1fr auto 1fr;

    align-items: center;

    gap: 15px;

    margin: 34px 0 10px;
}


.mz-page-arrow {
    color: #475569 !important;

    font-size: 11px;
    font-weight: 800;

    text-decoration: none !important;
}


.mz-page-arrow:last-child {
    text-align: right;
}


.mz-page-numbers {
    display: flex;

    gap: 5px;
}


.mz-page-numbers a {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid #e2e8f0;

    border-radius: 10px;

    background: #fff;

    color: #64748b !important;

    font-size: 11px;
    font-weight: 800;

    text-decoration: none !important;
}


.mz-page-numbers a.is-active {
    border-color: #2563eb;

    background: #2563eb;

    color: #fff !important;
}


/* VACÍO */

.mz-explorer-empty {
    padding: 70px 25px;

    text-align: center;
}


.mz-empty-symbol {
    margin-bottom: 12px;

    color: #cbd5e1;

    font-family: Georgia,serif;

    font-size: 55px;
}


.mz-explorer-empty h2 {
    margin: 0;

    color: #334155;

    font-size: 20px;
}


.mz-explorer-empty p {
    margin: 8px 0 18px;

    color: #94a3b8;
}


.mz-explorer-empty a {
    color: #2563eb;

    font-weight: 800;
}


/* TABLET */

@media (max-width: 850px) {

    .mz-explorer-search {
        grid-template-columns: 1fr;
    }


    .mz-course-select select {
        width: 100%;
    }

}


/* MOBILE */

@media (max-width: 650px) {

    .mz-explorer-sections {
        display: flex;

        overflow-x: auto;

        padding-bottom: 4px;

        scrollbar-width: none;
    }


    .mz-explorer-sections::-webkit-scrollbar {
        display: none;
    }


    .mz-explorer-section {
        min-width: 200px;

        flex: 0 0 200px;
    }


    .mz-explorer-tools {
        padding: 10px;
    }


    .mz-search-box button {
        padding: 0 10px;
    }


    .mz-explorer-pagination {
        grid-template-columns:
            1fr 1fr;
    }


    .mz-page-numbers {
        grid-column: 1 / -1;
        grid-row: 1;

        justify-content: center;
    }

}



/* =========================================================
   MATEMATICAZ EXPLORER
   RESPONSIVE GRID 1.2.1
   Replaces previous CSS multi-column masonry
   ========================================================= */

.mz-explorer-grid {
    display: grid !important;

    grid-template-columns:
        repeat(
            auto-fill,
            minmax(
                min(100%, 280px),
                1fr
            )
        ) !important;

    gap: 20px !important;

    width: 100%;

    column-gap: 20px !important;

    /*
     * Neutraliza por completo el antiguo
     * CSS columns/masonry.
     */
    columns: auto !important;
    column-count: auto !important;
    column-width: auto !important;
}


/* Cada tarjeta pasa a ser un elemento normal del Grid */

.mz-explorer-card {
    display: flex !important;
    flex-direction: column;

    width: 100% !important;
    min-width: 0;

    margin: 0 !important;

    break-inside: auto !important;

    box-sizing: border-box;
}


/* Área de miniatura proporcionada al ancho disponible */

.mz-explorer-image {
    width: 100%;

    height: clamp(
        250px,
        23vw,
        335px
    );

    flex: 0 0 auto;
}


/* No recortamos láminas matemáticas */

.mz-explorer-image img {
    width: auto !important;
    height: auto !important;

    max-width: 100% !important;
    max-height: 100% !important;

    object-fit: contain !important;
}


/* El cuerpo ocupa el resto de la tarjeta */

.mz-explorer-card-body {
    flex: 1;

    display: flex;
    flex-direction: column;
}


/* Estadísticas siempre al final */

.mz-explorer-stats {
    margin-top: auto;
}


/* =========================================================
   LARGE DESKTOP
   ========================================================= */

@media (min-width: 1500px) {

    .mz-explorer-grid {
        grid-template-columns:
            repeat(
                auto-fill,
                minmax(300px, 1fr)
            ) !important;
    }

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .mz-explorer-grid {
        grid-template-columns:
            repeat(
                auto-fill,
                minmax(250px, 1fr)
            ) !important;

        gap: 16px !important;
    }


    .mz-explorer-image {
        height: 275px;
    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 620px) {

    .mz-explorer-grid {
        grid-template-columns:
            1fr !important;

        gap: 14px !important;
    }


    .mz-explorer-image {
        height: 300px;
    }

}



/* =========================================================
   EXPLORER SOCIAL 1.4
   ========================================================= */

.mz-explorer-feed {
    display: flex;
    align-items: center;

    gap: 6px;

    margin:
        0
        0
        16px;

    padding:
        5px;

    width: fit-content;

    border:
        1px solid #e2e8f0;

    border-radius: 14px;

    background: #fff;

    box-shadow:
        0 6px 20px
        rgba(15,23,42,.04);
}


.mz-explorer-feed a {
    min-height: 37px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding:
        0
        14px;

    border-radius: 10px;

    color:
        #64748b !important;

    font-size: 10px;
    font-weight: 800;

    text-decoration: none !important;
}


.mz-explorer-feed a:hover {
    color:
        #2563eb !important;

    background:
        #eff6ff;
}


.mz-explorer-feed a.is-active {
    background:
        #0f172a;

    color:
        #fff !important;
}


/* Favorite button directly on card */

.mz-explorer-card {
    position: relative;
}


.mz-card-favorite {
    position: absolute;

    z-index: 8;

    top: 10px;
    right: 10px;

    width: 40px !important;
    height: 40px !important;

    min-width: 40px !important;
    min-height: 40px !important;

    padding: 0 !important;

    border:
        1px solid
        rgba(255,255,255,.8) !important;

    border-radius:
        50% !important;

    background:
        rgba(255,255,255,.94) !important;

    color:
        #64748b !important;

    box-shadow:
        0 6px 18px
        rgba(15,23,42,.14);

    backdrop-filter:
        blur(7px);
}


.mz-card-favorite:hover {
    color:
        #e11d48 !important;

    background:
        #fff !important;
}


.mz-card-favorite.is-active {
    border-color:
        #fecdd3 !important;

    background:
        #fff1f2 !important;

    color:
        #e11d48 !important;
}


.mz-card-favorite
.mz-favorite-icon {
    font-size: 21px;
}


.mz-card-favorite
.mz-favorite-label {
    display: none;
}


/* Follow */

.mz-profile-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;

    gap: 8px;

    margin-top: 15px;
}


.mz-follow {
    min-height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 6px;

    padding:
        0
        15px;

    border:
        1px solid
        rgba(255,255,255,.28);

    border-radius:
        999px;

    background:
        rgba(255,255,255,.13);

    color: #fff;

    font-size: 10px;
    font-weight: 850;

    cursor: pointer;
}


.mz-follow:hover {
    background:
        rgba(255,255,255,.22);
}


.mz-follow.is-active {
    background:
        #fff;

    color:
        #1d4ed8;
}


.mz-follow-count {
    color:
        rgba(255,255,255,.66);

    font-size: 9px;
}


.mz-follow-count strong {
    color: #fff;
}


/* Mobile */

@media (max-width: 650px) {

    .mz-explorer-feed {
        width: 100%;

        overflow-x: auto;

        box-sizing: border-box;
    }


    .mz-explorer-feed a {
        flex:
            1
            0
            auto;
    }

}



/* =========================================================
   EXPLORER Q&A
   ========================================================= */

.mz-qa-explorer-filter.is-active {
    background: #fff7ed !important;
    color: #c2410c !important;

    box-shadow:
        inset 0 0 0 1px
        #fed7aa;
}


.mz-explorer-solved {
    display: inline-flex;
    align-items: center;

    margin:
        0 5px 7px 0;

    padding:
        4px 8px;

    border-radius:
        999px;

    background:
        #ecfdf5;

    color:
        #047857;

    font-size:
        8px;

    font-weight:
        850;
}



/* =========================================================
   EXPLORER Q&A
   ========================================================= */

.mz-qa-explorer-filter.is-active {
    background: #fff7ed !important;
    color: #c2410c !important;

    box-shadow:
        inset 0 0 0 1px
        #fed7aa;
}


.mz-explorer-solved {
    display: inline-flex;
    align-items: center;

    margin:
        0 6px 8px 0;

    padding:
        5px 9px;

    border-radius:
        999px;

    background:
        #ecfdf5;

    color:
        #047857;

    border:
        1px solid #a7f3d0;

    font-size:
        8px;

    font-weight:
        850;
}



/* =========================================================
   Q&A WITHOUT IMAGE
   ========================================================= */

.mz-explorer-image.mz-qa-no-image {
    position: relative;

    min-height: 280px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-decoration: none !important;

    background:
        radial-gradient(
            circle at 20% 20%,
            rgba(37,99,235,.13),
            transparent 32%
        ),
        radial-gradient(
            circle at 85% 80%,
            rgba(124,58,237,.13),
            transparent 36%
        ),
        linear-gradient(
            145deg,
            #f8fbff,
            #eef4ff
        );
}


.mz-explorer-image.mz-qa-no-image::before {
    content: "∫   π   Σ   √x   ∞";

    position: absolute;

    inset: auto 0 18px;

    color:
        rgba(37,99,235,.08);

    font-family:
        Georgia, serif;

    font-size: 30px;

    letter-spacing: 12px;

    text-align: center;

    pointer-events: none;
}


.mz-qa-placeholder {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 28px;

    text-align: center;
}


.mz-qa-placeholder-symbol {
    width: 70px;
    height: 70px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 14px;

    border-radius: 20px;

    background:
        linear-gradient(
            145deg,
            #2563eb,
            #6d28d9
        );

    color: #fff;

    box-shadow:
        0 12px 30px
        rgba(37,99,235,.22);

    font-size: 38px;
    font-weight: 900;
}


.mz-qa-placeholder strong {
    color: #0f172a;

    font-size: 16px;
    font-weight: 900;
}


.mz-qa-placeholder small {
    margin-top: 5px;

    color: #64748b;

    font-size: 9px;
}


@media (max-width: 600px) {

    .mz-explorer-image.mz-qa-no-image {
        min-height: 230px;
    }

}



/* Q&A status on Explorer cards */

.mz-explorer-unresolved {
    display: inline-flex;
    align-items: center;

    margin:
        0 6px 8px 0;

    padding:
        5px 9px;

    border:
        1px solid #fed7aa;

    border-radius:
        999px;

    background:
        #fff7ed;

    color:
        #c2410c;

    font-size:
        8px;

    font-weight:
        850;
}

