@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@700&family=Open+Sans&display=swap');

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(to bottom, #ffffff, #f7f7f7);
    color: #000;
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Links */
a {
    text-decoration: none;
    color: #000;
    transition: color 0.3s ease;
}
a:hover, a:focus {
    color: #4aecff;
}

/* Intro Logo Animation */
#intro-logo {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    z-index: 2500;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    animation: introLogoFadeScale 3.5s forwards;
    background: #141420;
    width: 100vw;
    height: 100vh;
    user-select: none;
}
#intro-logo img {
    width: 100%;
    max-width: 600px;
    object-fit: contain;
}
body.loading {
    overflow: hidden;
}

/* Header */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    backdrop-filter: blur(16px);
    background: rgba(20, 20, 40, 0.85);
    box-shadow: 0 2px 8px rgb(0 0 0 / 0.6);
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 15px 3rem;
    z-index: 1100;
    transition: all 0.4s ease;
}
header.shrink {
    padding: 7px 1.5rem;
    background: rgba(15, 15, 35, 0.9);
    box-shadow: 0 2px 12px rgb(0 172 255 / 0.8);
}
header img.logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 12px;
    transition: all 0.4s ease;
}
header.shrink img.logo {
    width: 36px;
    height: 36px;
}
header h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 2.3rem;
    color: #fff;
    margin-left: 8px;
}
header.shrink h1 {
    font-size: 1.45rem;
}
header .caption {
    font-size: 1rem;
    color: #a1a9b8;
    font-style: italic;
    white-space: nowrap;
    margin-left: 12px;
    transition: opacity 0.4s ease;
}
header.shrink .caption {
    opacity: 0;
    visibility: hidden;
    height: 0;
}

/* Navigation */
nav {
    margin-top: 110px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 3px 20px rgba(42, 130, 216, 0.4);
    position: sticky;
    top: 67px;
    z-index: 1050;
    border-radius: 0 0 16px 16px;
}
nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 2rem;
    padding: 0.8rem 0;
}
nav li a {
    font-weight: 600;
    font-size: 1.15rem;
    padding: 6px 10px;
    border-radius: 8px;
    transition: 0.3s ease;
}
nav li a:hover {
    color: #4aecff;
    background-color: #f7f7f7;
}

/* Main content */
main {
    max-width: 900px;
    margin: 4rem auto 5rem auto;
    padding: 0 1.5rem;
}

/* Section base */
section {
    margin-bottom: 5rem;
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 12px;
}
section h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 2.75rem;
    color: #000;
    margin-bottom: 2rem;
}
section p, section address {
    font-size: 1.1rem;
    max-width: 680px;
    margin: 28px auto 0;
    color: #000;
}

/* Hero Section */
#home {
    width: 100%;
    height: calc(100vw * 9 / 16);
    max-height: 700px;
    background: url('datas/image 1.jpg') center/contain no-repeat;
    padding: 6rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 12px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.7);
}

/* Benefits section */
.benefits-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 800px;
    margin: 0 auto;
}

/* Common item styles */
.benefit-item {
    width: calc(50% - 10px);
    text-align: center;
    margin-bottom: 30px;
}

.benefit-item img {
    width: 100%;
    max-width: 220px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

/* Hover and focus pop-up effect */
.benefit-item img:hover,
.benefit-item img:focus {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

/* Last (7th) item centered in its own row */
.center-item {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Cards */
.card-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}
.card-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    width: 100%;
    max-width: 700px;
}
.card {
    flex: 1 1 clamp(200px, 40vw, 322px);
}
.card img {
    width: 100%;
    aspect-ratio: 322 / 206;
    object-fit: contain;
    border-radius: 20px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
    background: #fff;
    transition: transform 0.3s ease;
}
.card img:hover {
    transform: scale(1.05);
}

/* Buttons */
.view-details, .criteria, .download-button {
    margin-top: 1rem;
    padding: 10px 20px;
    background: #08172b;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}
.view-details:hover, .criteria:hover, .download-button:hover {
    background: #208bc8;
}

/* Footer */
footer {
    text-align: center;
    color: #666;
    padding: 3rem 1rem 5rem;
    font-size: 1rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1600;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    overflow-y: auto;
    background: rgba(3, 3, 14, 0.8);
    backdrop-filter: blur(6px);
}
.modal-content {
    background: #1b1e2a;
    margin: 4rem auto;
    padding: 2.5rem 3.5rem;
    border-radius: 14px;
    max-width: 720px;
    color: #bfdbf7;
    box-shadow: 0 0 35px 10px rgba(74, 236, 255, 0.3),
                inset 0 0 10px 3px rgba(74, 236, 255, 0.25);
}
.close-btn {
    position: absolute;
    top: 1rem;
    right: 1.4rem;
    font-size: 2.4rem;
    color: #4aecff;
    background: none;
    border: none;
    cursor: pointer;
}
.close-btn:hover {
    color: #8ef6ff;
}

/* Keyframes */
@keyframes introLogoFadeScale {
    0% { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
    20%, 70% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) scale(2); }
}

/* RESPONSIVE DESIGN */
@media (max-width: 720px) {
    header h1 {
        font-size: 1.6rem;
    }
    nav ul {
        flex-wrap: wrap;
        gap: 1.25rem;
    }
    section h2 {
        font-size: 2rem;
    }
    section p, section address {
        font-size: 1rem;
    }
    .card-container {
        padding: 0 1rem;
    }
    .card-row {
        flex-direction: column;
        align-items: center;
    }
    .card {
        width: 100%;
        padding: 0 1rem;
    }
    .card img {
        width: 100%;
        object-fit: cover;
        border-radius: 16px;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    }
    .view-details, .criteria {
        width: 130px;
        font-size: 0.95rem;
    }
}
