/* 99 Names of Allah - Homepage Styles with Global Consistency */

/* Custom 99 Names Header (content section only) */
.names-header {
    background-color: #ad5207;
    color: #ecf0f1;
    padding: 2.25rem 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;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.names-header h1 {
    margin: 0;
    font-size: 2.5rem;
    color: #ecf0f1;
    font-weight: 700;
}

.names-header p {
    margin: 0;
    font-size: 1.2rem;
    color: #ecf0f1;
}

/* Breadcrumbs Styling */
.breadcrumbs {
    padding-bottom: 1rem;
    font-size: 0.9rem;
    color: white;
    align-self: flex-start;
}

.breadcrumbs a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    text-decoration: underline;
    color: #f0f0f0; /* A slightly off-white for hover effect */
}

.breadcrumbs span {
    margin: 0 5px;
    color: white;
}

.breadcrumbs span:last-child {
    font-weight: 600;
    color: white;
}

/* Main container styles - consistent with global.css */
.container {
    padding: 20px;
    max-width: 1280px; /* Match global content-container max-width */
    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: #374151; /* Match global text-gray-700 */
    transition: all 0.3s ease;
    cursor: pointer;
}

.name-list-item:last-child {
    border-bottom: none;
}

.name-list-item:hover {
    background-color: rgba(173, 82, 7, 0.1); /* Use brand primary with transparency */
    border-radius: 10px;
    padding: 25px 15px;
    text-decoration: none;
    color: #374151;
}

.item-number {
    font-size: 1rem;
    font-weight: 600;
    color: #6B7280; /* Consistent gray color */
    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: #ad5207; /* Brand primary color from global.css */
}

.item-meaning {
    font-size: 0.9rem;
    color: #6B7280; /* Consistent with global gray colors */
}

.item-arabic {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ad5207; /* Brand primary */
    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: #4B5563; /* Match global text-gray-600 */
}

.item-audio-icon {
    font-size: 1.2rem;
    color: #9CA3AF;
    transition: color 0.3s ease;
}

.name-list-item:hover .item-audio-icon {
    color: #ad5207; /* Brand primary on hover */
}

/* Table of Contents Styles - consistent with global button 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-size: 1.2rem;
    color: #ad5207; /* Brand primary */
    margin: 0 0 12px 0;
    text-align: center;
    font-weight: 600;
}

.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(173, 82, 7, 0.2); /* Brand primary shadow */
}

.toc-link {
    display: block;
    padding: 10px 12px;
    text-decoration: none;
    color: #374151; /* Match global text color */
    font-weight: 600;
    border-radius: 8px;
    transition: color 0.3s ease;
    text-align: center;
    font-size: 0.9rem;
}

.toc-link:hover {
    color: #ad5207; /* Brand primary */
    text-decoration: none;
}

.toc-icon {
    display: block;
    width: 20px;
    height: 20px;
    margin: 0 auto 5px auto;
}

.toc-description {
    display: none;
}

/* Info & FAQ Section Styles - consistent with global heading 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-size: 1.5rem;
    color: #ad5207; /* Brand primary - consistent with global h1-h6 styles */
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
}

.info-card p {
    margin: 0;
    line-height: 1.7;
    color: #4B5563; /* Match global text-gray-600 */
}

/* 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-size: 1.1rem;
    font-weight: 600;
    padding: 10px 0;
    cursor: pointer;
    color: #374151; /* Match global text color */
}

.faq-section .faq-icon {
    font-size: 1.5rem;
    color: #ad5207; /* Brand primary */
    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: #4B5563; /* Match global text-gray-600 */
    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;
    }

    /* Mobile responsive adjustments for breadcrumbs */
    .breadcrumbs {
        padding-bottom: 0.8rem;
        font-size: 0.85rem;
    }

    .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;
        background-color: rgba(173, 82, 7, 0.05); /* Lighter brand color for mobile */
    }

    .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); /* Match global bg-brand-background */
        pointer-events: none;
    }

    .name-list-item:hover .item-explanation::after {
        background: linear-gradient(to bottom, transparent, rgba(173, 82, 7, 0.05));
    }

    .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;
    }

    .tab-button {
        min-width: 80px;
        padding: 10px 12px;
        font-size: 0.85rem;
    }

    .name-card {
        padding: 15px 0;
    }

    .arabic-title {
        font-size: 3.5rem;
    }

    .meaning {
        font-size: 1.1rem;
    }

    .nav-arrow {
        padding: 6px 12px;
        font-size: 0.85rem;
    }

    .name-details-container {
        padding: 10px 5px 0;
    }
}