/* ==========================================================================
   FACEBOOK - ESCUELA HUGO ERRAZURIZ
   Slider de publicaciones
   ========================================================================== */


/* --------------------------------------------------------------------------
   SECCION GENERAL
   -------------------------------------------------------------------------- */

.escuela-facebook-section {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 10px 0 42px;
}


/* --------------------------------------------------------------------------
   SWIPER
   -------------------------------------------------------------------------- */

.escuela-facebook-slider {
    position: relative;
    width: 100%;
    overflow: hidden;

    /*
     * Dejamos espacio lateral para que las flechas no queden
     * encima de las tarjetas.
     */
    padding: 8px 18px 16px;
}


/* --------------------------------------------------------------------------
   SLIDES
   -------------------------------------------------------------------------- */

.escuela-facebook-slider .swiper-wrapper {
    align-items: stretch;
}

.escuela-facebook-slider .swiper-slide {
    height: auto;
    display: flex;
}


/* --------------------------------------------------------------------------
   TARJETA
   -------------------------------------------------------------------------- */

.escuela-facebook-post {
    width: 100%;
    height: 100%;

    display: flex;
    flex-direction: column;

    background: #ffffff;

    border: 1px solid #e5e7eb;
    border-radius: 14px;

    overflow: hidden;

    box-shadow:
        0 4px 14px rgba(0, 0, 0, 0.07);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
}


/* Efecto al pasar mouse */

.escuela-facebook-post:hover {
    transform: translateY(-5px);

    box-shadow:
        0 10px 28px rgba(0, 0, 0, 0.12);

    border-color: #d8dce2;
}


/* --------------------------------------------------------------------------
   IMAGEN
   -------------------------------------------------------------------------- */

.escuela-facebook-image {
    width: 100%;
    height: 210px;

    overflow: hidden;

    background: #f3f4f6;

    flex-shrink: 0;
}


.escuela-facebook-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition: transform 0.4s ease;
}


/* Zoom muy suave */

.escuela-facebook-post:hover
.escuela-facebook-image img {
    transform: scale(1.035);
}


/* --------------------------------------------------------------------------
   CONTENIDO
   -------------------------------------------------------------------------- */

.escuela-facebook-content {
    display: flex;
    flex-direction: column;

    flex: 1;

    padding: 20px;
}


/* --------------------------------------------------------------------------
   FECHA
   -------------------------------------------------------------------------- */

.escuela-facebook-date {
    margin-bottom: 12px;

    font-size: 12px;
    font-weight: 600;

    line-height: 1.4;

    color: #6b7280;

    letter-spacing: 0.02em;
}


/* --------------------------------------------------------------------------
   TEXTO
   -------------------------------------------------------------------------- */

.escuela-facebook-message {
    color: #374151;

    font-size: 14px;
    line-height: 1.7;

    /*
     * Limitar texto para que todas las tarjetas
     * mantengan una altura similar.
     */
    display: -webkit-box;

    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;

    overflow: hidden;

    margin-bottom: 18px;
}


/* --------------------------------------------------------------------------
   LINK FACEBOOK
   -------------------------------------------------------------------------- */

.escuela-facebook-link {
    display: inline-flex;

    align-items: center;

    margin-top: auto;

    color: black;

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;

    transition:
        color 0.2s ease,
        transform 0.2s ease;
}


/*
 * Creamos la flecha con CSS.
 * Así evitamos problemas de codificación.
 */

.escuela-facebook-link::after {
    content: "";

    width: 7px;
    height: 7px;

    margin-left: 8px;

    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;

    transform: rotate(45deg);

    transition: transform 0.2s ease;
}


.escuela-facebook-link:hover {
    color: #0d5fd3;
    text-decoration: none;
}


.escuela-facebook-link:hover::after {
    transform:
        translateX(3px)
        rotate(45deg);
}


/* --------------------------------------------------------------------------
   FLECHAS DEL SLIDER
   -------------------------------------------------------------------------- */

.escuela-facebook-prev,
.escuela-facebook-next {
    position: absolute;

    top: 50%;

    width: 42px;
    height: 42px;

    padding: 0;
    margin: 0;

    border: none;
    border-radius: 50%;

    background: #ffffff;

    box-shadow:
        0 4px 16px rgba(0, 0, 0, 0.15);

    cursor: pointer;

    z-index: 20;

    transform: translateY(-50%);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;

    /*
     * Ocultamos el carácter que viene desde PHP.
     * Dibujaremos las flechas con CSS.
     */
    font-size: 0;
    color: transparent;
}


.escuela-facebook-prev {
    left: 4px;
}


.escuela-facebook-next {
    right: 4px;
}


/* Flecha creada con CSS */

.escuela-facebook-prev::before,
.escuela-facebook-next::before {
    content: "";

    position: absolute;

    top: 50%;
    left: 50%;

    width: 9px;
    height: 9px;

    border-top: 2px solid #1f2937;
    border-right: 2px solid #1f2937;
}


.escuela-facebook-prev::before {
    transform:
        translate(-35%, -50%)
        rotate(-135deg);
}


.escuela-facebook-next::before {
    transform:
        translate(-65%, -50%)
        rotate(45deg);
}


.escuela-facebook-prev:hover,
.escuela-facebook-next:hover {
    transform:
        translateY(-50%)
        scale(1.08);

    box-shadow:
        0 6px 20px rgba(0, 0, 0, 0.20);
}


/* --------------------------------------------------------------------------
   PAGINACION
   -------------------------------------------------------------------------- */

.escuela-facebook-pagination {
    width: 100%;

    display: flex;

    justify-content: center;
    align-items: center;

    gap: 7px;

    margin-top: 8px;
}


/*
 * Swiper agrega automáticamente estos elementos.
 */

.escuela-facebook-pagination
.swiper-pagination-bullet {
    width: 8px;
    height: 8px;

    margin: 0 !important;

    opacity: 1;

    background: #c7cbd1;

    transition:
        width 0.25s ease,
        border-radius 0.25s ease,
        background 0.25s ease;
}


.escuela-facebook-pagination
.swiper-pagination-bullet-active {
    width: 24px;

    border-radius: 10px;

    background: #1877f2;
}


/* --------------------------------------------------------------------------
   ERROR
   -------------------------------------------------------------------------- */

.escuela-facebook-error {
    padding: 20px;

    text-align: center;

    background: #f8f9fa;

    border-radius: 10px;

    color: #555;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */


/* --------------------------------------------------------------------------
   NOTEBOOK / TABLET
   -------------------------------------------------------------------------- */

@media (max-width: 1199px) {

    .escuela-facebook-image {
        height: 200px;
    }

}


/* --------------------------------------------------------------------------
   TABLET
   -------------------------------------------------------------------------- */

@media (max-width: 899px) {

    .escuela-facebook-slider {
        padding-left: 14px;
        padding-right: 14px;
    }

    .escuela-facebook-image {
        height: 210px;
    }

    .escuela-facebook-content {
        padding: 18px;
    }

}


/* --------------------------------------------------------------------------
   CELULAR
   -------------------------------------------------------------------------- */

@media (max-width: 599px) {

    .escuela-facebook-section {
        padding-bottom: 34px;
    }

    .escuela-facebook-slider {
        padding:
            6px
            10px
            14px;
    }

    .escuela-facebook-image {
        height: 220px;
    }

    .escuela-facebook-content {
        padding: 18px;
    }

    .escuela-facebook-message {
        font-size: 14px;

        -webkit-line-clamp: 7;
    }

    .escuela-facebook-prev,
    .escuela-facebook-next {
        width: 38px;
        height: 38px;
    }

    .escuela-facebook-prev {
        left: 2px;
    }

    .escuela-facebook-next {
        right: 2px;
    }

}