/* General body and typography styling */
:root {
    --bg-color-light: #FFFFFF; /* A pure white */
    --bg-color-dark: #111111; /* A deep black */
    --primary-color: #1a1a1a; /* Dark gray for text */
    --accent-color: #FFD700; /* A rich gold */
    --text-color: #1a1a1a;
    --secondary-text-color: #555555;
    --border-radius: 12px;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Amiri', serif;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color-light);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Utility classes for layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.hidden { display: none; }

/* Navigation bar styling */
.navbar {
    background-color: var(--bg-color-dark);
    color: var(--bg-color-light);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    text-decoration: none;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    color: var(--bg-color-light);
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease, background-color 0.3s ease;
    border-radius: var(--border-radius);
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active-link { /* New class for active state */
    color: var(--accent-color);
    background-color: rgba(255, 255, 255, 0.1);
}

/* Mobile menu toggle button */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--bg-color-light);
    font-size: 1.8rem;
    cursor: pointer;
}

/* Hero section styling */
.hero {
    /* Note: You'll need to provide the actual logo.png for the background image. */
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('./assets/logo.png') center/cover no-repeat;
    color: var(--bg-color-light);
    text-align: center;
    padding: 8rem 2rem;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 8vw, 4.5rem);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: clamp(1rem, 4vw, 1.5rem);
    max-width: 600px;
    opacity: 0.9;
}

/* Main content section styling */
.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.card {
    background-color: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 1.5rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.card-icon {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* New styling for the Qadaa section forms and dashboard */
.qadaa-form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    text-align: right;
}

@media (min-width: 600px) {
    .qadaa-form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.qadaa-form-grid .input-group,
.qadaa-form-grid .row {
    text-align: right;
    direction: rtl;
}

.qadaa-form-grid .h {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.qadaa-form-grid .input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-family: var(--font-main);
    margin-top: 0.5rem;
}

.qadaa-form-grid button {
    background-color: var(--primary-color);
    color: var(--bg-color-light);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-family: var(--font-main);
    transition: background-color 0.3s ease;
}

.qadaa-form-grid button:hover {
    background-color: #333;
}

.qadaa-form-grid .btn-ghost {
    background: none;
    color: var(--primary-color);
    border: 1px solid transparent;
    text-decoration: underline;
    padding: 0;
}

.qadaa-form-grid .btn-ghost:hover {
    color: #555;
    background: none;
}

.qadaa-form-grid .note {
    color: var(--secondary-text-color);
    font-size: 0.8rem;
}

/* Styling for the collapsible Dua section (newly added) */
.dua-section details {
    background-color: #fcf8e3; /* Soft yellow to match the accent color */
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 20px;
    margin-bottom: 20px;
}
.dua-section summary {
    font-size: 1.8rem; /* Larger font for the summary title */
    font-weight: bold;
    color: #d4a700; /* Darker yellow for the title */
    cursor: pointer;
    outline: none; /* Remove outline on focus */
    padding: 10px 0;
    text-align: center;
    list-style: none; /* Remove default arrow marker */
    position: relative;
}
.dua-section summary::-webkit-details-marker {
    display: none; /* Hide default marker for Webkit browsers */
}
.dua-section summary::before {
    content: '▼'; /* Custom arrow for closed state */
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
}
.dua-section details[open] summary::before {
    content: '▲'; /* Custom arrow for open state */
    transform: translateY(-50%) rotate(0deg);
}
.dua-section details[open] summary {
    border-bottom: 1px solid #ffd700; /* Separator when open */
    margin-bottom: 15px;
    padding-bottom: 15px;
}
.dua-section details p {
    font-size: 1.2rem; /* Adjusted font size for prayer text */
    line-height: 1.8;
    color: #444;
    text-align: justify; /* Justify text for better readability */
    direction: rtl; /* Set text direction for Arabic */
}

/* New styling for the Duaa Al-Ahad section to match the site theme */
.dua-card-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.dua-card {
    background-color: var(--bg-color-light);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    padding: 1.5rem;
    text-align: center;
    flex: 1 1 250px; /* Make cards flexible but with a min-width */
}

.dua-card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.dua-card-value {
    font-size: 2rem;
    font-weight: bold;
}

#days-completed {
    color: #2196F3; /* A blue color for consistency */
}

#completed-rounds {
    color: #FFC107; /* An amber color for consistency */
}

.dua-separator {
    border: 0;
    height: 1px;
    background-color: #ddd;
    margin: 1.5rem 0;
}

.audio-player-container {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.audio-player {
    width: 100%;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 1rem;
    text-align: center;
}

.checkbox-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
}

.checkbox-item label {
    text-align: center;
}

.message-box {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1a1a1a;
    color: #fff;
    padding: 1rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1000;
}

.message-box.show {
    opacity: 1;
    visibility: visible;
}

.ranking-table-container {
    overflow-x: auto;
    margin-top: 2rem;
    background-color: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.ranking-table {
    width: 100%;
    border-collapse: collapse;
}

.ranking-table th, .ranking-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #eee;
    text-align: right;
}

.ranking-table th {
    background-color: #f8f8f8;
    font-weight: bold;
    color: var(--secondary-text-color);
}

.ranking-table tbody tr:last-child td {
    border-bottom: none;
}

/* Footer styling */
.footer {
    background-color: var(--bg-color-dark);
    color: var(--secondary-text-color);
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

.footer-links a {
    color: var(--secondary-text-color);
    text-decoration: none;
    margin: 0 1rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* Responsive design for tablets and phones */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--bg-color-dark);
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        padding: 1rem 1.5rem;
        text-align: center;
    }

    .menu-toggle {
        display: block;
    }
}
