/* Form Container */
.prayer-times-form-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 1.5rem 0;
    margin-bottom: 0; /* Remove any bottom margin */
}

/* Form Grid Layout - 2 columns */
.prayer-times-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 0; /* Ensure no bottom margin */
}

/* Form Groups */
.form-group {
    display: flex;
    flex-direction: column;
}

/* Labels */
.form-group label {
    /*color: rgba(15, 94, 40, 0.8); /* Slightly transparent version of accent color */
    /* OR */
    color: "white";  /*A lighter shade of your accent color */
}

/* Input and Select Fields */
.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cfe5d4;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(15, 94, 40, 0.1);
}

.form-group input::placeholder {
    color: #999;
    font-style: italic;
}

/* Submit Button - Spans 2 columns */
.btn-primary {
    grid-column: span 2;
    background-color: var(--accent);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
    margin-top: 0.5rem;
    margin-bottom: 0; /* Remove any bottom margin */
}

.btn-primary:hover {
    background-color: var(--accent-hover);
}

/* Prayer Times Results */
.prayer-times-form-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 1.5rem 0;
    position: relative; /* Add this */
    overflow: hidden; /* Add this to contain any potential overflow */
}

#prayerTimesResults {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e0e6e3;
    color: #333;
    
    /* Optional: Add these to ensure no extra space */
    width: 100%;
    box-sizing: border-box;
}

#prayerTimesResults h3 {
    color: var(--accent);
    margin-top: 0;
    margin-bottom: 1rem;
    text-align: center;
}

#prayerTimesResults table {
    width: 100%;
    border-collapse: collapse;
    color: #333; /* Ensure dark text in the table */
}

#prayerTimesResults th,
#prayerTimesResults td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e0e6e3;
}

#prayerTimesResults th {
    background-color: var(--accent);
    color: white; /* White text on accent background */
    font-weight: 600;
}

#prayerTimesResults tr:last-child td {
    border-bottom: none;
}

#prayerTimesResults tr:hover {
    background-color: #f4f7f6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .prayer-times-form {
        grid-template-columns: 1fr;
    }
    
    .btn-primary {
        grid-column: span 1;
    }
}

#quranSearchResults {
    margin-top: 2rem;
    background: #f9f9f9;
    border-radius: 6px;
    padding: 1.5rem;
}

#quranSearchResults table {
    width: 100%;
    border-collapse: collapse;
}

#quranSearchResults th,
#quranSearchResults td {
    border: 1px solid #e0e6e3;
    padding: 0.75rem;
    text-align: left;
}

#quranSearchResults th {
    background-color: var(--accent);
    color: white;
}

.error {
    color: red;
    text-align: center;
}

.hadith-results-table {
    width: 100%;
    border-collapse: collapse;
}

.hadith-results-table th,
.hadith-results-table td {
    border: 1px solid #e0e6e3;
    padding: 0.75rem;
    text-align: left;
}

.hadith-results-table th {
    background-color: var(--muted);
    font-weight: 600;
}

.hadith-results-table .hadith-text {
    font-family: "Amiri", serif;
}
.article-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.article-results-table th,
.article-results-table td {
    border: 1px solid #e0e6e3;
    padding: 0.75rem;
    text-align: left;
}

.article-results-table th {
    background-color: var(--muted);
    font-weight: 600;
}

.article-results-table a {
    color: var(--accent);
    text-decoration: none;
}

.article-results-table a:hover {
    text-decoration: underline;
}

/* Companion Search Results Table */
.companions-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.companions-results-table th,
.companions-results-table td {
    border: 1px solid #e0e6e3;
    padding: 0.75rem;
    text-align: left;
}

.companions-results-table th {
    background-color: var(--muted);
    font-weight: 600;
    color: var(--accent);
}

.companions-results-table tr:hover {
    background-color: #f4f7f6;
    transition: background-color 0.3s ease;
}

/* Companion Biography Styles */
.companion-card {
    background-color: #f9f9f9;
    border-left: 4px solid var(--accent);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    transition: box-shadow 0.3s ease;
}

.companion-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.companion-card h3 {
    color: var(--accent);
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--muted);
    padding-bottom: 0.5rem;
}

.companion-highlights {
    list-style-type: none;
    padding-left: 0;
    margin-bottom: 1rem;
}

.companion-highlights li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.companion-highlights li::before {
    content: '✦';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.read-more {
    display: inline-block;
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

.read-more:hover {
    color: var(--accent-hover);
    text-decoration: underline;
}

/* Companion Grid Layout */
.companions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .companions-grid {
        grid-template-columns: 1fr;
    }
}

/* Companion Search Form Enhancements */
#companionsSearchForm .form-group {
    margin-bottom: 1rem;
}

#companionsSearchForm select,
#companionsSearchForm input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cfe5d4;
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

#companionsSearchForm select:focus,
#companionsSearchForm input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(15, 94, 40, 0.1);
}

.masjid-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.masjid-results-table th,
.masjid-results-table td {
    border: 1px solid #e0e6e3;
    padding: 0.75rem;
    text-align: left;
}

.masjid-results-table th {
    background-color: var(--muted);
    font-weight: 600;
}

.google-maps-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: bold;
}

.google-maps-link:hover {
    text-decoration: underline;
}

.charity-results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.charity-results-table th,
.charity-results-table td {
    border: 1px solid #e0e6e3;
    padding: 0.75rem;
    text-align: left;
}

.charity-results-table th {
    background-color: var(--muted);
    font-weight: 600;
    color: var(--accent);
}

.charity-results-table tr:hover {
    background-color: #f4f7f6;
    transition: background-color 0.3s ease;
}

.charity-link,
.donate-link {
    display: inline-block;
    margin: 0.25rem;
    padding: 0.25rem 0.5rem;
    color: var(--accent);
    text-decoration: none;
    border: 1px solid var(--accent);
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.donate-link {
    background-color: var(--accent);
    color: white;
}

.charity-link:hover,
.donate-link:hover {
    background-color: var(--accent-hover);
    color: white;
}
