/* Flex container for 3x3 grid */

.specialheadline {
    display: flex;
    flex-wrap: wrap;
    font-size: 40px;
    font-weight: 600;
    align-items: center;
    justify-content: center;
    background: linear-gradient(5deg, red, #043D5D, white ); 
    -webkit-background-clip: text; 
    color: transparent;
    text-decoration: underline 2px;
    text-decoration-thickness: 1px;
    text-underline-offset: 8px;
}
.specialheadline::after { 
    content: ''; 
    position: relative;
    left: 0; 
    bottom: -15px; /* Adjust the position of the underline */ 
    width: 100%; 
    height: 1px; /* Adjust the thickness of the underline */ 
    background: linear-gradient(90deg, red, rgb(4, 61, 93), white);
}
.flex-container {
    display: flex;
    box-sizing: border-box;
    flex-wrap: wrap;
    gap: 10px; /* Space between cards */
    justify-content: center;
    align-items: flex-start;
    background-color: #f9f9f9;
    padding: 15px;
    perspective: 1000px;
    
}

/* Card styles */
.card-oddone {
    box-sizing: border-box;
    width: 330px;
    height: 270px;
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
    padding: 10px;
    background-color: rgb(172, 14, 12);
    display: flex;
    flex-direction: column;
    
}
.card-evenone {
    width: 330px;
    box-sizing: border-box;
    height: 270px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background-color: #043D5D;
    display: flex;
    flex-direction: column;
    
}

.speciality-icon {
    width: 90px;
    height: auto;
    background: none;
}

/* Top row with icon and heading */
.card-row.top-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

/* Icon styles */
.icon {
    flex: 0 0 40px; /* Fixed width for the icon */
    font-size: 24px;
    text-align: center;
    margin-right: 10px;
}

/* Heading styles */
.heading {
    flex: 1; /* Take remaining space */
    font-size: 22px;
    font-weight: bold;
    color: white;
}

/* Explanation row */
.card-row.explanation {
    font-size: 18px;
    font-weight: 400;
    line-height: 1.5;
    color: white;
}
.slide-in-left {
    opacity: 0;
    transform: translateX(-5%); /* Start from the left */
    animation: slideInLeft 1.5s ease-out forwards;
    animation-play-state: paused;
}
.slide-in-right {
    opacity: 0; /* Initially hidden */
    transform: translateX(5%); /* Start off-screen */
    animation: slideInRight 1.5s ease-out forwards; /* Smooth slide-in effect */
    animation-play-state: paused; /* Paused until triggered by JS */
}
.scale-up {
    opacity: 0;
    transform: scale(5px); /* Start smaller */
    animation: scaleUp 1.5s ease-out forwards;
    animation-play-state: paused;
}
.bounce-in-left {
    opacity: 0;
    transform: translateX(-5px); /* Start off-screen to the left */
    animation: bounceInLeft 1.5s ease-out forwards;
    animation-play-state: paused;
}
/* Bounce-in from the right */
.bounce-in-right {
    opacity: 0;
    transform: translateX(5px); /* Start off-screen to the right */
    animation: bounceInRight 1.5s ease-out forwards;
    animation-play-state: paused;
}
/* Responsive Design */
@media (max-width: 768px) {
    .specialheadline{
        display: inline-flex;
        font-size: 39px;
        padding: 18px;
    }
    .flex-container {
        flex-direction: column;
        align-items: center;
        
    }

    .card-evenone, .card-oddone {
        width: 100%;     /* Full width for smaller screens */
        max-width: 350px;/* Optional: prevent cards from stretching too much */
        
    }
    
}
@keyframes floatEffect {
    0% {
        transform: rotateX(1deg) rotateY(1deg) translateZ(3px);
    }
    50% {
        transform: rotateX(-1deg) rotateY(-1deg) translateZ(3px);
    }
    100% {
        transform: rotateX(1deg) rotateY(1deg) translateZ(3px);
    }
}
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(5%); /* Start off the screen to the right */
    }
    to {
        opacity: 1;
        transform: translateX(0); /* End at the original position */
    }
}
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-5%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
@keyframes scaleUp {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
@keyframes bounceInLeft {
    0% {
        transform: translateX(-40px);
        opacity: 0;
    }
    60% {
        transform: translateX(20px);
        opacity: 1;
    }
    80% {
        transform: translateX(-10px);
    }
    100% {
        transform: translateX(0);
    }
}
/* Keyframes for bounceInRight */
@keyframes bounceInRight {
    0% {
        transform: translateX(40px);
        opacity: 0;
    }
    60% {
        transform: translateX(-20px);
        opacity: 1;
    }
    80% {
        transform: translateX(10px);
    }
    100% {
        transform: translateX(0);
    }
}