/* ═══════════════════════════════════════════════════════════
   instagram.css — Sección feed de Instagram
   Heisenburguer · public/css/instagram.css
   ═══════════════════════════════════════════════════════════ */

/* ─── Sección ─────────────────────────────────────────────── */
.ig-section {
    background: #0d0d0d;
    padding-top: 80px;
    padding-bottom: 80px;
    position: relative;
    overflow: hidden;
}

.ig-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(201, 168, 76, 0.04) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(201, 168, 76, 0.03) 0%, transparent 40%);
    pointer-events: none;
}

/* ─── Header ──────────────────────────────────────────────── */
.ig-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 48px;
    align-items: flex-start;
}

@media (min-width: 640px) {
    .ig-header {
        flex-direction: row;
        align-items: flex-end;
        justify-content: space-between;
    }
}

.ig-header-left .section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.ig-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    flex-shrink: 0;
}

.ig-svg {
    width: 20px;
    height: 20px;
    color: white;
}

.ig-subtitle {
    color: rgba(255, 255, 255, 0.45);
    font-size: 14px;
    margin-top: 4px;
}

/* ─── Botón Seguir ────────────────────────────────────────── */
.ig-follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 100px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--white-pure, #fff);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.25s ease;
    backdrop-filter: blur(8px);
}

.ig-follow-btn:hover {
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(220, 39, 67, 0.35);
}

.ig-btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ─── Grid ────────────────────────────────────────────────── */
.ig-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

@media (min-width: 640px) {
    .ig-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}

@media (min-width: 1024px) {
    .ig-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 10px;
    }
}

/* ─── Items ───────────────────────────────────────────────── */
.ig-item {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    aspect-ratio: 1 / 1;
    background: #1a1a1a;
    text-decoration: none;
    opacity: 0;
    transform: scale(0.94) translateY(12px);
    animation: igReveal 0.55s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    animation-delay: var(--delay, 0s);
    animation-play-state: running;
}

.ig-item--featured {
    grid-column: span 2;
    grid-row: span 1;
}

@media (min-width: 640px) {
    .ig-item--featured {
        grid-row: span 2;
    }
}

@keyframes igReveal {
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ─── Imagen / Video thumbnail ────────────────────────────── */
.ig-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Video: fondo oscuro dorado mientras carga el primer frame */
video.ig-img,
.ig-video-thumb {
    background: linear-gradient(145deg, #1a1409 0%, #2a1f00 50%, #1a1409 100%);
}

.ig-item:hover .ig-img {
    transform: scale(1.08);
}

/* ─── Overlay ─────────────────────────────────────────────── */
.ig-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top,
            rgba(0, 0, 0, 0.88) 0%,
            rgba(0, 0, 0, 0.4) 40%,
            rgba(0, 0, 0, 0) 100%);
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.ig-item:hover .ig-overlay {
    opacity: 1;
}

.ig-overlay-inner {
    padding: 16px;
    width: 100%;
    transform: translateY(8px);
    transition: transform 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.ig-item:hover .ig-overlay-inner {
    transform: translateY(0);
}

.ig-overlay-stats {
    display: flex;
    gap: 12px;
    margin-bottom: 6px;
}

.ig-stat {
    display: flex;
    align-items: center;
    gap: 4px;
    color: white;
    font-size: 12px;
    font-weight: 700;
}

.ig-caption {
    color: rgba(255, 255, 255, 0.85);
    font-size: 11px;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ig-view-btn {
    display: inline-block;
    padding: 5px 14px;
    background: linear-gradient(135deg, #f09433, #dc2743, #bc1888);
    color: white;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ─── Corner badge ────────────────────────────────────────── */
.ig-corner-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #f09433, #dc2743, #bc1888);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.7);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.ig-item:hover .ig-corner-badge {
    opacity: 1;
    transform: scale(1);
}

/* ─── Footer ──────────────────────────────────────────────── */
.ig-footer {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.ig-footer-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.08), transparent);
}

.ig-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--gold, #c9a84c);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: gap 0.2s ease, color 0.2s ease;
}

.ig-footer-link:hover {
    gap: 10px;
    color: #e8c56a;
}

.ig-footer-link .material-symbols-outlined {
    font-size: 18px;
    transition: transform 0.2s ease;
}

.ig-footer-link:hover .material-symbols-outlined {
    transform: translateX(3px);
}

/* ─── Skeleton loading ────────────────────────────────────── */
.ig-skeleton {
    position: relative;
    border-radius: 12px;
    aspect-ratio: 1 / 1;
    background: #1a1a1a;
    overflow: hidden;
}

.ig-skeleton.ig-item--featured {
    grid-column: span 2;
    grid-row: span 1;
}

@media (min-width: 640px) {
    .ig-skeleton.ig-item--featured {
        grid-row: span 2;
    }
}

.ig-skeleton-shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
            transparent 0%,
            rgba(255, 255, 255, 0.04) 50%,
            transparent 100%);
    background-size: 200% 100%;
    animation: skeletonShine 1.6s ease-in-out infinite;
}

@keyframes skeletonShine {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* ─── Video badge ─────────────────────────────────────────── */
.ig-video-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
    pointer-events: none;
}

.ig-video-badge .material-symbols-outlined {
    font-size: 28px;
}

/* ─── Error state ─────────────────────────────────────────── */
.ig-error {
    grid-column: 1 / -1;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 14px;
    padding: 60px 0;
}

.ig-error a {
    color: var(--gold, #c9a84c);
    text-decoration: underline;
}