@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Noto+Sans+JP:wght@400;500;700&display=swap');

.instagram-section {
    --instagram-ink: #1c1d1a;
    --instagram-accent: #ff5c35;
    --instagram-line: rgba(28, 29, 26, .18);
    --instagram-muted: #66675f;
    width: 100%;
    padding: 110px 0 120px;
    color: var(--instagram-ink);
    background: var(--color-surface);;
    /* font-family: "DM Sans", "Noto Sans JP", sans-serif; */
    -webkit-font-smoothing: antialiased;
}

.instagram-section,
.instagram-section * {
    box-sizing: border-box;
}

.instagram-inner {
    width: min(calc(100% - 40px), 1240px);
    margin-inline: auto;
}

.instagram-heading {
    display: flex;
    gap: 32px;
    align-items: end;
    justify-content: space-between;
    margin-bottom: 40px;
}

.instagram-title-wrap {
    min-width: min(100%, 300px);
}

.instagram-title {
    margin: 0;
    font-size: clamp(2.6rem, 5vw, 4.3rem);
    font-weight: 600;
    line-height: 1;
    letter-spacing: -.055em;
}

.instagram-title-line {
    width: min(100%, 265px);
    height: 1px;
    margin-top: 18px;
    background: var(--instagram-ink);
}

.instagram-section .instagram-controls {
    display: flex;
    gap: 8px;
}

.instagram-section .instagram-arrow {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    color: var(--instagram-ink);
    cursor: pointer;
    background: transparent;
    border: 1px solid var(--instagram-line);
    border-radius: 50%;
    transition: color .2s ease, background .2s ease, border-color .2s ease;
}

.instagram-section .instagram-arrow:hover {
    color: #fff;
    background: var(--instagram-ink);
    border-color: var(--instagram-ink);
}

.instagram-section .instagram-arrow:disabled {
    cursor: default;
    opacity: .3;
}

.instagram-feed {
    padding: 0 0 20px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    scroll-behavior: smooth;
}

.instagram-feed-track {
    display: grid;
    grid-auto-columns: calc((100% - 66px) / 4);
    grid-auto-flow: column;
    gap: 22px;
    width: 100%;
    transform: translate3d(0, 0, 0);
    will-change: transform;
    backface-visibility: hidden;
}

.instagram-feed.is-dragging,
.instagram-feed.is-animating {
    scroll-behavior: auto;
    scroll-snap-type: none;
}

.instagram-feed.is-animating .instagram-feed-track {
    transition: transform 1s cubic-bezier(.4, 0, .2, 1);
}

.instagram-feed.is-dragging {
    cursor: grabbing;
}

.instagram-feed::-webkit-scrollbar {
    display: none;
}

.instagram-card {
    min-width: 0;
    scroll-snap-align: start;
}

.instagram-card:last-child {
    scroll-snap-align: end;
}

.instagram-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    -webkit-user-drag: none;
}

.instagram-image-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    margin-bottom: 18px;
    overflow: hidden;
    background: #e9e6df;
}

.instagram-image {
    display: block;
    width: 100%;
    height: 100%;
    pointer-events: none;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.2, .7, .2, 1);
    -webkit-user-drag: none;
}

.instagram-card-link:hover .instagram-image {
    transform: scale(1.035);
}

.instagram-image-wrap::after {
    position: absolute;
    inset: auto 14px 14px auto;
    width: 32px;
    height: 32px;
    content: "";
    background: rgba(255, 255, 255, .9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231c1d1a' stroke-width='1.7'%3E%3Crect x='3' y='3' width='18' height='18' rx='5'/%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3Ccircle cx='17.4' cy='6.7' r='1' fill='%231c1d1a' stroke='none'/%3E%3C/svg%3E") center / 18px no-repeat;
    border-radius: 50%;
}

.instagram-date {
    display: block;
    margin-bottom: 8px;
    font-size: .79rem;
    font-variant-numeric: tabular-nums;
    color: var(--instagram-muted);
}

.instagram-caption {
    display: -webkit-box;
    min-height: 6.5em;
    margin: 0;
    overflow: hidden;
    -webkit-line-clamp: 4;
    font-size: .92rem;
    line-height: 1.75;
    -webkit-box-orient: vertical;
}

.instagram-empty {
    padding: 44px;
    color: var(--instagram-muted);
    text-align: center;
    border: 1px solid var(--instagram-line);
}

.instagram-footer {
    display: flex;
    justify-content: center;
    margin-top: 36px;
}

.instagram-button {
    display: inline-flex;
    gap: 9px;
    align-items: center;
    padding: 15px 24px;
    font-size: .84rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: var(--instagram-accent);
    border-radius: 99px;
    transition: opacity .2s ease, transform .2s ease;
}

.instagram-button:hover {
    opacity: .84;
    transform: translateY(-2px);
}

.instagram-button svg {
    width: 19px;
    height: 19px;
}

@media (max-width: 760px) {
    .instagram-section {
        padding: 76px 0 82px;
    }

    .instagram-inner {
        width: min(calc(100% - 28px), 1240px);
    }

    .instagram-heading {
        margin-bottom: 30px;
    }

    .instagram-feed-track {
        grid-auto-columns: min(78vw, 310px);
        gap: 16px;
    }

    .instagram-caption {
        min-height: 5.2em;
        -webkit-line-clamp: 3;
    }

    .instagram-section .instagram-arrow {
        width: 42px;
        height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .instagram-section *,
    .instagram-section *::before,
    .instagram-section *::after {
        transition-duration: .01ms !important;
    }
}
