/* heritage-tour.css - أنماط صفحة قائمة الدول (جولة في التراث) */

/* --- تمرير ناعم --- */
html {
    scroll-behavior: smooth;
}

/* --- إعدادات أساسية للعرض الكامل --- */
body.page-template-default .content-area-full-width,
body.page-template-template-heritage-tour-php .content-area-full-width,
body.page-template-page-countries-list-php .content-area-full-width {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: auto;
    margin-right: auto;
    overflow-x: hidden;
}

/* --- شارة عدد العناصر في بطاقة الدولة --- */
.country-items-count {
    position: absolute;
    top: 20px;
    left: 20px;
    background: linear-gradient(135deg, #C8A97E 0%, #9B8766 100%);
    color: #fff;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    z-index: 5;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 5px;
}

.country-items-count .count-number {
    font-size: 1.2em;
    font-weight: 700;
}

.country-items-count .count-label {
    font-size: 0.9em;
    opacity: 0.9;
}

/* --- تصميم الهيدر الرئيسي لصفحة "جولة في التراث" --- */
.heritage-page-main-header {
    background: linear-gradient(135deg, #f5df77 20%, #eb995d 100%);
    text-align: center;
    margin: 30px auto 40px auto;
    color: #ffffff;
    position: relative;
    width: fit-content;
    max-width: 90%;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    overflow: hidden;
}

.heritage-page-main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 200%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1.5px);
    background-size: 20px 20px;
    transform: translateX(-50%) skewY(-5deg);
    opacity: 0.5;
    z-index: 0;
}

.heritage-page-main-header .main-title {
    font-family: 'Scheherazade New', 'Arial', sans-serif;
    font-size: 2.8em;
    font-weight: 800;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
    margin: 0;
    animation: titleAnimation 1.2s cubic-bezier(0.23, 1, 0.32, 1) forwards;
    letter-spacing: 0.5px;
    position: relative;
    z-index: 1;
    padding: 10px 25px;
}

@keyframes titleAnimation {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.98);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- غلاف عرض الدول --- */
.countries-showcase-wrapper {
    padding: 0 20px 40px;
    background-color: #f4f7f6;
    min-height: calc(100vh - 250px);
}

/* --- شبكة الدول الاحترافية --- */
.countries-grid-professional {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 40px;
    max-width: 1600px;
    margin: 0 auto;
}

/* --- بطاقة الدولة الاحترافية --- */
.country-card-professional {
    background-color: #ffffff;
    border-radius: 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(50px) scale(0.98);
    transition: opacity 0.8s cubic-bezier(0.165, 0.84, 0.44, 1),
        transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1),
        box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.country-card-professional.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.country-card-professional:hover {
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.country-card-professional.is-visible:hover {
    transform: translateY(-12px) scale(1.03);
}

.country-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

/* حاوية الصورة */
.country-card-image-container {
    height: 380px;
    position: relative;
    overflow: hidden;
    border-radius: 25px;
    width: 100%;
}

/* أيقونة علم الدولة */
.country-flag-icon {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
    z-index: 5;
    background-color: #fff;
    padding: 2px;
}

.country-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1), filter 0.4s ease-out;
    filter: brightness(0.8) saturate(1.1);
}

.country-card-professional:hover .country-card-image {
    transform: scale(1.12);
    filter: brightness(0.9) saturate(1.2);
}

.country-card-info-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 30px;
    z-index: 3;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.75) 50%, rgba(0, 0, 0, 0.0) 100%);
    color: #ffffff;
    text-align: center;
    border-radius: 0 0 25px 25px;
    opacity: 1;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.country-card-name {
    font-family: 'Scheherazade New', 'Tahoma', sans-serif;
    font-size: 3em;
    font-weight: 700;
    line-height: 1.25;
    text-shadow: 1px 1px 8px rgba(0, 0, 0, 0.7);
    margin: 0 0 12px 0;
    color: #fff;
}

.info-separator {
    border: none;
    height: 2.5px;
    background-color: rgba(255, 255, 255, 0.6);
    width: 70px;
    margin: 0 auto 15px auto;
    border-radius: 2px;
}

.country-card-description-overlay {
    font-family: 'Scheherazade New', 'Arial', sans-serif;
    font-size: 1.25em;
    line-height: 1.65;
    color: #e8e8e8;
    margin: 0;
    max-width: 95%;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
}

.no-countries-found {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 30px;
    font-size: 1.6em;
    color: #52616B;
    background-color: #fff;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
    font-family: 'Scheherazade New', sans-serif;
}

/* --- تعديلات للشاشات الأصغر (Responsive) --- */
@media (max-width: 1200px) {
    .countries-grid-professional {
        gap: 30px;
        padding: 0 30px;
    }

    .country-card-name {
        font-size: 2.1em;
    }

    .country-card-image-container {
        height: 350px;
    }

    .heritage-page-main-header .main-title {
        font-size: 2.5em;
        padding: 8px 20px;
    }

    .country-flag-icon {
        width: 60px;
        height: 60px;
        top: 15px;
        right: 15px;
    }
}

@media (max-width: 992px) {
    .countries-grid-professional {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 25px;
    }

    .country-card-image-container {
        height: 320px;
    }

    .country-card-name {
        font-size: 2em;
    }

    .heritage-page-main-header .main-title {
        font-size: 2.2em;
        padding: 8px 18px;
    }

    .country-card-description-overlay {
        font-size: 0.95em;
    }

    .country-flag-icon {
        width: 55px;
        height: 55px;
        top: 12px;
        right: 12px;
    }
}

@media (max-width: 768px) {
    .countries-showcase-wrapper {
        padding: 30px 15px;
    }

    .countries-grid-professional {
        padding: 0 10px;
        grid-template-columns: 1fr;
    }

    .country-card-image-container {
        height: 300px;
    }

    .country-card-name {
        font-size: 1.8em;
    }

    .country-card-info-overlay {
        padding: 20px 25px;
    }

    .country-card-description-overlay {
        font-size: 0.9em;
    }

    .heritage-page-main-header {
        margin: 20px auto 30px auto;
    }

    .heritage-page-main-header .main-title {
        font-size: 2em;
        padding: 6px 15px;
    }

    .no-countries-found {
        font-size: 1.3em;
        padding: 60px 20px;
    }

    .country-flag-icon {
        width: 50px;
        height: 50px;
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .country-card-image-container {
        height: 280px;
    }

    .country-card-name {
        font-size: 2.5em;
    }

    .info-separator {
        width: 50px;
        margin-bottom: 10px;
    }

    .country-card-description-overlay {
        font-size: 1.2em;
    }

    .heritage-page-main-header .main-title {
        font-size: 1.8em;
        padding: 5px 12px;
    }

    .country-flag-icon {
        width: 45px;
        height: 45px;
        top: 8px;
        right: 8px;
    }
}