
:root {
    --primary: #9b111e;
    --primary-dark: #7b0d19;
    --text: #222;
    --muted: #555;
    --bg-light: #f5f5f5;
    --radius: 12px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    --transition: all 0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", system-ui, sans-serif;
}
html {
    scroll-behavior: smooth;
}
body {
    color: var(--text);
    line-height: 1.6;
    background:#fff5f5;
}

section {
    margin: 3rem auto;
    padding: 0 1rem;
}
.section-title {
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.btn-primary,
.btn-login {
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
    text-decoration: none;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}
.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}
.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.05rem;
}
.btn-login {
    margin-left: auto;
    background: #fff;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 0.8rem 1.6rem;
    border-radius: 12px;
    line-height: 1;
}
.btn-login:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-1px);
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: saturate(180%) blur(12px);
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}
.nav-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 1rem;
}
.logo {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.nav-links {
    list-style: none;
    display: flex;
    gap: 1.75rem;
    margin-left: 1rem;
    align-items: center;
}
.nav-links a {
    text-decoration: none;
    color: var(--text);
    font-weight: 600;
    position: relative;
    padding: 0.25rem 0;
}
.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.25s ease;
}
.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}


.hero {
    width: 100%;
    padding: 4rem;
    position: relative;
    overflow-x: hidden;
    overflow-y: visible;
    margin: 0;
}
.hero-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3rem;
}
.hero-content {
    max-width: 520px;
}
.hero-img {
    width: 100%;
    max-width: 450px;
    height: auto;
}
.hero h1 {
    font-size: clamp(2rem, 5vw + 1rem, 3.2rem);
    line-height: 1.2;
    margin-bottom: 1rem;
}
.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
}
.hero::before{
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);

    /*  size of the bar  */
    width: 130%;              /*  a little wider than the viewport */
    height: 260px;            /*  vertical thickness of the glow   */

    /*  colour + fade-out  */
    background: radial-gradient(
        ellipse at center,
        rgba(155, 17, 30, 0.43) 0%,   /*  centre colour & intensity  */
        rgba(155, 17, 30, 0) 70%      /*  edge fully transparent     */
    );

    filter: blur(80px);       /*  softness of the glow            */
    pointer-events: none;     /*  keeps it from intercepting clicks */
    z-index: -1;              /*  pushes it behind the hero content */
}


@media (min-width: 768px) {
    .hero {
        text-align: left;
    }
    .hero-inner {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
        align-items: center;
    }
    .hero-content {
        max-width: 540px;
    }
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}
.card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}
.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}
.card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}
.card p {
    font-size: 0.9rem;
    margin-bottom: 1.25rem;
    color: var(--muted);
}

details {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}
details summary {
    cursor: pointer;
    font-weight: 600;
}

.faq {
    background: #fff5f5;
    padding: 3rem 1rem;
    width: 100%;
    margin: 0;
}
.faq-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
}
.faq-title{
    font-size:clamp(1.2rem, 3vw, 2.8rem);
    text-align:left;
    padding-left:0;
    margin:0;
    display:flex;
    flex-direction:column;
    align-items:flex-start;
}
.faq-items details {
    background:transparent;
    border:none;
    border-bottom:1px solid #d8e0e6;
    border-radius:0;
    box-shadow:none;
    padding: 0rem;
    margin:0;
    overflow:visible;
}
.faq-items summary {
    padding:.8rem 0;
    font-size:1rem;
    font-weight:600; 
}
.faq-items details + details {
    margin-top:.35rem;
}

.faq-items p{
    padding:.75rem 0 1rem;
    font-size:.9rem;
    color:#4b5563;
    line-height:1.4;
}

.faq-items summary::after{
    width:11px;
    height:11px;
    border-width:2px;
    border-color:#374151;
}

.faq-items summary:hover{
    background:transparent
}

.faq-items ul {
    margin:.6rem 0 .8rem;
    padding-left:1.1rem;
}

.faq-items li {
    margin-bottom:.3rem;
}

.brand{
    display:flex;
    align-items:center;
    gap:.55rem;
    text-decoration:none;
}

.brand__img{
    width:84px;
    height:auto;
    object-fit:contain;
    border-radius:0;
}

.brand__img--home{
    width:42px;
}

.brand__img--faq{
    width:42px;
}

.brand__img--terms{
    width:42px;
}


.brand__text{
    font-size:1.35rem;
    font-weight:700;
    letter-spacing:-.3px;
    color:var(--text);
}

.brand:hover .brand__text{color:var(--primary);}

@media (max-width: 768px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }
    .faq-title {
        margin-bottom: 2rem;
        text-align: center;
    }
}

.bell-curve{
    display:flex;
    align-items:flex-end;
    justify-content:center;
    gap:6px;
    width:100%;
    max-width:630px;
    height:190px;
    margin:0 auto;
    overflow: visible;
}

@media (max-width:600px){
    .bell-curve{
        height:140px;
        gap:3px;
    }
    .bell-curve span{
        flex:0 0 4px;
    }
}


.bell-curve span{
    flex:0 0 8px;
    height:0;
    background:var(--primary);
    border-radius:0;
    animation:popUp .8s forwards;
    animation-delay:calc(var(--i) * .04s);
}

.bell-curve span:nth-child(n){
    --i:calc(var(--n,0));
}

.bell-curve span{
    position:relative;                       /* anchor for ::after  */
    display:inline-block;
}

.bell-curve span::after{
    content:attr(data-label);
    position:absolute;
    bottom:100%; left:50%;
    transform:translateX(-50%) translateY(-.4rem);
    padding:.15rem .4rem;
    border-radius:4px;
    font-size:.7rem;
    background:#222; color:#fff;
    white-space:nowrap; line-height:1.3;
    opacity:0; pointer-events:none;
    transition:opacity .18s ease;
    font-size: .9rem;
    padding: .25rem .55rem;
    white-space: pre;
    z-index: 10;
}

.bell-curve span::before{
    content:"";
    position:absolute;
    bottom:100%;
    left:50%;
    transform:translateX(-50%) translateY(6px);

    width:0;height:0;
    border:6px solid transparent;
    border-top-color:#222;

    opacity:0;
    pointer-events:none;
    transition:opacity .18s ease;
    z-index:9;
}

.bell-curve span:hover::before,
.bell-curve span:focus-visible::before{
    opacity:1;
}


.bell-curve span:hover::after,
.bell-curve span:focus-visible::after{
    opacity:1;
}
  
.bell-curve span.default::after,
.bell-curve span.default::before{
    opacity: 1;
}

.bell-curve:hover span.default::after,
.bell-curve:hover span.default::before{
    opacity: 0;
}

.bell-curve:not(:hover) span.default::after{
    content: "Find out your IQ";
    transform: translateX(-.5rem) translateY(-.3rem);
    text-align: left;
}

@supports (counter-set: section) {
    .bell-curve{
        counter-reset:idx;
    }
    .bell-curve span{
        counter-increment:idx;
        --n:counter(idx);
    }
}

@keyframes popUp {
    to { 
        height:var(--h); 
    }
}

.material-symbols-rounded,
.material-icons{
    color: var(--primary);
    font-variation-settings:'wght' 600;
    font-size: 2.5rem;
    vertical-align: -2px;
}

.strip{
    background: #fff5f5;
    padding: 4rem 1rem;
    margin-inline: 0;
    margin: 0;
    position: relative;
}

.icon-inline{
    font-size: 1.25em;
    margin: .25em;
    vertical-align: -.15em;
    color: var(--text);
}

.section-lead{
    margin: -1rem auto 3rem;
    text-align:center;
    font-size:clamp(1.05rem, 1vw + .9rem, 1.25rem);
    line-height:1.55;
    color:var(--muted);
}

.feature-split{
    padding:4rem 1rem;
    margin: 0 auto 3rem;
}

.feature-inner{
    max-width:1200px;
    margin:0 auto;
    display:flex;
    flex-direction:column;
    gap:3rem;
    align-items:center;
}

@media (min-width:768px){
    .feature-inner{flex-direction:row;}
}

@media (max-width:767.98px){
    .hero h1, .hero p{
        text-align:center;
    }
    .nav-container{
        justify-content:space-between;
        gap:.75rem;
    }

    .btn-login{
        margin-left:0;
        padding:.55rem 1rem;
        font-size:.9rem;
        border-width:1.5px;
        flex-shrink:0;
    }
    .faq-title{
        flex-direction:row;
    }
    .faq-title span{
        margin-right:.25em;
    }
    .faq-title span:last-child{
        margin-right:0;
    }
}


.feature-text{flex:1;}

.feature-head{
    font-size:2rem;
    line-height:1.2;
    margin-bottom:1.25rem;
}

.feature-text p{
    margin-bottom:1.25rem;
    color:var(--muted);
}

.feature-img{
    flex:1;
}

.feature-img img{
    width:100%;
    height:auto;
}

footer{
    font-size:1rem;
    background:var(--primary-dark);
}

.footer-top,
.footer-bottom{
    margin:0 auto;
    padding:1.4rem 2rem;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.footer-brand{
    display:flex;
    align-items:center;
    gap:.6rem;
    font-weight:700;
    text-decoration:none;
}
.footer-brand img{
    width:42px;
    height:42px;
    border-radius:50%;
    object-fit:cover;
}

.footer-contact a{
    color:#FFAE6D;
    font-weight:700;
    text-decoration:none;
}

.footer-bottom{
    padding:1rem 2rem;
    font-size:.85rem;
}
.copy{margin:0;font-weight:600;}

.footer-nav{
    display:flex;
    gap:1.4rem;
}
.footer-nav a{
    text-decoration:none;
    position:relative;
}
.footer-nav a:not(:first-child)::before{
    content:"";
    position:absolute;
    left:-.75rem;
    top:50%;
    transform:translateY(-50%);
    width:1px;
    height:60%;
}

.footer-nav a:hover{
    color:#d1d1d1;
}

footer,
footer a,
.footer-brand span,
.footer-contact,
.copy {
    color:#fff;
}

/* --- mobile stack ---------------------------------------------------- */
@media (max-width:600px){
    .footer-top,
    .footer-bottom{
        flex-direction:column;
        gap:1rem;
        text-align:center;
    }
    .footer-nav a::before{display:none;}  /* drop dividers on narrow */
}

.countries-section{
    background:#ffffff;
    padding:4rem 1rem;
    margin:0;
}
.carousel-wrapper{
    max-width:1200px;
    margin:0 auto;
    position:relative;
}
.countries-carousel{
    display:flex;
    gap:1rem;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    -webkit-overflow-scrolling:touch;
    padding:1rem 0;
}
.country{
    flex:0 0 auto;
    min-width:180px;
    display:flex;
    align-items:center;
    gap:.9rem;
    background:#fff5f5;
    border-radius:8px;
    padding:.75rem 1rem;
    box-shadow:var(--shadow);
}
.country .flag{
    width:2rem;
    height:2rem;
}
.text-wrapper{
    display:flex;
    flex-direction:column;
    line-height:1.2;
}
.rating{
    font-size:1.25rem;
    font-weight:700;
    margin:0;
}
.name{
    font-size:.9rem;
    color:var(--muted);
}

.scroll-btn{
    position:absolute;top:50%;
    transform:translateY(-50%);
    width:40px;height:40px;
    display:flex;justify-content:center;align-items:center;
    background:#fff;color:var(--primary);
    border:none;border-radius:50%;
    box-shadow:var(--shadow);
    cursor:pointer;transition:var(--transition);
}
.scroll-btn:hover{background:var(--primary);color:#fff;}
.scroll-left{left:-20px;}
.scroll-right{right:-20px;}

.countries-grid{
    display:grid;
    grid-template-columns:repeat(5,1fr);
    gap:1rem;
    max-width:1200px;
    margin:0 auto;
}
@media (max-width:900px){
    .countries-grid{grid-template-columns:repeat(3,1fr);}
}
@media (max-width:600px){
    .countries-grid{grid-template-columns:repeat(2,1fr);}
}
.countries-grid .country:nth-child(n+11){display:none;}
.countries-grid.expanded .country{display:flex;}

.btn-show{
    margin:2rem auto 0;
    display:block;
    background:#fff;
    border:2px solid var(--primary);
    color:var(--primary);
    padding:.6rem 1.4rem;
    border-radius:var(--radius);
    font-weight:600;
    cursor:pointer;
    transition:var(--transition);
}
.btn-show:hover{
    background:var(--primary);
    color:#fff;
}

#tests .cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

@media (max-width: 1024px) {
    #tests .cards {
        grid-template-columns: repeat(2, 1fr);/* 2 cards per row    */
    }
}

@media (max-width: 600px) {
    #tests .cards {
        grid-template-columns: 1fr;
    }
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 32px;
    height: 32px;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* shrink-point — 768 px is same as your hero grid flip  */
@media (max-width: 767.98px) {
    .nav-toggle { 
        display: flex;
    }
    .nav-links{
        position:fixed;
        top:0; left:0;
        height:100dvh;             /* full viewport height, mobile-safe  */
        width:260px;
        margin-left: 0;
        padding:3rem 1.5rem 2rem;
        flex-direction:column;
        gap:1.25rem;
        background:#fff;
        box-shadow:2px 0 12px rgba(0,0,0,.08);
        transform:translateX(-100%);
        transition:transform .5s cubic-bezier(.33,1.55,.68,1);
        z-index:1200;                       /* above header               */
    }

    /* push links down a bit more readable */
    .nav-links a{padding:.25rem 0;font-size:1.05rem;}

    /* when JS adds .open … */
    .nav-links.open{transform:translateX(0);}   /* slide in                */

    /* animate hamburger to X ------------- */
    .nav-toggle.open span:nth-child(1){transform:translateY(4px) rotate(45deg);}
    .nav-toggle.open span:nth-child(2){opacity:0;}
    .nav-toggle.open span:nth-child(3){transform:translateY(-4px) rotate(-45deg);}
    
    .hero-content{
        text-align:center;          /* <-- key line */
    }

    .hero-content .btn-primary{
        display:inline-block;       /* default for <a>, keep it explicit */
        margin:1.25rem auto 0;      /* auto L/R centers it */
    }
}

.card-logo{
    width: 120px;
    aspect-ratio: 1 / 1;
    object-fit: contain;

    display: block;
    margin: 0 auto .5rem;      /* 1 rem gap below the logo */

    background: #fff;
    border-radius: 12px;

    transition: transform .25s ease;
}
.card:hover .card-logo{
    transform: scale(1.06);
}

.tests-carousel{
    scroll-snap-type:x mandatory;
    overflow-x:auto;
    padding-bottom:.5rem;
}

.tests-carousel>.card{
    scroll-snap-align:start;
    width:260px;          /* stop cards stretching on phones   */
}

@media (min-width:768px){
    .tests-carousel{overflow:visible;}   /* back to CSS grid          */
    .tests-carousel>.card{width:auto;}
}

.arrow{
    position:absolute;
    top:50%;                    /* vertically centred in the strip             */
    transform:translateY(-50%);
    width:42px;height:42px;
    display:flex;justify-content:center;align-items:center;
    border:none;border-radius:50%;
    background:#fff;
    color:var(--primary);
    font-size:1.8rem;           /* so &#8249; / &#8250; look like chevrons      */
    box-shadow:var(--shadow);
    cursor:pointer;
    transition:var(--transition);
}
.arrow:hover{background:var(--primary);color:#fff;}
.arrow-left {left:8px;}         /* tweak if you want them tighter/looser       */
.arrow-right{right:8px;}

@media(max-width:767.98px){     /* hide them on touch devices – swipe instead  */
    .arrow{display:none;}
}

.game-list-container{
    overflow:hidden;
    padding:0 48px;             /* leaves space for the arrows’ circles        */
}

/* === adaptive carousel === */
.cards.tests-carousel{          /* more specific so it overrides .cards grid   */
    display:flex;
    gap:1.5rem;
    overflow-x:auto;
    scroll-snap-type:x mandatory;
    padding-bottom:.5rem;
    scrollbar-width:none;       /* Firefox */
}
.cards.tests-carousel::-webkit-scrollbar{display:none;}  /* Chrome / Safari */

.cards.tests-carousel>.card{
    flex:0 0 260px;             /* fixed width so they line up horizontally    */
    scroll-snap-align:start;
}

@media(min-width:768px){
    .cards.tests-carousel{
        display:grid;
        overflow:visible;       /* grid doesn’t need side-scroll               */
        grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
    }
    .cards.tests-carousel>.card{flex:0 0 auto;}
}


.btn-icon {
    display:flex;
    align-items:center;
    justify-content:center;
    width:2.75rem;
    height:2.75rem;
    padding:0;
    font-size:0;
}

.btn-icon::before{
    content:"\f007";
    font-family:"Font Awesome 6 Free";
    font-weight:900;
    font-size:1.25rem;
    line-height:1;
}

.btn-icon .btn-label{
    display:none;
}

@media (min-width:768px){
    .btn-icon{
      width:auto;
      height:auto;
      padding:.55rem 1rem;
      font-size:inherit;
    }
    .btn-icon::before{content:none;}
    .btn-icon .btn-label{display:inline; white-space:nowrap;}
  }