/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    list-style: none;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}

/* Header */
header {
    min-height: 100vh;
    width: 100%;
    background-image: linear-gradient(rgba(0, 40, 85, 0.7), rgba(7, 18, 63, 0.879)), url(pics/cvr.webp);
    background-position: center;
    background-size: cover;
    position: relative;
}

@font-face {
    font-family: 'Modernline Bold';
    src: url('../fonts/modernline.otf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Nav */
nav {
    display: flex;
    padding: 2% 6%;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    position: absolute;
    top: 50%;
    left: 30px;
    transform: translateY(-50%);
    width: 200px;
    height: auto;
    object-fit: contain;
}

.social-icons {
    display: flex;
    gap: 10px;
    position: absolute;
    top: 50%;
    right: 30px;
    transform: translateY(-50%);
    align-items: center;
}

.navlinks {
    flex: 1;
    display: flex;
    justify-content: center;
}

.navlinks ul {
    display: flex;
    align-items: center;
}

.navlinks ul li {
    display: inline-block;
    padding: 8px 12px;
    position: relative;
}
.navlinks ul li a {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
}

.navlinks ul li::after {
    content: '';
    width: 0%;
    height: 2px;
    background: #fff;
    display: block;
    margin: auto;
    transition: 0.5s;
}

.navlinks ul li:first-child::after {
    width: 100%;
}

.navlinks ul li:hover::after {
    width: 100%;
}
.join-us a{
    color: white;
    padding:8px 12px;
    border-radius: 10px;
    border: 1px solid white;
    text-decoration: none;
    display: inline-block; 
    margin-left: 20px;
    transition: all 0.4s ease;
}
.join-us a:hover {
    background-color: white;   
    color: #002855;           
}

.social-icons img:hover {
    filter: brightness(0) invert(0.7);
}

.icon {
    width: 24px;
    height: 24px;
}

.burger {
    display: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
}

.logo-resp {
    display: none;
}
.navlinks .join-usm {
    display: none;
}
.navlinks .join-usm:hover::after {
    width: 0%;
}


/* Textbox */
.textbox {
    width: 90%;
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.textbox h1 {
    font-size: clamp(40px, 8vw, 70px);
    color: white;
    text-align: center;
    font-weight: 750;
}

.textbox span {
    font-size: clamp(20px, 5vw, 30px);
    margin: 50px 0 40px;
    color: white;
    animation: pulse 3s infinite;
    font-family: 'Modernline Bold', sans-serif;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        color: #002855;
        text-shadow: none;
    }
    50% {
        transform: scale(1.05);
        color: #fff;
        text-shadow: 0 0 8px rgba(0, 40, 85, 0.7);
    }
}

/* Main Content */
.welcome-section {
    padding: clamp(20px, 5vw, 50px) clamp(10px, 3vw, 20px);
    text-align: center;
    background-image: url(pics/bg.png);
    background-size: cover;
    background-position: center;
}

.welcome-section h2 {
    font-size: clamp(24px, 5vw, 36px);
    color: #002855;
    margin-bottom: clamp(10px, 2vw, 20px);
}

.welcome-section p {
    font-size: clamp(14px, 3vw, 16px);
    color: #4d4848;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

@media screen and (max-width: 970px) {
    /* mettre nav en flex */
    nav {
        display: flex;
        justify-content: space-between; /* logo à gauche, burger à droite */
        align-items: center;
        padding: 15px 20px;
        position: relative;
    }

    /* cacher logo desktop */
    .logo {
        display: none;
    }

    /* logo responsive visible */
    .logo-resp {
        display: flex;
        align-items: center;
    }

    .logo-resp img {
        width: clamp(120px, 25vw, 180px); /* plus grand */
        height: auto;
    }

    /* burger */
    .burger {
        display: block;
        font-size: clamp(26px, 6vw, 36px); /* plus grand */
        color: white;
        cursor: pointer;
        z-index: 20;
    }

    /* menu */
    .navlinks {
        display: none;
        flex-direction: column;
        position: absolute;
        align-items: center;
        justify-content: center;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(0, 40, 85, 0.9);
        padding-bottom: 20px;
        z-index: 10;
    }

    .navlinks.active {
        display: flex;
    }

    .navlinks ul {
        flex-direction: column;
        padding: 0;
        margin: 0;
        width: 100%;
        text-align: center;
    }

    .navlinks ul li {
        padding: 15px 0;
    }

    .navlinks ul li a {
        font-size: clamp(18px, 4.5vw, 24px);
        color: white;
        text-decoration: none;
    }
    .navlinks.active .join-usm {
        display: block;
        padding: 15px 0;
    }
    .join-usm a{
        border: 1px solid white;
        border-radius: 10px;
        padding:8px 12px;
    }
    .join-us {
        display: none; 
    }

    .social-icons {
        display: none;
    }
}
