/* ==========================================================
   PAGES.CSS
   منصة القراءات العشر
   صفحات: جديد المنصة + تواصل معنا
   لا يتدخل في نظام الـ Navbar الأساسي
========================================================== */


/* ==========================================================
   1. INNER PAGE HERO
========================================================== */

.inner-page-hero {
    position: relative;
    overflow: hidden;
    padding: 110px 0 90px;
    min-height: 390px;

    background:
        linear-gradient(
            135deg,
            rgba(18, 76, 61, 0.98),
            rgba(11, 55, 45, 0.96)
        );

    color: #fff;
    isolation: isolate;
}

.inner-page-hero::before {
    content: "";
    position: absolute;
    width: 520px;
    height: 520px;
    top: -280px;
    right: -160px;

    border-radius: 50%;

    background: rgba(212, 175, 55, 0.10);

    filter: blur(2px);
    pointer-events: none;
}

.inner-page-hero::after {
    content: "";
    position: absolute;
    width: 380px;
    height: 380px;
    bottom: -250px;
    left: -120px;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.035);

    pointer-events: none;
}


/* الزخرفة */

.inner-page-pattern {
    position: absolute;
    inset: 0;

    opacity: 0.10;
    pointer-events: none;

    background-image:
        linear-gradient(
            30deg,
            transparent 46%,
            rgba(255,255,255,.22) 47%,
            rgba(255,255,255,.22) 49%,
            transparent 50%
        ),
        linear-gradient(
            -30deg,
            transparent 46%,
            rgba(255,255,255,.15) 47%,
            rgba(255,255,255,.15) 49%,
            transparent 50%
        );

    background-size: 90px 90px;
}


/* محتوى الـ Hero */

.inner-page-content {
    position: relative;
    z-index: 2;

    max-width: 850px;
    margin-inline: auto;

    text-align: center;
}

.page-kicker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    margin-bottom: 18px;

    color: #d9b95b;

    font-family: "Cairo", sans-serif;
    font-size: 0.92rem;
    font-weight: 700;

    letter-spacing: 0.2px;
}

.inner-page-content h1 {
    margin: 0 0 18px;

    color: #fff;

    font-family: "Amiri", serif;
    font-size: clamp(2.7rem, 6vw, 4.5rem);
    font-weight: 700;

    line-height: 1.15;
}

.inner-page-content p {
    max-width: 680px;
    margin: 0 auto;

    color: rgba(255, 255, 255, 0.82);

    font-family: "Cairo", sans-serif;
    font-size: 1.05rem;
    line-height: 2;
}


/* ==========================================================
   2. GENERAL PAGE SECTION
========================================================== */

.page-section {
    position: relative;

    padding: 90px 0;

    background: var(--bg-color, #f8f7f2);
}

.page-section > .container {
    position: relative;
    z-index: 1;
}


/* ==========================================================
   3. NEWS GRID
========================================================== */

.news-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 26px;
}


/* ==========================================================
   4. NEWS CARD
========================================================== */

.news-card {
    position: relative;

    display: flex;
    align-items: flex-start;
    gap: 22px;

    min-width: 0;

    padding: 30px;

    border: 1px solid rgba(18, 76, 61, 0.10);
    border-radius: 22px;

    background: #fff;

    box-shadow:
        0 12px 35px rgba(20, 45, 38, 0.07);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.news-card:hover {
    transform: translateY(-7px);

    border-color: rgba(212, 175, 55, 0.35);

    box-shadow:
        0 20px 50px rgba(20, 45, 38, 0.12);
}


/* البطاقة المميزة */

.news-card.featured {
    grid-column: span 2;

    padding: 36px;
}


/* ==========================================================
   5. NEWS ICON
========================================================== */

.news-card-icon {
    flex: 0 0 68px;

    width: 68px;
    height: 68px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 18px;

    background:
        linear-gradient(
            135deg,
            #124c3d,
            #1b6854
        );

    color: #d9b95b;

    font-size: 1.45rem;

    box-shadow:
        0 8px 22px rgba(18, 76, 61, 0.18);
}

.news-card.featured .news-card-icon {
    width: 78px;
    height: 78px;
    flex-basis: 78px;

    border-radius: 20px;

    font-size: 1.65rem;
}


/* ==========================================================
   6. NEWS BODY
========================================================== */

.news-card-body {
    min-width: 0;
    flex: 1;
}

.news-date {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin-bottom: 10px;

    color: #8a806d;

    font-family: "Cairo", sans-serif;
    font-size: 0.78rem;
    font-weight: 600;
}

.news-date i {
    color: #b9952f;
}

.news-card h2 {
    margin: 0 0 12px;

    color: #173f34;

    font-family: "Amiri", serif;
    font-size: 1.65rem;
    line-height: 1.45;
}

.news-card.featured h2 {
    font-size: 2rem;
}

.news-card p {
    margin: 0;

    color: #69716c;

    font-family: "Cairo", sans-serif;
    font-size: 0.93rem;
    line-height: 2;
}


/* ==========================================================
   7. NEWS TAG
========================================================== */

.news-tag {
    display: inline-flex;

    margin-top: 20px;
    padding: 6px 13px;

    border-radius: 999px;

    background: rgba(18, 76, 61, 0.08);

    color: #124c3d;

    font-family: "Cairo", sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
}


/* ==========================================================
   8. CONTACT PAGE
========================================================== */

.contact-section {
    padding-top: 100px;
}

.contact-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 0.85fr)
        minmax(0, 1.15fr);

    gap: 55px;

    align-items: start;
}


/* ==========================================================
   9. CONTACT INFO
========================================================== */

.contact-info {
    padding-top: 20px;
}

.contact-info > .page-kicker {
    justify-content: flex-start;
}

.contact-info h2 {
    margin: 0 0 18px;

    color: #173f34;

    font-family: "Amiri", serif;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.3;
}

.contact-info > p {
    max-width: 600px;
    margin: 0 0 35px;

    color: #69716c;

    font-family: "Cairo", sans-serif;
    font-size: 0.95rem;
    line-height: 2.1;
}


/* ==========================================================
   10. CONTACT ITEMS
========================================================== */

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;

    padding: 18px 20px;

    border: 1px solid rgba(18, 76, 61, 0.09);
    border-radius: 17px;

    background: rgba(255, 255, 255, 0.72);

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.contact-item:hover {
    transform: translateX(-5px);

    border-color: rgba(212, 175, 55, 0.35);

    box-shadow:
        0 10px 25px rgba(20, 45, 38, 0.07);
}

.contact-item-icon {
    flex: 0 0 48px;

    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background: rgba(18, 76, 61, 0.09);

    color: #124c3d;

    font-size: 1.05rem;
}

.contact-item h3 {
    margin: 0 0 4px;

    color: #173f34;

    font-family: "Cairo", sans-serif;
    font-size: 0.98rem;
    font-weight: 700;
}

.contact-item p {
    margin: 0;

    color: #777;

    font-family: "Cairo", sans-serif;
    font-size: 0.78rem;
    line-height: 1.8;
}


/* ==========================================================
   11. CONTACT FORM CARD
========================================================== */

.contact-form-card {
    position: relative;

    padding: 35px;

    border: 1px solid rgba(18, 76, 61, 0.10);
    border-radius: 26px;

    background: #fff;

    box-shadow:
        0 18px 55px rgba(20, 45, 38, 0.10);
}


/* ==========================================================
   12. CONTACT FORM HEADER
========================================================== */

.contact-form-header {
    display: flex;
    align-items: center;
    gap: 16px;

    margin-bottom: 30px;
}

.contact-form-icon {
    flex: 0 0 56px;

    width: 56px;
    height: 56px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 16px;

    background:
        linear-gradient(
            135deg,
            #124c3d,
            #1b6854
        );

    color: #d9b95b;

    font-size: 1.25rem;
}

.contact-form-header span {
    display: block;

    margin-bottom: 2px;

    color: #b08b2c;

    font-family: "Cairo", sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
}

.contact-form-header h2 {
    margin: 0;

    color: #173f34;

    font-family: "Amiri", serif;
    font-size: 1.8rem;
}


/* ==========================================================
   13. FORM
========================================================== */

#contactForm {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-row {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 17px;
}

.form-group {
    min-width: 0;
}

.form-group label {
    display: block;

    margin-bottom: 8px;

    color: #344b43;

    font-family: "Cairo", sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
}


/* ==========================================================
   14. INPUT WRAPPER
========================================================== */

.input-wrapper,
.textarea-wrapper {
    position: relative;
}

.input-wrapper > i,
.textarea-wrapper > i {
    position: absolute;

    top: 50%;
    right: 16px;

    transform: translateY(-50%);

    color: #8a978f;

    pointer-events: none;

    z-index: 2;
}

.textarea-wrapper > i {
    top: 20px;
    transform: none;
}

.input-wrapper input,
.input-wrapper select,
.textarea-wrapper textarea {
    width: 100%;

    border: 1px solid #dfe5e1;
    border-radius: 13px;

    outline: none;

    background: #fbfcfb;

    color: #243b33;

    font-family: "Cairo", sans-serif;
    font-size: 0.88rem;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.input-wrapper input,
.input-wrapper select {
    height: 52px;

    padding:
        0 46px 0 16px;
}

.textarea-wrapper textarea {
    min-height: 160px;

    padding:
        15px 46px 15px 16px;

    resize: vertical;

    line-height: 1.9;
}

.input-wrapper select {
    appearance: none;
    cursor: pointer;
}


/* التركيز */

.input-wrapper input:focus,
.input-wrapper select:focus,
.textarea-wrapper textarea:focus {
    border-color: #b9952f;

    background: #fff;

    box-shadow:
        0 0 0 4px rgba(185, 149, 47, 0.10);
}


/* Placeholder */

.input-wrapper input::placeholder,
.textarea-wrapper textarea::placeholder {
    color: #a5aea9;
}


/* ==========================================================
   15. CONTACT SUBMIT
========================================================== */

.contact-submit {
    width: 100%;
    min-height: 54px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    margin-top: 4px;

    border: 0;
    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            #124c3d,
            #1b6854
        );

    color: #fff;

    font-family: "Cairo", sans-serif;
    font-size: 0.9rem;
    font-weight: 700;

    cursor: pointer;

    box-shadow:
        0 10px 25px rgba(18, 76, 61, 0.18);

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.contact-submit:hover {
    transform: translateY(-2px);

    box-shadow:
        0 14px 30px rgba(18, 76, 61, 0.25);
}

.contact-submit:active {
    transform: translateY(0);
}


/* ==========================================================
   16. CONTACT STATUS
========================================================== */

.contact-status {
    margin-top: 14px;
    padding: 12px 15px;

    border-radius: 12px;

    background: rgba(34, 125, 84, 0.09);

    color: #28734f;

    font-family: "Cairo", sans-serif;
    font-size: 0.82rem;
    line-height: 1.8;

    text-align: center;
}

.contact-status i {
    margin-left: 6px;
}


/* ==========================================================
   17. PAGE CTA
========================================================== */

.page-cta {
    padding: 0 0 90px;

    background: var(--bg-color, #f8f7f2);
}

.page-cta-box {
    position: relative;
    overflow: hidden;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;

    padding: 42px 45px;

    border-radius: 25px;

    background:
        linear-gradient(
            135deg,
            #124c3d,
            #0c3b31
        );

    color: #fff;

    box-shadow:
        0 20px 50px rgba(18, 76, 61, 0.18);
}

.page-cta-box::after {
    content: "";

    position: absolute;

    width: 260px;
    height: 260px;

    left: -90px;
    bottom: -150px;

    border-radius: 50%;

    background: rgba(212, 175, 55, 0.10);

    pointer-events: none;
}

.page-cta-box > div,
.page-cta-box > a {
    position: relative;
    z-index: 2;
}

.page-cta-box span {
    display: block;

    margin-bottom: 5px;

    color: #d9b95b;

    font-family: "Cairo", sans-serif;
    font-size: 0.78rem;
    font-weight: 700;
}

.page-cta-box h2 {
    margin: 0 0 7px;

    color: #fff;

    font-family: "Amiri", serif;
    font-size: 2rem;
}

.page-cta-box p {
    margin: 0;

    color: rgba(255, 255, 255, 0.75);

    font-family: "Cairo", sans-serif;
    font-size: 0.84rem;
    line-height: 1.9;
}


/* ==========================================================
   18. CTA BUTTON
========================================================== */

.page-cta-box .btn-primary {
    flex-shrink: 0;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    min-height: 52px;

    padding: 0 25px;

    border-radius: 13px;

    background: #d9b95b;

    color: #173f34;

    font-family: "Cairo", sans-serif;
    font-weight: 800;

    text-decoration: none;

    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.page-cta-box .btn-primary:hover {
    transform: translateY(-3px);

    box-shadow:
        0 10px 25px rgba(0, 0, 0, 0.16);
}


/* ==========================================================
   19. DARK MODE
   متوافق مع أكثر من طريقة لتفعيل الوضع الليلي
========================================================== */

body.dark-mode .page-section,
body.dark-theme .page-section,
html.dark-mode .page-section,
html.dark-theme .page-section {
    background: #101b18;
}

body.dark-mode .news-card,
body.dark-theme .news-card,
html.dark-mode .news-card,
html.dark-theme .news-card,

body.dark-mode .contact-form-card,
body.dark-theme .contact-form-card,
html.dark-mode .contact-form-card,
html.dark-theme .contact-form-card {
    background: #172521;

    border-color: rgba(255, 255, 255, 0.07);

    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.20);
}

body.dark-mode .news-card h2,
body.dark-theme .news-card h2,
html.dark-mode .news-card h2,
html.dark-theme .news-card h2,

body.dark-mode .contact-info h2,
body.dark-theme .contact-info h2,
html.dark-mode .contact-info h2,
html.dark-theme .contact-info h2,

body.dark-mode .contact-form-header h2,
body.dark-theme .contact-form-header h2,
html.dark-mode .contact-form-header h2,
html.dark-theme .contact-form-header h2,

body.dark-mode .contact-item h3,
body.dark-theme .contact-item h3,
html.dark-mode .contact-item h3,
html.dark-theme .contact-item h3 {
    color: #f3eee1;
}

body.dark-mode .news-card p,
body.dark-theme .news-card p,
html.dark-mode .news-card p,
html.dark-theme .news-card p,

body.dark-mode .contact-info > p,
body.dark-theme .contact-info > p,
html.dark-mode .contact-info > p,
html.dark-theme .contact-info > p,

body.dark-mode .contact-item p,
body.dark-theme .contact-item p,
html.dark-mode .contact-item p,
html.dark-theme .contact-item p {
    color: #aebbb5;
}

body.dark-mode .contact-item,
body.dark-theme .contact-item,
html.dark-mode .contact-item,
html.dark-theme .contact-item {
    background: rgba(255, 255, 255, 0.025);

    border-color: rgba(255, 255, 255, 0.07);
}

body.dark-mode .contact-item-icon,
body.dark-theme .contact-item-icon,
html.dark-mode .contact-item-icon,
html.dark-theme .contact-item-icon {
    background: rgba(255, 255, 255, 0.06);
}

body.dark-mode .contact-item-icon,
body.dark-theme .contact-item-icon,
html.dark-mode .contact-item-icon,
html.dark-theme .contact-item-icon {
    color: #d9b95b;
}

body.dark-mode .form-group label,
body.dark-theme .form-group label,
html.dark-mode .form-group label,
html.dark-theme .form-group label {
    color: #d8e0dc;
}

body.dark-mode .input-wrapper input,
body.dark-mode .input-wrapper select,
body.dark-mode .textarea-wrapper textarea,

body.dark-theme .input-wrapper input,
body.dark-theme .input-wrapper select,
body.dark-theme .textarea-wrapper textarea,

html.dark-mode .input-wrapper input,
html.dark-mode .input-wrapper select,
html.dark-mode .textarea-wrapper textarea,

html.dark-theme .input-wrapper input,
html.dark-theme .input-wrapper select,
html.dark-theme .textarea-wrapper textarea {
    background: #101b18;

    border-color: rgba(255, 255, 255, 0.10);

    color: #edf3ef;
}

body.dark-mode .input-wrapper input::placeholder,
body.dark-mode .textarea-wrapper textarea::placeholder,
body.dark-theme .input-wrapper input::placeholder,
body.dark-theme .textarea-wrapper textarea::placeholder,
html.dark-mode .input-wrapper input::placeholder,
html.dark-mode .textarea-wrapper textarea::placeholder,
html.dark-theme .input-wrapper input::placeholder,
html.dark-theme .textarea-wrapper textarea::placeholder {
    color: #74837c;
}

body.dark-mode .news-tag,
body.dark-theme .news-tag,
html.dark-mode .news-tag,
html.dark-theme .news-tag {
    background: rgba(217, 185, 91, 0.10);

    color: #d9b95b;
}


/* ==========================================================
   20. TABLET
========================================================== */

@media (max-width: 900px) {

    .inner-page-hero {
        padding: 90px 0 75px;
        min-height: 340px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-card.featured {
        grid-column: auto;
    }

    .contact-grid {
        grid-template-columns: 1fr;

        gap: 45px;
    }

    .contact-info {
        padding-top: 0;
    }

    .page-cta-box {
        padding: 35px;

        flex-direction: column;
        align-items: flex-start;
    }

}


/* ==========================================================
   21. MOBILE
========================================================== */

@media (max-width: 650px) {

    .inner-page-hero {
        padding: 75px 0 65px;

        min-height: 300px;
    }

    .inner-page-content h1 {
        font-size: 2.7rem;
    }

    .inner-page-content p {
        padding-inline: 12px;

        font-size: 0.9rem;
        line-height: 1.9;
    }

    .page-section {
        padding: 60px 0;
    }

    .news-card,
    .news-card.featured {
        flex-direction: column;

        padding: 24px;

        gap: 17px;

        border-radius: 19px;
    }

    .news-card-icon,
    .news-card.featured .news-card-icon {
        width: 58px;
        height: 58px;

        flex-basis: 58px;

        border-radius: 15px;

        font-size: 1.2rem;
    }

    .news-card h2,
    .news-card.featured h2 {
        font-size: 1.55rem;
    }

    .news-card p {
        font-size: 0.84rem;
    }

    .contact-section {
        padding-top: 60px;
    }

    .contact-info h2 {
        font-size: 2.15rem;
    }

    .contact-form-card {
        padding: 23px 18px;

        border-radius: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form-header {
        margin-bottom: 23px;
    }

    .page-cta {
        padding-bottom: 60px;
    }

    .page-cta-box {
        padding: 30px 24px;

        border-radius: 20px;
    }

    .page-cta-box h2 {
        font-size: 1.7rem;
    }

    .page-cta-box .btn-primary {
        width: 100%;
    }

}


/* ==========================================================
   22. SMALL MOBILE
========================================================== */

@media (max-width: 420px) {

    .inner-page-hero {
        padding: 65px 0 55px;
    }

    .inner-page-content h1 {
        font-size: 2.35rem;
    }

    .page-kicker {
        font-size: 0.78rem;
    }

    .news-card,
    .news-card.featured {
        padding: 20px;
    }

    .contact-item {
        align-items: flex-start;

        padding: 15px;
    }

    .contact-item-icon {
        flex-basis: 43px;

        width: 43px;
        height: 43px;
    }

    .contact-form-card {
        padding: 20px 15px;
    }

}


/* ==========================================================
   23. ACCESSIBILITY
========================================================== */

.news-card:focus-within,
.contact-item:focus-within,
.contact-form-card:focus-within {
    outline: 2px solid rgba(185, 149, 47, 0.45);
    outline-offset: 3px;
}


/* ==========================================================
   24. REDUCED MOTION
========================================================== */

@media (prefers-reduced-motion: reduce) {

    .news-card,
    .contact-item,
    .contact-submit,
    .page-cta-box .btn-primary {
        transition: none;
    }

}

/* ==========================================================
   CONTACT FORM STATUS
========================================================== */

.contact-status {
    margin-top: 18px;
    padding: 14px 18px;
    border-radius: 14px;

    display: flex;
    align-items: center;
    gap: 10px;

    font-family: "Cairo", sans-serif;
    font-size: 14px;
    font-weight: 600;

    animation: statusAppear 0.3s ease;
}

.contact-status.success {
    background: rgba(34, 197, 94, 0.10);
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: #15803d;
}

.contact-status.error {
    background: rgba(239, 68, 68, 0.10);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #b91c1c;
}

.contact-status i {
    font-size: 18px;
    flex-shrink: 0;
}

.contact-submit:disabled {
    opacity: 0.7;
    cursor: wait;
}

@keyframes statusAppear {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}