@charset "utf-8";
/* CSS Document */

@charset "utf-8";
/* CSS Document */

/* Container الشبكة الرئيسي */
.grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    padding: 20px 10px;
    box-sizing: border-box;
}

/* التنسيق الأساسي للكروت */
.grid figure {
    position: relative;
    z-index: 1;
    overflow: hidden;
    margin: 10px;
    height: 300px;
    background: #000;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
}

/* ضبط اللوجوهات والصور لتجنب التشوّه */
.grid figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    box-sizing: border-box;
    display: block;
}

/* تقسيم 4 عناصر للكمبيوتر */
.grid-4 figure {
    flex: 0 0 calc(25% - 20px);
    max-width: calc(25% - 20px);
}

/* تقسيم 3 عناصر للكمبيوتر */
.grid-3 figure {
    flex: 0 0 calc(33.333% - 20px);
    max-width: calc(33.333% - 20px);
}

/* 📱 شاشات الموبايل والتابلت (أقل من 768px) */
@media screen and (max-width: 768px) {
    .grid {
        padding: 5px 2px !important;
        width: 100% !important;
    }

    .grid-4 figure,
    .grid-3 figure,
    .grid figure {
        flex: 0 0 calc(100% - 4px) !important;
        max-width: calc(100% - 4px) !important;
        width: calc(100% - 4px) !important;
        height: 230px !important;
        margin: 6px auto !important;
    }

    .grid figure img {
        object-fit: cover !important;
        object-position: center !important;
        padding: 0 !important;
    }

    .grid figure figcaption {
        padding: 10px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
    }

    .grid figure h2,
    figure.effect-chico h2 {
        padding: 0 !important;
        margin: 0 !important;
        font-size: 1.1rem !important;
        line-height: 1.25 !important;
        word-break: break-word !important;
        text-align: center !important;
    }

    figure.effect-chico p {
        font-size: 11px !important;
        max-width: 90% !important;
        transform: scale(1) !important;
        margin-top: 5px !important;
    }

    figure.effect-chico figcaption::before {
        top: 8px !important;
        right: 8px !important;
        bottom: 8px !important;
        left: 8px !important;
    }
}

.grid figure figcaption {
    padding: 1.5em;
    color: #fff;
    text-transform: uppercase;
    font-size: 1.25em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.grid figure figcaption::before,
.grid figure figcaption::after {
    pointer-events: none;
}

.grid figure figcaption,
.grid figure a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Anchor covers item */
.grid figure a {
    z-index: 1000;
    text-indent: 200%;
    white-space: nowrap;
    font-size: 0;
    opacity: 0;
}

.grid figure h2,
figure.effect-chico h2 {
    word-spacing: -0.15em;
    font-weight: 300;
    padding: 0 !important; /* إلغاء الـ padding العلوي القديم لمنع خروج النص */
    margin: 0;
}

.grid figure h2 span {
    font-weight: 800;
}

.grid figure p {
    letter-spacing: normal;
    line-height: 1.5;
    font-size: 12px;
    color: #fff;
    text-shadow: 1px 1px 2px #000;
    margin: 0;
}

/*---------------*/
/***** Chico *****/
/*---------------*/

figure.effect-chico img {
	-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
	transition: opacity 0.35s, transform 0.35s;
	-webkit-transform: scale(1.12);
	transform: scale(1.12);
}

figure.effect-chico:hover img {
	opacity: 0.2;
	-webkit-transform: scale(1);
	transform: scale(1);
}

figure.effect-chico figcaption {
	padding: 3em;
}

figure.effect-chico figcaption::before {
	position: absolute;
	top: 30px;
	right: 30px;
	bottom: 30px;
	left: 30px;
	border: 1px solid #fff;
	content: '';
	-webkit-transform: scale(1.1);
	transform: scale(1.1);
}

figure.effect-chico figcaption::before,
figure.effect-chico p {
	opacity: 0;
	-webkit-transition: opacity 0.35s, -webkit-transform 0.35s;
	transition: opacity 0.35s, transform 0.35s;
}

figure.effect-chico h2 {
	padding: 20% 0 20px 0;
}

figure.effect-chico p {
	margin: 0 auto;
	max-width: 200px;
	-webkit-transform: scale(1.5);
	transform: scale(1.5);
}

figure.effect-chico:hover figcaption::before,
figure.effect-chico:hover p {
	opacity: 1;
	-webkit-transform: scale(1);
	transform: scale(1);
}

@media screen and (max-width: 69.5em) {
	.grid figure {
		width: 50%;
	}	

	.grid figure figcaption {
		font-size: 90%;
	}
}


@media screen and (max-width: 41.5em) {

	.grid figure {
		width: 100%;
	}
}