.main-card1 {
    display: flex;
    flex-direction: row; /* Simpan gambar di sebelah kanan */
    gap: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 10px 15px;
    width: 100%;
    max-width: 700px;
    margin: 15px auto;
    min-height: 300px;
}

.card1 {
    flex: 1 1 35%;
    padding: 15px;
    background-color: #fff;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Ensure content is spaced properly */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: auto;
}

.card1:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.weather-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
}

.weather-icons img {
    width: 72px;
    height: auto;
}

.data {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-top: 1px;
    flex-grow: 1; /* Allow data section to grow */
}

.data span {
    margin: 4px 0;
    font-size: 14px;
}

.button-container {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px; /* Add space between data and button */
}

.button-container a {
    background-color: #007BFF;
    color: white;
    padding: 6px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    font-size: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.button-container a:hover {
    background-color: #0056b3;
}

.image1-container {
    flex: 1 1 23%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    margin-top: 10px;
    align-items: center;
}

.image1-container img {
    width: 75%;
    height: auto;
    margin-bottom: 10px;
    margin-left: auto;
    margin-right: auto;
}

.image1-container .image-title1 {
    text-align: center;
    font-size: 13px;
    font-weight: bold;
}

#error-message {
    margin: 10px;
    padding: 10px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    font-size: 14px;
    display: none;
}


@media (max-width: 768px) {
    .main-card1 {
        flex-direction: column;
        gap: 15px;
        padding: 10px 15px;
        width: 85%;
        min-height: 400px;
    }

    .card1 {
        flex: 1 1 100%;
    }

    .weather-icons img {
        width: 100px;
    }

    .data span {
        font-size: 12px;
    }

    .button-container a {
        padding: 6px 10px;
        font-size: 12px;
    }

    .image1-container {
        flex: 1 1 70%;
    }

    .image1-container img {
        width: 70%;
    }
}

@media (max-width: 480px) {
    .main-card1 {
        padding: 5px 10px;
        min-height: 350px;
    }

    .card1 {
        padding: 10px;
    }

    .weather-icons img {
        width: 100px;
    }

    .data span {
        font-size: 12px;
    }

    .button-container a {
        padding: 4px 8px;
        font-size: 10px;
    }

    .image1-container {
        flex: 1 1 100%;
        margin-top: 5px;
    }

    .image1-container img {
        width: 100%;
    }

    .image1-container .image-title1 {
        font-size: 12px;
    }
}
