/* REDECOMSA-COMPANY-DETAIL-1.0.0 START */

:root {
    --rdc-detail-blue: #053b78;
    --rdc-detail-blue-2: #087fbd;
    --rdc-detail-orange: #f05a00;
    --rdc-detail-text: #294b69;
    --rdc-detail-muted: #60758a;
    --rdc-detail-line: #d7e4ee;
    --rdc-detail-soft: #f3f8fc;
}

.rdc-company-detail {
    width: min(100%, 76rem);
    margin: 0 auto;
    color: var(--rdc-detail-text);
}

.rdc-company-detail *,
.rdc-company-detail *::before,
.rdc-company-detail *::after {
    box-sizing: border-box;
}

.rdc-company-detail-back {
    margin: 0 0 1rem;
}

.rdc-company-detail-back a {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: #075fa1;
    font-weight: 750;
    text-decoration: none;
}

.rdc-company-detail-back a:hover,
.rdc-company-detail-back a:focus-visible {
    color: var(--rdc-detail-orange);
}

.rdc-company-detail-hero {
    display: grid;
    grid-template-columns: minmax(15rem, 22rem) minmax(0, 1fr);
    min-height: 22rem;
    overflow: hidden;
    border-radius: 1.15rem;
    border-bottom: 0.28rem solid var(--rdc-detail-orange);
    background:
        linear-gradient(
            125deg,
            #063873 0%,
            #0867a4 58%,
            #0787c4 100%
        );
    box-shadow: 0 1.2rem 2.8rem rgba(0, 39, 88, 0.17);
    color: #ffffff;
}

.rdc-company-detail-logo-area {
    position: relative;
    display: flex;
    min-height: 100%;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background:
        linear-gradient(
            145deg,
            rgba(1, 35, 78, 0.45),
            rgba(6, 89, 143, 0.2)
        );
}

.rdc-company-detail-featured {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    background: var(--rdc-detail-orange);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 800;
}

.rdc-company-detail-logo-frame {
    display: flex;
    width: min(100%, 18rem);
    height: 10rem;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 1rem 2.2rem rgba(0, 26, 61, 0.22);
}

.rdc-company-detail-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rdc-company-detail-initials {
    display: flex;
    width: 8rem;
    height: 8rem;
    align-items: center;
    justify-content: center;
    border: 0.15rem solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    font-size: 2.6rem;
    font-weight: 850;
}

.rdc-company-detail-heading {
    display: flex;
    min-width: 0;
    justify-content: center;
    flex-direction: column;
    padding: 2.4rem clamp(1.5rem, 4vw, 4rem);
}

.rdc-company-detail-eyebrow {
    display: block;
    margin-bottom: 0.55rem;
    color: #d9efff;
    font-size: 0.84rem;
    font-weight: 850;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rdc-company-detail-heading h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    line-height: 1.04;
}

.rdc-company-detail-heading p {
    max-width: 48rem;
    margin: 1rem 0 0;
    color: rgba(255, 255, 255, 0.94);
    font-size: clamp(1rem, 1.7vw, 1.22rem);
    line-height: 1.62;
}

.rdc-company-detail-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.rdc-company-detail-button {
    display: inline-flex;
    min-height: 2.85rem;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.72rem 1rem;
    border: 1px solid transparent;
    border-radius: 0.65rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

.rdc-company-detail-button:hover,
.rdc-company-detail-button:focus-visible {
    transform: translateY(-0.08rem);
    text-decoration: none;
}

.rdc-company-detail-button.is-primary {
    background: #ffffff;
    color: #075b9a;
}

.rdc-company-detail-button.is-primary:hover,
.rdc-company-detail-button.is-primary:focus-visible {
    background: #fff4eb;
    color: #c94700;
}

.rdc-company-detail-button.is-whatsapp {
    background: #1f9d55;
    color: #ffffff;
}

.rdc-company-detail-button.is-whatsapp:hover,
.rdc-company-detail-button.is-whatsapp:focus-visible {
    background: #168044;
    color: #ffffff;
}

.rdc-company-detail-button.is-secondary {
    border-color: #b9d4e7;
    background: #f5fafe;
    color: #075b9a;
}

.rdc-company-detail-button.is-secondary:hover,
.rdc-company-detail-button.is-secondary:focus-visible {
    border-color: var(--rdc-detail-orange);
    background: #fff4eb;
    color: #c94700;
}

.rdc-company-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(18rem, 0.8fr);
    align-items: start;
    gap: 1.5rem;
    margin-top: 1.6rem;
}

.rdc-company-detail-main {
    display: grid;
    gap: 1.25rem;
}

.rdc-company-detail-section,
.rdc-company-detail-contact {
    border: 1px solid var(--rdc-detail-line);
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 0.7rem 1.8rem rgba(0, 42, 91, 0.07);
}

.rdc-company-detail-section {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: 1rem;
    padding: 1.45rem;
}

.rdc-company-detail-section-icon {
    display: flex;
    width: 3rem;
    height: 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background:
        linear-gradient(
            135deg,
            #075b9a,
            #078ac7
        );
    color: #ffffff;
    font-size: 1.2rem;
}

.rdc-company-detail-section h2,
.rdc-company-detail-contact h2,
.rdc-company-detail-catalogs h2 {
    margin: 0;
    color: var(--rdc-detail-blue);
}

.rdc-company-detail-section p {
    margin: 0.85rem 0 0;
    color: var(--rdc-detail-text);
    line-height: 1.72;
}

.rdc-company-detail-sectors {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.rdc-company-detail-sectors li {
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: #edf6fc;
    color: #075783;
    font-size: 0.84rem;
    font-weight: 750;
}

.rdc-company-detail-contact {
    position: sticky;
    top: 1rem;
    padding: 1.45rem;
}

.rdc-company-detail-contact > p {
    margin: 0.55rem 0 1.25rem;
    color: var(--rdc-detail-muted);
    line-height: 1.55;
}

.rdc-company-detail-contact dl {
    display: grid;
    gap: 0;
    margin: 0;
}

.rdc-company-detail-contact dl > div {
    padding: 0.9rem 0;
    border-top: 1px solid #e6eef4;
}

.rdc-company-detail-contact dl > div:first-child {
    border-top: 0;
    padding-top: 0;
}

.rdc-company-detail-contact dt {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--rdc-detail-blue);
    font-size: 0.82rem;
    font-weight: 850;
    text-transform: uppercase;
}

.rdc-company-detail-contact dd {
    margin: 0.38rem 0 0;
    overflow-wrap: anywhere;
    color: var(--rdc-detail-text);
}

.rdc-company-detail-contact a {
    color: #076da9;
    font-weight: 700;
    text-decoration: none;
}

.rdc-company-detail-contact a:hover,
.rdc-company-detail-contact a:focus-visible {
    color: var(--rdc-detail-orange);
}

.rdc-company-detail-catalogs {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--rdc-detail-line);
}

.rdc-company-detail-catalogs > header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.rdc-company-detail-catalogs > header p {
    margin: 0.55rem 0 0;
    color: var(--rdc-detail-muted);
}

.rdc-company-detail-catalogs .rdc-company-detail-eyebrow {
    color: #0875b3;
}

.rdc-company-detail-all-catalogs {
    flex: 0 0 auto;
    color: #076da9;
    font-weight: 800;
    text-decoration: none;
}

.rdc-company-detail-all-catalogs:hover,
.rdc-company-detail-all-catalogs:focus-visible {
    color: var(--rdc-detail-orange);
}

.rdc-company-detail-catalog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 1.1rem;
}

.rdc-company-detail-catalog-card {
    display: flex;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    border: 1px solid var(--rdc-detail-line);
    border-radius: 0.95rem;
    background: #ffffff;
    box-shadow: 0 0.65rem 1.6rem rgba(0, 42, 91, 0.08);
}

.rdc-company-detail-catalog-card.is-featured {
    border-color: rgba(240, 90, 0, 0.58);
    box-shadow:
        0 0.65rem 1.6rem rgba(0, 42, 91, 0.08),
        inset 0 0 0 1px rgba(240, 90, 0, 0.18);
}

.rdc-company-detail-catalog-cover {
    position: relative;
    display: flex;
    height: 15rem;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0.8rem;
    background:
        linear-gradient(
            145deg,
            #eaf3f9,
            #f9fcfe
        );
}

.rdc-company-detail-catalog-cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.rdc-company-detail-catalog-cover > .fa {
    color: #0877ba;
    font-size: 4rem;
}

.rdc-company-detail-catalog-badge {
    position: absolute;
    z-index: 2;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.38rem 0.65rem;
    border-radius: 999px;
    background: var(--rdc-detail-orange);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 850;
}

.rdc-company-detail-catalog-content {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
    padding: 1.15rem;
}

.rdc-company-detail-catalog-content h3 {
    margin: 0;
    color: var(--rdc-detail-blue);
    font-size: 1.14rem;
    line-height: 1.35;
}

.rdc-company-detail-catalog-meta {
    display: grid;
    gap: 0.3rem;
    margin: 0.85rem 0 1rem;
    padding: 0;
    color: var(--rdc-detail-muted);
    font-size: 0.86rem;
    list-style: none;
}

.rdc-company-detail-catalog-meta strong {
    color: var(--rdc-detail-text);
}

.rdc-company-detail-catalog-actions {
    display: grid;
    gap: 0.6rem;
    margin-top: auto;
}

.rdc-company-detail-catalog-actions .rdc-company-detail-button {
    width: 100%;
}

.rdc-company-detail-empty {
    padding: 2.5rem 1.25rem;
    border: 1px dashed #b7cddd;
    border-radius: 1rem;
    background: var(--rdc-detail-soft);
    text-align: center;
}

.rdc-company-detail-empty > .fa {
    color: #0877ba;
    font-size: 2.7rem;
}

.rdc-company-detail-empty h3 {
    margin: 0.9rem 0 0;
    color: var(--rdc-detail-blue);
}

.rdc-company-detail-empty p {
    margin: 0.5rem 0 0;
    color: var(--rdc-detail-muted);
}

/*
 * La ficha utiliza la misma separación menú → contenido
 * que las páginas públicas de empresas y catálogos.
 */
#g-main {
    padding-top: 0 !important;
}

#g-main
> .g-container
> .g-grid:first-child {
    display: none !important;
}

#g-main
> .g-container
> .g-grid:nth-child(2)
.g-content {
    padding-top: 3rem !important;
}

@media (max-width: 69.99rem) {
    .rdc-company-detail-catalog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 59.99rem) {
    #g-main
    > .g-container
    > .g-grid:nth-child(2)
    .g-content {
        padding-top: 1.5rem !important;
    }

    .rdc-company-detail-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .rdc-company-detail-logo-area {
        min-height: 13rem;
    }

    .rdc-company-detail-heading {
        padding-top: 1.5rem;
    }

    .rdc-company-detail-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .rdc-company-detail-contact {
        position: static;
    }
}

@media (max-width: 47.99rem) {
    .rdc-company-detail-hero {
        border-radius: 0.85rem;
    }

    .rdc-company-detail-heading {
        padding: 1.4rem;
    }

    .rdc-company-detail-heading h1 {
        font-size: clamp(2.15rem, 12vw, 3.2rem);
    }

    .rdc-company-detail-hero-actions,
    .rdc-company-detail-hero-actions .rdc-company-detail-button {
        width: 100%;
    }

    .rdc-company-detail-section {
        grid-template-columns: minmax(0, 1fr);
    }

    .rdc-company-detail-catalogs > header {
        align-items: flex-start;
        flex-direction: column;
    }

    .rdc-company-detail-catalog-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* REDECOMSA-COMPANY-DETAIL-1.0.0 END */

/* REDECOMSA-SOCIO-MODAL-FORMS-1.0.0 START */


.rdc-redecomsa-contact-modal-button {
    display: inline-flex;

    width: 100%;
    min-height: 38px;

    gap: .42rem;

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

    padding:
        .55rem
        .8rem;

    border:
        1px solid
        rgba(0, 35, 89, .14);

    border-radius: 999px;

    cursor: pointer;

    font: inherit;
    font-size: .78rem;
    line-height: 1.1;
    font-weight: 800;

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


.rdc-redecomsa-contact-modal-button.is-contact {
    background: #f2f6fa;

    color: #07518e;
}


.rdc-redecomsa-contact-modal-button.is-sales {
    background: #002f67;

    border-color: #002f67;

    color: #fff;
}


.rdc-company-contact-dialog {
    width:
        min(
            760px,
            calc(100vw - 1.5rem)
        );

    max-width: 760px;

    padding: 0;

    border: 0;
    border-radius: 18px;

    overflow: hidden;

    background: #fff;

    box-shadow:
        0 24px 70px
        rgba(0, 27, 67, .28);
}


.rdc-company-contact-dialog::backdrop {
    background:
        rgba(0, 22, 52, .68);

    backdrop-filter:
        blur(3px);
}


.rdc-company-contact-dialog-shell {
    display: flex;

    flex-direction: column;

    max-height: 90vh;
}


.rdc-company-contact-dialog-header {
    display: flex;

    gap: 1rem;

    align-items: flex-start;
    justify-content: space-between;

    padding:
        1rem
        1.15rem;

    background:
        linear-gradient(
            135deg,
            #002359,
            #07518e
        );

    color: #fff;
}


.rdc-company-contact-dialog-kicker {
    display: block;

    margin-bottom: .2rem;

    color: #f5a20b;

    font-size: .68rem;
    font-weight: 850;

    letter-spacing: .08em;
}


.rdc-company-contact-dialog-header h2 {
    margin:
        0
        0
        .2rem;

    color: #fff;

    font-size: 1.25rem;
}


.rdc-company-contact-dialog-header p {
    margin: 0;

    color:
        rgba(
            255,
            255,
            255,
            .82
        );

    font-size: .8rem;
}


.rdc-company-contact-dialog-close {
    display: inline-flex;

    width: 36px;
    height: 36px;

    flex: 0 0 36px;

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

    padding: 0;

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

    border-radius: 50%;

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

    color: #fff;

    cursor: pointer;
}


.rdc-company-contact-dialog-frame {
    display: block;

    width: 100%;
    height: min(72vh, 720px);

    border: 0;

    background: #fff;
}


@media (hover: hover) and (pointer: fine) {

    .rdc-redecomsa-contact-modal-button:hover,
    .rdc-redecomsa-contact-modal-button:focus {
        transform: translateY(-2px);

        box-shadow:
            0 5px 12px
            rgba(0, 35, 89, .14);
    }


    .rdc-company-contact-dialog-close:hover,
    .rdc-company-contact-dialog-close:focus {
        background:
            rgba(
                255,
                255,
                255,
                .20
            );
    }

}


@media (max-width: 640px) {

    .rdc-company-contact-dialog {
        width:
            calc(
                100vw -
                .75rem
            );

        border-radius: 14px;
    }


    .rdc-company-contact-dialog-header {
        padding:
            .85rem
            .9rem;
    }


    .rdc-company-contact-dialog-frame {
        height: 76vh;
    }

}


/* REDECOMSA-SOCIO-MODAL-FORMS-1.0.0 END */


/* REDECOMSA-COMPANY-DETAIL-MOBILE-LIGHT-1.0.0 START */


/*
 * En escritorio se conserva íntegramente
 * el diseño original.
 *
 * Solo en celular aclaramos la zona visual
 * dedicada al logotipo del socio.
 */

@media (max-width: 47.99rem) {


    /* =================================================
       ZONA DE LOGOTIPO
       ================================================= */

    .rdc-company-detail-logo-area {
        min-height:
            12.5rem !important;

        padding:
            1.35rem !important;

        background:
            linear-gradient(
                180deg,
                #f8fbfe 0%,
                #eef5fa 100%
            ) !important;

        border-bottom:
            1px solid
            rgba(
                5,
                59,
                120,
                .11
            );
    }


    /* =================================================
       TARJETA DEL LOGOTIPO
       ================================================= */

    .rdc-company-detail-logo-frame {
        width:
            min(
                100%,
                18rem
            );

        height:
            10rem;

        padding:
            1.15rem;

        border:
            1px solid
            rgba(
                5,
                59,
                120,
                .13
            );

        border-radius:
            .95rem;

        background:
            #ffffff;

        box-shadow:
            0
            .65rem
            1.6rem
            rgba(
                0,
                43,
                92,
                .10
            );
    }


    /* =================================================
       DISTINTIVO DESTACADA
       ================================================= */

    .rdc-company-detail-featured {
        top:
            .8rem;

        left:
            .8rem;

        z-index: 2;

        background:
            var(
                --rdc-detail-orange
            );

        color:
            #ffffff;

        box-shadow:
            0
            .25rem
            .7rem
            rgba(
                184,
                68,
                0,
                .18
            );
    }


    /* =================================================
       SI ALGÚN SOCIO NO TIENE LOGOTIPO
       ================================================= */

    .rdc-company-detail-initials {
        border:
            .15rem solid
            rgba(
                5,
                59,
                120,
                .17
            );

        background:
            #ffffff;

        color:
            var(
                --rdc-detail-blue
            );

        box-shadow:
            0
            .65rem
            1.6rem
            rgba(
                0,
                43,
                92,
                .10
            );
    }


    /* =================================================
       TRANSICIÓN HACIA EL BLOQUE AZUL DEL NOMBRE
       ================================================= */

    .rdc-company-detail-heading {
        position: relative;

        /*
         * Se conserva el fondo azul del hero.
         * No se modifica el encabezado del nombre,
         * descripción ni botones.
         */
    }

}


/* REDECOMSA-COMPANY-DETAIL-MOBILE-LIGHT-1.0.0 END */



/* REDECOMSA-COMPANY-DETAIL-MOBILE-FULLBLEED-1.1.0 START */


/*
 * Corrección definitiva basada en medición
 * real desde DevTools.
 *
 * El gutter exterior desplaza la ficha:
 *
 * hero.left = 12px
 *
 * y el borde derecho ya coincide con
 * el viewport.
 *
 * Por tanto:
 *
 * margin-left: -12px
 * width: calc(100% + 12px)
 *
 * Resultado medido:
 *
 * left = 0
 * right = viewport
 * horizontalOverflow = false
 *
 * No se modifican gutters globales.
 */


@media (max-width: 47.99rem) {


    .rdc-company-detail-hero {
        box-sizing:
            border-box;

        margin-left:
            -12px !important;

        margin-inline-start:
            -12px !important;

        width:
            calc(
                100% + 12px
            ) !important;

        max-width:
            none !important;


        /*
         * El hero conserva una sola columna.
         */

        grid-template-columns:
            minmax(
                0,
                1fr
            ) !important;

        column-gap:
            0 !important;

        row-gap:
            0 !important;
    }


    /*
     * Ambos hijos siguen ocupando
     * exactamente todo el hero.
     */

    .rdc-company-detail-logo-area,
    .rdc-company-detail-heading {
        box-sizing:
            border-box;

        width:
            100% !important;

        min-width:
            0 !important;

        max-width:
            none !important;

        margin-left:
            0 !important;

        margin-right:
            0 !important;

        grid-column:
            1 / -1 !important;
    }


}


/* REDECOMSA-COMPANY-DETAIL-MOBILE-FULLBLEED-1.1.0 END */
