/* ============================================
   SECTION: Why Join ANNA — ANNA's life (Instagram feed)
   Arrow-scrollable row of square Instagram post cards
   (280x280). Reuses the generic carousel behaviour from
   js/sections/home/carousel.js.
   ============================================ */

.ig-feed {
    padding: 64px var(--section-side-padding) 100px;
    background: var(--color-white);
    overflow: hidden;
}

/* ----- Header: avatar + titles ----- */
.ig-feed__head {
    max-width: var(--container-max);
    margin: 0 auto 32px;
}

.ig-feed__profile {
    display: inline-flex;
    align-items: center;
    gap: 24px;
    text-decoration: none;
}

.ig-feed__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-full);
    background: var(--color-primary-light);
    flex-shrink: 0;
}
.ig-feed__avatar img {
    width: 24px;
    height: 24px;
}

.ig-feed__titles {
    display: flex;
    flex-direction: column;
}

.ig-feed__title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: var(--font-weight-medium);
    line-height: 36px;
    color: var(--color-text-heading);
    margin: 0;
}

.ig-feed__sub {
    font-size: 14px;
    line-height: 20px;
    color: var(--color-text-body);
}

/* ----- Carousel ----- */
.ig-feed__carousel {
    position: relative;
}

.ig-feed__row {
    list-style: none;
    margin: 0;
    padding: 8px 4px;
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.ig-feed__row::-webkit-scrollbar {
    display: none;
}

.ig-feed__arrow {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--color-white);
    border: 2px solid var(--color-primary-light);
    box-shadow: var(--shadow-card);
    color: var(--color-primary);
    cursor: pointer;
    transition: background-color var(--transition-fast), opacity var(--transition-fast);
}
.ig-feed__arrow:hover {
    background: var(--color-primary-light);
}
.ig-feed__arrow--prev {
    left: 0;
}
.ig-feed__arrow--next {
    left: auto;
    right: 0;
    transform: translate(50%, -50%);
}
.ig-feed__arrow[hidden] {
    display: none;
}
.ig-feed__arrow:disabled {
    opacity: 0.35;
    cursor: default;
    box-shadow: none;
}

/* ----- Post card ----- */
.ig-post {
    flex: 0 0 280px;
    max-width: 80vw;
    scroll-snap-align: start;
}

.ig-post__link {
    position: relative;
    display: block;
    width: 280px;
    max-width: 80vw;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid var(--color-primary-light);
}

.ig-post__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Hover/focus: dim the card and reveal a centered Instagram icon. */
.ig-post__overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(60, 60, 60, 0.42);
    opacity: 0;
    transition: opacity var(--transition-base);
}
.ig-post__link:hover .ig-post__overlay,
.ig-post__link:focus-visible .ig-post__overlay {
    opacity: 1;
}

.ig-post__overlay-icon {
    width: 46px;
    height: 46px;
    background-color: var(--color-white);
    -webkit-mask: url("../../../images/icons/instagram.8c754b2db2ee.svg") no-repeat center / contain;
    mask: url("../../../images/icons/instagram.8c754b2db2ee.svg") no-repeat center / contain;
}

.ig-post__badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.ig-feed__empty a {
    color: var(--color-primary);
    text-decoration: none;
}

@media (max-width: 768px) {
    .ig-feed {
        padding: 48px var(--section-side-padding) 64px;
    }
    .ig-feed__arrow {
        display: none;
    }
}
