/* ===== الأساسيات ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: #0a192f; /* الأزرق الداكن */
    color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 0;
}

/* ===== الألوان ===== */
.gold {
    color: #d4af37;
}

/* ===== الروابط والعناوين ===== */
h1, h2, h3, h4 {
    font-family: 'Tajawal', sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: #fff;
    transition: color 0.3s;
}

a:hover {
    color: #d4af37;
}

/* ===== الهيدر ===== */
header {
    background-color: rgba(10, 25, 47, 0.95);
    backdrop-filter: blur(5px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h2 {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-links a {
    font-size: 1.1rem;
    font-weight: 500;
    padding: 10px 0;
    position: relative;
}

.nav-links a.active::after,
.nav-links a:hover::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #d4af37;
}

/* ===== القسم الرئيسي ===== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: linear-gradient(rgba(10, 25, 47, 0.8), rgba(10, 25, 47, 0.9)), url('https://via.placeholder.com/1920x1080/0a192f/000000?text=+') no-repeat center center/cover;
    background-attachment: fixed; /* تأثير parallax بسيط */
    margin-top: 70px; /* لتعويض الهيدر الثابت */
}

.hero-content {
    max-width: 800px;
}

.main-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.3;
}

.emotional-text {
    font-size: 1.5rem;
    font-family: 'Amiri', serif;
    margin-bottom: 40px;
    color: #eee;
    font-style: italic;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1.1rem;
}

.btn-primary {
    background-color: #d4af37;
    color: #0a192f;
}

.btn-primary:hover {
    background-color: transparent;
    border-color: #d4af37;
    color: #d4af37;
}

.btn-outline {
    border: 2px solid #d4af37;
    color: #fff;
}

.btn-outline:hover {
    background-color: #d4af37;
    color: #0a192f;
}

/* ===== العدادات ===== */
.counters {
    padding: 80px 0;
    background-color: #0a192f;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
}

.counter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.counter-item {
    text-align: center;
    background-color: rgba(255,255,255,0.05);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    backdrop-filter: blur(5px);
    transition: transform 0.3s;
}

.counter-item:hover {
    transform: translateY(-10px);
}

.counter-icon {
    font-size: 3rem;
    color: #d4af37;
    margin-bottom: 15px;
}

.counter-number {
    font-size: 2.8rem;
    font-weight: 700;
    display: block;
    color: #d4af37;
}

.counter-label {
    font-size: 1.2rem;
    color: #ccc;
}

/* ===== دعاء اليوم ===== */
.daily-dua {
    padding: 80px 0;
    background: linear-gradient(135deg, #0a192f 0%, #1a2a3f 100%);
}

.dua-card {
    max-width: 700px;
    margin: 0 auto;
    background-color: rgba(255,255,255,0.05);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.quote-icon {
    font-size: 3rem;
    color: #d4af37;
    opacity: 0.3;
    position: absolute;
    top: 10px;
    right: 20px;
}

.dua-text {
    font-family: 'Amiri', serif;
    font-size: 1.8rem;
    margin-bottom: 20px;
    line-height: 1.8;
}

.dua-source {
    color: #d4af37;
    font-style: italic;
}

/* ===== قسم المشاركة ===== */
.share {
    padding: 80px 0;
    text-align: center;
    background-color: #0a192f;
}

.share-text {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #ccc;
}

.share-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    transition: 0.3s;
    border: 2px solid transparent;
}

.share-btn i {
    font-size: 1.3rem;
}

.whatsapp {
    background-color: #25D366;
    color: #fff;
}

.whatsapp:hover {
    background-color: transparent;
    border-color: #25D366;
    color: #25D366;
}

.facebook {
    background-color: #1877F2;
    color: #fff;
}

.facebook:hover {
    background-color: transparent;
    border-color: #1877F2;
    color: #1877F2;
}

.twitter {
    background-color: #1DA1F2;
    color: #fff;
}

.twitter:hover {
    background-color: transparent;
    border-color: #1DA1F2;
    color: #1DA1F2;
}

/* ===== الفوتر ===== */
footer {
    background-color: #051020;
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid #d4af37;
}

footer p {
    margin: 10px 0;
    color: #aaa;
}

.copyright {
    font-size: 0.9rem;
}

/* ===== المودال ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: #0a192f;
    padding: 40px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid #d4af37;
    position: relative;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    position: absolute;
    top: 15px;
    left: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: #d4af37;
}

.modal-title {
    color: #d4af37;
    margin-bottom: 20px;
    text-align: center;
}

.quran-text {
    font-family: 'Amiri', serif;
    font-size: 1.4rem;
    line-height: 2.2;
    margin: 20px 0;
    text-align: center;
}

.virtue-message, .dedication-message {
    background-color: rgba(212, 175, 55, 0.1);
    padding: 15px;
    border-radius: 10px;
    border-right: 3px solid #d4af37;
    font-style: italic;
    margin: 20px 0;
}

/* ===== صفحة القرآن ===== */
.page-header {
    background-color: #0a192f;
    padding: 100px 0 60px;
    text-align: center;
    border-bottom: 1px solid #d4af37;
}

.page-header h1 {
    font-size: 3rem;
}

.quran-surahs {
    padding: 60px 0;
}

.surah-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.surah-card {
    background-color: rgba(255,255,255,0.05);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid transparent;
    transition: all 0.3s;
}

.surah-card:hover {
    border-color: #d4af37;
    transform: scale(1.02);
}

.surah-card h3 {
    margin-bottom: 20px;
}

.btn-read-surah {
    background-color: transparent;
    border: 2px solid #d4af37;
    color: #d4af37;
    padding: 8px 20px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.btn-read-surah:hover {
    background-color: #d4af37;
    color: #0a192f;
}

/* ===== صفحة الأدعية ===== */
.add-supplication {
    padding: 60px 0;
}

#supplicationForm {
    max-width: 600px;
    margin: 0 auto;
}

#duaInput {
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    border: none;
    background-color: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 20px;
    resize: vertical;
}

#duaInput::placeholder {
    color: #aaa;
}

#supplicationsContainer {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.supplication-item {
    background-color: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: 15px;
    border-right: 3px solid #d4af37;
}

/* ===== صفحة عن المرحوم ===== */
.about-section {
    padding: 60px 0;
}

.about-card {
    max-width: 800px;
    margin: 0 auto;
    background-color: rgba(255,255,255,0.05);
    padding: 50px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid #d4af37;
}

.about-card h2 {
    margin-bottom: 30px;
}

.about-card p {
    font-size: 1.2rem;
    margin-bottom: 20px;
    line-height: 1.8;
}

.prayer-hand {
    font-size: 4rem;
    color: #d4af37;
    margin-top: 30px;
}

/* ===== تحسينات الجوال ===== */
@media (max-width: 768px) {
    .header-flex {
        flex-direction: column;
        gap: 10px;
    }

    .nav-links {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .main-title {
        font-size: 2.5rem;
    }

    .emotional-text {
        font-size: 1.2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 80%;
    }

    .counter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .dua-text {
        font-size: 1.4rem;
    }

    .modal-content {
        padding: 20px;
    }

    .quran-text {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .counter-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }
}

/* قسم صورة المرحوم - محسّن للتجاوب */
.deceased-section {
    padding: 60px 0;
    background: linear-gradient(135deg, #0a192f 0%, #102a3c 100%);
}

.deceased-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5%;
    flex-wrap: wrap;
    background-color: rgba(255,255,255,0.05);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    max-width: 1000px;
    margin: 0 auto;
}

.deceased-image {
    flex: 0 0 auto;
    width: min(300px, 40vw);
    max-width: 300px;
    aspect-ratio: 1 / 1; /* مربع */
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #d4af37;
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.4);
    transition: transform 0.3s ease;
}

.deceased-image:hover {
    transform: scale(1.02);
}

.deceased-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* يقص الصورة لتملأ الإطار مع الحفاظ على النسب */
    display: block;
}

.deceased-info {
    flex: 1 1 250px;
    text-align: center;
    padding: 0 15px;
}

.deceased-name {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    color: #d4af37;
    margin-bottom: 10px;
}

.deceased-prayer {
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    font-style: italic;
    margin-bottom: 10px;
    color: #fff;
}

.deceased-dates {
    color: #ccc;
    font-size: 1rem;
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .deceased-card {
        flex-direction: column;
        gap: 25px;
        padding: 30px 20px;
    }
    .deceased-image {
        width: min(250px, 60vw);
    }
}

@media (max-width: 480px) {
    .deceased-image {
        width: min(200px, 70vw);
    }
    .deceased-name {
        font-size: 1.8rem;
    }
}