
/* =====================================================
   REPSA - CONCRETOS REFRACTARIOS
   Archivo: css/castables.css
   ===================================================== */

/* CONTENEDOR PRINCIPAL */
.castables-page {
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.castables-articulo {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto 35px;
    padding-bottom: 35px;
    border-bottom: 1px solid #ddd;
    overflow: hidden;
    box-sizing: border-box;
}

/* TÍTULO DEL ARTÍCULO */
.castables-articulo .art-header {
    width: 100%;
    margin-bottom: 25px;
}

.castables-articulo .art-header h2 {
    margin: 0;
    padding: 0 0 0 15px;
    border-left: 5px solid #F3542D;
    color: #222;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
    text-transform: uppercase;
    box-sizing: border-box;
}

/* CONTENIDO */
.castables-articulo .art-content {
    width: 100%;
    display: flow-root;
    color: #444;
    font-size: 16px;
    line-height: 1.8;
    text-align: justify;
    box-sizing: border-box;
}

.castables-articulo .art-content p {
    margin: 0 0 18px;
    padding: 0;
    color: #444;
    font-size: 16px;
    line-height: 1.8;
    text-align: justify;
}

/* IMAGEN PRINCIPAL */
.castables-articulo .imagen-castables {
    float: left;
    display: block;
    width: 400px;
    max-width: 45%;
    height: 300px;
    margin: 0 25px 18px 0;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 3px;
    object-fit: cover;
    object-position: center center;
    box-sizing: border-box;
}

/* BANNER SUPERIOR */
.castables-subheader {
    position: relative;
    width: 100%;
    min-height: 150px;
    margin: 0 0 40px;
    padding: 35px 20px 25px;
    display: flex;
    align-items: center;
    background:
        linear-gradient(rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.35)),
        url("../images/bg-4.jpg");
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    box-sizing: border-box;
}

.castables-subheader .zerogrid {
    width: 100%;
}

.castables-subheader h1 {
    margin: 0;
    padding: 0;
    color: #fff;
    font-size: 35px;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    text-transform: uppercase;
}

/* DOCUMENTOS PDF */
.castables-documentos {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    width: 100%;
    margin-top: 28px;
    clear: both;
    box-sizing: border-box;
}

.castables-documento {
    width: 100%;
    max-width: 900px;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.castables-documento a {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 68px;
    padding: 12px 18px;
    border: 1px solid #e5e5e5;
    border-left: 4px solid #F3542D;
    border-radius: 3px;
    background: #f7f7f7;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    text-align: left;
    text-decoration: none;
    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        box-shadow 0.25s ease;
    box-sizing: border-box;
}

.castables-documento a:hover {
    border-color: #F3542D;
    border-left-color: #d94420;
    background: #fff;
    color: #d94420;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.07);
}

.castables-documento .pdf-icono {
    display: block;
    flex: 0 0 35px;
    width: 35px;
    height: 37px;
    margin: 0;
    padding: 0;
    object-fit: contain;
}

.castables-documento a span {
    flex: 1 1 auto;
    min-width: 0;
}

.castables-documento a .fa-external-link {
    flex: 0 0 auto;
    margin-left: 8px;
    color: #888;
    font-size: 14px;
}

.castables-documento a:hover .fa-external-link {
    color: #F3542D;
}

/* COPYRIGHT */
.castables-copyright {
    margin-top: 18px;
}

/* FLECHAS DE LOS MENÚS DESPLEGABLES */
#mainNav li:has(> ul) > a::after,
#cssmenu li:has(> ul) > a::after {
    content: "\f107";
    font-family: FontAwesome;
    font-weight: normal;
    display: inline-block;
    margin-left: 8px;
    font-size: 13px;
    line-height: inherit;
    vertical-align: middle;
}

/* BOTÓN VOLVER ARRIBA */
#backToTop {
    display: none;
    position: fixed;
    right: 25px;
    bottom: 25px;
    z-index: 999;
    width: 45px;
    height: 45px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 3px;
    background: #F3542D;
    color: #fff;
    font-size: 25px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    transition: background-color 0.25s ease;
}

#backToTop:hover {
    background: #d94420;
}

/* =====================================================
   TABLET
   ===================================================== */
@media screen and (max-width: 900px) {
    .castables-articulo .art-header h2 {
        font-size: 27px;
    }

    .castables-articulo .imagen-castables {
        width: 360px;
        height: 270px;
    }

    .castables-subheader h1 {
        font-size: 30px;
    }

    .castables-documento a {
        font-size: 14px;
    }
}

/* =====================================================
   MÓVILES
   ===================================================== */
@media screen and (max-width: 767px) {
    .castables-page {
        padding: 0 15px;
    }

    .castables-articulo {
        margin-bottom: 25px;
        padding-bottom: 25px;
    }

    .castables-articulo .art-header {
        margin-bottom: 20px;
    }

    .castables-articulo .art-header h2 {
        padding-left: 12px;
        font-size: 24px;
    }

    .castables-articulo .art-content {
        font-size: 15px;
        line-height: 1.75;
        text-align: left;
    }

    .castables-articulo .art-content p {
        font-size: 15px;
        line-height: 1.75;
        text-align: left;
    }

    .castables-articulo .imagen-castables {
        float: none;
        width: 100%;
        max-width: 100%;
        height: auto;
        max-height: none;
        margin: 0 0 22px;
        object-fit: contain;
    }

    .castables-subheader {
        min-height: 125px;
        margin-bottom: 28px;
        padding: 25px 15px;
    }

    .castables-subheader h1 {
        font-size: 25px;
    }

    .castables-documentos {
        gap: 10px;
        margin-top: 24px;
    }

    .castables-documento {
        max-width: 100%;
    }

    .castables-documento a {
        gap: 11px;
        min-height: 62px;
        padding: 11px 12px;
        font-size: 14px;
        overflow-wrap: anywhere;
    }

    .castables-documento .pdf-icono {
        flex-basis: 30px;
        width: 30px;
        height: 32px;
    }

    .castables-documento a .fa-external-link {
        margin-left: 2px;
        font-size: 12px;
    }

    #backToTop {
        right: 15px;
        bottom: 15px;
        width: 40px;
        height: 40px;
        font-size: 22px;
    }
}

/* TELÉFONOS PEQUEÑOS */
@media screen and (max-width: 380px) {
    .castables-articulo .art-header h2 {
        font-size: 21px;
    }

    .castables-subheader h1 {
        font-size: 22px;
    }

    .castables-documento a {
        gap: 8px;
        padding: 10px;
        font-size: 13px;
    }
}


/* =========================================
   CORRECCIÓN: CENTRAR TÍTULO, IMAGEN Y TEXTO
   ========================================= */

/* Centrar el bloque del artículo */
.castables-page .castables-articulo {
    max-width: 1180px;
    margin-left: auto;
    margin-right: auto;
}

/* Centrar el título */
.castables-page .castables-articulo .art-header {
    text-align: center;
}

.castables-page .castables-articulo .art-header h2 {
    display: inline-block;
    text-align: center;
    border-left: none;
    border-bottom: 4px solid #F3542D;
    padding: 0 0 10px;
    margin: 0 auto;
}

/* Centrar la imagen y quitar el float */
.castables-page .castables-articulo .imagen-castables {
    display: block;
    float: none;
    width: 400px;
    max-width: 100%;
    height: 300px;
    margin: 0 auto 25px;
    object-fit: cover;
    object-position: center;
}

/* Centrar el bloque de texto */
.castables-page .castables-articulo .art-content {
    display: flow-root;
    text-align: center;
}

/* Mantener el texto centrado */
.castables-page .castables-articulo .art-content p {
    text-align: center;
}

/* Centrar los documentos PDF */
.castables-page .castables-documentos {
    align-items: center;
}

.castables-page .castables-documento {
    width: 100%;
    max-width: 900px;
}

/* Adaptación para móviles */
@media screen and (max-width: 767px) {
    .castables-page .castables-articulo .imagen-castables {
        width: 100%;
        max-width: 400px;
        height: auto;
        margin: 0 auto 20px;
    }

    .castables-page .castables-articulo .art-content p {
        text-align: center;
    }
}


/* IMAGEN PRINCIPAL: MISMO FORMATO QUE LOS DEMÁS PRODUCTOS */
.castables-articulo .imagen-castables {
    float: left;
    display: block;
    width: 400px;
    max-width: 45%;
    height: 300px;
    margin: 0 25px 18px 0;
    padding: 0;
    border: 1px solid #ddd;
    border-radius: 3px;
    object-fit: cover;
    object-position: center center;
    box-sizing: border-box;
}

/* TÍTULO: MISMO ESTILO QUE LOS DEMÁS PRODUCTOS */
.castables-articulo .art-header h2 {
    margin: 0;
    padding: 0 0 0 15px;
    border-left: 5px solid #F3542D;
    color: #222;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
    text-transform: uppercase;
}

/* TEXTO: JUSTIFICADO, JUNTO A LA IMAGEN */
.castables-articulo .art-content {
    display: flow-root;
    color: #444;
    font-size: 16px;
    line-height: 1.8;
    text-align: justify;
}

.castables-articulo .art-content p {
    margin: 0 0 18px;
    color: #444;
    font-size: 16px;
    line-height: 1.8;
    text-align: justify;
}

/* MÓVILES */
@media screen and (max-width: 767px) {
    .castables-articulo .imagen-castables {
        float: none;
        width: 100%;
        max-width: 100%;
        height: auto;
        margin: 0 0 22px;
    }

    .castables-articulo .art-content p {
        text-align: left;
    }
}


/* ===== CENTRAR EL ARTÍCULO COMO EN LAS OTRAS PÁGINAS ===== */

#container.castables-page {
    width: 100% !important;
    padding: 0 20px !important;
    box-sizing: border-box !important;
}

#container.castables-page .castables-articulo {
    display: block !important;
    width: 100% !important;
    max-width: 1180px !important;
    margin: 0 auto 35px !important;
    padding-bottom: 35px !important;
    float: none !important;
    box-sizing: border-box !important;
}

/* TÍTULO ALINEADO A LA IZQUIERDA DENTRO DEL BLOQUE CENTRADO */
#container.castables-page .art-header {
    width: 100% !important;
    margin: 0 auto 25px !important;
    text-align: left !important;
}

/* IMAGEN A LA IZQUIERDA DEL TEXTO */
#container.castables-page .art-content img.imagen-castables {
    float: left !important;
    display: block !important;
    width: 400px !important;
    max-width: 45% !important;
    height: 450px !important;
    margin: 0 25px 18px 0 !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* TEXTO JUSTIFICADO */
#container.castables-page .art-content {
    display: flow-root !important;
    width: 100% !important;
    margin: 0 auto !important;
    float: none !important;
    text-align: justify !important;
    line-height: 1.8 !important;
    box-sizing: border-box !important;
}

#container.castables-page .art-content p {
    text-align: justify !important;
    line-height: 1.8 !important;
}

/* DOCUMENTOS DENTRO DEL ARTÍCULO CENTRADO */
#container.castables-page .castables-documentos {
    clear: both !important;
    width: 100% !important;
    max-width: 900px !important;
    margin: 28px 0 0 !important;
}

/* ADAPTACIÓN A CELULARES */
@media screen and (max-width: 767px) {
    #container.castables-page {
        padding: 0 15px !important;
    }

    #container.castables-page .castables-articulo {
        width: 100% !important;
    }

    #container.castables-page .art-content img.imagen-castables {
        float: none !important;
        width: 100% !important;
        max-width: 400px !important;
        height: auto !important;
        margin: 0 auto 22px !important;
    }

    #container.castables-page .art-content p {
        text-align: left !important;
    }
}


/* Alinear el título del banner con el contenido de la página */
body .sub-header.castables-subheader {
    padding-left: 20px !important;
    padding-right: 20px !important;
}

body .sub-header.castables-subheader .zerogrid {
    width: 100% !important;
    max-width: 1180px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
}

body .sub-header.castables-subheader h1 {
    margin-left: 0 !important;
    padding-left: 0 !important;
}

@media screen and (max-width: 767px) {
    body .sub-header.castables-subheader {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

/* LINKEDIN EN EL HEADER - SOLO INDEX */
.header-linkedin {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    margin-left: 10px;
    color: #0A66C2;
    font-size: 18px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.header-linkedin:hover {
    color: #F3542D;
}

/* Ajuste para pantallas pequeñas */
@media (max-width: 800px) {
    .header-linkedin {
        margin-left: auto;
        margin-right: 10px;
    }
}