/* Reproductor integrado para publicaciones y reels de Instagram. */
.instagram-project-embed {
    padding: 4rem 7vw;
    background: #f8fafc;
}

.instagram-project-embed__inner {
    width: min(540px, 100%);
    margin: 0 auto;
}

.instagram-project-embed h2 {
    margin: 0 0 1.5rem;
    font-size: clamp(2rem, 4vw, 3.5rem);
    line-height: .95;
    letter-spacing: -.065em;
}

.instagram-project-embed iframe {
    display: block;
    width: 100%;
    height: 760px;
    border: 0;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 18px 42px rgb(15 23 42 / .12);
}

@media (max-width: 520px) {
    .instagram-project-embed {
        padding: 3rem 4vw;
    }

    .instagram-project-embed iframe {
        height: 650px;
        border-radius: .75rem;
    }
}

/* Detalle de proyectos: portada responsive y acceso directo al Reel integrado. */
.project-header {
    padding: clamp(3rem, 7vw, 6rem) 7vw 2.5rem;
}

.project-header h1 {
    max-width: 1200px;
    font-size: clamp(2.8rem, 5.8vw, 6rem);
}

.project-cover {
    position: relative;
    width: min(86vw, 1320px);
    min-height: 0;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--deep);
}

.project-cover picture,
.project-cover picture img {
    display: block;
    width: 100%;
    height: 100%;
}

.project-cover img {
    max-height: 100%;
    object-fit: cover;
    object-position: center;
}

.project-cover__reel-link {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;
    color: #fff;
    text-decoration: none;
    background: rgb(3 7 18 / .08);
    transition: background .2s;
}

.project-cover__reel-link:hover {
    background: rgb(3 7 18 / .25);
}

.project-cover__reel-link span {
    width: 4rem;
    height: 4rem;
    display: grid;
    place-items: center;
    padding-left: .2rem;
    border-radius: 50%;
    background: rgb(255 255 255 / .94);
    color: var(--blue);
    box-shadow: 0 12px 30px rgb(0 0 0 / .22);
}

.project-cover__reel-link strong {
    padding: .65rem .9rem;
    border-radius: 999px;
    background: rgb(3 7 18 / .72);
    font-size: .82rem;
    letter-spacing: .01em;
}

#instagram-reel {
    scroll-margin-top: 90px;
}

@media (max-width: 700px) {
    .project-header {
        padding: 3rem 7vw 2rem;
    }

    .project-header h1 {
        font-size: clamp(2.65rem, 13vw, 4.8rem);
        line-height: .92;
    }

    .project-cover {
        width: 100%;
        aspect-ratio: 4 / 5;
        border-radius: 0;
    }

    .project-cover img {
        object-fit: contain;
    }

    .project-cover--has-mobile img {
        object-fit: cover;
    }

    .project-cover__reel-link span {
        width: 3.5rem;
        height: 3.5rem;
    }

    .instagram-project-embed__inner {
        width: min(470px, 100%);
    }
}
