/* Scrolling Background Section */
.scrolling-background1 {
    position: relative;
    margin-top: 5rem;
    width: 100%;
    height: 7rem;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
    opacity: 0; /* Initially hidden */
    transform: translateY(50px); /* Start off-screen */
    transition: opacity 1s ease, transform 1s ease; /* Smooth transition */
}

.scrolling-background1.visible {
    opacity: 1; /* Fade in */
    transform: translateY(0); /* Slide into view */
}

.scrolling-background1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background-image: url('/images/guidingprinciples/bg.png');
    background-size: auto 100%;
    background-repeat: repeat-x;
    animation: scroll-background 100s linear infinite;
    opacity: 0.2;
    z-index: -1;
    background-blend-mode: overlay;
}

@keyframes scroll-background {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: -100% 0;
    }
}

/* Logo Styling */
.guidingprinciples {
    width: 50%;
    z-index: 1;
    transition: transform 0.5s ease-in-out, box-shadow 0.5s ease-in-out;
    animation: fade-in 2s forwards;
}

@keyframes fade-in {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.card-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem; /* Space between cards */
    padding: 2rem;
}

/* Card Styling */
.card {
    width: 50%;
    background-color: #ffffff;
    box-shadow: 0 0.25rem 0.375rem rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    justify-content: center;
    align-content: center;
    text-align: center;
    transition: all 0.5s ease-in-out; /* Smooth transition for all properties */
    max-height: 4rem; /* Collapsed height */
}

.card :hover {
    background-color: #001F3F;
    color: #F4F4F4;
}

.card-header {
    padding: 1rem;
    font-size: 1.25rem;
    font-weight: bold;
    color: #001F3F;
    background-color: #F4F4F4;
    transition: background-color 0.3s ease-in-out, color 0.3s ease-in-out;
}

.card-content {
    padding: 1rem;
    font-size: 1rem;
    color: #333;
    opacity: 0; /* Initially hidden */
    height: 0; /* Initially no height */
    overflow: hidden; /* Hide overflowing content */
    transition: opacity 0.5s ease-in-out, height 0.5s ease-in-out; /* Smooth reveal */
}

.card.expanded {
    max-height: 20rem; /* Expanded height (adjust as needed) */
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.2);
    transform: scale(1.02); /* Slightly enlarge the card */
}

.card.expanded .card-content {
    opacity: 1; /* Fade in the content */
    height: auto; /* Dynamically adjust height */
}