/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Poppins:wght@500;600;700&display=swap');

/* --- Root Variables --- */
:root {
    --primary-color: #1a3b52;       /* اللون الأزرق الأصلي */
    --primary-dark: #112635;        /* درجة أغمق للعناوين */
    --accent-color: #f59e0b;        /* لون التمييز (برتقالي ذهبي) */
    --text-color: #334155;          /* لون نصوص رمادي مزرق حديث */
    --text-light: #64748b;          /* نصوص ثانوية */
    --bg-light: #f8fafc;            /* خلفية فاتحة جداً */
    --white: #ffffff;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-dark);
    line-height: 1.3;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* --- Modern Navbar (Glassmorphism) --- */
/* Navbar - الحالة الابتدائية (شفافة تماماً) */
.navbar {
    position: fixed;        /* ضروري لكي تظهر القائمة فوق صورة الخلفية */
    width: 100%;            /* لضمان امتداد القائمة للعرض الكامل */
    top: 0;
    left: 0;
    background: transparent; /* خلفية شفافة لظهور الصورة تحتها */
    backdrop-filter: none;   /* لا يوجد ضبابية في البداية */
    padding: 1.5rem 0;       /* مسافة أكبر في البداية */
    border-bottom: none;
    z-index: 1000;
    transition: all 0.4s ease; /* تنعيم حركة التحول */
}

/* Navbar - عند التمرير (تتحول لزجاج) */
.navbar.scrolled {
    background: rgba(26, 59, 82, 0.85); /* لون الخلفية مع شفافية */
    backdrop-filter: blur(12px);        /* تأثير التغبيش (الزجاج) */
    padding: 0.8rem 0;                  /* تقليص حجم البار */
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: -0.5px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: rgba(255,255,255,0.85);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--white);
}

.nav-link:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--white);
    transition: var(--transition);
    border-radius: 2px;
}

/* --- Hero Section --- */
.hero {
    height: 85vh;
    display: flex;
    align-items: center;
    text-align: center;
    position: relative;
    /* تأكد من صحة مسار الصورة */
    background:
            linear-gradient(135deg, rgba(26, 59, 82, 0.7), rgba(17, 38, 53, 0.7)),
            url('/images/783caee0-6c68-41a4-86e4-ffda819ff6e8.jpg') no-repeat center center/cover fixed;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--white);
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: rgba(255,255,255,0.9);
}

/* Modern Button */
.btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background-color: #d97706; /* لون أغمق قليلاً عند التحويم */
    transition: var(--transition);
    z-index: -1;
    border-radius: 50px;
}

.btn:hover::before {
    width: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.5);
}

/* --- Section Titles --- */
.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

/* --- About Section --- */
.about-section {
    padding: 6rem 0;
    background-color: var(--white);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-text p {
    color: var(--text-color);
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.highlight-text {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.2rem;
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: rgba(26, 59, 82, 0.04);
    border-left: 4px solid var(--accent-color);
    border-radius: 0 8px 8px 0;
}

/* --- Features Section --- */
.features-section {
    padding: 6rem 0;
    background-color: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.feature-item {
    background: var(--white);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0,0,0,0.03);
}

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

.feature-image {
    height: 220px;
    overflow: hidden;
}

.feature-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

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

.feature-icon {
    position: absolute;
    top: 190px;
    left: 25px;
    width: 60px;
    height: 60px;
    background-color: var(--accent-color);
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid var(--white);
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.feature-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--white);
}

.feature-item h3 {
    margin: 45px 25px 15px 25px;
    font-size: 1.35rem;
}

.feature-item p {
    padding: 0 25px 30px 25px;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* --- Services Section --- */
.services {
    padding: 6rem 0;
    background-color: var(--white);
}

.services-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 4rem auto;
    color: var(--text-light);
    font-size: 1.1rem;
}

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

.service-card {
    background: var(--white);
    padding: 2.5rem 2rem;
    border-radius: 16px; /* الحواف الدائرية للبطاقة */
    border: 1px solid rgba(0,0,0,0.05);
    text-align: center;
    transition: var(--transition);
    position: relative;
    box-shadow: var(--shadow-sm);
    overflow: hidden; /* مهم جداً لقص الخط العلوي */
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px; /* زيادة بسيطة في السمك */
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    /* التعديل: جعل الخط يتبع انحناءة البطاقة العلوية */
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem;
    background-color: rgba(26, 59, 82, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: var(--transition);
}

.service-icon svg {
    /* التعديل: تقليل حجم الأيقونة لتناسب الدائرة تماماً */
    width: 32px;
    height: 32px;
}

.service-card:hover .service-icon {
    background-color: var(--primary-color);
    color: var(--white);
}

.service-card h3 {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.service-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.service-list {
    text-align: left;
}

.service-list li {
    padding: 8px 0;
    color: var(--text-color);
    font-size: 0.9rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
}

.service-list li:last-child {
    border-bottom: none;
}

.service-list li::before {
    content: "\2713";
    color: var(--accent-color);
    font-weight: bold;
    margin-right: 12px;
}

/* --- Contact Section --- */
.contact-section {
    padding: 6rem 0;
    background-color: var(--bg-light);
}

.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    margin-top: 3rem;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.info-item {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    border-left: 4px solid var(--primary-color);
}

.info-item h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.info-item p {
    color: var(--text-light);
}

.contact-form {
    flex: 1.5;
    background: var(--white);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 1.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #f8fafc;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: var(--white);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.contact-form button {
    width: 100%;
    cursor: pointer;
    font-size: 1.1rem;
}

/* --- Footer --- */
footer {
    background-color: var(--primary-dark);
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 2rem 0;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* --- Scroll Reveal Animation Classes --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .menu-toggle { display: block; }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--primary-color);
        width: 100%;
        text-align: center;
        padding: 2rem 0;
        box-shadow: var(--shadow-lg);
        gap: 1.5rem;
    }

    .nav-menu.active { left: 0; }

    .hero h1 { font-size: 2.5rem; }

    .contact-form { padding: 1.5rem; }

    .about-text h2::after, .section-title h2::after { margin: 10px auto; }
}