/* General Body Styles */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

/* Header Styles */
header {
    background-color: #333;
    color: #fff;
    padding: 1.5rem 0;
    text-align: center;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

/* Navigation Bar */
nav {
    display: flex;
    justify-content: center;
    background-color: #444;
    padding: 0.75rem 0;
}

nav a {
    color: #fff;
    padding: 0.5rem 1.5rem;
    text-decoration: none;
    font-size: 1.1rem;
    transition: background-color 0.3s;
}

nav a:hover, nav a.active {
    background-color: #555;
}

/* Main Content Area */
main {
    padding: 1rem;
    max-width: 1000px;
    margin: 2rem auto;
}

.content {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Home Page Specific Styles */
.navigation-boxes {
    display: flex;
    justify-content: space-around;
    margin-top: 2rem;
}

.nav-box {
    width: 45%;
    padding: 1.5rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: box-shadow 0.3s, transform 0.3s;
}

.nav-box:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

.nav-box h3 {
    margin-top: 0;
    color: #0056b3;
}

/* --- STYLES FOR CARDS AND SEARCH --- */
.search-container {
    margin-bottom: 2rem;
    text-align: center;
}

.search-input {
    width: 80%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 20px;
    outline: none;
    transition: border-color 0.3s;
}

.search-input:focus {
    border-color: #007bff;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.card {
    background-color: #e7f3fe;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    text-align: center;
    transition: box-shadow 0.3s, transform 0.3s;
}

.card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
    transform: translateY(-5px);
}

.card h3 {
    margin: 0;
    color: #0056b3;
}

/* --- STYLES FOR FULL-SCREEN MODAL --- */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto; /* Adjusted margin to allow for more content */
    padding: 3rem;
    border: 1px solid #888;
    width: 90%;
    max-width: 900px; /* Increased max-width for better list display */
    max-height: 90vh; /* Added max-height */
    overflow-y: auto; /* Scrollable if content exceeds height */
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: fadeIn 0.5s;
    text-align: left;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-question-list h2 {
    text-align: center;
    color: #0056b3;
    margin-bottom: 1.5rem;
}

.question-item {
    background-color: #e7f3fe;
    border-left: 5px solid #007bff;
    padding: 1rem;
    margin: 0.75rem 0;
    cursor: pointer;
    transition: background-color 0.3s;
}

.question-item:hover {
    background-color: #d0e8fc;
}

.answer-text {
    display: none; /* Hidden by default */
    padding: 1rem;
    background-color: #f8f9fa;
    border-left: 5px solid #28a745;
    margin: 0.75rem 0 0 0;
}

.answer-text strong {
    color: #28a745;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-button:hover, .close-button:focus {
    color: #333;
}

body.modal-open {
    overflow: hidden;
}

/* Footer Styles */
footer {
    text-align: center;
    padding: 1rem;
    background-color: #333;
    color: #fff;
    position: relative;
    bottom: 0;
    width: 100%;
}
