/* --- Page Header (Shared Style) --- */
.page-header {
    background: var(--background-grey);
    padding: 100px 0;
    text-align: center;
}
.page-header h1 { color: var(--primary-color); }
.page-header p { color: var(--secondary-color); max-width: 800px; margin: 10px auto 0 auto; line-height: 1.8; }

/* --- Filter Tabs --- */
.filter-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
}
.filter-btn {
    background: var(--background-grey);
    color: var(--secondary-color);
    border: none;
    padding: 10px 25px;
    border-radius: 50px;
    font-family: var(--heading-font);
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
}
.filter-btn:hover {
    background: #e0e0e0;
}
.filter-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(244, 110, 47, 0.3);
}

/* --- Projects Grid (projects.php) --- */
.projects-page-section { padding-top: 50px; padding-bottom: 80px; }
.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;
    height: 250px; /* Fixed height for project cards */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}
.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(0); /* Always visible */
    transition: transform 0.4s ease;
}
.project-info h3 { color: white; margin: 0; }

/* --- Project Details (project-details.php) --- */
.project-details-section {
    padding-top: 100px;
    padding-bottom: 80px;
    background: var(--background-grey);
}
.project-details-section h1 {
    text-align: center;
    margin-bottom: 40px;
    color: var(--secondary-color);
    line-height: 1.4;
}

.project-facts-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.07);
    margin-bottom: 50px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}
.fact-item {
    background: var(--background-grey);
    padding: 15px;
    border-radius: 6px;
    border-left: 3px solid var(--primary-color);
    flex: 1 1 220px;
}
.fact-item strong {
    display: block;
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 5px;
}
.fact-item span {
    font-weight: 700;
    color: var(--secondary-color);
}
.fact-item-full {
    flex-basis: 100%;
}

.project-details-grid {
    max-width: 1200px; /* Control the max width of the image */
    margin: 0 auto; /* Center the image and add more space below */
    border-radius: 12px; /* Softer corners */
    overflow: hidden;
    transition: transform 0.4s ease;
}
.project-details-grid {
    display: grid;
    gap: 30px;
    grid-template-columns: 1fr;
}
@media (min-width: 992px) {
    .project-details-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
.detail-block {
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.07);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.detail-block:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

/* .detail-block h3 { color: var(--primary-color); margin-bottom: 15px; display: flex; align-items: center; gap: 15px; } */
.detail-block h3 i { font-size: 1.8rem; }
/* .detail-block p { line-height: 1.8; color: #555; } */


.detail-block img {
    width: 100%;
    height: 220px; /* تقليل ارتفاع الصورة لتكون أنسب */
    object-fit: cover;
    display: block;
}
.detail-text {
    padding: 30px;
}
.detail-text h3 {
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.detail-text h3 i {
    color: var(--primary-color);
}
.detail-text p {
    line-height: 1.8;
    color: #555;
}



@media (max-width: 768px) {
    .project-card { height: 200px; } /* Adjust height for smaller screens */
}