/* =========================================================
   COUNTRIES PAGE
========================================================= */

.countries-page {
    min-height: 100vh;

    background:
        radial-gradient(
            circle at 5% 15%,
            rgba(102, 72, 245, .08),
            transparent 25%
        ),
        radial-gradient(
            circle at 95% 80%,
            rgba(102, 72, 245, .07),
            transparent 25%
        ),
        #f7f6ff;
}


/* =========================================================
   CONTENT
========================================================= */

.countries-content {
    padding-top: 55px;
    padding-bottom: 90px;
}


/* =========================================================
   HEADING
========================================================= */

.countries-heading {
    display: flex;

    justify-content: space-between;

    align-items: flex-end;

    gap: 30px;

    margin-bottom: 30px;
}


.section-label {
    display: block;

    margin-bottom: 8px;

    color: #6548f4;

    font-size: 11px;

    font-weight: 900;

    letter-spacing: 3px;
}


.countries-heading h1 {
    margin: 0;

    color: #17285f;

    font-size: clamp(40px, 5vw, 58px);

    line-height: 1.05;

    font-weight: 900;
}


.countries-heading p {
    max-width: 650px;

    margin: 12px 0 0;

    color: #7582a4;

    font-size: 16px;

    line-height: 1.65;
}


/* =========================================================
   COUNT
========================================================= */

.countries-count {
    min-width: 110px;

    padding: 14px 20px;

    text-align: center;

    background: #ffffff;

    border: 1px solid #e4dfff;

    border-radius: 17px;

    box-shadow:
        0 10px 28px rgba(55, 43, 150, .07);
}


.countries-count strong {
    display: block;

    color: #6045eb;

    font-size: 27px;

    font-weight: 900;
}


.countries-count span {
    display: block;

    margin-top: 2px;

    color: #8993af;

    font-size: 11px;
}



/* =========================================================
   GRID
========================================================= */

.countries-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 24px;
}



/* =========================================================
   COUNTRY CARD
========================================================= */

.country-card {
    overflow: hidden;

    background: #ffffff;

    border: 1px solid #e4dfff;

    border-radius: 22px;

    box-shadow:
        0 10px 30px rgba(60, 45, 150, .08);

    opacity: 0;

    transform: translateY(18px);

    transition:
        opacity .45s ease,
        transform .3s ease,
        box-shadow .3s ease,
        border-color .3s ease;
}


.country-card-visible {
    opacity: 1;

    transform: translateY(0);
}


.country-card:hover {
    transform: translateY(-7px);

    border-color: #c8bdff;

    box-shadow:
        0 20px 45px rgba(70, 50, 170, .15);
}



/* =========================================================
   IMAGE
========================================================= */

.country-image {
    position: relative;

    height: 220px;

    overflow: hidden;

    background:
        linear-gradient(
            135deg,
            #ebe8ff,
            #f8f7ff
        );
}


.country-image img {
    width: 100%;
    height: 100%;

    display: block;

    object-fit: cover;

    transition:
        transform .45s ease;
}


.country-card:hover .country-image img {
    transform: scale(1.05);
}


/* overlay */

.country-image::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(18, 15, 45, .22),
            transparent 55%
        );

    pointer-events: none;
}



/* =========================================================
   CARD BODY
========================================================= */

.country-card-body {
    padding: 20px 21px 22px;
}


.country-card-title {
    margin: 0;

    color: #17285f;

    font-size: 21px;

    line-height: 1.3;

    font-weight: 800;
}


.country-card-description {
    margin: 10px 0 0;

    color: #7885a6;

    font-size: 14px;

    line-height: 1.65;
}


.country-card-description:empty {
    display: none;
}



/* =========================================================
   FOOTER CARD
========================================================= */

.country-card-footer {
    display: flex;

    align-items: center;

    gap: 7px;

    margin-top: 17px;

    padding-top: 14px;

    border-top: 1px solid #eeeafa;

    color: #8993ad;

    font-size: 12px;

    font-weight: 700;
}


.country-dot {
    width: 7px;
    height: 7px;

    border-radius: 50%;

    background: #6045eb;

    box-shadow:
        0 0 0 4px rgba(96, 69, 235, .10);
}



/* =========================================================
   EMPTY
========================================================= */

.countries-empty {
    grid-column: 1 / -1;

    min-height: 300px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    padding: 45px 25px;

    text-align: center;

    background: rgba(255,255,255,.75);

    border: 1px dashed #d6cff5;

    border-radius: 23px;
}


.countries-empty-icon {
    width: 76px;
    height: 76px;

    display: flex;

    align-items: center;

    justify-content: center;

    margin-bottom: 18px;

    border-radius: 22px;

    background:
        linear-gradient(
            145deg,
            #6548f4,
            #8970ff
        );

    color: white;

    font-size: 31px;

    box-shadow:
        0 14px 30px rgba(91,67,237,.20);
}


.countries-empty h3 {
    margin: 0;

    color: #17285f;

    font-size: 23px;
}


.countries-empty p {
    max-width: 550px;

    margin: 10px 0 0;

    color: #7b87a6;

    line-height: 1.7;
}



/* =========================================================
   FOOTER
========================================================= */

footer a {
    color: inherit;

    text-decoration: none;
}


footer a:hover {
    color: #6548f4;
}



/* =========================================================
   DARK THEME
========================================================= */

html.dark,
body.dark,
body.dark-theme {
    color-scheme: dark;
}


body.dark .countries-page,
body.dark-theme .countries-page {
    background:
        radial-gradient(
            circle at 5% 15%,
            rgba(102,72,245,.12),
            transparent 25%
        ),
        radial-gradient(
            circle at 95% 80%,
            rgba(102,72,245,.09),
            transparent 25%
        ),
        #0d0b1b;
}


body.dark .countries-heading h1,
body.dark-theme .countries-heading h1,
body.dark .country-card-title,
body.dark-theme .country-card-title,
body.dark .countries-empty h3,
body.dark-theme .countries-empty h3 {
    color: #ffffff;
}


body.dark .countries-heading p,
body.dark-theme .countries-heading p,
body.dark .country-card-description,
body.dark-theme .country-card-description,
body.dark .countries-empty p,
body.dark-theme .countries-empty p {
    color: #a1a9c6;
}


body.dark .countries-count,
body.dark-theme .countries-count,
body.dark .country-card,
body.dark-theme .country-card,
body.dark .countries-empty,
body.dark-theme .countries-empty {
    background: #191632;

    border-color: #302958;

    box-shadow:
        0 15px 35px rgba(0,0,0,.24);
}


body.dark .countries-count strong,
body.dark-theme .countries-count strong {
    color: #a08cff;
}


body.dark .countries-count span,
body.dark-theme .countries-count span {
    color: #9ca5c3;
}


body.dark .country-card:hover,
body.dark-theme .country-card:hover {
    border-color: #5e50a0;
}


body.dark .country-image,
body.dark-theme .country-image {
    background:
        linear-gradient(
            135deg,
            #252047,
            #17152c
        );
}


body.dark .country-card-footer,
body.dark-theme .country-card-footer {
    border-color: #302958;

    color: #9ca5c3;
}


body.dark .countries-empty,
body.dark-theme .countries-empty {
    border-color: #413865;
}



/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1000px) {

    .countries-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 700px) {

    .countries-content {
        padding-top: 35px;

        padding-bottom: 60px;
    }


    .countries-heading {
        flex-direction: column;

        align-items: flex-start;
    }


    .countries-count {
        width: 100%;

        box-sizing: border-box;
    }


    .countries-grid {
        grid-template-columns: 1fr;
    }


    .country-image {
        height: 230px;
    }


    .countries-empty {
        min-height: 270px;

        padding: 30px 20px;
    }

}