/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #8B0000;
    /* Dark background */
    color: #f0f0f0;
    /* Light text */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

/* Header */
header {
    background-color: #eeeeee;
    /* Dark Red */
    color: white;
    padding: 0.75rem 2rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header .logo img {
    width: 300px;
    height: auto;
    transition: transform 0.3s ease;
    display: block;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
    flex-grow: 1;
    text-align: center;
    /* Center title if nav is separate */
}

header nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

header nav ul li {
    margin: 0.5rem 1rem;
}

header nav ul li a {
    color: #8B0000;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 0.8rem;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

header nav ul li a:hover,
header nav ul li a:focus {
    background-color: #8B0000;
    color: #f0f0f0;
    outline: none;
}

header nav ul li.active a {
    background-color: #a50000;
    color: #f0f0f0;
}

header nav ul li.active a:hover {
    /* Optional: Keep the active link highlighted on hover */
    background-color: #8B0000;
    color: #f0f0f0;
}

/* User Actions */
.user-actions {
    margin-left: 1rem;
    display: flex;
    align-items: center;
}

.user-email {
    display: inline-block;
    margin-right: 0.5rem;
    font-size: 0.9rem;
    color: #8B0000;
    font-weight: bold;
}

.login-icon, .logout-icon {
    display: inline-block;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.login-icon svg, .logout-icon svg {
    display: block;
    width: 28px;
    height: 28px;
    fill: #8B0000;
    color: #8B0000;
}

.login-icon:hover, .logout-icon:hover {
    background-color: #e0e0e0;
}

/* Hamburger Menu Styles */
.menu-toggle {
    display: none;
    /* Hidden by default on larger screens */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: auto;
    /* Pushes it to the right if logo is on left */
}

.hamburger-icon {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #f0f0f0;
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
}

.menu-toggle:hover .hamburger-icon,
.menu-toggle:focus .hamburger-icon {
    background-color: #8B0000;
}


/* Main Content & Sections */
.container,
main section {
    width: 85%;
    margin: 2rem auto;
    padding: 2rem;
    background-color: #d1d1d1;
    /* Slightly lighter dark shade for content */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Background Section */
.background {
    position: relative;
    min-height: 400px;
    /* Or your desired height */
    display: flex;
    align-items: center;
    justify-content: center;
    /* This will center the .overlay-left and .overlay-right if they are the only direct children after the image container is absolutely positioned */
    overflow: hidden;
    width: 100%;
    /* Ensure it takes full width */
    padding: 2rem 0;
    /* Add some padding if needed, adjust as necessary */
    flex-wrap: wrap;
    /* Allow overlays to wrap on smaller screens */
    gap: 10rem;
    /* Space between overlays */
}

.background-image-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.background-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    /* Optional: center the focus area */
}

.overlay-left {
    position: relative;
    /* Keeps it in the flex flow of .background */
    z-index: 2;
    /* Above the background image */
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 3rem;
    /* Adjusted padding */
    border-radius: 0;
    /* As per original inline style, can be changed */
    margin: 1rem;
    /* Adjusted margin */
    max-width: 500px;
    /* Adjusted max-width */
    text-align: left;
}

.overlay-left h1 {
    font-size: 3rem;
    /* Example size */
    margin-bottom: 1rem;
    color: #fff;
    /* Ensure h1 color is white */
}

.overlay-left p {
    font-size: 1.2rem;
    /* Example size */
    line-height: 1.6;
}

.overlay-right {
    position: relative;
    /* Keeps it in the flex flow of .background */
    z-index: 2;
    /* Above the background image */
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 2rem;
    border-radius: 0;
    /* As per original inline style, can be changed */
    margin: 1rem;
    /* Adjusted margin */
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /* Increased gap */
    max-width: 300px;
}

.overlay-right .stat {
    text-align: center;
}

.overlay-right .stat h3 {
    font-size: 2rem;
    /* Example size */
    margin-bottom: 0.3rem;
    color: #fff;
    /* Ensure h3 color is white */
}

.overlay-right .stat p {
    font-size: 0.9rem;
    margin: 0;
}

.get-certificate-page h1,
.download-certificate-page h1,
.verify-certificate-page h1 {
    color: #eaeaea;
    text-align: center;
}


h2 {
    color: #8B0000;
    /* Dark Red for headings */
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 1.8em;
}

.landing p {
    font-size: 1.2rem;
    color: #1c1c1c;
    margin-bottom: 2rem;
    text-align: center;
}

.landing p.tagline {
    /* New class for the specific paragraph */
    color: #000000;
    /* Black color */
}


/* Buttons */
.button,
button,
.btn {
    background-color: #8B0000;
    /* Dark Red */
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    display: inline-block;
    margin: 0.5rem 0;
    font-size: 1rem;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
}

.button:hover,
button:hover,
.btn:hover {
    background-color: #a50000;
    /* Slightly lighter red on hover */
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.button:focus,
button:focus,
.btn:focus {
    outline: 2px solid #272727;
    /* White outline on focus */
    outline-offset: 2px;
    background-color: #a50000;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group,
form label {
    /* Combined for simplicity */
    display: block;
    /* Ensure label takes full width */
    margin-bottom: 0.25rem;
    /* Reduced space below label */
    color: #242424;
    font-weight: bold;
}

.form-group input,
form input[type="text"],
form input[type="email"],
form input[type="tel"],
form input[type="date"],
form input[type="number"],
form textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #000000;
    /* Darker border */
    border-radius: 5px;
    background-color: #333333;
    /* Dark input background */
    color: #f0f0f0;
    /* Light text in input */
    box-sizing: border-box;
    /* Ensure padding doesn't add to width */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    margin-top: 0;
    /* Ensure no extra top margin on input */
}

form input[type="text"]::placeholder,
form input[type="email"]::placeholder,
form input[type="tel"]::placeholder,
form input[type="date"]::placeholder,
form input[type="number"]::placeholder,
form textarea::placeholder {
    color: #d6d6d6;
    /* Lighter gray for placeholder text */
    opacity: 0.8;
    /* Make it slightly transparent */
    font-style: italic;
}

form input[type="text"]:focus,
form input[type="email"]:focus,
form input[type="tel"]:focus,
form input[type="date"]:focus,
form input[type="number"]:focus,
form textarea:focus {
    border-color: #8B0000;
    /* Dark Red border on focus */
    box-shadow: 0 0 8px rgba(139, 0, 0, 0.5);
    /* Red glow */
    outline: none;
}

form textarea {
    min-height: 100px;
    resize: vertical;
}

footer {
    background-color: #8B0000;
    /* Dark Red */
    color: white;
    padding: 2rem 5rem 1rem 5rem;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    /* Distributes space between sections */
    gap: 2rem;
    /* Space between sections */
    margin-bottom: 2rem;
    text-align: left;
    /* Override general footer text-align for sections */
}

.footer-section {
    flex: 1;
    /* Allows sections to grow and shrink */
    min-width: 250px;
    /* Minimum width before wrapping */
    padding: 0 1rem;
    /* Padding within each section */
}

.footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #f0f0f0;
    /* Lighter color for headings */
    border-bottom: 1px solid #c50000;
    /* Subtle separator */
    padding-bottom: 0.5rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a,
.footer-section.reach-us p a {
    color: #e0e0e0;
    /* Slightly off-white for links */
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-section ul li a:hover,
.footer-section.reach-us p a:hover {
    color: #ffffff;
    /* Brighter white on hover */
    padding-left: 5px;
    /* Slight indent on hover */
}

.footer-section.reach-us p,
.footer-section.locate-us address {
    margin-bottom: 0.5rem;
    line-height: 1.6;
    color: #e0e0e0;
}

.footer-section.locate-us address {
    font-style: normal;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid #a50000;
    /* Separator for copyright */
    margin-top: 1rem;
}

.footer-bottom p {
    margin: 0;
    font-size: 0.9rem;
    color: #f0f0f0;
}

/* Popup / Modal */
/* Styles for popup messages (if not already defined well) */
.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translateX(-50%);
    padding: 15px 25px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    font-size: 16px;
    text-align: center;
}

.popup.active {
    opacity: 1;
    visibility: visible;
}

.popup.success {
    background-color: #01a806;
    /* Green */
    color: white;
}

.popup.error {
    background-color: #ce0f02;
    /* Red */
    color: white;
}

/* Error message styling for all forms */
.error-message {
    color: #ce0f02;
    background-color: rgba(255, 200, 200, 0.3);
    border-left: 3px solid #ce0f02;
    padding: 10px;
    margin: 10px 0;
    font-size: 14px;
    border-radius: 3px;
    display: none;
}

.error-message.active {
    display: block;
}

.error-message.success {
    color: #01a806;
    background-color: rgba(200, 255, 200, 0.3);
    border-left: 3px solid #01a806;
}

/* Certificate Preview & Results */
#certificatePreview,
#verificationResult {
    margin-top: 2rem;
    padding: 1.5rem;
    background-color: #333;
    border: 1px solid #8B0000;
    border-radius: 5px;
    animation: slideInUp 0.5s ease-out;
}

#certificatePreview.hidden {
    display: none;
}

/* This rule is for general messages within #previewContent, like "Fetching..." or "Not found"
   It should NOT override specific styles within the .certificate-design itself. */
#previewContent>p,
/* Target only direct children p for general messages */
#verificationResult p {
    margin: 0.5rem 0;
    color: #f0f0f0;
}

#previewContent strong,
/* This might need adjustment if used inside .certificate-design */
#verificationResult strong {
    color: #8B0000;
}

/* Certificate Preview Styling */
#certificatePreview {
    margin-top: 20px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
}

#certificatePreview h3 {
    margin-top: 0;
    color: #333;
    text-align: center;
    margin-bottom: 20px;
}

.certificate-design {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    /* Inner padding for content, distinct from border padding */
    background-color: #fdfdfd;
    /* Off-white for the certificate paper */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    /* More pronounced shadow */
    color: #222;
    /* Darker default text color for better contrast */
    position: relative;
}

.certificate-border {
    border: 10px double #c0a062;
    /* Ornate gold-ish double border */
    padding: 25px;
    position: relative;
    /* Adding a subtle inner border/shadow for depth */
    box-shadow: inset 0 0 0 2px #daa520;
    /* Goldenrod inner line */
}

/* Optional: Add a subtle background pattern or texture if desired */
/* .certificate-design::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/subtle-parchment.png'); 
    opacity: 0.05;
    z-index: 0;
} */

.certificate-header,
.certificate-body,
.certificate-footer {
    text-align: center;
    position: relative;
    z-index: 1;
}

.certificate-logo {
    max-width: 300px;
    /* Adjust as needed */
    margin-bottom: 10px;
}

.certificate-design .certificate-header h1 {
    font-size: 32px;
    /* Larger for University Name */
    color: #8B0000;
    /* Dark Red, matching header theme */
    margin: 10px 0;
    font-weight: bold;
    font-family: 'Trajan Pro', 'Times New Roman', serif;
    /* More formal font if available */
    text-transform: uppercase;
    letter-spacing: 1px;
}

.certificate-design .certificate-header h2 {
    font-size: 24px;
    /* Prominent "Certificate of Achievement" */
    color: #504020;
    /* Dark brown, complementary to gold */
    margin: 5px 0 25px 0;
    font-style: normal;
    /* Changed from italic for more formality */
    font-weight: 600;
}

.certificate-body {
    margin: 30px 0;
}

.certificate-design .certify-text,
.certificate-design .course-text {
    font-size: 16px;
    margin-bottom: 5px;
    color: #333;
    /* Explicitly set dark color */
}

.certificate-design .student-name {
    font-size: 30px;
    /* More prominent student name */
    font-weight: bold;
    color: #8B0000;
    /* Dark Red */
    margin: 15px 0;
    border-bottom: 2px solid #b8860b;
    /* Gold underline */
    display: inline-block;
    padding-bottom: 8px;
    font-family: 'Brush Script MT', 'cursive';
    /* Cursive font for name, ensure fallback */
}

.certificate-design .course-name {
    font-size: 22px;
    /* Prominent course name */
    font-weight: 600;
    /* Semi-bold */
    color: #333;
    margin: 15px 0 25px 0;
}

.certificate-design .details-text {
    font-size: 15px;
    /* Clear and readable */
    line-height: 1.7;
    margin-top: 20px;
    color: #444;
}

.certificate-design .certificate-footer {
    margin-top: 45px;
    font-size: 14px;
    /* Slightly larger footer text */
    display: flex;
    justify-content: space-between;
    color: #222;
    padding-top: 15px;
    border-top: 1px solid #daa520;
    /* Light gold separator line */
}

.certificate-design .certificate-number,
.certificate-design .issue-date {
    margin: 0;
    color: #222;
}

#certificatePreview #downloadButton,
#certificatePreview .share-options button {
    margin-top: 15px;
    margin-right: 10px;
}

#certificatePreview .share-options {
    margin-top: 15px;
    text-align: center;
}

#certificatePreview .share-options h4 {
    margin-bottom: 10px;
}

/* About Us Section Styles */
.about-section {
    background-color: #f9f9f9;
    /* Light background for the section */
    color: #333;
    /* Darker text for readability */
    animation: fadeIn 1s ease-out;
}

.about-section .container {
    width: 85%;
    margin: 0 auto;
    /* Center the container */
    padding: 2rem;
    background-color: #ffffff;
    /* White background for content box */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.about-section h2 {
    color: #8B0000;
    /* Dark Red for main heading */
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.2em;
    position: relative;
}

.about-section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: #8B0000;
    margin: 0.5rem auto 0;
}

.about-section p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    text-align: justify;
    color: #444;
}

.about-section h3 {
    color: #8B0000;
    /* Dark Red for subheadings */
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.8em;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

/* Mission List Styles */
.mission-container,
.core-values-container {
    margin-top: 2rem;
}

.mission-list {
    list-style: none;
    padding-left: 0;
}

.mission-list li {
    background-color: #f0f4f8;
    /* Light blue-grey background */
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    border-left: 5px solid #8B0000;
    /* Dark Red accent border */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUpList 0.5s ease-out forwards;
}

.mission-list li:nth-child(1) {
    animation-delay: 0.1s;
}

.mission-list li:nth-child(2) {
    animation-delay: 0.2s;
}

.mission-list li:nth-child(3) {
    animation-delay: 0.3s;
}

.mission-list li:nth-child(4) {
    animation-delay: 0.4s;
}


.mission-list li:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.mission-list li strong {
    color: #8B0000;
    font-weight: 700;
    margin-right: 0.5rem;
}

/* Core Values List Styles */
.core-values-list {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.core-values-list li {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.07);
    text-align: center;
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUpList 0.5s ease-out forwards;
    position: relative;
    overflow: hidden;
}

.core-values-list li:nth-child(1) {
    animation-delay: 0.5s;
}

.core-values-list li:nth-child(2) {
    animation-delay: 0.6s;
}

.core-values-list li:nth-child(3) {
    animation-delay: 0.7s;
}

.core-values-list li:nth-child(4) {
    animation-delay: 0.8s;
}

.core-values-list li:nth-child(5) {
    animation-delay: 0.9s;
}


.core-values-list li::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(139, 0, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.core-values-list li:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 8px 20px rgba(139, 0, 0, 0.15);
    border-color: #8B0000;
}

.core-values-list li:hover::before {
    left: 100%;
}

@keyframes slideInUpList {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contact Page Specific Styles */
.contact-section {
    background-color: #ffffff;
    /* White background for content box */
    color: #333;
    /* Darker text for readability */
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}


.contact-section .contact-block {
    margin-bottom: 2.5rem;
}

.contact-section .contact-block:last-child {
    margin-bottom: 0;
}

.contact-section h3 {
    color: #8B0000;
    /* Dark Red for subheadings */
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.8em;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.75rem;
}

.contact-section h4 {
    color: #8B0000;
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1.5em;
    font-weight: 700;
}

.contact-section p,
.contact-section ul li {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 0.75rem;
    color: #333;
}

.contact-section a:hover,
.contact-section a:focus {
    outline: none;
    border: #000000 1px solid;
}

.contact-section form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.contact-section a:focus-visible {
    outline: 2px solid #8B0000;
    outline-offset: 2px;
    border-radius: 2px;
}

.contact-section .contact-email-list {
    list-style: none;
    padding-left: 0;
}

.contact-section .contact-email-list li {
    margin-bottom: 0.5rem;
}

.contact-section .direction-method,
.contact-section .admission-type {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: #f9f9f9;
    border-radius: 6px;
    border-left: 5px solid #8B0000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.contact-section .direction-method:hover,
.contact-section .admission-type:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.contact-section .direction-method ul {
    list-style: disc;
    padding-left: 25px;
    margin-top: 0.75rem;
}

.contact-section .direction-method ul li {
    color: #555;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Responsive adjustments for contact section */
@media (max-width: 768px) {
    .contact-section .container {
        padding: 1.5rem;
    }

    .contact-section h3 {
        font-size: 1.6em;
        margin-bottom: 1.2rem;
        padding-bottom: 0.6rem;
    }

    .contact-section h4 {
        font-size: 1.25em;
        margin-bottom: 0.8rem;
    }

    .contact-section p,
    .contact-section ul li {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .contact-section .direction-method,
    .contact-section .admission-type {
        padding: 1.2rem;
        border-left-width: 4px;
    }

    .contact-section .direction-method ul {
        padding-left: 20px;
    }

    .contact-section .direction-method ul li {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .contact-section h3 {
        font-size: 1.4em;
    }

    .contact-section h4 {
        font-size: 1.15em;
    }

    .contact-section p,
    .contact-section ul li {
        font-size: 0.9rem;
    }

    .contact-section .direction-method,
    .contact-section .admission-type {
        padding: 1rem;
    }
}

/* Ensure the preview content is not hidden by default if it has content */
#certificatePreview:not(.hidden) #previewContent {
    display: block;
}

/* Loading button state */
.button.loading,
button.loading,
.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
    cursor: not-allowed;
}

.button.loading::after,
button.loading::after,
.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Remove the conflicting ::before pseudo-element */
.button.loading::before,
button.loading::before,
.btn.loading::before {
    display: none;
}

/* Specific text for different forms - using a simpler approach */
#certificateForm button.loading::after {
    /* Keep the spinner, text will be handled differently if needed */
}

#downloadForm button.loading::after {
    /* Keep the spinner, text will be handled differently if needed */
}

#verifyForm button.loading::after {
    /* Keep the spinner, text will be handled differently if needed */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .footer {
        padding: 2rem 1rem 5rem;
    }

    .certificate-design {
        padding: 10px;
    }

    .certificate-border {
        padding: 20px;
        /* Adjusted padding */
        border-width: 8px;
        /* Thinner border on mobile */
        box-shadow: inset 0 0 0 1px #daa520;
        /* Thinner inner line */
    }

    .certificate-design .certificate-header h1 {
        font-size: 24px;
        /* Adjusted for mobile */
    }

    .certificate-design .certificate-header h2 {
        font-size: 20px;
        /* Adjusted for mobile */
    }

    .certificate-design .student-name {
        font-size: 22px;
        /* Adjusted for mobile */
    }

    .certificate-design .course-name {
        font-size: 18px;
        /* Adjusted for mobile */
    }

    .certificate-design .certify-text,
    .certificate-design .course-text {
        font-size: 16px;
    }

    .certificate-design .details-text {
        font-size: 13px;
    }

    .certificate-design .certificate-footer {
        font-size: 12px;
        /* Adjusted for mobile */
        flex-direction: column;
        align-items: center;
    }

    .certificate-design .certificate-footer p {
        margin-bottom: 8px;
        /* Spacing for stacked items */
    }

    /* About Section Responsive */
    .about-section .container {
        padding: 1.5rem;
    }

    .about-section h2 {
        font-size: 1.8em;
    }

    .about-section h3 {
        font-size: 1.5em;
    }

    .about-section p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .mission-list li {
        padding: 1rem;
        font-size: 0.95rem;
    }

    .core-values-list {
        grid-template-columns: 1fr;
        /* Stack core values on smaller screens */
        gap: 1rem;
    }

    .core-values-list li {
        padding: 1.5rem;
        font-size: 1rem;
    }
}

/* Responsive Design */
@media (max-width: 1380px) {
    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.5rem 1rem;
        /* Adjusted padding for responsive header */
        position: relative;
        flex-wrap: nowrap;
        /* Ensure logo and menu toggle stay on the same line */
    }

    header .logo {
        /* Optional: if div.logo needs specific flex properties */
        flex-shrink: 0;
        /* Prevent logo container from shrinking */
    }

    header .logo img {
        width: 250px;
    }

    .menu-toggle {
        display: block;
        order: 2;
        /* Ensures it's logically after the logo if other items were in flow */
        /* margin-left: auto; is inherited from the base .menu-toggle style, which pushes it to the right. */
    }

    /* Hamburger animation when active */
    .menu-toggle .hamburger-icon:nth-child(1),
    .menu-toggle .hamburger-icon:nth-child(2),
    .menu-toggle .hamburger-icon:nth-child(3) {
        background-color: #8B0000;
    }

    header nav {
        display: none;
        /* Hide nav by default on mobile */
        width: 100%;
        background-color: #f0f0f0;
        /* Slightly darker red for dropdown */
        position: absolute;
        top: 100%;
        /* Position below the header */
        left: 0;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
        z-index: 100;
        /* Ensure it's above other content */
        order: 3;
        /* After logo and toggle */
    }

    .user-actions {
        order: 2;
        margin-left: 0.5rem;
        display: flex;
        align-items: center;
    }

    .user-email {
        display: inline-block;
        /* Ensure visibility */
        font-size: 0.8rem;
        /* Smaller text on smaller screens */
        max-width: 150px;
        /* Limit width */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    header nav.active {
        display: block;
        background-color: #f0f0f0;
        /* Show nav when active */
    }

    header nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
        padding: 1rem 0;
    }

    header nav ul li {
        margin: 0.8rem 0;
        width: 100%;
        text-align: center;
    }

    header nav ul li a {
        padding: 0.8rem 1rem;
        display: block;
        /* Make links take full width */
        width: 90%;
        margin: 0 auto;
        transition: background-color 0s ease, color 0s ease;

    }

    header nav ul li a:hover {
        background-color: #a50000;
        /* Lighter red on hover */
        color: #f0f0f0;
    }

    header nav ul li a:focus {
        background-color: #8B0000;
        color: #f0f0f0;
    }

    /* Hamburger animation when active */
    .menu-toggle.active .hamburger-icon:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
        background-color: #ffffff;
    }

    .menu-toggle.active .hamburger-icon:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active .hamburger-icon:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
        background-color: #ffffff;
    }

    .modal-content {
        margin: 20% auto;
        padding: 1.5rem;
    }

    header h1 {
        font-size: 1.5rem;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .background {
        gap: 1rem;
        /* Adjust gap for vertical stacking */
    }

    .overlay-left h1 {
        font-size: 1.8rem;
    }

    .overlay-left p {
        font-size: 1rem;
    }

    .overlay-right .stat h3 {
        font-size: 1.5rem;
    }

    .overlay-right {
        gap: 1rem;
    }

    .container,
    main section {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }

    .buttons {
        flex-direction: column;
    }

    .button,
    button,
    .btn {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .landing h1 {
        font-size: 2rem;
    }

    .landing p {
        font-size: 1rem;
    }

    .popup {
        width: 90%;
    }

    footer {
        padding: 1rem;
        /* Adjusted padding for smaller screens */
    }

    .footer-container {
        flex-direction: column;
        align-items: center;
        /* Center sections when stacked */
        text-align: center;
        /* Center text within sections on mobile */
        gap: 0;
        /* Space between sections */
        margin: 0;
    }

    .footer-section {
        min-width: 100%;
        /* Sections take full width when stacked */
        margin-bottom: 1.5rem;
        padding: 0;
    }

    .footer-section h3 {
        text-align: center;
    }

    .footer-section ul {
        text-align: center;
    }

    .certificate-logo {
        max-width: 250px;
    }
}

/* Responsive adjustments for the background section */
@media (max-width: 992px) {

    /* Adjust breakpoint as needed */
    .background {
        gap: 1rem;
        /* Adjust gap for vertical stacking */
    }

    .certificate-logo {
        max-width: 250px;
    }
}

@media (max-width: 1024px) {

    /* Adjust breakpoint as needed */
    .background {
        gap: 1rem;
        /* Adjust gap for vertical stacking */
    }
}


@media (max-width: 480px) {
    header .logo img {
        width: 200px;
    }

    header h1 {
        /* If h1 is present in some headers and needs to be smaller */
        font-size: 1.1rem;
        /* Adjust h1 size on small screens */
        margin: 0.5rem 0.25rem;
        /* Adjust margins */
        flex-grow: 1;
        /* Allow it to take space if needed, but ensure it doesn't break layout */
        text-align: center;
    }

    header nav ul li a {
        padding: 0.4rem 0.6rem;
        font-size: 0.9rem;
    }

    .background {
        gap: 1.5rem;
        /* Adjust gap for vertical stacking */
    }

    h2 {
        font-size: 1.5em;
    }

    form input[type="text"],
    form input[type="email"],
    form input[type="tel"],
    form input[type="date"],
    form input[type="number"],
    form textarea {
        padding: 0.7rem;
    }

    .certificate-logo {
        max-width: 200px;
    }

    .overlay-left {
        padding: 1.5rem;
        margin: 0.3rem;
    }

    .footer {
        padding: 1rem;
    }

    /* About Section Responsive Small Screens */
    .about-section h2 {
        font-size: 1.6em;
    }

    .about-section h3 {
        font-size: 1.3em;
    }

    .about-section p {
        font-size: 0.9rem;
    }

    .mission-list li {
        padding: 0.8rem;
        font-size: 0.9rem;
    }

    .core-values-list li {
        padding: 1rem;
        font-size: 0.95rem;
    }
}

/* Developer Info and Social Links Styles */
.developer-info {
    background-color: #ffe6e6;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 5px solid #8B0000;
}

.developer-info p {
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.developer-info strong {
    color: #8B0000;
}

.developer-info a {
    color: #8B0000;
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.developer-info a:hover,
.developer-info a:focus {
    color: #a50000;
    text-decoration: underline;
    border: none;
    outline: none;
}

.disclaimer-section {
    background-color: #fff3cd;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 5px solid #ffc107;
    margin-bottom: 2rem;
}

.disclaimer-section h4 {
    color: #856404;
    margin-top: 0;
    margin-bottom: 1rem;
}

.disclaimer-section ul {
    list-style: disc;
    padding-left: 20px;
}

.disclaimer-section ul li {
    margin-bottom: 0.5rem;
    color: #856404;
}

.social-links {
    margin-bottom: 2rem;
}

.social-links h4 {
    margin-bottom: 1rem;
    color: #8B0000;
}

.social-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 55px;
    height: 55px;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 1.75rem;
    /* Make icons larger */
    color: white;
}

.social-icon span {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: white;
    transition: transform 0.3s ease;
}

.social-icon.website {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.social-icon.linkedin {
    background: linear-gradient(135deg, #0077b5 0%, #00a0dc 100%);
}

.social-icon.github {
    background: linear-gradient(135deg, #333 0%, #666 100%);
}

.social-icon.twitter {
    background: linear-gradient(135deg, #000 0%, #333 100%);
}

.social-icon.instagram {
    background: linear-gradient(135deg, #ff1741 0%, #cd30bb 100%);
}

.social-icon.facebook {
    background: linear-gradient(135deg, #2651af 0%, #5e91ff 100%);
}

.social-icon.threads {
    background: linear-gradient(135deg, #000 0%, #333 100%);
}

.social-icon.whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.25);
}

.social-icon:hover i {
    transform: scale(1.1);
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.social-icon:hover::before {
    left: 100%;
}

.feedback-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2.5rem;
    border-radius: 12px;
    border-left: 5px solid #8B0000;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.feedback-section h4 {
    color: #8B0000;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    text-align: center;
}

.feedback-section>p {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.feedback-form-container {
    background: #ffd5d5;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #8B0000;
}

.feedback-form {
    margin: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.feedback-form .form-group {
    margin-bottom: 1.5rem;
}

.feedback-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
    font-weight: 600;
    font-size: 0.95rem;
}

.feedback-form-container p {
    font-size: 1rem;
    text-align: center;
    margin-bottom: 1.8rem;
}

.contact-section .form-group input {
    border: 1px solid #000000;
    background-color: #ededed;
    /* Dark input background */
    color: #5f0000;
}

.contact-section .feedback-form input,
.contact-section .feedback-form textarea,
.contact-section .feedback-form select {
    width: 100%;
    padding: 0.85rem;
    border: 1px solid #000000;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #ededed;
    color: #5f0000;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    -webkit-appearance: none;
    /* Removes default browser styling */
    -moz-appearance: none;
    appearance: none;
}

.feedback-form select {
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%235f0000%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 0.65em auto;
    padding-right: 2.5rem;
    /* Make space for the arrow */
}

.feedback-form input:focus,
.feedback-form textarea:focus,
.feedback-form select:focus {
    border-color: #8B0000;
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.1);
    outline: none;
    transform: translateY(-1px);
}

.feedback-form textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;

}

.form-actions {
    text-align: center;
    margin-top: 1rem;
}

.feedback-btn {
    background: linear-gradient(135deg, #8B0000 0%, #a50000 100%);
    color: white;
    padding: 0.85rem 2.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
}

.feedback-btn:hover {
    background: linear-gradient(135deg, #a50000 0%, #8B0000 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(139, 0, 0, 0.4);
}

.feedback-btn:active {
    transform: translateY(0);
}

.btn-text {
    transition: transform 0.3s ease;
}

.btn-icon {
    transition: transform 0.3s ease;
    font-size: 1.2rem;
}

.feedback-btn:hover .btn-text {
    transform: translateX(-2px);
}

.feedback-btn:hover .btn-icon {
    transform: translateX(3px);
}

/* Responsive adjustments for social icons and feedback form */
@media (max-width: 768px) {
    .social-icons {
        gap: 0.75rem;
    }

    .social-icon {
        width: 50px;
        height: 50px;
    }

    .social-icon span {
        font-size: 0.7rem;
    }

    .developer-info,
    .disclaimer-section,
    .feedback-section {
        padding: 1.5rem;
    }

    .feedback-form-container {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .feedback-btn {
        padding: 0.75rem 2rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .social-icons {
        gap: 0.5rem;
    }

    .social-icon {
        width: 45px;
        height: 45px;
    }

    .social-icon span {
        font-size: 0.65rem;
    }

    .feedback-form input,
    .feedback-form textarea,
    .feedback-form select {
        padding: 0.75rem;
        font-size: 0.95rem;
    }

    .feedback-section {
        padding: 1.5rem;
    }

    .feedback-form-container {
        padding: 1rem;
    }

    .feedback-btn {
        padding: 0.7rem 1.5rem;
        font-size: 0.9rem;
    }
    .user-actions .user-email {
        display: none;
    }
}

/* Login Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: #fefefe;
    color: #333;
    margin: 10% auto;
    padding: 2rem;
    border: 1px solid #888;
    width: 80%;
    max-width: 450px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideInUp 0.4s;
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
}

.close-button:hover,
.close-button:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.password-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    top: 70%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #8B0000;
}

.modal-content .form-group {
    margin-bottom: 1rem;
}

.modal-content .form-group label {
    color: #333;
    font-weight: 600;
}

.modal-content input[type="email"],
.modal-content input[type="password"],
.modal-content input[type="text"] {
    background-color: #f0f0f0;
    color: #333;
    border: 1px solid #ccc;
}

.modal-content input[type="email"]:focus,
.modal-content input[type="password"]:focus,
.modal-content input[type="text"]:focus {
    border-color: #8B0000;
    box-shadow: 0 0 5px rgba(139, 0, 0, 0.2);
}

.captcha-group .captcha-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.captcha-group #captchaText {
    padding: 0.8rem;
    background-color: #ddd;
    border-radius: 5px;
    font-weight: bold;
    letter-spacing: 2px;
    user-select: none;
    color: #333;
    border: 1px solid #ccc;
}

.password-options {
    display: flex;
    justify-content: space-between;
}

.password-options a {
    color: #8B0000;
    text-decoration: none;
}

.password-options a:hover {
    text-decoration: underline;
}

.buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Password Input Container Styles */
.password-input-container {
    position: relative;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.password-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.password-toggle .eye-icon {
    fill: #666;
    transition: fill 0.3s ease;
}

.password-toggle:hover .eye-icon {
    fill: #8B0000;
}

/* Dashboard Styles */
.dashboard-section {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin: 2rem auto;
    width: 82%;
    max-width: 1400px;
}

.dashboard-section h2 {
    color: #8B0000;
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: 1.8rem;
}

.table-container {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.table-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 0.5rem;
}

#searchInput {
    padding: 0.6rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 60%;
    background-color: #f9f9f9;
    color: #333;
}

.refresh-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background-color: #8B0000;
}

.refresh-btn svg {
    transition: transform 0.3s ease;
}

.refresh-btn:hover svg {
    transform: rotate(180deg);
}

#tableWrapper {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
}

#certificatesTable, 
#feedbackTable, 
#adminUsersTable {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    color: #333;
    min-width: 650px;
    /* Ensure tables have minimum width to maintain structure */
}

#certificatesTable th,
#feedbackTable th,
#adminUsersTable th,
#certificatesTable td,
#feedbackTable td,
#adminUsersTable td {
    padding: 10px 8px;
    /* Improved cell padding for better touch targets */
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

#certificatesTable th {
    background-color: #8B0000;
    color: #fff;
    font-weight: bold;
    position: sticky;
    top: 0;
}

#certificatesTable tbody tr:hover {
    background-color: #f5f5f5;
}

.loading-row td {
    text-align: center;
    padding: 2rem !important;
    color: #666;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.4rem 0.7rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: bold;
    transition: all 0.2s ease;
}

.details-btn {
    background-color: #3498db;
    color: white;
}

.update-btn {
    background-color: #2ecc71;
    color: white;
}

.delete-btn {
    background-color: #e74c3c;
    color: white;
}

.details-btn:hover {
    background-color: #2980b9;
}

.update-btn:hover {
    background-color: #27ae60;
}

.delete-btn:hover {
    background-color: #c0392b;
}

.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.5rem;
    background-color: #f9f9f9;
    border-top: 1px solid #e0e0e0;
}

.page-btn {
    padding: 0.4rem 0.8rem;
    border: 1px solid #ddd;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.page-btn:hover {
    background-color: #8B0000;
    color: #fff;
    border-color: #8B0000;
}

.page-btn.active {
    background-color: #8B0000;
    color: #fff;
    border-color: #8B0000;
}

/* Certificate Detail and Update Modals */
.certificate-details-modal,
.certificate-update-modal,
.delete-confirm-modal {
    width: 90%;
    max-width: 800px;
}

.certificate-details {
    margin: 1.5rem 0;
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #8B0000;
}

.certificate-details dl {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem 2rem;
}

.certificate-details dt {
    font-weight: bold;
    color: #8B0000;
    margin-bottom: 0.3rem;
}

.certificate-details dd {
    margin: 0 0 1rem 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    color: #333;
}

#updateCertificateForm input:focus,
#updateCertificateForm textarea:focus {
    border-color: #8B0000;
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.1);
    outline: none;
}

#updateCertificateForm textarea {
    min-height: 100px;
    resize: vertical;
}

#updateCertificateForm input[readonly] {
    background-color: #e9e9e9;
    cursor: not-allowed;
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.cancel-btn {
    background-color: #7f8c8d;
}

.cancel-btn:hover {
    background-color: #6c7a7d;
}

/* Feedback Management Styles */
.feedback-details {
    margin: 1.5rem 0;
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #8B0000;
}

.feedback-details dl {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.feedback-details dt {
    font-weight: bold;
    color: #8B0000;
    margin-bottom: 0.3rem;
}

.feedback-details dd {
    margin: 0 0 1rem 0;
    color: #333;
    line-height: 1.5;
}

.feedback-details dd.message {
    background-color: #f0f0f0;
    padding: 1rem;
    border-radius: 4px;
    border-left: 3px solid #8B0000;
    white-space: pre-line;
}

.status-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-pending {
    background-color: #f39c12;
    color: #fff;
}

.status-reviewed {
    background-color: #27ae60;
    color: #fff;
}

.review-btn {
    background-color: #2ecc71;
    color: white;
}

.review-btn:hover {
    background-color: #27ae60;
}

.feedback-details-modal {
    max-width: 800px;
}

/* Feedback Table Specific Styles */
#feedbackTable {
    width: 100%;
    border-collapse: collapse;
}

#feedbackTable th {
    background-color: #8B0000;
    color: #fff;
    font-weight: bold;
    position: sticky;
    top: 0;
}

#feedbackTable td {
    background-color: #fff;
    color: #333;
    padding: 7px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
    max-width: 175px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#feedbackTable tbody tr:hover {
    background-color: #f5f5f5;
}

#feedbackTable tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Make message column more readable */
#feedbackTable td.message-cell {
    max-width: 300px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: #fff;
    color: #333;
}

/* Improve status badge visibility */
.status-badge {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.status-pending {
    background-color: #f39c12;
    color: #fff;
}

.status-reviewed {
    background-color: #27ae60;
    color: #fff;
}

/* Improved feedback details modal */
.feedback-details {
    margin: 1.5rem 0;
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #8B0000;
    color: #333;
}

/* Admin Page Styles */
.admin-form-container {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.admin-form-container h3 {
    color: #8B0000;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 0.5rem;
}

.admin-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.admin-form input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    color: #333;
}

.admin-form input:focus {
    border-color: #8B0000;
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.1);
    outline: none;
}

#adminUsersTable {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    color: #333;
}

.table-actions h3 {
    color: #8B0000;
    margin: 0;
    font-size: 1.4rem;
    text-align: center;
}

#adminUsersTable th {
    background-color: #8B0000;
    color: #fff;
    font-weight: bold;
    position: sticky;
    top: 0;
}

#adminUsersTable td, 
#adminUsersTable th {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

#adminUsersTable tbody tr:hover {
    background-color: #f5f5f5;
}

#adminUsersTable tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

.user-update-modal {
    max-width: 700px;
}

/* Responsive styles for admin page */
@media (max-width: 768px) {
    .admin-form .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    #adminUsersTable td, 
    #adminUsersTable th {
        padding: 10px;
    }
}