/*
 * الأنماط العامة للموقع - نسخة محسنة
 */

/* استيراد خطوط Google Fonts - تم تحديثه */
/* تم استبداله بالاستدعاء المباشر في ملف header.php */

/* متغيرات CSS */
:root {
    --primary-color: #1e88e5;
    --primary-dark: #1565c0;
    --primary-light: #64b5f6;
    --secondary-color: #ff5722;
    --secondary-dark: #e64a19;
    --secondary-light: #ff8a65;
    --success-color: #43a047;
    --danger-color: #e53935;
    --warning-color: #ffb300;
    --info-color: #039be5;
    --dark-color: #212121;
    --light-color: #f5f5f5;
    --gray-color: #757575;
    --white-color: #ffffff;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 5px 15px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.2);
    --transition-fast: 0.3s;
    --transition-medium: 0.5s;
    --transition-slow: 0.8s;
    --border-radius-sm: 0.25rem;
    --border-radius-md: 0.5rem;
    --border-radius-lg: 1rem;
}

/* إعدادات عامة */
body {
    font-family: 'Tajawal', 'Cairo', sans-serif;
    background-color: var(--light-color);
    color: var(--dark-color);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', 'Tajawal', sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    transition: all var(--transition-fast);
}

.btn {
    border-radius: var(--border-radius-md);
    padding: 0.5rem 1.5rem;
    font-weight: 600;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: var(--secondary-dark);
    border-color: var(--secondary-dark);
}

.section-title {
    position: relative;
    margin-bottom: 2rem;
    font-weight: 800;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 50px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--secondary-color) !important;
}

/* الهيدر */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white-color);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 100;
}

header h1 {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

/* القائمة */
.navbar {
    background-color: rgba(33, 33, 33, 0.95) !important;
    box-shadow: var(--shadow-md);
    padding: 0.75rem 1rem;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-fast);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link.active {
    color: var(--white-color);
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar-dark .navbar-nav .nav-link.active {
    background-color: var(--primary-color);
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-md);
    border-radius: var(--border-radius-md);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--border-radius-sm);
    padding: 0.5rem 1rem;
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background-color: rgba(30, 136, 229, 0.1);
    color: var(--primary-color);
}

/* الصفحة الرئيسية */
.hero-section {
    background: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url('../images/pattern.png');
    background-size: cover;
    padding: 4rem 0;
    margin-bottom: 3rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50px;
    left: -50px;
    width: 100px;
    height: 100px;
    background-color: rgba(30, 136, 229, 0.1);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background-color: rgba(255, 87, 34, 0.1);
    border-radius: 50%;
}

.hero-section h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 800;
    font-size: 2.5rem;
}

.hero-section .lead {
    color: var(--gray-color);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

/* البطاقات */
.card {
    transition: all var(--transition-medium);
    margin-bottom: 1.5rem;
    border: none;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-img-top {
    height: 220px;
    object-fit: cover;
    transition: all var(--transition-medium);
}

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

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.card-text {
    color: var(--gray-color);
    margin-bottom: 1.5rem;
}

.card-footer {
    background-color: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem;
}

/* الأنشطة */
.activity-card {
    position: relative;
}

.activity-card .card-img-top {
    height: 220px;
    object-fit: cover;
}

.activity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 220px;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

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

.activity-type {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 0.35rem 0.75rem;
    border-radius: var(--border-radius-md);
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
    box-shadow: var(--shadow-sm);
}

.activity-type.charity {
    background-color: var(--danger-color);
    color: white;
}

.activity-type.educational {
    background-color: var(--primary-color);
    color: white;
}

.activity-type.other {
    background-color: var(--gray-color);
    color: white;
}

/* المنشورات */
.post-card .card-img-top {
    height: 220px;
    object-fit: cover;
}

.post-meta {
    font-size: 0.85rem;
    color: var(--gray-color);
    margin-bottom: 0.5rem;
}

/* معرض الصور */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-gap: 20px;
    margin-top: 30px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all var(--transition-medium);
}

.gallery-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 50%, rgba(0, 0, 0, 0.7) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

.gallery-item:hover::before {
    opacity: 1;
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform var(--transition-medium);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item::after {
    content: '\f00e';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    color: white;
    font-size: 2rem;
    z-index: 2;
    opacity: 0;
    transition: all var(--transition-fast);
}

.gallery-item:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

/* نموذج التواصل */
.contact-form {
    background-color: var(--white-color);
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
}

.contact-form .form-control {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--border-radius-md);
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
}

.contact-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(30, 136, 229, 0.25);
}

.contact-info .card {
    transition: all var(--transition-fast);
    border-radius: var(--border-radius-md);
}

.contact-info .card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.contact-info .card-title {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: var(--light-color);
    color: var(--primary-color);
    border-radius: 50%;
    margin-right: 10px;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.social-icons a:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* الفوتر - تم تحديثه */
/* تم نقل تنسيقات الفوتر إلى ملف footer.php */

/* سلايدر الصور */
.carousel {
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    margin-bottom: 3rem;
    position: relative;
}

.carousel-item {
    height: 500px;
    position: relative;
}

.carousel-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.6));
    z-index: 1;
}

.carousel-item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform 10s ease;
}

.carousel-item.active img {
    transform: scale(1.1);
}

/* تنسيق السلايدر القديم */
.carousel-caption {
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: var(--border-radius-md);
    padding: 2rem;
    max-width: 600px;
    margin: 0 auto;
    bottom: 3rem;
    z-index: 2;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: all var(--transition-medium);
    box-shadow: var(--shadow-md);
}

/* تنسيق السلايدر الجديد - تصميم محسن وأكثر احترافية */
.carousel-caption-modern {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 0;
    color: white;
    text-align: center;
    pointer-events: none;
}

.carousel-caption-modern .caption-content {
    display: inline-block;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 0.8rem 1.5rem;
    max-width: 80%;
    margin: 0 auto;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    pointer-events: auto;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(20px);
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards 0.3s;
}

.carousel-caption-modern h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
    display: inline-block;
    position: relative;
}

.carousel-caption-modern h2::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
    transform: translateX(-50%);
    border-radius: 2px;
}

.carousel-caption-modern p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    opacity: 0.9;
}

.carousel-caption-modern .btn {
    font-weight: 500;
    padding: 0.4rem 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border-radius: 30px;
    font-size: 0.85rem;
    position: relative;
    overflow: hidden;
    z-index: 1;
    margin-top: 0.5rem;
    background-color: var(--primary-color);
    border: none;
}

.carousel-caption-modern .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    background-color: var(--primary-color-dark, #0056b3);
}

/* تنسيق بديل للعرض المصغر */
.carousel-caption-minimal {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    padding: 0;
    color: white;
    text-align: right;
    pointer-events: none;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0) 100%);
    height: 150px;
    display: flex;
    align-items: flex-end;
}

.carousel-caption-minimal .caption-content {
    padding: 1rem 2rem;
    width: 100%;
    pointer-events: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.carousel-caption-minimal .caption-text {
    max-width: 70%;
}

.carousel-caption-minimal h2 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.3;
}

.carousel-caption-minimal p {
    font-size: 0.85rem;
    margin-bottom: 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    opacity: 0.9;
}

.carousel-caption-minimal .btn {
    font-weight: 500;
    padding: 0.4rem 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border-radius: 30px;
    font-size: 0.85rem;
    white-space: nowrap;
    background-color: var(--primary-color);
    border: none;
}

.carousel-caption-minimal .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    background-color: var(--primary-color-dark, #0056b3);
}

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

@media (max-width: 992px) {
    .carousel-caption-modern .caption-content {
        max-width: 90%;
        padding: 0.7rem 1.2rem;
    }

    .carousel-caption-modern h2 {
        font-size: 1.2rem;
    }

    .carousel-caption-minimal {
        height: 120px;
    }

    .carousel-caption-minimal .caption-content {
        padding: 0.8rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
    }

    .carousel-caption-minimal .caption-text {
        max-width: 100%;
        margin-bottom: 0.5rem;
    }

    .carousel-caption-minimal h2 {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .carousel-caption-modern {
        bottom: 15px;
    }

    .carousel-caption-modern .caption-content {
        max-width: 95%;
        padding: 0.6rem 1rem;
    }

    .carousel-caption-modern h2 {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
    }

    .carousel-caption-modern p {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .carousel-caption-modern .btn {
        padding: 0.3rem 1rem;
        font-size: 0.8rem;
        margin-top: 0.3rem;
    }

    .carousel-caption-minimal {
        height: 100px;
    }

    .carousel-caption-minimal .caption-content {
        padding: 0.7rem 1rem;
    }

    .carousel-caption-minimal h2 {
        font-size: 1rem;
        margin-bottom: 0.2rem;
    }

    .carousel-caption-minimal p {
        font-size: 0.75rem;
    }

    .carousel-caption-minimal .btn {
        padding: 0.3rem 1rem;
        font-size: 0.75rem;
    }
}

.carousel-caption h2 {
    font-weight: 800;
    margin-bottom: 1rem;
    font-size: 2.5rem;
    color: var(--white-color);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.carousel-caption p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--white-color);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.carousel-caption .btn {
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
}

.carousel-caption .btn:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0;
    transition: all var(--transition-fast);
}

.carousel:hover .carousel-control-prev,
.carousel:hover .carousel-control-next {
    opacity: 0.8;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 3rem;
    height: 3rem;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    background-size: 50%;
    transition: all var(--transition-fast);
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

.carousel-indicators {
    margin-bottom: 1.5rem;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    transition: all var(--transition-fast);
}

.carousel-indicators button.active {
    width: 15px;
    height: 15px;
    background-color: var(--white-color);
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .carousel-item {
        height: 400px;
    }

    .carousel-caption {
        padding: 1.5rem;
        max-width: 90%;
        bottom: 2rem;
    }

    .carousel-caption h2 {
        font-size: 1.8rem;
    }

    .carousel-caption p {
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .carousel-caption .btn {
        padding: 0.5rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* صفحة التفاصيل */
.detail-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

/* التعليقات */
.comment {
    background-color: var(--white-color);
    padding: 1.5rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    transition: all var(--transition-fast);
}

.comment:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.comment-meta {
    font-size: 0.85rem;
    color: var(--gray-color);
    margin-bottom: 0.75rem;
}

/* تأثيرات الحركة */
.fade-in {
    animation: fadeIn 1s ease-in-out;
}

.slide-up {
    animation: slideUp 0.8s ease-in-out;
}

.slide-right {
    animation: slideRight 0.8s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes slideRight {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* الاستجابة للشاشات الصغيرة */
@media (max-width: 992px) {
    .carousel-item {
        height: 400px;
    }

    .carousel-caption {
        padding: 1.5rem;
        bottom: 2rem;
    }

    .carousel-caption h2 {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .carousel-item {
        height: 350px;
    }

    .carousel-caption {
        padding: 1rem;
        bottom: 1.5rem;
    }

    .carousel-caption h2 {
        font-size: 1.75rem;
    }

    .card-img-top {
        height: 200px;
    }

    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .gallery-item img {
        height: 180px;
    }

    .hero-section {
        padding: 3rem 0;
    }

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

@media (max-width: 576px) {
    .carousel-item {
        height: 300px;
    }

    .carousel-caption {
        bottom: 1rem;
    }

    .carousel-caption h2 {
        font-size: 1.5rem;
    }

    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .gallery-item img {
        height: 150px;
    }

    .hero-section {
        padding: 2rem 0;
    }

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