/* ===================================
   Social Media Feed Section
   =================================== */

.social-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.social-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

/* Section Heading */
.social-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #d35400 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    width: 100%;
}

.social-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: #666;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Social Feed Grid */
.social-feed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

/* Individual Feed Card */
.social-feed-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.social-feed-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-accent-color, var(--primary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.social-feed-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.social-feed-card:hover::before {
    transform: scaleX(1);
}

/* Platform-specific accent colors */
.social-feed-card.instagram {
    --card-accent-color: #E1306C;
}

.social-feed-card.facebook {
    --card-accent-color: #1877F2;
}

.social-feed-card.youtube {
    --card-accent-color: #FF0000;
}

/* Card Header */
.social-feed-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.social-feed-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: var(--card-accent-color, var(--primary-color));
    flex-shrink: 0;
}

.social-feed-info h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
}

/* ===================================
   Social Media Feed Section
   =================================== */

.social-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.social-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

/* Section Heading */
.social-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, #d35400 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    width: 100%;
}

.social-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: #666;
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Social Feed Grid */
.social-feed-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

/* Individual Feed Card */
.social-feed-card {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.social-feed-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-accent-color, var(--primary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.social-feed-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.social-feed-card:hover::before {
    transform: scaleX(1);
}

/* Platform-specific accent colors */
.social-feed-card.instagram {
    --card-accent-color: #E1306C;
}

.social-feed-card.facebook {
    --card-accent-color: #1877F2;
}

.social-feed-card.youtube {
    --card-accent-color: #FF0000;
}

/* Card Header */
.social-feed-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.social-feed-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    background: var(--card-accent-color, var(--primary-color));
    flex-shrink: 0;
}

.social-feed-info h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: #1a1a1a;
}

.social-feed-info p {
    margin: 0.25rem 0 0 0;
    font-size: 0.875rem;
    color: #666;
}

/* Embed Container */
.social-feed-content {
    flex: 1;
    min-height: 280px;
    position: relative;
    margin-bottom: 1.5rem;
}

.embed-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 280px;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
}

.embed-container.scrollable-feed {
    overflow-y: auto;
    max-height: 280px;
    padding: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--card-accent-color, #E1306C) #f0f0f0;
}

.embed-container.scrollable-feed::-webkit-scrollbar {
    width: 6px;
}

.embed-container.scrollable-feed::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.embed-container.scrollable-feed::-webkit-scrollbar-thumb {
    background-color: var(--card-accent-color, #E1306C);
    border-radius: 10px;
}

.embed-container iframe {
    width: 100%;
    height: 100%;
    min-height: 280px;
    border: none;
    border-radius: 12px;
}

/* Loading Skeleton */
.embed-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 12px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Follow Button */
.social-follow-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: var(--card-accent-color, var(--primary-color));
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: auto;
}

.social-follow-btn:hover {
    background: var(--card-accent-hover, #d35400);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.social-follow-btn i {
    font-size: 1.125rem;
}

/* Instagram specific */
.instagram .social-follow-btn:hover {
    background: #C13584;
}

/* Facebook specific */
.facebook .social-follow-btn:hover {
    background: #166FE5;
}

/* YouTube specific */
.youtube .social-follow-btn:hover {
    background: #CC0000;
}

/* Alternative: Simple Post Preview Cards */
.social-posts-preview {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.post-preview-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    transition: background 0.3s ease;
}

.post-preview-card:hover {
    background: #f0f0f0;
}

.post-preview-image {
    width: 100%;
    aspect-ratio: 16/9;
    background: #e0e0e0;
    border-radius: 6px;
    margin-bottom: 0.75rem;
    object-fit: cover;
}

.post-preview-text {
    font-size: 0.875rem;
    color: #333;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2;
    overflow: hidden;
}

/* Tablet Styles */
@media (max-width: 1023px) {
    .social-feed-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .social-section {
        padding: 4rem 0;
    }
}

/* Mobile Styles - Compact Redesign with Performance Optimizations */
@media (max-width: 767px) {
    /* Mobile compact layout with horizontal scrolling - Performance Optimized */
    .social-feed-grid {
        display: flex;
        overflow-x: auto;
        gap: 1rem;
        padding-bottom: 1rem;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        margin-top: 2rem;
        /* Performance optimizations */
        will-change: transform;
        transform: translateZ(0);
        backface-visibility: hidden;
        perspective: 1000px;
    }

    .social-section {
        padding: 2rem 0;
    }

    .social-title {
        font-size: 1.75rem;
        margin-bottom: 0.75rem;
        /* Performance optimization */
        will-change: transform;
    }

    .social-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
        max-width: 100%;
    }

    /* Compact social cards for mobile - Performance Optimized */
    .social-feed-card {
        min-width: 280px;
        max-width: 320px;
        flex: 0 0 auto;
        scroll-snap-align: start;
        padding: 1rem;
        margin-right: 1rem;
        /* Performance optimizations */
        will-change: transform;
        transform: translateZ(0);
        backface-visibility: hidden;
        perspective: 1000px;
        /* Reduce repaints */
        contain: content;
    }

    .social-feed-header {
        min-height: auto;
        margin-bottom: 0.75rem;
    }

    .social-feed-icon {
        width: 36px;
        height: 36px;
        font-size: 1.125rem;
    }

    /* Compact embed container - Performance Optimized */
    .social-feed-content {
        min-height: 120px;
        max-height: 120px;
        overflow: hidden;
        position: relative;
        margin-bottom: 0.75rem;
        /* Performance optimizations */
        will-change: transform;
        transform: translateZ(0);
    }

    .embed-container {
        min-height: 120px;
        max-height: 120px;
        /* Performance optimizations */
        will-change: transform;
        transform: translateZ(0);
    }

    .embed-container.scrollable-feed {
        max-height: 120px;
        /* Performance optimizations */
        will-change: transform;
        transform: translateZ(0);
    }

    .embed-container iframe {
        min-height: 120px;
        max-height: 120px;
        /* Performance optimizations */
        will-change: transform;
        transform: translateZ(0);
        /* Reduce iframe impact */
        pointer-events: none;
    }

    /* Additional posts section - hidden by default */
    .additional-posts {
        display: none;
        /* Performance optimizations */
        will-change: transform;
        transform: translateZ(0);
    }

    .social-feed-card.expanded .additional-posts {
        display: block;
    }

    .social-follow-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
        /* Performance optimizations */
        will-change: transform;
        transform: translateZ(0);
    }

    /* Show more button for mobile - Performance Optimized */
    .show-more-btn {
        display: block;
        width: 100%;
        padding: 0.75rem;
        background: var(--card-accent-color, var(--primary-color));
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 0.9375rem;
        font-weight: 600;
        cursor: pointer;
        margin-top: 0.75rem;
        /* Performance optimizations */
        will-change: transform;
        transform: translateZ(0);
        transition: transform 0.2s ease, background 0.2s ease;
    }

    .show-more-btn:hover {
        background: var(--card-accent-hover, #d35400);
        transform: translateY(-2px);
    }

    /* Expanded state - Performance Optimized */
    .social-feed-card.expanded .social-feed-content {
        max-height: none;
    }

    .social-feed-card.expanded .embed-container {
        max-height: 400px;
    }

    .social-feed-card.expanded .embed-container iframe {
        min-height: 200px;
        max-height: 400px;
        /* Performance optimizations */
        will-change: transform;
        transform: translateZ(0);
    }

    /* Reduced motion support */
    @media (prefers-reduced-motion: reduce) {
        .social-feed-grid,
        .social-feed-card,
        .show-more-btn {
            transition: none !important;
            animation: none !important;
        }
    }
}

/* Desktop/Tablet - Show all content by default */
@media (min-width: 768px) {
    .show-more-btn {
        display: none;
    }

    .additional-posts {
        display: block;
    }
}

/* Extra small mobile adjustments */
@media (max-width: 480px) {
    .social-feed-card {
        min-width: 260px;
        max-width: 280px;
        padding: 0.875rem;
    }

    .social-feed-icon {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .social-feed-info h3 {
        font-size: 1.125rem;
    }

    .social-follow-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* Extra small mobile */
@media (max-width: 480px) {
    .social-feed-card {
        padding: 1.25rem;
    }

    .social-feed-header {
        gap: 0.75rem;
    }

    .social-feed-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .social-feed-info h3 {
        font-size: 1.125rem;
    }
}