/* --- الألوان والمتغيرات المُحدثة لمؤسسة "نبع نيسان" لتنقية المياه --- */
:root {
    /* ألوانكِ الأساسية لـ "نبع نيسان" - مستوحاة من النقاء والطبيعة */
    --primary-color: #057d71; /* أخضر مائل للأزرق، لون شعار نبع نيسان */
    --secondary-color: #4dc2b8; /* أزرق فيروزي فاتح، لون ثانوي مكمل */
    --accent-color: #fce38a; /* ذهبي فاتح، للمسات التمييز والإبراز */
    --dark-text: #212529; /* أسود داكن للنصوص الرئيسية */
    --gray-text: #6c757d; /* رمادي للنصوص الثانوية */
    --light-text: #f8f9fa; /* أبيض/رمادي فاتح للنصوص على الخلفيات الداكنة */
    --white-bg: #ffffff; /* خلفية بيضاء نقية */
    --light-blue-bg: #e6f7f6; /* خلفية زرقاء فاتحة جداً، توحي بالماء النظيف */

    /* ظلال وألوان حدود إضافية */
    --box-shadow-light: rgba(0, 0, 0, 0.08);
    --box-shadow-medium: rgba(0, 0, 0, 0.15);
    --hover-effect-color: var(--secondary-color);
}

/* --- تنسيقات عامة للجسم والخطوط --- */
body {
    font-family: 'Cairo', sans-serif; /* تأكدي من استيراد خط القاهرة في header.php */
    direction: rtl;
    text-align: right;
    color: var(--dark-text);
    background-color: var(--light-blue-bg);
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* لضمان تباعد الأقسام */
section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* --- العناوين الفرعية والرئيسية للأقسام --- */
.section-header {
    max-width: 900px;
    margin-bottom: 4rem;
}

.section-subtitle {
    font-size: 1.5rem;
    color: var(--secondary-color); /* لون فيروزي مميز */
    margin-bottom: 0.5rem;
    letter-spacing: 1.5px;
    position: relative;
    display: inline-block;
    padding-bottom: 8px;
    font-weight: 600;
}

.section-subtitle::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--secondary-color), var(--primary-color));
    border-radius: 3px;
}

.section-main-title {
    font-size: 3.8rem;
    font-weight: 800;
    color: var(--dark-text);
    line-height: 1.3;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.07);
}

/* --- قسم بانر المدونة (Hero Section) --- */
.blog-hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #008c8e 100%); /* تدرج لوني عميق */
    color: var(--light-text);
    min-height: 480px; /* ارتفاع أعلى للبانر */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding-bottom: 7rem;
}

.blog-hero-section .hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2); /* طبقة تراكب شفافة */
    z-index: 0;
}

.blog-hero-section .container {
    z-index: 1; /* لجعل المحتوى فوق التأثيرات */
}

.blog-hero-section h1 {
    font-size: 4.8rem;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
}

.blog-hero-section .lead {
    font-size: 1.3rem;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
}

.blog-hero-section .btn-hero-primary {
    background-color: var(--accent-color);
    color: var(--dark-text);
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    border: none;
}

.blog-hero-section .btn-hero-primary:hover {
    background-color: #fdd66f;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

.blog-hero-section .btn-hero-outline {
    background-color: transparent;
    color: var(--light-text);
    border: 2px solid rgba(255, 255, 255, 0.7);
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
}

.blog-hero-section .btn-hero-outline:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: var(--light-text);
    transform: translateY(-5px);
}

/* تأثيرات تموج الماء في البانر */
.water-ripple-1, .water-ripple-2 {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: rippleEffect 20s infinite ease-in-out;
    z-index: 0;
}

.water-ripple-1 {
    width: 600px;
    height: 600px;
    top: -150px;
    right: -150px;
    animation-delay: 0s;
}

.water-ripple-2 {
    width: 800px;
    height: 800px;
    bottom: -200px;
    left: -200px;
    animation-delay: 5s;
    opacity: 0.08;
}

@keyframes rippleEffect {
    0% { transform: scale(0.5); opacity: 0; }
    50% { transform: scale(1.1); opacity: 0.15; }
    100% { transform: scale(1.5); opacity: 0; }
}


/* --- قسم "أخبارنا المميزة" (Featured News) --- */
.featured-news-section {
    background-color: var(--white-bg); /* خلفية بيضاء */
}

.news-card {
    background-color: var(--white-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px var(--box-shadow-light);
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.news-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 18px 45px var(--box-shadow-medium);
    border-color: var(--secondary-color);
}

.news-card .news-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px; /* ارتفاع ثابت للصور */
}

.news-card .news-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.news-card:hover .news-img-wrapper img {
    transform: scale(1.08);
}

.news-card .news-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--primary-color);
    color: var(--light-text);
    padding: 0.4rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.news-card .news-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 1.8rem;
}

.news-card .news-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    transition: color 0.3s ease;
    line-height: 1.4;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-card .news-title:hover {
    color: var(--secondary-color);
}

.news-card .news-description {
    font-size: 1.05rem;
    color: var(--gray-text);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-card .read-more-link {
    display: inline-block;
    color: var(--secondary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 5px;
    font-size: 1.05rem;
}

.news-card .read-more-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.news-card .read-more-link:hover {
    color: var(--primary-color);
}

.news-card .read-more-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
    background-color: var(--primary-color);
}

/* --- قسم "آخر التحديثات" (Latest Updates) --- */
.latest-updates-section {
    background: linear-gradient(180deg, var(--light-blue-bg) 0%, var(--white-bg) 100%);
}

.latest-news-list .latest-news-item {
    background-color: var(--white-bg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.latest-news-list .latest-news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--box-shadow-light);
    border-color: var(--secondary-color);
}

.latest-news-list .latest-news-item img {
    height: 120px;
    width: 100%;
    object-fit: cover;
}

.latest-news-list .news-item-title a {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dark-text);
    text-decoration: none;
    transition: color 0.3s ease;
}

.latest-news-list .news-item-title a:hover {
    color: var(--primary-color);
}

.latest-news-list .news-item-description {
    color: var(--gray-text);
    font-size: 0.95rem;
    margin-bottom: 0;
}

.load-more-btn {
    background-color: var(--primary-color);
    color: var(--light-text);
    border: none;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.load-more-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
}

/* الشريط الجانبي (Sidebar) */
.sidebar-block {
    background-color: var(--white-bg);
    border-radius: 15px;
    box-shadow: 0 8px 20px var(--box-shadow-light);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.sidebar-block .sidebar-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.sidebar-block .text-accent {
    color: var(--accent-color) !important;
}

.tip-of-day-content p.lead {
    font-size: 1.15rem;
    color: var(--dark-text);
}

.upcoming-events-list .event-item {
    border-bottom: 1px dashed rgba(0, 0, 0, 0.1);
    padding-bottom: 1rem;
    margin-bottom: 1rem !important;
}

.upcoming-events-list .event-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0 !important;
}

.upcoming-events-list .event-title {
    font-size: 1.2rem;
    color: var(--dark-text);
    font-weight: 600;
}

.upcoming-events-list .event-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.upcoming-events-list .event-link:hover {
    color: var(--primary-color);
}

.sidebar-block.bg-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color);
    box-shadow: 0 8px 20px rgba(5, 125, 113, 0.3);
}

.sidebar-block.bg-primary .sidebar-title,
.sidebar-block.bg-primary p,
.sidebar-block.bg-primary a {
    color: var(--light-text) !important;
}

.sidebar-block.bg-primary a:hover {
    color: var(--accent-color) !important;
}


/* --- قسم معرض صور نبع نيسان (Photo Gallery) --- */
.photo-gallery-section {
    background-color: var(--white-bg);
}

.photo-gallery-section .gallery-item {
    cursor: pointer;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 8px 20px var(--box-shadow-light);
    transition: all 0.3s ease;
}

.photo-gallery-section .gallery-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 30px var(--box-shadow-medium);
}

.photo-gallery-section .gallery-item img {
    width: 100%;
    height: 250px; /* ارتفاع موحد للصور */
    object-fit: cover;
    transition: transform 0.4s ease;
}

.photo-gallery-section .gallery-item:hover img {
    transform: scale(1.08);
}

.view-all-gallery-btn {
    background-color: var(--secondary-color);
    color: var(--light-text);
    border: none;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(77, 194, 184, 0.3);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.view-all-gallery-btn:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(77, 194, 184, 0.4);
}

/* Lightbox overrides - لضمان تناسق Lightbox مع تصميمك */
/* تأكدي أن هذه الألوان تتناسب مع Lightbox2 */
#lightbox .lb-dataContainer .lb-caption,
#lightbox .lb-dataContainer .lb-number {
    color: var(--dark-text) !important; /* لون النص في الكابشن والرقم */
}
#lightbox .lb-dataContainer .lb-details {
    background-color: var(--white-bg) !important; /* خلفية التفاصيل */
}
#lightbox .lb-close {
    background: url(./images/close.png) no-repeat; /* تأكدي من مسار الأيقونة */
    width: 36px;
    height: 36px;
    right: 10px;
    top: 10px;
}
#lightbox .lb-nav a.lb-prev,
#lightbox .lb-nav a.lb-next {
    width: 36px; /* حجم أزرار التنقل */
    height: 100px; /* ارتفاع مناسب */
    background: rgba(0, 0, 0, 0.5) url(./images/prev.png) no-repeat center; /* تأكدي من مسار الأيقونة */
    background-size: 24px;
    opacity: 0.7;
    transition: opacity 0.3s;
}
#lightbox .lb-nav a.lb-next {
    background: rgba(0, 0, 0, 0.5) url(./images/next.png) no-repeat center; /* تأكدي من مسار الأيقونة */
}
#lightbox .lb-nav a.lb-prev:hover,
#lightbox .lb-nav a.lb-next:hover {
    opacity: 1;
}

/* --- Responsive Adjustments --- */
@media (max-width: 1200px) {
    .blog-hero-section h1 {
        font-size: 4rem;
    }
    .section-main-title {
        font-size: 3.2rem;
    }
}

@media (max-width: 992px) {
    .blog-hero-section {
        min-height: 400px;
        padding-bottom: 5rem;
    }
    .blog-hero-section h1 {
        font-size: 3.2rem;
    }
    .blog-hero-section .lead {
        font-size: 1.1rem;
    }
    .section-main-title {
        font-size: 2.8rem;
    }
    .news-card-item {
        margin-bottom: 2rem;
    }
    .news-card .news-img-wrapper {
        height: 200px;
    }
    .news-card .news-title {
        font-size: 1.6rem;
    }
    .news-card .news-description {
        font-size: 1rem;
    }
    .news-card .read-more-link {
        font-size: 1rem;
    }
    .latest-news-list .latest-news-item img {
        height: 100px;
    }
    .latest-news-list .news-item-title a {
        font-size: 1.2rem;
    }
    .load-more-btn, .view-all-gallery-btn {
        padding: 0.8rem 2rem;
        font-size: 1rem;
    }
    .sidebar-block {
        margin-bottom: 2rem;
    }
    .photo-gallery-section .gallery-item img {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .blog-hero-section {
        min-height: 350px;
        padding-bottom: 4rem;
    }
    .blog-hero-section h1 {
        font-size: 2.5rem;
    }
    .blog-hero-section .lead {
        font-size: 1rem;
    }
    .section-main-title {
        font-size: 2.2rem;
    }
    .section-subtitle {
        font-size: 1.3rem;
    }
    .news-card .news-content {
        padding: 1.5rem;
    }
    .news-card .news-title {
        font-size: 1.4rem;
    }
    .news-card .news-description {
        font-size: 0.95rem;
    }
    .latest-news-list .news-item-title a {
        font-size: 1.1rem;
    }
    .latest-news-list .news-item-description {
        font-size: 0.85rem;
    }
    .photo-gallery-section .gallery-item img {
        height: 180px;
    }
    .sidebar-block .sidebar-title {
        font-size: 1.4rem;
    }
    .tip-of-day-content p.lead {
        font-size: 1.05rem;
    }
    .upcoming-events-list .event-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .blog-hero-section {
        min-height: 300px;
        padding-bottom: 3rem;
    }
    .blog-hero-section h1 {
        font-size: 2rem;
    }
    .blog-hero-section .btn-hero-primary,
    .blog-hero-section .btn-hero-outline {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
    .section-main-title {
        font-size: 1.8rem;
    }
    .section-subtitle {
        font-size: 1.1rem;
    }
    .news-card .news-content {
        padding: 1.2rem;
    }
    .news-card .news-title {
        font-size: 1.2rem;
        margin-bottom: 0.8rem !important;
    }
    .news-card .news-description {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    .news-card .news-category {
        padding: 0.3rem 0.8rem;
        font-size: 0.8rem;
    }
    .load-more-btn, .view-all-gallery-btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
    .latest-news-list .latest-news-item .col-md-3 {
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
    }
    .latest-news-list .latest-news-item .col-md-9 {
        width: 100%;
        text-align: center;
    }
    .latest-news-list .latest-news-item img {
        height: 150px; /* لتكون الصورة أوضح */
        width: auto; /* لتجنب التمطيط */
        max-width: 100%;
    }
    .photo-gallery-section .gallery-item img {
        height: 150px;
    }
}