@font-face {
    font-family: 'IranSans';
    src: url('/fonts/IranSans.woff2') format('woff2'),
         url('/fonts/IranSans.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* Ensure html and body cover full viewport */
html, body {
    width: 100%;
    height: 100%;
}

/* Background Styles */
body {
    font-family: 'IranSans', sans-serif;
    margin: 0;
    padding: 0;
    text-align: center;
    color: #333;
    direction: rtl; /* Set text direction to RTL */
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Style for the informational box */
.info-box {
    background-color: #ffffe0; /* Light yellow background */
    color: #333; /* Dark text for contrast */
    padding: 15px;
    margin: 20px auto; /* Center the box horizontally with margin auto */
    border-radius: 10px;
    font-size: 1.2rem; /* Adjust font size for readability */
    font-weight: bold;
    text-align: center; /* Center text */
    max-width: 60%; /* Limit width to 80% of the container */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Subtle shadow for better visibility */
    line-height: 1.5; /* Improve line spacing */
}

/* Responsive Design for the info box */
@media (max-width: 500px) {
    .info-box {
        font-size: 1rem; /* Adjust font size on smaller screens */
        padding: 10px; /* Adjust padding */
        max-width: 90%; /* Slightly increase width for small screens */
    }
}

@media (max-width: 480px) {
    .info-box {
        font-size: 0.9rem; /* Further adjust font size */
        padding: 8px; /* Further adjust padding */
        max-width: 95%; /* Further increase width for very small screens */
    }
}


/* General Styles */
.header {
    margin-top: 20px;
    color: #0a0000; /* Red header text */
    font-size: 1.1rem; /* Use relative units */
    font-weight: 900;
}

.sub-header {
    margin-top: 10px;
    color: #0a0000; /* Red sub-header text */
    font-size: 1rem; /* Use relative units */
    font-weight: 900;
}

.sub-header a {
    color: #940a0a; /* Red links */
    text-decoration: none;
    font-size: 0.9rem; /* Use relative units */
    font-weight: 750;
    margin: 0 10px;
}

.sub-header a:hover {
    text-decoration: underline;
    color: #0056b3; /* Darker blue on hover */
}

.course-container {
    width: 90%; /* Use percentage-based width */
    max-width: 1200px; /* Limit maximum width for large screens */
    margin: 20px auto;
    background-color: #ffffff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    max-height: 80vh;
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
}

.course-category {
    font-size: 1.6rem; /* Use relative units */
    font-weight: bold;
    margin: 20px 0;
    border-bottom: 2px solid #28a745; /* Green border */
    padding-bottom: 10px;
}

.course-item {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping for smaller screens */
    justify-content: space-between; /* Ensure items are spaced between */
    align-items: center;
    margin-bottom: 10px;
    text-align: right;
    padding: 10px;
    border-bottom: 1px solid #ddd;
    position: relative;
    font-weight: bold;
    background-color: #f9f9f9;
    border-radius: 5px;
    font-size: 1.25rem; /* Use relative units */
    font-family: 'IranSans', sans-serif;
}

.course-item span {
    margin-left: 24px;
    margin-right: 0;
}

.copy-button {
    background-color: #28a745; /* Green button */
    color: #dfff00;
    border: none;
    padding: 5px 10px;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.1s; /* Smooth transition */
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
    text-align: center;
    vertical-align: middle;
    line-height: 1;
    white-space: nowrap;
    font-weight: normal;
}

.copy-button span {
    display: inline-block; /* Ensure the span behaves like inline block */
    vertical-align: middle; /* Align text vertically in case of discrepancies */
    margin: 0;
    font-weight: bold;
    font-size: 1.1rem;
}

.copy-button:hover {
    background-color: #218838; /* Darker green on hover */
}

/* Responsive Design */
@media (max-width: 768px) {
    .header {
        font-size: 1.25rem; /* Adjust header size */
    }

    .sub-header {
        font-size: 1.1rem; /* Adjust sub-header size */
    }

    .course-category {
        font-size: 1.4rem; /* Adjust category size */
    }

    .course-container {
        width: 95%; /* Slightly increase width for small screens */
        padding: 15px;
    }

    .course-item {
        flex-direction: column; /* Stack items vertically */
        align-items: flex-start; /* Align items to start */
    }

    .copy-button {
        margin-top: 10px; /* Add margin for spacing */
    }
}

@media (max-width: 300px) {
    .header {
        font-size: 1.1rem; /* Further adjust header size */
    }

    .sub-header {
        font-size: 1rem; /* Further adjust sub-header size */
    }

    .course-category {
        font-size: 1.2rem; /* Further adjust category size */
    }

    .course-item {
        font-size: 1rem; /* Further adjust course item size */
    }

    .copy-button {
        font-size: 0.85rem; /* Adjust button size */
    }
}
