/* Profiles Section */
#profiles {
    padding: 50px 0;
    text-align: center;
    position: relative; /* Set relative position for the falling elements */
    overflow: hidden;  /* Prevent falling objects from going outside */
    background-color: #153c76; /* Keep the background color constant */
}

/* Add falling animation for background elements */
#profiles::before {
    content: "";
    position: absolute;
    top: -10%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 20%, rgba(255, 255, 255, 0) 70%);
    animation: fallAnimation 5s infinite linear; /* Falling animation applied */
    transform: translateX(-50%);
    pointer-events: none; /* Allow interaction with underlying content */
}

/* Keyframes for falling animation */
@keyframes fallAnimation {
    0% {
        top: -10%;
    }
    50% {
        top: 50%; /* Objects fall halfway down the section */
    }
    100% {
        top: 110%; /* Objects fall completely out of the section */
    }
}

/* Profiles Section Heading */
#profiles h2 {
    font-size: 36px;
    color: #fff;
    margin-bottom: 20px;
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    padding: 12px 20px;
    display: inline-block;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent background for contrast */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    opacity: 0; /* Initially invisible */
    transform: translateY(-20px); /* Start position slightly above */
    animation: fadeIn 1s ease-out forwards, headingGlow 5s infinite alternate;
}

/* Fade-in animation */
@keyframes fadeIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Glow effect for the heading */
@keyframes headingGlow {
    0% {
        text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #ff6347;
    }
    100% {
        text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #1e90ff;
    }
}


#profiles h2 {
    font-size: 32px;
    margin-bottom: 40px;
    color: #2c3e50;
    font-weight: 600;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 40px;
    justify-items: center;
}

.profile-card {
    text-decoration: none;
    color: #34495e;
    background-color: #fff;
    border: 1px solid #e3e6e8;
    border-radius: 10px;
    padding: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
    width: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.profile-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.icon-wrapper {
    width: 70px;
    height: 70px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 15px;
}

.icon-wrapper img {
    width: 100%;
    height: auto;
    transition: transform 0.3s;
}

.profile-card:hover .icon-wrapper img {
    transform: scale(1.2);
}

.profile-card span {
    font-size: 16px;
    font-weight: bold;
    color: #2c3e50;
}
