/* ==========================================================================
   BLOG POST
   Estilos para la plantilla blog-post.xsl
   Figma ref: Blog-Post - 1920_v1 (node 6122:8156)
   ========================================================================== */


/* --------------------------------------------------------------------------
   SECCIÓN PRINCIPAL (intro + body compartiendo fondo beige)
   -------------------------------------------------------------------------- */

.blog-post-section {
    background-color: rgba(230, 225, 219, 0.16);
    padding-top: 123px;
    padding-bottom: 128px;
    display: flex;
    flex-direction: column;
    gap: 96px;
}


/* --------------------------------------------------------------------------
   CABECERA DEL POST (breadcrumb + intro 2 columnas)
   -------------------------------------------------------------------------- */

.blog-post-intro-header {
    display: flex;
    flex-direction: column;
    gap: 64px;
}

/* Intro: 2 columnas (título / búsqueda+compartir) */
.blog-post-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
}

/* --- Columna izquierda --- */
.blog-post-intro__left {
    display: flex;
    flex-direction: column;
    gap: 24px;
    flex: 0 0 60%;
    max-width: 60%;
}

/* Badges de categoría (reutiliza .blog-card__category de blog-list.css
   pero con color azul en lugar del color por defecto) */
.blog-post-intro__categories {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.blog-post-intro__categories .blog-card__category {
    background-color: rgba(178, 227, 255, 0.48);
    color: #00305c;
    font-weight: 600;
    text-transform: uppercase;
}

/* Fecha */
.blog-post-intro__date {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 24px;
    color: #00305c;
}

/* Título H1 */
.blog-post-intro__title {
    font-family: 'Argesta Headline', serif;
    font-size: 80px;
    line-height: 1.1;
    font-weight: 400;
    font-style: normal;
    color: #00305c;
    margin: 0;
}

/* Descripción */
.blog-post-intro__description {
    font-size: 16px;
    line-height: 28px;
    color: #6d6d6d;
    font-weight: 400;
    padding-right: 96px;
}

.blog-post-intro__description p {
    margin: 0;
}

/* --- Columna derecha --- */
.blog-post-intro__right {
    display: flex;
    flex-direction: column;
    gap: 40px;
    flex: 0 0 29%;
    max-width: 29%;
}

.blog-post-intro__sidebar-block {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.blog-post-intro__sidebar-label {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    line-height: 24px;
    letter-spacing: 0.5px;
    color: #00305c;
    margin: 0;
}

/* Buscador */
.blog-post-intro__search-wrapper {
    position: relative;
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    border: 1px solid #00305c;
    border-radius: 32px;
    padding: 8px 36px 8px 13px;
}

.blog-post-intro__search-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: #00305c;
    width: 121px;
    -webkit-appearance: none;
    appearance: none;
}

/* Dropdown de sugerencias */
.blog-post-intro__search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid rgba(0, 48, 92, 0.16);
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 48, 92, 0.12);
    z-index: 100;
    max-height: 240px;
    overflow-y: auto;
    display: none;
}

.blog-post-intro__search-suggestions.is-open {
    display: block;
}

.blog-post-intro__search-suggestion {
    display: block;
    padding: 10px 16px;
    font-size: 13px;
    line-height: 1.4;
    color: #00305c;
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 48, 92, 0.08);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color 0.15s;
}

.blog-post-intro__search-suggestion:last-child {
    border-bottom: none;
}

.blog-post-intro__search-suggestion:hover,
.blog-post-intro__search-suggestion.is-selected {
    background-color: rgba(230, 225, 219, 0.48);
    color: #00305c;
}

.blog-post-intro__search-suggestion mark {
    background: rgba(178, 227, 255, 0.55);
    font-weight: inherit;
    color: inherit;
    border-radius: 2px;
    padding: 0 1px;
}

/* Ocultar lista de datos del sitemap */
.blog-post-search-data {
    display: none;
}

.blog-post-intro__search-input::placeholder {
    color: rgba(0, 48, 92, 0.4);
}

.blog-post-intro__search-input::-webkit-search-cancel-button {
    cursor: pointer;
}

.blog-post-intro__search-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00305c;
    padding: 0;
}

/* Iconos de compartir */
.blog-post-intro__share-icons {
    display: flex;
    gap: 16px;
    align-items: center;
}

.blog-post-intro__share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: rgba(178, 227, 255, 0.48);
    color: #00305c;
    text-decoration: none;
    flex-shrink: 0;
    transition: background-color 0.2s ease;
}

.blog-post-intro__share-btn:hover {
    background-color: rgba(0, 48, 92, 0.08);
    color: #00305c;
}


/* --------------------------------------------------------------------------
   CUERPO DEL POST (galería + bloques de contenido + nav)
   -------------------------------------------------------------------------- */

.blog-post-body {
    display: flex;
    flex-direction: column;
    gap: 96px;
}


/* --- Galería de imágenes (Swiper) --- */

.blog-post-gallery .container {
    max-width: 1544px;
}

/* Outer: posición relativa para situar flechas y contador */
.blog-post-gallery__outer {
    position: relative;
}

.blog-post-gallery__swiper {
    position: relative;
    width: 100%;
    height: 760px;
    overflow: hidden;
}

.blog-post-gallery__swiper .swiper-slide {
    height: 100%;
}

.blog-post-gallery__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Botones de navegación (fuera del overflow del swiper) */
.blog-post-gallery__btn {
    position: absolute;
    top: 380px; /* mitad exacta de los 760px de imagen */
    transform: translateY(-50%);
    z-index: 2;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid #00305c;
    border-radius: 50%;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.blog-post-gallery__btn:hover,
.blog-post-gallery__btn:focus {
    background-color: #00305c;
}

.blog-post-gallery__btn:hover img,
.blog-post-gallery__btn:focus img {
    filter: brightness(0) saturate(100%) invert(100%) sepia(100%) saturate(0%) hue-rotate(106deg) brightness(103%) contrast(106%);
}

.blog-post-gallery__btn--prev {
    left: -70px;
}

.blog-post-gallery__btn--next {
    right: -70px;
}

/* Contador: 01 ─── 05 */
.blog-post-gallery__counter {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 32px;
    justify-content: center;
}

.blog-post-gallery__current {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    color: #00305c;
    min-width: 22px;
    text-align: right;
}

.blog-post-gallery__total {
    font-size: 18px;
    font-weight: 400;
    line-height: 1;
    color: #6d6d6d;
    min-width: 22px;
}

.blog-post-gallery__bar {
    position: relative;
    width: 72px;
    height: 1px;
    background: rgba(115, 98, 73, 0.08);
}

.blog-post-gallery__bar-fill {
    position: absolute;
    left: 0;
    top: 0;
    height: 1px;
    background: #00305c;
    transition: width 0.3s ease;
}


/* --- Bloques de contenido (texto) --- */

.blog-post-content-block__container {
    max-width: 914px;
}

.blog-post-content-block__title {
    font-family: 'Argesta Headline', serif;
    font-size: 36px;
    line-height: 46px;
    font-weight: 400;
    font-style: normal;
    color: #00305c;
    margin: 0 0 32px;
}

.blog-post-content-block__title--first {
    font-size: 50px;
    line-height: 60px;
}

.blog-post-content-block__text {
    font-size: 16px;
    line-height: 28px;
    color: #6d6d6d;
    font-weight: 400;
}

.blog-post-content-block__text p {
    margin: 0 0 16px;
}

.blog-post-content-block__text p:last-child {
    margin-bottom: 0;
}


/* --- Navegación prev/next --- */

.blog-post-nav .blog-post-content-block__container {
    padding-top: 0;
}

.blog-post-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 32px;
    border-top: 1px solid rgba(0, 48, 92, 0.16);
}

.blog-post-nav__link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 700;
    line-height: 28px;
    color: #00305c;
    overflow: hidden;
    padding: 2px 0;
}

.blog-post-nav__link:hover {
    color: #00305c;
}

.blog-post-nav__link--disabled {
    visibility: hidden;
}

.blog-post-nav__arrow {
    width: 40px;
    height: 40px;
    border: 1px solid #00305c;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}


/* --------------------------------------------------------------------------
   POSTS RELACIONADOS
   -------------------------------------------------------------------------- */

.blog-post-related {
    padding: 128px 0;
    display: flex;
    flex-direction: column;
    gap: 80px;
}

.blog-post-related__intro-container {
    max-width: 604px;
    text-align: center;
}

.blog-post-related__title {
    font-family: 'Argesta Headline', serif;
    font-size: 50px;
    line-height: 60px;
    font-weight: 400;
    font-style: normal;
    color: #00305c;
    margin: 0 0 32px;
}

.blog-post-related__description {
    font-size: 16px;
    line-height: 28px;
    color: #6d6d6d;
    font-weight: 400;
    margin: 0;
}

/* Grid de cards relacionadas */
.blog-post-related__cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}

/* Card relacionada (sin descripción) */
.blog-post-related-card {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.blog-post-related-card__image-link {
    display: block;
    text-decoration: none;
}

.blog-post-related-card__image-wrapper {
    position: relative;
    height: 443px;
    overflow: hidden;
}

.blog-post-related-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.blog-post-related-card__image-link:hover .blog-post-related-card__img {
    transform: scale(1.04);
}

.blog-post-related-card__content {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 0 32px;
}

.blog-post-related-card__header {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.blog-post-related-card__date {
    display: block;
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #00305c;
}

.blog-post-related-card__title {
    font-family: 'Argesta Headline', serif;
    font-size: 26px;
    line-height: 36px;
    font-weight: 400;
    font-style: normal;
    color: #00305c;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.blog-post-related-card__cta {
    display: inline-flex;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 1px;
    text-decoration: none;
    color: #00305c;
}


/* ==========================================================================
   RESPONSIVE — Desktop grande (>1920px)
   ========================================================================== */

@media (min-width: 1921px) {
    .blog-post-intro__title {
        font-size: 80px;
    }
}


/* ==========================================================================
   RESPONSIVE — Desktop estándar (992px – 1920px)
   ========================================================================== */

@media (max-width: 1600px) {
    .blog-post-intro__title {
        font-size: 64px;
    }

    .blog-post-gallery .container {
        max-width: 1320px;
    }

    .blog-post-gallery__swiper {
        height: 560px;
    }

    .blog-post-gallery__btn {
        top: 280px;
    }
}

@media (max-width: 1280px) {
    .blog-post-intro__title {
        font-size: 52px;
        line-height: 1.1;
    }

    .blog-post-gallery__swiper {
        height: 420px;
    }

    .blog-post-gallery__btn {
        top: 210px;
    }

    /* Dentro de la imagen: no hay espacio fuera del container */
    .blog-post-gallery__btn--prev {
        left: 16px;
    }

    .blog-post-gallery__btn--next {
        right: 16px;
    }
}


/* ==========================================================================
   RESPONSIVE — Móvil / Tablet (<992px)
   ========================================================================== */

@media (max-width: 991px) {

    /* Sección principal */
    .blog-post-section {
        padding-top: 100px;
        padding-bottom: 64px;
        gap: 64px;
    }

    .blog-post-intro-header {
        gap: 32px;
    }

    /* Intro: columna única */
    .blog-post-intro {
        flex-direction: column;
        align-items: flex-start;
        gap: 48px;
    }

    .blog-post-intro__left {
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    .blog-post-intro__title {
        font-size: 36px;
        line-height: 44px;
    }

    .blog-post-intro__description {
        padding-right: 0;
    }

    .blog-post-intro__right {
        flex: none;
        max-width: 100%;
        width: 100%;
    }

    /* Body */
    .blog-post-body {
        gap: 48px;
    }

    /* Galería */
    .blog-post-gallery .container {
        max-width: 100%;
        padding-left: 0;
        padding-right: 0;
    }

    .blog-post-gallery__swiper {
        height: 300px;
    }

    .blog-post-gallery__btn {
        display: none;
    }

    .blog-post-gallery__counter {
        padding-top: 20px;
    }

    /* Bloques de contenido */
    .blog-post-content-block__container {
        max-width: 100%;
    }

    .blog-post-content-block__title--first {
        font-size: 32px;
        line-height: 42px;
    }

    .blog-post-content-block__title {
        font-size: 26px;
        line-height: 36px;
    }

    .blog-post-content-block__text {
        padding-right: 0;
    }

    /* Nav prev/next */
    .blog-post-nav .blog-post-content-block__container {
        max-width: 100%;
    }

    /* Related */
    .blog-post-related {
        padding: 64px 0;
        gap: 48px;
    }

    .blog-post-related__intro-container {
        max-width: 100%;
        text-align: center;
    }

    .blog-post-related__title {
        font-size: 36px;
        line-height: 46px;
    }

    .blog-post-related__cards {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .blog-post-related-card__image-wrapper {
        height: 280px;
    }

    .blog-post-related-card__content {
        padding: 0 16px;
    }

}
