/* Custom 99 Names Header (content section only) */
.names-header {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 2rem 1rem;
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    text-align: center;
    margin-top: 0;
}

.names-header .content-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.names-header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-family: 'Amiri', serif;
    color: #ecf0f1;
}

.names-header p {
    margin: 0;
    font-size: 1.2rem;
    color: #ecf0f1;
}

/* Main container styles */
.container {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Homepage List Styles */
.names-list-container {
    margin-top: 2rem;
}

.name-list-item {
    display: flex;
    align-items: center;
    padding: 25px 0;
    border-bottom: 1px solid #dee2e6;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    cursor: pointer;
}

.name-list-item:last-child {
    border-bottom: none;
}

.name-list-item:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 25px 15px;
    text-decoration: none;
    color: #333;
}

.item-number {
    font-size: 1rem;
    font-weight: 600;
    color: #b0bec5;
    width: 40px;
    flex-shrink: 0;
}

.item-main-info {
    display: flex;
    flex-direction: column;
    width: 180px;
    flex-shrink: 0;
    margin-right: 20px;
    text-align: left;
}

.item-transliteration {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    font-family: 'Manrope', sans-serif;
}

.item-meaning {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.item-arabic {
    font-family: 'Amiri', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    width: 150px;
    text-align: center;
    flex-shrink: 0;
    margin-right: 20px;
}

.item-explanation {
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: left;
    margin: 0 20px 0 0;
    color: #555;
}

.item-audio-icon {
    font-size: 1.2rem;
    color: #ced4da;
    transition: color 0.3s ease;
}

.name-list-item:hover .item-audio-icon {
    color: #16a085;
}

/* Table of Contents Styles */
.table-of-contents {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 15px 20px;
    margin: 1.5rem 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.table-of-contents h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.2rem;
    color: #2c3e50;
    margin: 0 0 12px 0;
    text-align: center;
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.toc-item {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    flex: 1;
    min-width: 160px;
    max-width: 200px;
}

.toc-item:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.toc-link {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 600;
    border-radius: 8px;
    transition: color 0.3s ease;
    text-align: center;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
}

.toc-link:hover {
    color: #16a085;
    text-decoration: none;
}

.toc-icon {
    display: block;
    width: 20px;
    height: 20px;
    margin: 0 auto 5px auto;
}

.toc-description {
    display: none;
}

/* Info & FAQ Section Styles */
.info-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.info-card {
    padding: 25px 0;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.info-card:last-child {
    border-bottom: none;
}

.info-card h2 {
    font-family: 'Manrope', sans-serif;
    font-size: 1.5rem;
    color: #2c3e50;
    margin-top: 0;
    margin-bottom: 15px;
}

.info-card p {
    margin: 0;
    line-height: 1.7;
    color: #555;
}

/* Homepage FAQ Specific Styles */
.faq-section {
    margin: 40px auto;
    padding: 0;
}

.faq-section .faq-item {
    border-bottom: 1px solid #dee2e6;
    padding: 15px 0;
}

.faq-section .faq-item:last-child {
    border-bottom: none;
}

.faq-section .faq-question {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 10px 0;
    cursor: pointer;
    color: #333;
}

.faq-section .faq-icon {
    font-size: 1.5rem;
    color: #16a085;
    transition: transform 0.3s ease;
}

.faq-section .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out;
}

.faq-section .faq-answer p {
    padding: 10px 0 15px 0;
    color: #555;
    line-height: 1.7;
}

.faq-section .faq-item.active .faq-answer {
    max-height: 200px;
}

.faq-section .faq-item.active .faq-icon {
    transform: rotate(45deg);
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .container {
        padding: 15px 10px;
    }

    .names-header {
        padding: 1.5rem 0.5rem;
    }

    .names-header h1 {
        font-size: 2rem;
    }

    .table-of-contents {
        padding: 12px 15px;
        margin: 1rem 0;
    }

    .table-of-contents h2 {
        font-size: 1.1rem;
        margin-bottom: 10px;
    }

    .toc-list {
        gap: 8px;
    }

    .toc-item {
        min-width: 140px;
        max-width: none;
        flex: 1;
    }

    .toc-link {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .toc-icon {
        width: 18px;
        height: 18px;
        margin-bottom: 3px;
    }

    .name-list-item {
        flex-wrap: wrap;
        padding: 20px 0;
        position: relative;
        justify-content: center;
    }

    .name-list-item:hover {
        padding: 20px 10px;
    }

    .item-main-info {
        width: 100%;
        text-align: center;
        margin-right: 0;
        margin-bottom: 10px;
    }

    .item-arabic {
        order: 1;
        width: 100%;
        text-align: center;
        font-size: 2.2rem;
        margin: 10px 0;
    }

    .item-explanation {
        order: 2;
        width: 100%;
        margin: 0;
        text-align: center;
        padding: 0 10px;
        position: relative;
        max-height: 60px;
        overflow: hidden;
        line-height: 1.4;
    }

    .item-explanation::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 30px;
        background: linear-gradient(to bottom, transparent, #fff0e1);
        pointer-events: none;
    }

    .name-list-item:hover .item-explanation::after {
        background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.3));
    }

    .item-audio-icon {
        position: absolute;
        top: 20px;
        right: 10px;
    }

    .info-sections {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 5px;
    }

    .info-card {
        padding: 20px 5px;
    }

    .faq-section {
        padding: 0 5px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px 5px;
    }

    .names-header {
        padding: 1rem 0.5rem;
    }

    .names-header h1 {
        font-size: 1.8rem;
    }

    .table-of-contents {
        padding: 10px 12px;
    }

    .table-of-contents h2 {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .toc-list {
        gap: 6px;
    }

    .toc-item {
        min-width: 120px;
    }

    .toc-link {
        padding: 6px 8px;
        font-size: 0.8rem;
    }

    .toc-icon {
        width: 16px;
        height: 16px;
        margin-bottom: 2px;
    }

    .item-explanation {
        padding: 0 5px;
        max-height: 50px;
        font-size: 0.85rem;
    }

    .item-explanation::after {
        height: 25px;
    }

    .info-card {
        padding: 15px 0;
    }

    .info-card h2 {
        font-size: 1.3rem;
    }
}