/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* FULL HEIGHT + NO SCROLL */
html, body {
    height: 100%;
    overflow: hidden; /* removes scrollbar */
}

/* BODY */
body {
    font-family: 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, #020617, #0b0f1a);
    color: white;
    animation: pageFade 0.6s ease;
}

@keyframes pageFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* PARTICLES BACKGROUND */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 0;
}

/* WRAPPER */
.wrapper {
    position: relative;
    z-index: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 100vh;
}

/* TITLE (FIXED ISSUE 🔥) */
.title {
    position: relative;
    z-index: 20; /* 🔥 always above cards */

    font-size: 30px;
    font-weight: 700;
    margin: 20px 0 10px;
    letter-spacing: 1px;

    opacity: 0;
    animation: titleEntry 1s ease forwards;
    margin-bottom: 25px;
}

@keyframes titleEntry {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CONTAINER */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
}

/* CARD */
.card {
    width: 280px;
    padding: 20px;
    border-radius: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;

    backdrop-filter: blur(15px);
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);

    transition: transform 0.3s ease, box-shadow 0.3s ease;

    opacity: 0;
    animation: fadeIn 0.8s ease forwards;

    z-index: 2;
}

.card:nth-child(1) { animation-delay: 0.2s; }
.card:nth-child(2) { animation-delay: 0.5s; }
.card:nth-child(3) { animation-delay: 0.8s; }

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* GRADIENT CARDS */
.card:nth-child(1) {
    background: linear-gradient(135deg, #0DFFA9, #0D4DFF);
}
.card:nth-child(2) {
    background: linear-gradient(135deg, #FF0A6C, #4A3CDB);
}
.card:nth-child(3) {
    background: linear-gradient(135deg, #00C0FF, #4218B8);
}

/* HOVER (FIXED z-index 🔥) */
.card:hover {
    transform: translateY(-12px) scale(1.06);
    z-index: 5;

    box-shadow: 
        0 20px 50px rgba(0,0,0,0.7),
        0 0 25px rgba(255,255,255,0.4),
        0 0 15px rgba(139, 92, 246, 0.6);
}

/* IMAGE */
.hospital-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    margin: 12px 0;
    border: 2px solid rgba(255,255,255,0.3);
}

/* TEXT */
.card h2 {
    font-size: 17px;
    margin-bottom: 8px;
}
.card h3 {
    margin-top: 12px;
    font-size: 14px;
    color: rgba(255,255,255,0.9);
}
.card p {
    font-size: 12px;
    margin-top: 4px;
    font-weight: bold;
    color: rgba(255,255,255,0.8);
}

/* BUTTON */
.btn {
    display: inline-block;
    margin: 12px 0;
    padding: 8px 20px;
    border-radius: 25px;
    text-decoration: none;
    background: white;
    color: black;
    font-weight: bold;
    transition: 0.3s;
}

.btn:hover {
    background: #040333;
    color: white;
}

/* ENSURE CONTENT ABOVE PARTICLES */
body > *:not(#particles-js) {
    position: relative;
    z-index: 1;
}

/* MOBILE */
@media (max-width: 768px) {

    html, body {
        overflow: auto; /* allow scroll on mobile */
    }

    .container {
        flex-direction: column;
    }

    .title {
        font-size: 24px;
    }
}