/* ===================================
   Instagram Feed Section Styles
   تنسيقات قسم منشورات إنستقرام
   =================================== */

.instagram-feed-section {
    position: relative;
    overflow: hidden;
}

.instagram-feed-grid {
    margin-top: 40px;
}

/* بطاقة المنشور */
.instagram-post-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.instagram-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* الصورة */
.instagram-post-wrapper {
    overflow: hidden;
    border-radius: 15px;
    aspect-ratio: 1 / 1;
}

.instagram-post-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.instagram-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.instagram-post-card:hover .instagram-post-image img {
    transform: scale(1.1);
}

/* الطبقة العلوية (Overlay) */
.instagram-post-overlay {
    top: 0;
    left: 0;
    background: linear-gradient(135deg, rgba(47, 102, 163, 0.95) 0%, rgba(255, 117, 31, 0.95) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 15px;
    z-index: 2;
}

.instagram-post-card:hover .instagram-post-overlay {
    opacity: 1;
}

/* محتوى الـ Overlay */
.overlay-content {
    padding: 20px;
}

/* زر حجز موعد */
.btn-appointment {
    background: #ffffff !important;
    color: #2f66a3 !important;
    border: none !important;
    padding: 12px 30px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 50px !important;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.btn-appointment:hover {
    background: #ff751f !important;
    color: #ffffff !important;
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 25px rgba(255, 117, 31, 0.4) !important;
}

.btn-appointment i {
    font-size: 18px;
}

/* زر عرض في إنستقرام */
.btn-outline-light {
    border: 2px solid #ffffff !important;
    color: #ffffff !important;
    padding: 8px 20px !important;
    font-size: 14px !important;
    border-radius: 50px !important;
    transition: all 0.3s ease !important;
    background: transparent !important;
}

.btn-outline-light:hover {
    background: #ffffff !important;
    color: #2f66a3 !important;
    transform: translateY(-2px) !important;
}

/* زر المتابعة الرئيسي */
.instagram-feed-section .btn-primary {
    padding: 14px 40px !important;
    font-size: 18px !important;
    font-weight: 600 !important;
    border-radius: 50px !important;
    box-shadow: 0 4px 20px rgba(255, 117, 31, 0.3) !important;
    transition: all 0.3s ease !important;
}

.instagram-feed-section .btn-primary:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 6px 30px rgba(255, 117, 31, 0.5) !important;
}

.instagram-feed-section .btn-primary i {
    font-size: 20px;
}

/* تأثير التحميل */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.instagram-post-card {
    animation: fadeInUp 0.6s ease forwards;
}

/* تأخير التحميل لكل بطاقة */
.instagram-post-card:nth-child(1) { animation-delay: 0.1s; }
.instagram-post-card:nth-child(2) { animation-delay: 0.2s; }
.instagram-post-card:nth-child(3) { animation-delay: 0.3s; }
.instagram-post-card:nth-child(4) { animation-delay: 0.4s; }
.instagram-post-card:nth-child(5) { animation-delay: 0.5s; }
.instagram-post-card:nth-child(6) { animation-delay: 0.6s; }

/* Responsive */
@media (max-width: 991px) {
    .instagram-post-wrapper {
        aspect-ratio: 1 / 1;
    }
    
    .btn-appointment {
        padding: 10px 25px !important;
        font-size: 15px !important;
    }
}

@media (max-width: 767px) {
    .instagram-feed-section {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    
    .instagram-feed-grid {
        margin-top: 30px;
    }
    
    .instagram-post-card {
        margin-bottom: 15px;
    }
    
    .btn-appointment {
        padding: 10px 20px !important;
        font-size: 14px !important;
    }
    
    .btn-outline-light {
        padding: 6px 15px !important;
        font-size: 13px !important;
    }
    
    .instagram-feed-section .btn-primary {
        padding: 12px 30px !important;
        font-size: 16px !important;
    }
}

@media (max-width: 575px) {
    .overlay-content {
        padding: 15px;
    }
    
    .btn-appointment {
        padding: 8px 18px !important;
        font-size: 13px !important;
    }
    
    .btn-appointment i {
        font-size: 16px;
    }
}

/* تأثير النبض على زر حجز موعد */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.instagram-post-overlay:hover .btn-appointment {
    animation: pulse 1.5s infinite;
}

/* لون خلفية القسم */
.instagram-feed-section.bg-gray {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

/* أيقونة إنستقرام */
.fa-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.btn-primary .fa-instagram,
.btn-light .fa-instagram {
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: unset;
    background-clip: unset;
}

/* Border مزخرف للبطاقات */
.instagram-post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    padding: 2px;
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.instagram-post-card:hover::before {
    opacity: 0.6;
}

/* Grid Spacing */
.row.g-4 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

@media (max-width: 767px) {
    .row.g-4 {
        --bs-gutter-x: 1rem;
        --bs-gutter-y: 1rem;
    }
}
