/* =========================================================
   CLASIZO COUNTRY SELECTOR
   PERFORMANCE OPTIMIZED
========================================================= */


/* =========================
   RESET
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    min-width: 0;
    scroll-behavior: smooth;
}

body {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 0;

    font-family: "Montserrat", sans-serif;

    color: #0b1742;
    background: #f5f8fe;

    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    display: block;
    max-width: 100%;
}


/* =========================
   BACKGROUND
========================= */

.background {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    overflow: hidden;

    pointer-events: none;

    z-index: -1;

    background:
        radial-gradient(
            circle at 5% 5%,
            rgba(75, 135, 245, 0.20),
            transparent 27%
        ),
        radial-gradient(
            circle at 95% 95%,
            rgba(253, 181, 21, 0.12),
            transparent 25%
        ),
        linear-gradient(
            135deg,
            #f8fbff 0%,
            #f2f6fd 55%,
            #fafcff 100%
        );
}


/* =========================
   BACKGROUND BLOBS
========================= */

.blob {
    position: absolute;

    border-radius: 50%;

    pointer-events: none;

    /* Reduced blur for better rendering performance */
    filter: blur(70px);
}

.blob1 {
    width: 420px;
    height: 420px;

    top: -180px;
    left: -150px;

    background: rgba(75, 135, 245, 0.15);
}

.blob2 {
    width: 360px;
    height: 360px;

    right: -150px;
    bottom: -150px;

    background: rgba(253, 181, 21, 0.12);
}


/* =========================
   WORLD MAP
========================= */

.world-map {
    position: absolute;

    width: 1000px;
    max-width: 90vw;

    height: auto;

    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    opacity: 0.055;
}


/* =========================
   MAIN
========================= */

.hero {
    position: relative;

    width: 100%;

    padding:
        55px
        0
        30px;
}

.container {
    width: 92%;
    max-width: 1120px;

    margin: 0 auto;

    text-align: center;
}


/* =========================
   LOGO
========================= */

.logo {
    width: 190px;
    height: auto;

    margin:
        0 auto
        25px;

    filter:
        drop-shadow(
            0 5px 12px
            rgba(16, 43, 134, 0.08)
        );
}


/* =========================
   HEADING
========================= */

h1 {
    color: #102b86;

    font-size:
        clamp(
            40px,
            5vw,
            68px
        );

    line-height: 1.05;

    font-weight: 800;

    letter-spacing: -2.5px;

    margin: 0;
}

.subtitle {
    margin:
        18px auto
        50px;

    max-width: 650px;

    color: #71819d;

    font-size: 15px;

    line-height: 1.7;

    font-weight: 500;
}


/* =========================
   COUNTRY GRID
========================= */

.countries {
    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );

    gap: 24px;

    text-align: left;
}


/* =========================
   COUNTRY CARD
========================= */

.card {
    position: relative;

    display: block;

    width: 100%;
    min-width: 0;

    overflow: hidden;

    background: #ffffff;

    border:
        1px solid
        rgba(255, 255, 255, 0.9);

    border-radius: 24px;

    box-shadow:
        0 15px 40px
        rgba(24, 48, 105, 0.09);

    transition:
        box-shadow 0.35s ease,
        border-color 0.35s ease,
        transform 0.2s ease;

    transform-style: preserve-3d;

    /* Helps browser optimize transform animation */
    will-change: transform;
}

.card:hover {
    box-shadow:
        0 28px 65px
        rgba(16, 43, 134, 0.16);

    border-color:
        rgba(16, 43, 134, 0.15);
}


/* =========================
   IMAGE
========================= */

.image {
    position: relative;

    width: 100%;

    height: 255px;

    overflow: hidden;

    background: #e8edf6;
}

.image::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(5, 17, 54, 0) 35%,
            rgba(5, 17, 54, 0.18) 100%
        );

    pointer-events: none;
}

.image img {
    display: block;

    width: 100%;
    height: 255px;

    object-fit: cover;

    object-position: center center;

    transition:
        transform 0.65s
        cubic-bezier(
            0.2,
            0.8,
            0.2,
            1
        );
}

.card:hover .image img {
    transform: scale(1.06);
}


/* =========================
   CARD CONTENT
========================= */

.content {
    position: relative;

    width: 100%;

    min-height: 150px;

    padding:
        20px
        22px
        22px;

    background: #ffffff;
}


/* =========================
   FLAG
========================= */

.flag {
    display: block;

    margin-bottom: 8px;

    font-size: 22px;

    line-height: 1;
}


/* =========================
   COUNTRY NAME
========================= */

.content h2 {
    color: #102b86;

    font-size: 24px;

    line-height: 1.2;

    font-weight: 700;

    letter-spacing: -0.5px;

    margin-bottom: 8px;
}


/* =========================
   DESCRIPTION
========================= */

.content p {
    color: #7b8ba6;

    font-size: 12px;

    line-height: 1.5;

    font-weight: 500;

    margin-bottom: 17px;
}


/* =========================
   EXPLORE
========================= */

.explore {
    display: inline-flex;

    align-items: center;

    gap: 7px;

    color: #102b86;

    font-size: 12px;

    font-weight: 800;
}

.arrow {
    display: inline-block;

    font-size: 16px;
    line-height: 1;

    transition:
        transform 0.3s ease;
}

.card:hover .arrow {
    transform: translateX(5px);
}


/* =========================
   COMING SOON
========================= */

.coming-soon {
    margin-top: 42px;

    color: #6e7e99;

    font-size: 13px;

    font-weight: 600;

    text-align: center;
}


/* =========================
   FOOTER
========================= */

.footer {
    margin-top: 18px;

    padding:
        0
        0
        10px;

    color: #8a97ac;

    font-size: 14px;

    line-height: 1.8;

    text-align: center;
}

.footer strong {
    color: #102b86;
}

.footer span {
    margin:
        0
        5px;

    color: #b2bac8;
}

.footer a {
    color: #102b86;

    font-weight: 700;

    transition:
        color 0.25s ease;
}

.footer a:hover {
    color: #fdb515;
}


/* =========================
   CARD ANIMATION
========================= */

.card {
    opacity: 0;

    animation:
        cardReveal
        0.7s
        ease
        forwards;
}

.card:nth-child(1) {
    animation-delay: 0.10s;
}

.card:nth-child(2) {
    animation-delay: 0.20s;
}

.card:nth-child(3) {
    animation-delay: 0.30s;
}

.card:nth-child(4) {
    animation-delay: 0.40s;
}

@keyframes cardReveal {

    from {
        opacity: 0;

        transform:
            translateY(25px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }
}


/* =========================
   TABLET
========================= */

@media (max-width: 850px) {

    .hero {
        padding-top: 35px;
    }

    .container {
        width: 92%;
        max-width: 680px;
    }

    .logo {
        width: 175px;

        margin-bottom: 22px;
    }

    h1 {
        font-size: 44px;

        letter-spacing: -1.8px;
    }

    .subtitle {
        margin-bottom: 38px;

        font-size: 14px;
    }

    .countries {
        grid-template-columns: 1fr;

        gap: 20px;
    }

    .image {
        height: 240px;
    }

    .image img {
        height: 240px;
    }
}


/* =========================
   MOBILE
========================= */

@media (max-width: 480px) {

    .hero {
        padding:
            25px
            0
            25px;
    }

    .container {
        width: 92%;
    }

    .logo {
        width: 160px;

        margin-bottom: 20px;
    }

    h1 {
        font-size: 35px;

        line-height: 1.08;

        letter-spacing: -1.5px;
    }

    .subtitle {
        margin:
            14px auto
            30px;

        font-size: 12px;

        line-height: 1.7;
    }

    .countries {
        gap: 18px;
    }

    .image {
        width: 100%;

        height: 220px;
    }

    .image img {
        width: 100%;

        height: 220px;

        object-fit: cover;
    }

    .content {
        min-height: 145px;

        padding:
            17px
            18px
            20px;
    }

    .flag {
        font-size: 20px;

        margin-bottom: 7px;
    }

    .content h2 {
        font-size: 22px;

        margin-bottom: 7px;
    }

    .content p {
        font-size: 10px;

        margin-bottom: 14px;
    }

    .explore {
        font-size: 11px;
    }

    .coming-soon {
        margin-top: 30px;

        font-size: 11px;
    }

    .footer {
        margin-top: 15px;

        font-size: 13px;
    }
}


/* =========================
   VERY SMALL MOBILE
========================= */

@media (max-width: 360px) {

    h1 {
        font-size: 31px;
    }

    .image {
        height: 200px;
    }

    .image img {
        height: 200px;
    }

    .content h2 {
        font-size: 20px;
    }
}


/* =========================
   REDUCED MOTION
========================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}