/* =========================
   Section Background
========================= */
.projects-section {
    background: #fff;              /* الخلفية البيضا */
    padding: 30px 30px;
}


/* عنوان الكاتيجوري */
.category-title {
    font-size: 1.25rem;
    margin-bottom: 40px;
    color: #173542;
    letter-spacing: 2px;
}

/* =========================
   Category Title (Outside Section)
========================= */
.category-title.outside {
    color: #fff;
    font-size: 1.25rem;
    margin: 35px 0 10px;
    letter-spacing: 0px;
    text-transform: uppercase;
}
/* =========================
   Projects Grid
========================= */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    position: relative;
}
.project-title {
    text-align: center;
}
/* =========================
   Project Card
========================= */
.project-card {
    position: relative;
    cursor: pointer;
    padding-right: 20px; /* مساحة الخط */
    background: transparent;
	margin-top: 20px;
	margin-bottom: 20px;
}

/* =========================
   Project Number
========================= */
.project-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #173542;
    display: block;
    margin-bottom: 10px;
}

/* =========================
   Title (فوق الصورة)
========================= */
.project-card h3 {
    font-size: 14px;
    text-transform: uppercase;
    margin: 0 0 12px;
    color: #173542;
    max-width: 90%;
}


/* =========================
   Eye Circle (Right)
========================= */
.project-eye {
    margin-top: 12px;
    margin-left: auto;           /* يخليها يمين */
    width: 41px;
    height: 41px;
    background: #fff;
    border: 1px solid #173542;
    border-radius: 50%;          /* دايرة */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: all .3s ease;
}

/* Hover */
.project-card:hover .project-eye {
    background: #173542;
    color: #fff;
}

/* =========================
   Timeline Line + Dots
========================= */
.line {
    position: absolute;
    top: -15px;
    bottom: -15px;
    right: 0;
    width: 1px;
    background: #173542;
}

.dot {
    width: 10px;
    height: 10px;
    background: #173542;
    border-radius: 50%;
    position: absolute;
    top: 0;
    right: -4.5px;
}

/* النقطة اللي تحت */
.project-card::after {
    content: "";
    width: 10px;
    height: 10px;
    background: #173542;
    border-radius: 50%;
    position: absolute;
    bottom: -15px;
    right: -4.5px;
}


/* ❌ Remove divider from last item in each row (Desktop) */
.projects-grid .project-card:nth-child(5n) .line,
.projects-grid .project-card:nth-child(5n)::after {
    display: none;
}
/* =========================
   Load More
========================= */
.projects-load-more {
    text-align: center;
    margin-top: 20px;
}

/* Discover More Button */
.projects-load-more button {
    color: #fff;
    border: 1px solid #fff;
	margin-top: 10px;
    background: transparent;
}

.projects-load-more button:hover {
    background: #fff;
    color: #173542;
}

/* =========================
   Popup (كما هو)
========================= */
.project-popup {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.popup-box {
    background: #173542;
    color: #fff;
    padding: 30px;
    width: 50%;
    max-width: 900px;
    border-radius: 12px;
    direction: ltr;
    position: relative;
}

.popup-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 30px;
    cursor: pointer;
}

/* Popup Divider */
.popup-divider {
    width: 100%;
    height: 1px;
    background: #fff;
    margin: 20px 0 30px;
}

/* =========================
   Swiper Custom Color
========================= */

.project-swiper .swiper-button-next,
.project-swiper .swiper-button-prev {
    color: #C49A6C;
}

.project-swiper .swiper-button-next::after,
.project-swiper .swiper-button-prev::after {
    font-size: 28px;
    font-weight: bold;
}


.more-projects {
	border-top: 20px solid #173542;
    padding: 30px 30px;}

.more-projects.hidden {
    display: none;
}

.hidden {
    display: none;
}

.more-projects .line,
.more-projects .dot,
.more-projects .project-card::after {
    background: #173542;
}



.projects-load-more {
    position: relative;
    z-index: 9999;
}

.projects-load-more button {
    pointer-events: auto;
}

.project-card {
    pointer-events: auto;
}


/* Discover More button states fix */
.projects-load-more button:focus,
.projects-load-more button:active,
.projects-load-more button:focus-visible {
    background-color: #fff !important;
    color: #173542;              /* غيره لو عاوز */
    border: 1px solid #173542;
    outline: none;
    box-shadow: none;
}

/* عشان ميبقاش فيه تأثير غريب على الموبايل */
.projects-load-more button::-moz-focus-inner {
    border: 0;
}

/* =========================
   Responsive
========================= */

@media (max-width: 768px) {

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
	
	    .projects-grid .project-card:nth-child(5n) {
        grid-column: span 2;
			padding: 0px 40px;
    }
	
	.projects-section {
    padding: 10px 10px;
}
	.more-projects {
    padding: 10px 10px;}
	
	.project-card h3 {
		font-size: 11px;
	}
	.project-number {
	calc(1.375rem + 1.5vw)
	}
	#popup-title {
		font-size: 11px;
	}


}

@media (max-width: 768px) {

    /* ❌ Remove divider from last item in each row (Mobile) */
    .projects-grid .project-card:nth-child(2n) .line,
    .projects-grid .project-card:nth-child(2n)::after {
        display: none;
    }

}