/**
 * NetSol Instagram Feed - Estilos del Frontend
 * Diseño idéntico a las cards de noticias del theme Carrilobo
 */

/* Container */
.netsol-ig-feed {
    padding: 0;
    margin: 0;
}

/* Grid Layout - Igual que featured-news-grid */
.netsol-ig-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

/* Card - Igual que featured-news-card */
.netsol-ig-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #E5E7EB; /* var(--color-gris) */
    display: flex;
    flex-direction: column;
}

.netsol-ig-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    border-color: #F97316; /* var(--color-naranja) */
}

/* Image Container - Igual que news-image */
.netsol-ig-card-image {
    display: block;
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #f0f0f0;
}

.netsol-ig-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.netsol-ig-card:hover .netsol-ig-card-image img {
    transform: scale(1.05);
}

/* Video/Carousel Badges */
.netsol-ig-video-badge,
.netsol-ig-carousel-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* Content - Igual que news-content */
.netsol-ig-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Title - Igual que news-title */
.netsol-ig-card-title {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
    color: #0F172A; /* var(--color-negro) */
}

.netsol-ig-card-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.netsol-ig-card-title a:hover {
    color: #FC2E3B; /* var(--color-rojo) */
}

/* Date - Igual que news-date */
.netsol-ig-card-date {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #0F172A; /* var(--color-negro) */
    opacity: 0.7;
    margin-bottom: 1rem;
}

.netsol-ig-card-date svg {
    flex-shrink: 0;
    color: #3B82F6; /* var(--color-azul) */
    fill: #3B82F6;
}

/* Excerpt - Igual que news-excerpt */
.netsol-ig-card-excerpt {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #0F172A; /* var(--color-negro) */
    opacity: 0.8;
    margin: 0 0 1rem 0;
    flex-grow: 1;
}

/* CTA Link - Igual que read-more (con borde) */
.netsol-ig-card-cta {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    color: #FC2E3B; /* var(--color-rojo) */
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #FC2E3B;
    border-radius: 0.25rem;
    transition: all 0.3s ease;
    margin-top: auto;
    text-align: center;
    width: fit-content;
}

.netsol-ig-card-cta:hover {
    background: #FC2E3B;
    color: white;
}

/* ==========================================
   RESPONSIVE BREAKPOINTS
   ========================================== */

/* Tablet: 2 columnas */
@media (max-width: 1023px) {
    .netsol-ig-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

/* Mobile: 1 columna, SOLO 4 items visibles */
@media (max-width: 639px) {
    .netsol-ig-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    /* Ocultar items 5 y 6 en mobile */
    .netsol-ig-card:nth-child(n+5) {
        display: none;
    }
    
    .netsol-ig-card-content {
        padding: 1.25rem;
    }
    
    .netsol-ig-card-title {
        font-size: 1rem;
    }
    
    .netsol-ig-card-excerpt {
        font-size: 0.9rem;
    }
}

/* ==========================================
   IMAGE PLACEHOLDER / SKELETON
   ========================================== */
.netsol-ig-card-image {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: netsol-shimmer 1.5s infinite;
}

.netsol-ig-card-image img {
    background: transparent;
}

@keyframes netsol-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Stop shimmer when image is loaded */
.netsol-ig-card-image img[src] {
    position: relative;
    z-index: 1;
}
