/**
 * Instagram section & post card styles
 * Loaded by public/sections/instagram.php
 */

/* -------------------------------------------------------------------------- */
/* Section & profile                                                          */
/* -------------------------------------------------------------------------- */

.insta-section {
    background: #fafafa;
}

.insta-section .insta-profile {
    justify-items: center;
    background: #185a39;
    padding: 30px 0;
    color: #fff;
    border-radius: 20px;
    margin-bottom: 30px;
}

.insta-section .profile-img-container {
    position: relative;
    background: transparent;
}

.insta-section .stats-text {
    font-size: 1rem;
    margin-right: 40px;
}

.insta-section .stats-number {
    font-weight: 700;
}

.insta-section .bio-header {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.insta-section .bio-category {
    color: #a8a8a8;
    font-size: 0.9rem;
}

.insta-section .bio-text {
    font-size: 0.95rem;
    line-height: 1.2;
}

.insta-section .bio-link {
    text-decoration: none;
    font-weight: 600;
    color: #fff;
}

.insta-section .bio-link:hover {
    text-decoration: underline;
}

/* -------------------------------------------------------------------------- */
/* Vertical feed — 3-column grid in scrollable container                      */
/* -------------------------------------------------------------------------- */

.insta-section .insta-feed-wrap {
    max-width: 100%;
    margin: 0 auto;
}

.insta-section .insta-feed-viewport {
    /* max-height: min(75vh, 1200px); */
    /* overflow-x: hidden; */
    /* overflow-y: auto; */
    /* -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #c7c7c7 transparent;
    border-radius: 8px; */
}

.insta-section .insta-feed-viewport::-webkit-scrollbar {
    width: 6px;
}

.insta-section .insta-feed-viewport::-webkit-scrollbar-thumb {
    background: #c7c7c7;
    border-radius: 3px;
}

.insta-section .insta-feed {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    padding: 4px 4px 16px;
}

/* -------------------------------------------------------------------------- */
/* Post card                                                                  */
/* -------------------------------------------------------------------------- */

.insta-section .insta-post,
.insta-section .insta-card {
    background: #fff;
    border: 1px solid #dbdbdb;
    border-radius: 8px;
    overflow: hidden;
    margin: 0 auto;
}

.insta-section .insta-post-header,
.insta-section .insta-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
}

.insta-section .insta-post-user {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.insta-section .insta-post-user-meta {
    min-width: 0;
}

.insta-section .insta-post-redirect {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: #262626;
    font-size: 14px;
    text-decoration: none;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.insta-section .insta-post-redirect:hover {
    background-color: #f0f0f0;
    color: #0095f6;
}

.insta-section .profile-pic-container {
    position: relative;
    display: block;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    margin-right: 10px;
    text-decoration: none;
}

.insta-section .profile-pic-border {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    padding: 2px;
}

.insta-section .profile-pic {
    background: #fff;
    border-radius: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid #fff;
    display: block;
}

.insta-section .username {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    text-decoration: none;
    line-height: 1.2;
}

.insta-section .location {
    font-size: 12px;
    color: #8e8e8e;
    display: block;
}

/* -------------------------------------------------------------------------- */
/* Post media — image, video, carousel                                        */
/* -------------------------------------------------------------------------- */

.insta-section .insta-post-media,
.insta-section .media-container {
    position: relative;
    background: #000;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.insta-section .media-container {
    height: auto;
}

.insta-section .insta-post-slides,
.insta-section .insta-post-slide {
    width: 100%;
    height: 100%;
}

.insta-section .insta-post-slide {
    display: none;
}

.insta-section .insta-post-slide.is-active {
    display: block;
}

.insta-section .insta-post-image,
.insta-section .insta-video-wrap,
.insta-section .insta-video,
.insta-section .media-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.insta-section .insta-video-wrap {
    position: relative;
    background: #000;
}

.insta-section .insta-video-play,
.insta-section .insta-video-mute {
    position: absolute;
    border: 0;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

.insta-section .insta-video-play {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 56px;
    height: 56px;
    font-size: 20px;
    padding-left: 4px;
}

.insta-section .insta-video-mute {
    right: 12px;
    bottom: 12px;
    width: 32px;
    height: 32px;
    font-size: 14px;
}

.insta-section .insta-video-wrap.is-playing .insta-video-play {
    opacity: 0;
    pointer-events: none;
}

.insta-section .play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: rgba(255, 255, 255, 0.9);
    font-size: 60px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.insta-section .insta-carousel-btn,
.insta-section .nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    color: #262626;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 3;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    font-size: 12px;
}

.insta-section .insta-carousel-prev,
.insta-section .nav-left { left: 10px; }

.insta-section .insta-carousel-next,
.insta-section .nav-right { right: 10px; }

.insta-section .insta-carousel-counter {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    z-index: 3;
}

.insta-section .insta-carousel-dots,
.insta-section .carousel-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 4px;
    z-index: 3;
}

.insta-section .insta-dot,
.insta-section .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.45);
    cursor: pointer;
}

.insta-section .insta-dot.is-active,
.insta-section .dot.active {
    background: #0095f6;
}

.insta-section .dot.active {
    background: #fff;
}

/* -------------------------------------------------------------------------- */
/* Post body — actions, caption, engagement                                   */
/* -------------------------------------------------------------------------- */

.insta-section .insta-post-body,
.insta-section .insta-footer {
    padding: 10px 14px 14px;
}

.insta-section .insta-post-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.insta-section .insta-post-actions-left,
.insta-section .action-icons {
    display: flex;
    align-items: center;
    gap: 14px;
}

.insta-section .action-icons {
    justify-content: space-between;
    width: 100%;
}

.insta-section .insta-action-btn {
    background: none;
    border: 0;
    padding: 0;
    color: #262626;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.insta-section .insta-action-count,
.insta-section .insta-count {
    font-size: 13px;
    font-weight: 600;
    color: #262626;
}

.insta-section .insta-count {
    margin-right: 12px;
    margin-left: 4px;
}

.insta-section .insta-post-album-icon {
    margin-left: auto;
    margin-right: 12px;
    color: #262626;
    font-size: 18px;
}

.insta-section .action-icons i {
    font-size: 24px;
    color: #262626;
    margin-right: 15px;
    cursor: pointer;
    transition: color 0.2s;
}

.insta-section .action-icons i:last-child {
    margin-right: 0;
}

.insta-section .action-icons i:hover {
    color: #8e8e8e;
}

.insta-section .insta-post-likes,
.insta-section .insta-post-engagement {
    font-size: 14px;
    font-weight: 600;
    color: #262626;
    margin: 0 0 6px;
}

.insta-section .insta-post-caption {
    font-size: 14px;
    color: #262626;
    margin: 0 0 6px;
    line-height: 1.45;
    word-break: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
}

.insta-section .insta-caption-user {
    font-weight: 600;
    color: #262626;
    text-decoration: none;
    margin-right: 6px;
}

.insta-section .insta-post-view-comments,
.insta-section .view-more-link {
    display: inline-block;
    font-size: 14px;
    color: #8e8e8e;
    text-decoration: none;
    margin-bottom: 6px;
}

.insta-section .view-more-link {
    color: #0095f6;
    font-weight: 600;
    display: block;
}

.insta-section .view-more-link:hover {
    text-decoration: underline;
}

.insta-section .insta-post-time {
    display: block;
    font-size: 10px;
    color: #8e8e8e;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.insta-section .custom-hr {
    margin: 0 0 10px;
    border-top: 1px solid #dbdbdb;
    opacity: 0.5;
}

/* -------------------------------------------------------------------------- */
/* Responsive                                                                 */
/* -------------------------------------------------------------------------- */

@media (max-width: 991px) {
    .insta-section .insta-feed {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .insta-section .insta-feed-viewport {
        max-height: min(80vh, 900px);
    }

    .insta-section .insta-feed {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media screen and (max-width: 600px) {
    .insta-section .stats-text {
        font-size: 1rem;
        margin-right: 25px;
    }

    .insta-section .bio-link {
        font-size: 11px !important;
    }

    .insta-section .nav-arrow {
        width: 18px;
        height: 18px;
        font-size: 8px;
    }

    .insta-section .play-overlay {
        font-size: 25px;
    }

    .insta-section .action-icons i {
        font-size: 15px;
        margin-right: 10px;
    }

    .insta-section .insta-footer {
        padding: 10px 5px;
    }

    .insta-section .custom-hr {
        display: none;
    }

    .insta-section .view-more-link {
        font-size: 9px;
        margin-bottom: 0;
    }

    .insta-section .location {
        margin-top: -3px;
        font-size: 10px;
    }

    .insta-section .username {
        font-size: 10px;
    }

    .insta-section .btn-view-profile {
        display: none;
    }

    .insta-section .insta-header {
        padding: 0;
        margin-bottom: 5px;
    }

    .insta-section .profile-pic-container {
        width: 30px;
        height: 30px;
        margin-right: 8px;
    }

    .insta-section .media-container {
        height: auto;
    }
}
