/* General Body and Container Styles */
body {
    font-family: "Inter", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f3f4f6; /* Reverted to original light gray background */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header and Navigation Styles */
header {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

@media (min-width: 768px) {
    header .container {
        flex-direction: row;
        justify-content: space-between;
    }
}

nav {
    background-color: #1e3a8a; /* Darker blue for nav */
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem; /* Space between nav items */
}

nav ul li a {
    color: #ffffff;
    font-weight: bold;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem; /* rounded-md */
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
    display: block; /* Make the whole padding area clickable */
}

nav ul li a:hover {
    background-color: #dbeafe; /* blue-100 */
    color: #1e3a8a; /* blue-800 */
}

nav ul li a.active {
    background-color: #2563eb; /* blue-600 */
    color: #ffffff;
}

/* Section and Card Styles */
.page-section {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.card {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    /* Ensure card itself is centered and has max-width for better readability */
    max-width: 700px; /* Limit card width */
    margin-left: auto;
    margin-right: auto;
}

/* Form Styles */
.form-input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db; /* gray-300 */
    border-radius: 0.375rem; /* rounded-md */
    font-size: 1rem;
    line-height: 1.5;
    color: #374151; /* gray-700 */
    background-color: #ffffff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-input:focus {
    border-color: #3b82f6; /* blue-500 */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5); /* blue-500 with opacity */
    outline: none;
}

.form-button {
    display: block;
    width: 100%;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: #ffffff;
    border-radius: 0.375rem; /* rounded-md */
    transition: background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    cursor: pointer;
    border: none;
}

/* Specific button colors are handled by Tailwind classes directly in HTML */
/* Example: bg-blue-600 hover:bg-blue-700 */

/* Message Box for Form Submissions */
.message-box {
    margin-top: 1rem;
    padding: 0.75rem 1.25rem;
    border-radius: 0.375rem;
    font-weight: 500;
    text-align: center;
    color: #ffffff;
    display: none; /* Hidden by default */
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.5);
    display: flex; /* Changed from 'none' for debugging, will revert to 'none' */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none; /* This is the crucial line that should hide them by default */
}

.modal-content {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    width: 90%;
    position: relative;
    max-height: 90vh; /* Limit height for scrollability */
    overflow-y: auto; /* Enable scrolling for long content */
}

.close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280; /* gray-500 */
}

.close-button:hover {
    color: #1f2937; /* gray-900 */
}

/* FAQ Styles */
.faq-list .faq-item {
    margin-bottom: 1rem;
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 0.375rem;
    overflow: hidden;
}

.faq-question {
    background-color: #eff6ff; /* blue-50 */
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: #1e40af; /* blue-800 */
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s ease-in-out;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.2s ease-in-out;
}

.faq-question.active::after {
    content: '-';
    transform: rotate(180deg);
}

.faq-question:hover {
    background-color: #dbeafe; /* blue-100 */
}

.faq-answer {
    padding: 1rem 1.25rem;
    background-color: #ffffff;
    border-top: 1px solid #e5e7eb; /* gray-200 */
    color: #4b5563; /* gray-700 */
    display: none; /* Hidden by default */
}

/* Validation Icon (Tick/Spinner) */
.input-group {
    position: relative;
    display: flex;
    flex-direction: column;
}

.input-group input,
.input-group select,
.input-group textarea {
    padding-right: 2.5rem; /* Make space for the icon */
}

.validation-icon {
    position: absolute;
    right: 0.75rem;
    top: 50%; /* Adjust based on input height */
    transform: translateY(-50%);
    pointer-events: none; /* Allow clicks to pass through to input */
    height: 1.25rem; /* h-5 */
    width: 1.25rem; /* w-5 */
}

.spinner {
    border: 3px solid #f3f3f3; /* Light grey */
    border-top: 3px solid #3b82f6; /* Blue */
    border-radius: 50%;
    width: 1.25rem;
    height: 1.25rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Payment Page Specific Styles */
.qr-code-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.qr-code-section img {
    border: 1px solid #e5e7eb;
    padding: 0.5rem;
    max-width: 200px; /* Ensure QR code image doesn't get too large */
    height: auto;
}

.details-section {
    background-color: #f9fafb; /* gray-50 */
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.details-section h2 {
    color: #1f2937; /* gray-900 */
    margin-bottom: 0.75rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0;
    border-bottom: 1px dashed #e5e7eb;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 500;
    color: #4b5563; /* gray-700 */
}

.detail-value {
    color: #1f2937; /* gray-900 */
}

/* Footer specific adjustments for better alignment and responsiveness */
footer .container .flex { /* Targeting the div containing footer links */
    display: flex; /* Ensure it's a flex container */
    flex-wrap: wrap; /* Allow items to wrap to the next line */
    justify-content: center; /* Center items horizontally */
    gap: 0.75rem 1rem; /* Add more consistent gap between links (row-gap column-gap) */
    padding: 0.5rem 0; /* Add some vertical padding within the footer link container */
}

/* Ensure footer text color is consistent */
footer a {
    color: #1e3a8a; /* Explicitly set link color for consistency, matching the header nav */
}


/* Responsive Adjustments */
@media (max-width: 767px) {
    .nav-link {
        font-size: 0.875rem; /* Smaller font on small screens */
        padding: 0.5rem 0.75rem;
    }

    .page-section {
        padding: 1.5rem;
    }

    .card {
        padding: 1.5rem;
    }

    h1 {
        font-size: 1.75rem; /* Smaller heading on small screens */
    }

    h2 {
        font-size: 1.5rem;
    }

    .modal-content {
        padding: 1.5rem;
    }
    footer .container .flex {
        gap: 0.4rem 0.6rem; /* Smaller gap on small screens */
    }
}
