/* ========================================
   Homepage Professional Styles
   تصميم احترافي للصفحة الرئيسية
   ======================================== */

/* Hero Section / Slider Enhancement */
.slider-section,
#mainCarousel {
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

#mainCarousel .carousel-item img {
    filter: brightness(0.85);
    transition: transform 0.8s ease, filter 0.5s ease;
}

#mainCarousel .carousel-item.active img {
    transform: scale(1.02);
}

#mainCarousel .carousel-caption {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    padding: 40px 20px 30px;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
}

#mainCarousel .carousel-caption h5 {
    font-size: 2rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
    animation: fadeInUp 0.6s ease-out;
}

#mainCarousel .carousel-caption p {
    font-size: 1.1rem;
    opacity: 0.9;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

#mainCarousel .carousel-control-prev,
#mainCarousel .carousel-control-next {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 20px;
    opacity: 0;
    transition: all 0.3s ease;
}

#mainCarousel:hover .carousel-control-prev,
#mainCarousel:hover .carousel-control-next {
    opacity: 1;
}

#mainCarousel .carousel-control-prev:hover,
#mainCarousel .carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

/* Section Titles */
.section-title {
    position: relative;
    font-weight: 700;
    font-size: 1.8rem;
    color: #1a237e;
    margin-bottom: 1.5rem;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #1976D2, #42A5F5);
    border-radius: 2px;
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 90px;
    width: 20px;
    height: 4px;
    background: #FF5722;
    border-radius: 2px;
}

/* Card Enhancements */
.card {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img-top {
    transform: scale(1.08);
}

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 700;
    font-size: 1.2rem;
    color: #1a237e;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.card-text {
    color: #616161;
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Activity Cards Special Styling */
.activity-card,
.post-card {
    position: relative;
}

.activity-card::before,
.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1976D2, #42A5F5, #4CAF50);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.activity-card:hover::before,
.post-card:hover::before {
    opacity: 1;
}

/* Badge Styling */
.badge {
    font-weight: 600;
    padding: 0.5em 1em;
    border-radius: 50px;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
}

.badge.bg-primary {
    background: linear-gradient(135deg, #1976D2, #42A5F5) !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, #43A047, #66BB6A) !important;
}

.badge.bg-info {
    background: linear-gradient(135deg, #00ACC1, #4DD0E1) !important;
}

/* Button Styling */
.btn {
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    box-shadow: 0 4px 15px rgba(25, 118, 210, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1565C0 0%, #0D47A1 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(25, 118, 210, 0.4);
}

.btn-outline-primary {
    border: 2px solid #1976D2;
    color: #1976D2;
    background: transparent;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #1976D2, #42A5F5);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

/* Featured Activities Section */
.activities-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 60px 0;
    margin: 40px 0;
    border-radius: 30px;
}

/* Latest Posts Section */
.posts-section {
    padding: 60px 0;
}

/* Partners Section */
.partners-section {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    padding: 60px 0;
    margin: 40px 0;
}

.partners-section .section-title {
    color: #ffffff;
}

.partners-section .section-title::after {
    background: linear-gradient(90deg, #42A5F5, #64B5F6);
}

.partner-logo {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.partner-logo:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.partner-logo img {
    max-height: 80px;
    filter: brightness(1.1);
    transition: all 0.3s ease;
}

.partner-logo:hover img {
    transform: scale(1.1);
}

/* Read More Button */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #1976D2;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.read-more-btn:hover {
    color: #1565C0;
    gap: 12px;
}

.read-more-btn i {
    transition: transform 0.3s ease;
}

.read-more-btn:hover i {
    transform: translateX(-5px);
}

/* Date Badge */
.date-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, rgba(25, 118, 210, 0.95), rgba(66, 165, 245, 0.95));
    color: #fff;
    padding: 8px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, #1976D2 0%, #1565C0 100%);
    padding: 50px 0;
    margin: 40px 0;
}

.stat-item {
    text-align: center;
    padding: 30px 20px;
    color: #fff;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Hover Float Effect */
.hover-float {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-float:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

/* Gradient Text */
.gradient-text {
    background: linear-gradient(135deg, #1976D2, #42A5F5, #4CAF50);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Divider */
.section-divider {
    height: 4px;
    width: 100px;
    background: linear-gradient(90deg, #1976D2, #42A5F5);
    margin: 20px auto;
    border-radius: 2px;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Image Overlay Effect */
.image-overlay {
    position: relative;
    overflow: hidden;
}

.image-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-overlay:hover::after {
    opacity: 1;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    margin: 30px 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
}

.welcome-section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1a237e;
    margin-bottom: 20px;
}

.welcome-section p {
    font-size: 1.2rem;
    color: #616161;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Container Padding Adjustment */
.container {
    padding-left: 20px;
    padding-right: 20px;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .section-title {
        font-size: 1.5rem;
    }

    .welcome-section h2 {
        font-size: 2rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    #mainCarousel .carousel-caption h5 {
        font-size: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .section-title {
        font-size: 1.3rem;
    }

    .welcome-section {
        padding: 40px 15px;
    }

    .welcome-section h2 {
        font-size: 1.75rem;
    }

    .welcome-section p {
        font-size: 1rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    #mainCarousel .carousel-caption h5 {
        font-size: 1.2rem;
    }

    #mainCarousel .carousel-caption p {
        font-size: 0.9rem;
    }
}

/* RTL Support */
[dir="rtl"] .section-title::after {
    right: 0;
    left: auto;
}

[dir="rtl"] .section-title::before {
    right: 90px;
    left: auto;
}

[dir="rtl"] .read-more-btn:hover i {
    transform: translateX(5px);
}

[dir="rtl"] .date-badge {
    right: 15px;
    left: auto;
}