/* Instagram Gallery Styles */

/* Gallery Section */
.instagram-gallery-section {
    padding: 4rem 0;
    background: #000000;
    position: relative;
    color: #ffffff;
}

.instagram-gallery-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.03"><circle cx="30" cy="30" r="2"/></g></g></svg>') repeat;
    pointer-events: none;
}

/* Gallery Header */
.gallery-header {
    text-align: center;
    margin-bottom: 3rem;
}

.gallery-header .section-title {
    margin-bottom: 1rem;
    color: #ffffff;
    font-size: 2.5rem;
    font-weight: 700;
}

.gallery-subtitle {
    max-width: 600px;
    margin: 0 auto;
}

.gallery-subtitle p {
    font-size: 1.1rem;
    color: #cccccc;
    margin-bottom: 1rem;
}

.instagram-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(45deg, #833ab4, #fd1d1d, #fcb045);
    color: white;
    padding: 0.5rem 1.2rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(131, 58, 180, 0.3);
    transition: transform 0.3s ease;
}

.instagram-badge:hover {
    transform: translateY(-2px);
}

.instagram-badge i {
    font-size: 1.1rem;
}

/* Loading State */
.gallery-loading {
    text-align: center;
    padding: 4rem 0;
    color: #cccccc;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #333;
    border-top: 3px solid #833ab4;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Instagram Grid */
.instagram-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Instagram Post Cards */
.instagram-post {
    background: #1a1a1a;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1);
    position: relative;
    border: 1px solid #333;
    cursor: default;
    pointer-events: none;
}

.post-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.post-overlay {
    display: none;
}

/* Post Stats - Hidden */
.post-stats {
    display: none;
}

.post-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-stats i {
    font-size: 1.2rem;
}

/* Post Caption */
.post-caption {
    padding: 1.5rem;
}

.post-caption p {
    color: #ffffff;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.post-date {
    color: #999999;
    font-size: 0.85rem;
    font-weight: 500;
}

.post-hashtags {
    color: #4dabf7;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Gallery Error State */
.gallery-error {
    text-align: center;
    padding: 4rem 2rem;
    background: #1a1a1a;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(255, 255, 255, 0.1);
    border: 1px solid #333;
}

.error-content i {
    font-size: 3rem;
    color: #ffc107;
    margin-bottom: 1rem;
}

.error-content h3 {
    color: #ffffff;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.error-content p {
    color: #cccccc;
    margin-bottom: 2rem;
}

/* Gallery Footer */
.gallery-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #333;
}

.gallery-cta {
    flex: 1;
    max-width: 600px;
}

.gallery-cta h3 {
    color: #ffffff;
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.gallery-cta p {
    color: #cccccc;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.gallery-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.instagram-button {
    background: #000000 !important;
    border: 1px solid #333 !important;
    color: white !important;
    transition: all 0.3s ease !important;
}

.instagram-button:hover {
    background: #1a1a1a !important;
    border-color: #666 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3) !important;
}

/* Gallery Refresh */
.gallery-refresh {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.refresh-button {
    background: #2d2d2d;
    border: 1px solid #444;
    color: #cccccc;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.refresh-button:hover {
    background: #3d3d3d;
    border-color: #555;
    transform: translateY(-1px);
}

.refresh-button i {
    transition: transform 0.3s ease;
}

.refresh-button:hover i {
    transform: rotate(180deg);
}

.last-updated {
    font-size: 0.8rem;
    color: #999;
}

/* Responsive Design */
@media (max-width: 768px) {
    .instagram-gallery-section {
        padding: 3rem 0;
    }
    
    .gallery-header .section-title {
        font-size: 2rem;
    }
    
    .instagram-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-footer {
        flex-direction: column;
        text-align: center;
    }
    
    .gallery-refresh {
        align-items: center;
    }
    
    .gallery-buttons {
        justify-content: center;
    }
    
    .instagram-badge {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }
}

@media (max-width: 480px) {
    .instagram-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .post-image {
        height: 200px;
    }
    
    .post-caption {
        padding: 1rem;
    }
    
    .gallery-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .gallery-buttons .button {
        width: 100%;
        text-align: center;
    }
}

/* Animation Classes */
.fade-in-gallery {
    animation: fadeInGallery 0.6s ease forwards;
}

@keyframes fadeInGallery {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Instagram API Integration Styles */
.instagram-post.api-loaded {
    border-top: 3px solid #833ab4;
}

.instagram-post.api-loaded::before {
    content: "Live from Instagram";
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(131, 58, 180, 0.9);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 10;
}

/* Lightbox Effect for Posts */
.instagram-post.enlarged {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

.lightbox-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 999;
    backdrop-filter: blur(5px);
}
