/* General Styling */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    direction: rtl;
}

/* Main Container */
.container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 1000px; /* Increased max-width to give more space on larger screens */
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 10px;
    overflow: hidden;
}

/* Logo Positioning */
#logo {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 100px;
    height: auto;
    z-index: 10;
    cursor: pointer;
}

/* Title */
h1 {
    margin-top: 80px;
    font-size: 22px;
    text-align: center;
    color: #333;
}

/* Calendar Wrapper */
#calendar-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 1px;
}

/* Buttons on Left and Right */
#left-buttons, #right-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    height: auto;
    margin: 0;
}

/* Hijri Month Buttons (Same as Navigation Buttons) */
.month-btn {
    width: 80px;
    height: 80px;
    background-image: url('btn-bg-mid.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 2px;
    transition: transform 0.3s ease;
    color: black;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: transparent;
}

/* Button hover effect */
.month-btn:hover {
    transform: scale(1.1);
}

/* Calendar Content */
#calendar-content {
    width: 100%; /* Allow calendar content to fill the container width */
    max-width: 500px; /* Limit the width to avoid it getting too large */
    height: auto; /* Let the height be adjusted based on aspect ratio */
    background-color: #f4f4f9;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 20px; /* Adds space between calendar and title/logo */
}

#calendar-content img {
    width: 100%; /* Ensure the image takes up the full width of the container */
    height: auto; /* Maintain the aspect ratio by adjusting height */
    object-fit: contain; /* Preserve the aspect ratio of the image */
    max-height: 400px; /* Limit the height so it doesn't overflow */
}

/* Navigation Buttons */
#navigation {
    display: flex;
    justify-content: center;
    margin-top: 5px;
}

#navigation button {
    width: 80px;
    height: 80px;
    background-image: url('btn-bg.png');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    border: none;
    cursor: pointer;
    border-radius: 12px;
    transition: transform 0.3s ease;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 16px;
    font-weight: bold;
    color: black;
    margin-bottom: 2px;
}

/* Button hover effect */
#navigation button:hover {
    transform: scale(1.1);
}

/* Specific Positioning for Previous and Next Buttons */
#prev-btn {
    margin-left: 20px; /* Move left */
    }

    /* Today Button Specific Styling */
#today-btn {
    background-image: url('btn-bg-mid.png')!important;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
    border: none;
    cursor: pointer;
    border-radius: 12px;
    transition: transform 0.3s ease;
    font-size: 16px;
    font-weight: bold;
    color: black;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Next Button Specific Styling */
#next-btn {
    background-image: url('btn-bg-left.png')!important;
    background-size: contain;
    margin-right: 20px; /* Move right */
    background-position: center;
    background-repeat: no-repeat;
    background-color: transparent;
    border: none;
    cursor: pointer;
    border-radius: 12px;
    transition: transform 0.3s ease;
    font-size: 16px;
    font-weight: bold;
    color: black;
    display: flex;
    justify-content: center;
    align-items: center;
}


/* Date Button Specific Styling */
#navigation #date-button {
    font-size: 12px;
    font-weight: bold;
    color: black;
    text-align: center;
    line-height: 1.1;
    margin-right: 20px;
}

.date-label {
    display: block;
    font-size: 12px;
    color: #f00;
    text-align: center;
    margin-top: 5px;
    margin-right: 10px;
}

/* Container for download link */
.download-container {
    text-align: center;
    width: 100%;
    margin-top: 10px;
}

/* Styling for the download link */
.download-link {
    font-size: 18px;
    color: blue;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Styling for the download icon */
.download-icon {
    width: 24px;
    height: auto;
}

/* Social Media Links */
#social-media-links {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.social-link {
    margin: 0 5px;
}

.social-icon {
    width: 30px;
    height: 30px;
}

/* Mobile Adjustments */
@media screen and (max-width: 600px) {
    #logo {
        width: 70px; /* Smaller size on mobile */
        right: 10px; /* Adjust positioning */
        top: 10px;
    }

    /* Keep month buttons small */
    .month-btn {
        width: 50px !important;
        height: 50px !important;
        font-size: 10px !important;
    }

    /* Make navigation buttons larger */
    #navigation button {
        width: 70px !important;
        height: 70px !important;
        font-size: 15px !important;
    }

    /* Reduce font size for the date button on mobile */
    #navigation #date-button {
        font-size: 10px !important; /* Adjust this value to your preference */
    }

    /* Adjust layout for month buttons */
    .month-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2px;
        margin-bottom: 2px;
    }

    /* Ensure calendar image takes up more space */
    #calendar-content {
        height: auto;
        max-height: 400px;
    }

    #calendar-content img {
        max-width: 100%;
        height: auto;
    }
}
