/* استيراد الخطوط */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700&display=swap');

/* المتغيرات العامة */
:root {
    --primary-color: hwb(207 19% 27%);
    --secondary-color: lch(72.7% 82.36 69.26 / 0.925);
    --dark-color: #2c3e50;
    --light-color: #ecf0f1;
    --text-color: #333;
    --white: #fff;
    --transition: all 0.3s ease;
}

/* الإعدادات العامة */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Tajawal', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    direction: rtl;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 15px;
}

.section-title {
    text-align: center;
    margin-bottom: 20px;
}

    .section-title h2 {
        font-size: 2.5rem;
        color: var(--dark-color);
        margin-bottom: 15px;
        position: relative;
        display: inline-block;
    }

.underline {
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 0 auto;
    border-radius: 2px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

    .btn:hover {
        background-color: var(--secondary-color);
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

/* رأس الصفحة */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: initial;
    width: 100%;
    top: 0;
    z-index: 1000;
}

    header .container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
    }

.logo {
    display: flex;
    align-items: center;
    height: 174px;
}

    .logo img {
        width: 120px;
        margin-left: 10px;
    }

    .logo h1 {
        font-size: 13px;
        color: var(--dark-color);
        font-weight: bold;
        white-space: nowrap;
    }

        .logo-en {
            display: block;
            font-size: 0.78em;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 62vw;
        }

nav ul {
    display: flex;
    list-style: none;
}

    nav ul li {
        margin-right: 20px;
    }

        nav ul li a {
            text-decoration: none;
            color: var(--dark-color);
            font-weight: 600;
            font-size: 0.95rem;
            transition: var(--transition);
            position: relative;
            white-space: nowrap;
        }

            nav ul li a:hover {
                color: var(--primary-color);
            }

            nav ul li a::after {
                content: '';
                position: absolute;
                width: 0;
                height: 2px;
                background-color: var(--primary-color);
                bottom: -5px;
                right: 0;
                transition: var(--transition);
            }

            nav ul li a:hover::after {
                width: 100%;
            }

/* قسم البطل */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('mybg.jpg');
    background-size: cover;
    background-position: center;
    height: 180vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding-top: 240px;
    padding-bottom: 240px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

    .hero-content h2 {
        font-size: 3rem;
        margin-bottom: 80px;
        animation: fadeInUp 1s ease;
    }

    .hero-content p {
        font-size: 1.2rem;
        margin-bottom: 30px;
        animation: fadeInUp 1s ease 0.2s;
        animation-fill-mode: both;
    }

    .hero-content .btn {
        animation: fadeInUp 1s ease 0.4s;
        animation-fill-mode: both;
    }

/* قسم نبذة عن المؤسسة */
.about {
    padding: 100px 0;
    background-color: var(--light-color);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

    .about-text p {
        margin-bottom: 20px;
        font-size: 1.1rem;
    }

.about-image {
    flex: 1;
}

    .about-image img {
        width: 100%;
        border-radius: 10px;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    }

/* قسم الاهداف */
.projects {
    padding: 100px 0;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 180px));
    gap: 30px;
}

.project-card {
    width: 180px;
    height: 180px;
    background-color: var(--white);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    transform-style: preserve-3d;
    justify-content:center;
}




.front, .back {
    justify-content:center;
    text-align: center;
    position: absolute;
    backface-visibility: hidden;
    border-radius: 10px;
}

.front {
    transform: rotatey(0deg);
}

.back {
    transform: rotatey(180deg);
}


.project-card:hover {
    text-align:center;
    transform: rotatey(180deg);
    transform-style: preserve-3d;
    transition: 0.8s;
    box-shadow: 0 15px 30px rgba(24, 114, 248, 0.1);
}





.project-icon {
    width: 80px;
    height: 80px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content:center;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: var(--transition);
}

.project-card:hover .project-icon {
    background-color: var(--secondary-color);
}

.project-icon i {
    justify-content:center;
    font-size: 2rem;
    color: var(--white);
}

.project-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.project-card p {
    color: #666;
}


/* قسم الأخبار والفعاليات */
.news {
    padding: 100px 0;
    background-color: var(--light-color);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background-color: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

    .news-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    }

.news-image {
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

    .news-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.card-slider {
    position: relative;
    height: 100%;
    overflow: hidden;
    background: #eee;
}

    .card-slider img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        opacity: 0;
        transition: opacity 0.6s ease;
    }

        .card-slider img.active {
            opacity: 1;
        }

    .card-slider .slider-dots {
        position: absolute;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 6px;
        z-index: 2;
    }

        .card-slider .slider-dots span {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.6);
            cursor: pointer;
            transition: background 0.3s;
        }

            .card-slider .slider-dots span.active {
                background: #fff;
            }

.news-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-date {
    display: block;
    color: var(--primary-color);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.news-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.news-content p {
    margin-bottom: 15px;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    margin-top: auto;
}

    .read-more:hover {
        color: var(--secondary-color);
    }

.gallery {
    margin-bottom: 30px;
}

.gallery-main {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 12px;
}

    .gallery-main img {
        width: 100%;
        height: auto;
        object-fit: cover;
        display: block;
    }

.gallery-thumbs {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .gallery-thumbs img {
        width: 100%;
        height: auto;
        max-height: 540px;
        object-fit: cover;
        border-radius: 12px;
        cursor: pointer;
        border: 3px solid transparent;
        opacity: 0.7;
        transition: all 0.3s;
    }

        .gallery-thumbs img:hover {
            opacity: 1;
        }

        .gallery-thumbs img.active {
            border-color: var(--primary-color);
            opacity: 1;
        }

/* قسم شركاء المؤسسة */
.policies {
    padding: 100px 0;
}

.policies-slider {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 30px;
}

.policies-logo {
    text-align: center;
    width: 150px;
    height: 120px;
    background-color: var(--secondary-color);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    padding: 20px;
}

    .policies-logo:hover {
        text-align: center;
        transform: translateY(-10px);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
        background-color: var(--primary-color);
    }

    .policies-logo img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

/* قسم نموذج التواصل */
.contact {
    padding: 100px 0;
    background-color: var(--light-color);
}

.contact-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
}

.contact-item {
    display: flex;
    margin-bottom: 30px;
}

    .contact-item i {
        font-size: 1.5rem;
        color: var(--primary-color);
        margin-left: 20px;
        margin-top: 5px;
    }

    .contact-item h3 {
        font-size: 1.2rem;
        margin-bottom: 5px;
        color: var(--dark-color);
    }

.social-media {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

    .social-media a {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        background-color: var(--primary-color);
        color: var(--white);
        border-radius: 50%;
        transition: var(--transition);
    }

        .social-media a:hover {
            background-color: var(--secondary-color);
            transform: translateY(-5px);
        }

.contact-form {
    background-color: var(--white);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.form-group {
    margin-bottom: 20px;
}

    .form-group input,
    .form-group textarea {
        width: 100%;
        padding: 12px 15px;
        border: 1px solid #ddd;
        border-radius: 5px;
        font-family: 'Tajawal', sans-serif;
        font-size: 1rem;
        transition: var(--transition);
    }

        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--primary-color);
        }

.form-status {
    margin-top: 15px;
    font-size: 0.95rem;
    font-weight: 500;
    min-height: 20px;
}

/* تذييل الصفحة */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 70px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-logo img {
    width: 80px;
    margin-bottom: 20px;
}

.footer-logo h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.footer-links h3,
.footer-newsletter h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

    .footer-links h3::after,
    .footer-newsletter h3::after {
        content: '';
        position: absolute;
        width: 50px;
        height: 2px;
        background-color: var(--primary-color);
        bottom: 0;
        right: 0;
    }

.footer-links ul {
    list-style: none;
}

    .footer-links ul li {
        margin-bottom: 10px;
    }

        .footer-links ul li a {
            color: #bbb;
            text-decoration: none;
            transition: var(--transition);
        }

            .footer-links ul li a:hover {
                color: var(--primary-color);
                padding-right: 5px;
            }

.footer-newsletter p {
    margin-bottom: 20px;
    color: #bbb;
}

.footer-newsletter form {
    display: flex;
}

.footer-newsletter input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 5px 0 0 5px;
    font-family: 'Tajawal', sans-serif;
}

.footer-newsletter button {
    border-radius: 0 5px 5px 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bbb;
}

/* تأثيرات الحركة */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

/* قائمة الموبايل */
.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    z-index: 2100;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--dark-color);
    border-radius: 2px;
    transition: var(--transition);
}

body.menu-open .menu-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

body.menu-open .menu-toggle span:nth-child(2) {
    opacity: 0;
}

body.menu-open .menu-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* تصميم متجاوب */
@media (max-width: 1200px) {
    header .container {
        padding: 12px 15px;
    }

    .logo {
        height: auto;
    }

    .about-content {
        flex-direction: column;
    }

    .hero-content h2 {
        font-size: 2.5rem;
    }

    .hero {
        height: 120vh;
        padding-top: 150px;
        padding-bottom: 150px;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 150px));
    }

    .project-card {
        width: 150px;
        height: 150px;
    }

    .policies-slider {
        gap: 20px;
    }

    .policies-logo {
        width: 130px;
        height: 100px;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
    header .container {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 10px;
    }

    .logo {
        margin-bottom: 0;
        height: auto;
        flex-shrink: 0;
    }

    .logo img {
        width: 55px;
        margin-left: 8px;
    }

    .logo h1 {
        font-size: 10px;
        white-space: normal;
    }

    .menu-toggle {
        display: flex;
        order: -1;
        position: relative;
    }

    @media (min-width: 769px) {
        header .container {
            gap: 10px;
        }

        .logo {
            max-width: 72%;
            overflow: hidden;
        }

        .logo img {
            width: 90px;
            margin-left: 10px;
        }

        .logo h1 {
            font-size: 12px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        nav {
            width: 45%;
            max-width: 340px;
        }

            nav ul li a {
                font-size: 1rem;
                padding: 16px 28px;
            }
    }

    nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 78%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--white);
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
        transition: right 0.35s ease;
        z-index: 2000;
        padding-top: 80px;
        overflow-y: auto;
        overflow-x: hidden;
    }

        nav.open {
            right: 0;
        }

    nav ul {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

        nav ul li {
            margin: 0;
            border-bottom: 1px solid #eee;
        }

            nav ul li a {
                display: block;
                padding: 15px 25px;
                font-size: 1rem;
            }

    .hero {
        height: 100vh;
        padding-top: 120px;
        padding-bottom: 120px;
    }

    .hero-content h2 {
        font-size: 2rem;
        margin-bottom: 50px;
    }

    .hero-content p {
        font-size: 1rem;
    }

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

    .about {
        padding: 60px 0;
    }

    .about-text p {
        font-size: 1rem;
    }

    .about-text .btn {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 12px;
    }

    .about-text .btn:last-child {
        margin-bottom: 0;
    }

    .projects {
        padding: 60px 0;
    }

    .projects-grid {
        grid-template-columns: repeat(auto-fit, minmax(130px, 130px));
        gap: 15px;
        justify-content: center;
    }

    .project-card {
        width: 130px;
        height: 130px;
        padding: 20px;
    }

    .project-icon {
        width: 60px;
        height: 60px;
    }

    .project-icon i {
        font-size: 1.5rem;
    }

    .project-card h3 {
        font-size: 1rem;
        margin-bottom: 5px;
    }

    .project-card p {
        font-size: 0.75rem;
    }

    .news {
        padding: 60px 0;
    }

    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .news-image img {
        height: 200px;
    }

    .policies {
        padding: 60px 0;
    }

    .policies-slider {
        gap: 24px 20px;
        justify-content: center;
    }

    .policies-logo {
        width: 140px;
        height: 100px;
        padding: 14px;
    }

    .policies-logo .btn {
        font-size: 0.75rem;
        padding: 8px 12px;
    }

    .contact {
        padding: 60px 0;
    }

    .contact-form {
        padding: 20px;
    }

    footer {
        padding: 40px 0 20px;
    }

    .footer-logo h3 {
        font-size: 1.2rem;
    }

    .footer-links h3,
    .footer-newsletter h3 {
        font-size: 1.1rem;
    }

    .pdf-page {
        padding: 15px 0;
    }

    .pdf-container embed {
        height: 70vh;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 12px;
    }

    .hero {
        height: 90vh;
        padding-top: 100px;
        padding-bottom: 100px;
    }

    .hero-content h2 {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }

    .hero-content p {
        font-size: 0.9rem;
    }

    .section-title h2 {
        font-size: 1.6rem;
    }

    .about-content {
        gap: 25px;
    }

    .about-text p {
        font-size: 0.9rem;
    }

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .project-card {
        width: auto;
        height: auto;
        padding: 15px;
    }

    .project-icon {
        width: 50px;
        height: 50px;
    }

    .project-icon i {
        font-size: 1.2rem;
    }

    .project-card h3 {
        font-size: 0.85rem;
    }

    .news-image img {
        height: 180px;
    }

    .news-content h3 {
        font-size: 1.1rem;
    }

    .news-content p {
        font-size: 0.85rem;
    }

    .policies-slider {
        gap: 22px 16px;
        justify-content: center;
    }

    .policies-logo {
        width: 45%;
        min-width: 110px;
        height: auto;
        min-height: 80px;
        padding: 12px;
    }

    .policies-logo .btn {
        font-size: 0.7rem;
        padding: 7px 12px;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .footer-newsletter form {
        flex-direction: column;
    }

    .footer-newsletter input,
    .footer-newsletter button {
        width: 100%;
        border-radius: 5px;
        margin-bottom: 10px;
    }

    .pdf-container embed {
        height: 60vh;
    }

    .logo {
        text-align: center;
    }

    .logo h1 {
        font-size: 10px;
    }
}

/* صفحات عرض PDF */
.pdf-page {
    padding: 30px 0;
    min-height: 90vh;
    display: flex;
    align-items: flex-start;
}

.pdf-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 15px;
    width: 100%;
    flex: 1;
}

.pdf-container embed {
    width: 100%;
    height: 85vh;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.pdf-open {
    display: none;
}

@media (max-width: 768px) {
    .pdf-container embed {
        display: none;
    }

    .pdf-open {
        display: block;
        width: fit-content;
        margin: 20px auto 0;
    }
}
