/* --- Hero Slider --- */
.hero-slider {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: white;
}
.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}
.hero-slider .slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
}
.hero-slider .slide.active {
    opacity: 1;
    z-index: 2;
}
.hero-slider .hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
}
.slider-nav {
    position: absolute;
    z-index: 4;
    bottom: 30px;
    display: flex;
    gap: 15px;
}

.hero-content h1 {
    color: var(--background-light);
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 30px auto;
    opacity: 0.9;
}

/* --- Problem Section --- */
.section-title { text-align: center; margin-bottom: 50px; }
.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
    margin-bottom: 3rem !important;
}
.problem-card {
    padding: 30px;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.problem-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
}
.problem-card .icon { font-size: 3rem; color: var(--primary-color); margin-bottom: 15px; }




/* --- Services Section (Copied from services.css for homepage) --- */
.services-section { padding-top: 80px; padding-bottom: 80px; }
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.service-card {
    background: var(--background-light);
    border: 1px solid #eee;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    
    /* جديد */
    position: relative;
    overflow: hidden;
    transform-origin: center;
    transition:
        transform 0.35s cubic-bezier(.21,.72,.26,.99),
        box-shadow 0.35s cubic-bezier(.21,.72,.26,.99),
        border-color 0.35s ease,
        background 0.35s ease;
}

/* طبقة توهّج/إضاءة خلفية تمر فوق الكارد */
.service-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background:
        radial-gradient(circle at top left, rgba(235, 123, 37, 0.2), transparent 55%),
        radial-gradient(circle at bottom right, rgba(248, 142, 56, 0.18), transparent 55%);
    opacity: 0;
    transform: translate3d(0, 12%, 0) scale(0.92);
    transition:
        opacity 0.5s ease,
        transform 0.5s ease;
    z-index: 0;
}

/* محتوى الكارد فوق طبقة التوهّج */
.service-card > * {
    position: relative;
    z-index: 1;
}

/* تأثير الـ hover */
.service-card:hover {
    transform: translateY(-14px) scale(1.02);
    box-shadow: 0 25px 60px rgba(42, 25, 15, 0.18);
    border-color: rgba(235, 126, 37, 0.35);
    background: linear-gradient(
        145deg,
        var(--background-light),
        rgba(235, 126, 37, 0.02)
    );
}

/* تفعيل التوهّج في الـ hover */
.service-card:hover::before {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
}



.service-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}
.service-card h3 {
    min-height: 50px; /* To align titles */
}
.service-card p {
    color: #666;
    flex-grow: 1; /* Pushes the button to the bottom */
    margin-bottom: 30px;
}
.btn-learn-more {
    color: var(--primary-color);
    font-weight: 700;
    align-self: center;
    transition: all 0.3s ease;
}
.btn-learn-more:hover {
    background: var(--primary-color);
    color:white;
    padding: 5px 10px;
    border-radius: 8px;
}
.btn-learn-more i {
    transition: transform 0.3s ease;
    margin-right: 5px;
}
.btn-learn-more:hover i {
    transform: translateX(-5px);
}



/* --- Solution Section --- */
.solution-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    position: relative;
}

.step-card {
    background: var(--background-light);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.05);
    position: relative;
    padding-top: 50px;
    overflow: hidden;            /* مهم عشان نخفي الجزء اللي برا الكرت */
    /* z-index: 0;                  عشان الـ ::after يكون تحت المحتوى */
    transition: color 0.2s ease;
}

/* الطبقة اللي بتنزل من أعلى لأسفل */
.step-card::after {
    content: "";
    position: absolute;
    inset: 0;                    /* top/right/bottom/left = 0 */
    background: var(--primary-color);
    transform: translateY(-100%); /* خارج الكرت من فوق */
    transition: transform 0.4s ease-in-out;
    z-index: -1;                 /* تخليها خلف محتوى الكرت */
}

/* عند الـ hover نخلي الطبقة تنزل */
.step-card:hover::after {
    transform: translateY(0);
}

/* اختيارية: تغيّر لون الخط لما الخلفية تصير ملونة */
.step-card:hover {
    color: #fff;
}
.step-card:hover .step-number {
    background-color: var(--background-light);
    color: var(--primary-color);
}

.step-number {
    position: absolute;
    top: 5px;
    right: 30px;
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(244, 110, 47, 0.4);
}

/* --- Partners Section --- */
.section-subtitle { text-align: center; max-width: 700px; margin: -30px auto 50px auto; color: #666; }
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.text-center { text-align: center; }

/* --- Final CTA Section --- */
.final-cta-section {
    background-color: var(--secondary-color);
    color: white;
    padding: 60px 0;
}
.final-cta-section h2 { color: white; }
.final-cta-section .btn-primary {
    margin-top: 20px;
}

/* --- Projects Section --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.project-card {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    color: white;
}
.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.project-card:hover img {
    transform: scale(1.1);
}
.project-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 60%);
    transition: background 0.3s ease;
}
.project-card:hover::after {
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 70%);
}
.project-info {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 25px;
    z-index: 2;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}
.project-card:hover .project-info {
    transform: translateY(0);
}
.project-info h3 { color: white; }

/* --- Blog Section --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.post-card {
    background: var(--background-light);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}
.post-image-link img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.post-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
.post-card-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
}
.post-card-content h3 a { color: var(--secondary-color); }
.post-card-content h3 a:hover { color: var(--primary-color); }
.post-card-content p { color: #666; flex-grow: 1; margin-bottom: 20px; }
.post-meta {
    font-size: 0.85rem;
    color: #999;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    h1, .hero-content h1 { font-size: 2.5rem; }
    section { padding: 60px 0; }
}
