/* Social Showcase Grid Section */
.social-showcase-section {
    width: 100%;
    margin: 4rem 0;
    padding: 2rem 0;
}

.social-showcase-heading {
    font-size: 2rem;
    text-align: center;
    color: #e3fc02;
    font-weight: bold;
    margin-bottom: 2rem;
    letter-spacing: 1.5px;
    text-shadow: 0 0 10px rgba(227, 252, 2, 0.3);
}

.social-showcase-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

.social-showcase-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: rgba(24, 24, 24, 0.92);
    border: 1.5px solid rgba(227, 252, 2, 0.13);
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.social-showcase-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 8px 24px rgba(227, 252, 2, 0.2), 0 2px 12px rgba(0, 0, 0, 0.3);
    border-color: #e3fc02;
    z-index: 2;
}

.social-showcase-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.social-showcase-item:hover .social-showcase-thumbnail {
    transform: scale(1.05);
}

.social-showcase-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.social-showcase-item:hover .social-showcase-overlay {
    opacity: 1;
}

.social-showcase-brand {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 2px rgba(0, 0, 0, 0.8);
    opacity: 1;
    transition: opacity 0.3s;
    z-index: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 1.25rem 1rem 1rem 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.7) 60%, transparent 100%);
    letter-spacing: 0.5px;
}

.social-showcase-item:hover .social-showcase-brand {
    opacity: 0;
}

.social-showcase-info {
    color: white;
    width: 100%;
    opacity: 0;
    transition: opacity 0.3s;
}

.social-showcase-item:hover .social-showcase-info {
    opacity: 1;
}

.social-showcase-platform {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(227, 252, 2, 0.9);
    color: #181818;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.social-showcase-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0.25rem 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.social-showcase-brand-in-overlay {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 0.5rem;
    color: #e3fc02;
}

.social-showcase-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(227, 252, 2, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
}

.social-showcase-item:hover .social-showcase-play-icon {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.social-showcase-play-icon::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 20px solid #181818;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
    margin-left: 4px;
}

.social-showcase-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #e3fc02;
    font-size: 1.1rem;
}

.social-showcase-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
}

/* Modal Styles */
.social-showcase-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    backdrop-filter: blur(5px);
    overflow-y: auto;
    padding: 2rem 1rem;
    box-sizing: border-box;
}

.social-showcase-modal.open {
    display: flex;
    align-items: center;
    justify-content: center;
    /* Ensure equal padding on both sides */
    padding-left: 1rem;
    padding-right: 1rem;
}

.social-showcase-modal-content {
    position: relative;
    background: rgba(20, 20, 20, 0.98);
    border: 2px solid #e3fc02;
    border-radius: 16px;
    width: 100%;
    max-width: 375px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 0 40px rgba(227, 252, 2, 0.4), 0 0 80px rgba(0, 0, 0, 0.8);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.social-showcase-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(227, 252, 2, 0.3);
    position: sticky;
    top: 0;
    background: rgba(20, 20, 20, 0.98);
    z-index: 10;
}

.social-showcase-modal-title {
    font-size: 1.2rem;
    font-weight: bold;
    color: #e3fc02;
    margin: 0;
    flex: 1;
    padding-right: 1rem;
}

.social-showcase-modal-close {
    background: none;
    border: none;
    font-size: 0;
    color: white;
    cursor: pointer;
    transition: transform 0.3s, background-color 0.3s, color 0.3s;
    width: 36px;
    height: 36px;
    display: block;
    border-radius: 50%;
    background-color: rgba(227, 252, 2, 0.2);
    padding: 0;
    flex-shrink: 0;
    position: relative;
    /* Ensure rotation happens around the center */
    transform-origin: center center;
}

/* Replace the × character with a perfectly centered one using pseudo-element */
.social-showcase-modal-close::before {
    content: '×';
    font-size: 1.8rem;
    line-height: 1;
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-weight: 300;
    letter-spacing: 0;
    /* Absolutely position and center using margin: auto (no transform conflicts) */
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 1.8rem;
    height: 1.8rem;
    margin: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.social-showcase-modal-close:hover {
    color: #e3fc02;
    transform: rotate(90deg);
    background-color: rgba(227, 252, 2, 0.3);
    /* Ensure rotation origin stays centered */
    transform-origin: center center;
}

.social-showcase-modal-body {
    padding: 1.5rem;
}

.social-showcase-embed-container {
    position: relative;
    width: 100%;
    padding-bottom: 177.78%; /* 9:16 aspect ratio for mobile-like view */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: #000;
}

.social-showcase-embed-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    overflow: hidden;
    /* Prevent scrolling */
}

.social-showcase-embed-container.youtube {
    padding-bottom: 56.25%; /* 16:9 for YouTube */
}

.social-showcase-embed-container.instagram {
    padding-bottom: 125%; /* 4:5 for Instagram */
    max-height: 600px;
}

.social-showcase-embed-container.instagram blockquote {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.social-showcase-embed-container.tiktok {
    padding-bottom: 177.78%; /* 9:16 aspect ratio for TikTok */
    max-height: 600px;
}

.social-showcase-modal-info {
    color: white;
}

.social-showcase-modal-platform-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: #e3fc02;
    color: #181818;
    font-size: 0.85rem;
    font-weight: bold;
    border-radius: 6px;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.social-showcase-modal-brand {
    color: #e3fc02;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.social-showcase-modal-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: 1rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .social-showcase-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .social-showcase-section {
        margin: 3rem 0;
        padding: 1.5rem 0;
    }
    
    .social-showcase-heading {
        font-size: 1.6rem;
        margin-bottom: 1.7rem;
        margin-top: 0;
    }
    
    .social-showcase-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 0 0.5rem;
    }
    
    .social-showcase-modal-content {
        max-width: 95%;
        max-height: 95vh;
        margin: 1rem;
        /* Ensure equal margins on left and right */
        margin-left: auto;
        margin-right: auto;
    }
    
    .social-showcase-modal-header {
        padding: 1rem;
    }
    
    .social-showcase-modal-body {
        padding: 1rem;
    }
    
    /* TikTok embed: constrain width and use appropriate height on mobile */
    .social-showcase-embed-container.tiktok {
        max-width: 323px;
        margin: 0 auto;
        padding-bottom: 0;
        height: 574px; /* Fixed height matching TikTok embed at 323px width */
    }
    
    /* TikTok iframe: fill container on mobile */
    .social-showcase-embed-container.tiktok iframe {
        position: absolute;
        width: 100%;
        height: 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .social-showcase-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .social-showcase-modal-content {
        max-width: 100%;
        max-height: 100vh;
        margin: 0 auto;
        /* Ensure no margin on very small screens */
        margin-left: 0;
        margin-right: 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    
    .social-showcase-embed-container {
        border-radius: 0;
    }
    
    /* TikTok embed: constrain width and use appropriate height on mobile */
    .social-showcase-embed-container.tiktok {
        max-width: 323px;
        margin: 0 auto;
        padding-bottom: 0;
        height: 574px; /* Fixed height matching TikTok embed at 323px width */
    }
    
    /* TikTok iframe: fill container on mobile */
    .social-showcase-embed-container.tiktok iframe {
        position: absolute;
        width: 100%;
        height: 100%;
        max-width: 100%;
    }
}

/* Loading skeleton */
.social-showcase-skeleton {
    aspect-ratio: 1;
    background: linear-gradient(90deg, rgba(227, 252, 2, 0.1) 25%, rgba(227, 252, 2, 0.2) 50%, rgba(227, 252, 2, 0.1) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 12px;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
