* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Poppins';
    background: linear-gradient(to bottom, #0D355F, #3c7cb4); /* Color values based on image */
    color: white;
    display: flex;
    flex-direction: column;
    height: 100vh;
    /* overflow: hidden;  */
}
.container {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 20px;
}
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.header img {
    height: 60px;
}
h1 {
    color: white;
    font-size: 3rem;
}
.card-container {
    display: flex;
    justify-content: space-around;
    flex: 1;
    align-items: center;
    flex-wrap: wrap; /* Enable wrapping for smaller screens */
}
.card {
    background-color: #ffde59;
    color: black;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    width: 20%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: 0.3s;
    cursor: pointer;
    margin: 10px;
}
.card img {
    width: 100%;
    height: auto;
    max-height: 150px;
    border-radius: 10px 10px 0 0;
}
.card h2 {
    margin: 10px 0;
    font-size: 1.5rem;
}
.card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
}
.footer {
    background-color: white;
    color: black;
    padding: 10px 20px;
    position: relative;
    text-align: left;
    height: 60px;
    width: 100%;
    border-radius: 30px 30px 0 0;
    box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.2);
}
.footer-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
}
.footer p {
    font-size: 18px;
    margin-right: 10px;
    color: #1f72b5;
    font-weight: bold;
}
.footer img {
    height: 30px;
    margin-left: 10px;
}
.footer a {
    color: #1f72b5;
    text-decoration: none;
    font-weight: bold;
    margin-left: 10px;
}
.footer a:hover {
    text-decoration: underline;
}
.hidden {
    display: none;
}
.details-container {
    flex: 1;
    align-items: center;
    justify-content: space-around;
    display: none; /* Initially hidden */
    flex-wrap: wrap; /* Enable wrapping for smaller screens */
}
.details-container img {
    width: 100%;
    height: auto;
    max-height: 150px;
    border-radius: 10px 10px 0 0;
}
.details-container h2 {
    font-size: 1rem;
    margin: 10px 0;
}
.details-container p {
    font-size: 1rem;
}
.details-wrapper {
    background-color: white;
    border-radius: 10px;
    color: black;
    display: flex;
    justify-content: space-around;
    align-items: center;
}
.details-card {
    background-color: #ffde59;
    color: black;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    width: 30%;
    transition: 0.3s;
    cursor: pointer;
}
.details-card img {
    width: 100%;
    height: auto;
    max-height: 150px;
    border-radius: 10px 10px 0 0;
}
.details-card h2 {
    margin: 10px 0;
    font-size: 1rem;
}
.details-card a p:hover {
    opacity: 0.3;
}
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}
.details-container.hide .details-wrapper {
    animation: fadeOut 0.3s ease;
    opacity: 0;
}

/* ==================== Media Responsive ==================== */
@media only screen and (max-width: 1366px){
    .details-wrapper {
        width: 70%;
    }
}

@media only screen and (max-width: 1200px) and (orientation: landscape) {
    .card {
        width: 25%; /* 3 cards in a row */
        margin-bottom: 20px; 
    }
    h1 {
        font-size: 2.5rem;
    }
    .details-wrapper {
        width: 70%;
    }
}

@media only screen and (max-width: 992px) and (orientation: landscape) {
    /* Tablets: Adjust to 3 cards in a row */
    .card {
        width: 25%; /* 3 cards in a row */
        margin-bottom: 20px; 
    }
    h1 {
        font-size: 2.5rem;
    }
    .details-wrapper {
        width: 70%;
    }
}

@media only screen and (max-width: 992px) and (orientation: portrait) {
/* @media (max-width: 992px) { */
    /* Tablets: Adjust to 3 cards in a row */
    .card, .details-card {
        width: 30%; /* 3 cards in a row */
        margin-bottom: 20px; 
    }
    h1 {
        font-size: 2.5rem;
    }
    .details-wrapper {
        width: auto;
    }
}

@media only screen and (max-width: 768px) {
/* @media (max-width: 768px) { */
    /* Small tablets and large smartphones: Adjust to 2 cards in a row */
    .card, .details-card {
        width: 45%;  /* 2 cards in a row */
        margin-bottom: 20px; 
    }
    .header img {
        height: 50px;
    }
    h1 {
        font-size: 1.8rem;
    }
    .footer p {
        font-size: 16px;
    }
    .details-wrapper {
        width: auto;
    }
}

@media only screen and (max-width: 480px) {
/* @media (max-width: 576px) { */
    /* Smartphones: Stack cards vertically */
    
    .details-container {
        display: block;
        justify-content: center;  /* Center horizontally */
        align-items: center;  /* Center vertically */
        flex-direction: column;  /* Stack vertically */
        height: 100vh;  /* Full screen height */
        padding: 0 10px;
        margin: 0;
    }

    /* Ensure the details-wrapper takes full width and centers cards */
    .details-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%; /* Full width of the container */
        max-width: 500px; /* Limit the max width */
        text-align: center; /* Center text */
        margin-bottom: 20px;
    }

    .details-container .card {
        width: 80%;
        max-width: 500px; /* Optional: limit max width */  /* 2 cards in a row */
        margin-left: auto;    /* Set left margin to auto */
        margin-right: auto;
    }

    .card {
        width: 80%;
        margin-bottom: 20px;  /* Space between the cards */
        max-width: 500px; /* Optional: limit max width */  /* 2 cards in a row */
    }

    /* Make the details-card take full width and stack vertically */
    .details-card {
        width: 80%;  /* Full width */
        margin-bottom: 20px;  /* Space between the cards */
        max-width: 500px; /* Optional: limit max width */
    }

    /* Optional: Reduce the font size for smaller screens */
    .details-card h2 {
        font-size: 1rem;
    }

    .hidden {
        display: none;
    }
}

