/* style.css */
/* Adobe Jenson Pro Font */
@font-face {
    font-family: 'Adobe Jenson Pro';
    src: url('./fonts/AJensonPro-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Adobe Jenson Pro';
    src: url('fonts/AJensonPro-Regular.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Adobe Jenson Pro';
    src: url('fonts/AJensonPro-Regular.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Adobe Jenson Pro';
    src: url('fonts/AJensonPro-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

/* Base Styles */
body {
    font-family: 'Adobe Jenson Pro', 'Crimson Text', 'Times New Roman', serif;
    background: #0a0a0f;
    color: #ffffff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

html {
    background: #0a0a0f;
    background-color: #0a0a0f;
    min-height: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

.header {
    margin-bottom: 4rem;
    padding-top: 2rem;
}

.title {
    font-size: 4rem;
    font-weight: 400;
    color: #ffffff;
    margin: 0;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.title-image {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    margin: 0;
}

.subtitle {
    font-size: 1.2rem;
    color: #b8b4ff;
    font-style: normal;
    margin-top: 0.5rem;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.category-card {
    background: #1a1525;
    border: 1px solid #3732ad;
    border-radius: 12px;
    padding: 2rem 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.category-card:hover {
    background: #3732ad;
    border-color: #7c77ff;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(55, 50, 173, 0.3);
}

.category-image {
    width: 180px;
    height: 180px;
    margin: 0 auto 1rem auto;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: brightness(0.9);
    order: 1;
    display: block;
}

.category-card:hover .category-image {
    transform: scale(1.1);
    filter: brightness(1.1);
}

.category-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem 0;
    color: #ffffff;
    order: 2;
}

.category-count {
    font-size: 0.9rem;
    color: #b8b4ff;
    margin: 0;
    font-weight: normal;
    order: 3;
}





/* Category Page Styles */
.page-header {
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
}

.back-link {
    position: absolute;
    top: 0;
    left: 0;
    color: #ffffff;
    background: #3732ad;
    text-decoration: none;
    font-size: 1rem;
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    border: 2px solid #3732ad;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.back-link:hover {
    background: transparent;
    color: #7c77ff;
    border-color: #7c77ff;
    transform: translateX(-3px);
}

.page-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem auto;
    object-fit: contain;
    display: block;
}

.page-title {
    font-size: 3rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
}

.page-subtitle {
    font-size: 1.2rem;
    color: #b8b4ff;
    margin: 0;
}

.content-sections {
    max-width: 1000px;
    margin: 0 auto;
}

.section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 600;
    color: #7c77ff;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 2px solid #3732ad;
    padding-bottom: 0.5rem;
}

.file-grid {
    display: flex;
    flex-direction: column;
    gap: 2px;
    background: #1a1525;
    border: 1px solid #3732ad;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
}

.file-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(55, 50, 173, 0.3);
    border-radius: 0;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #ffffff;
    transition: background-color 0.2s ease;
    display: block;
    text-align: left;
}

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

.file-item:hover {
    background: rgba(55, 50, 173, 0.4);
    border-color: transparent;
    transform: none;
    box-shadow: none;
}

.file-name {
    font-size: 1rem;
    font-weight: 400;
    text-align: left;
}

.coming-soon {
    text-align: center;
    color: #b8b4ff;
    font-style: italic;
    padding: 2rem;
    background: #1a1525;
    border: 1px dashed #3732ad;
    border-radius: 8px;
}

/* Icon styles */
.icon-scroll:before { content: "📜"; }
.icon-scale:before { content: "⚖️"; }
.icon-pray:before { content: "🙏"; }
.icon-write:before { content: "✍️"; }
.icon-prayer:before { content: "📿"; }
.icon-temple:before { content: "🏛️"; }
.icon-link:before { content: "🔗"; }
.icon-books:before { content: "📚"; }

/* Info Button and Modal */
.info-button {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 32px;
    height: 32px;
    background-color: rgba(55, 50, 173, 0.8);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Arial, sans-serif;
    font-style: normal;
}

.info-button:hover {
    background-color: #3732ad;
    transform: scale(1.1);
}

.info-modal {
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(5px);
}

.info-modal-content {
    background-color: #0a0a0f;
    margin: 10% auto;
    padding: 30px;
    border: 2px solid #3732ad;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-modal-close {
    color: #b8b4ff;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
    transition: color 0.3s ease;
}

.info-modal-close:hover {
    color: #ffffff;
}

.info-modal-text {
    color: #b8b4ff;
    font-size: 16px;
    line-height: 1.6;
    font-family: 'Adobe Jenson Pro', Georgia, serif;
}

.info-modal-text p {
    margin-bottom: 15px;
}

.info-modal-text a {
    color: #7d6ff0;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.info-modal-text a:hover {
    color: #9b8df3;
    text-decoration: underline;
}

/* Text Cards for Category Pages */
.content-section {
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 2rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #3732ad;
    padding-bottom: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.texts-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.texts-list li {
    margin-bottom: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: #1a1525;
    border: 1px solid #3732ad;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: left;
}

.texts-list li:hover {
    background: #3732ad;
    border-color: #7c77ff;
    transform: translateX(5px);
}

.texts-list li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    display: block;
    text-align: left;
    transition: color 0.3s ease;
}

.texts-list li:hover a {
    color: #ffffff;
}

.page-title {
    font-size: 3rem;
    color: #ffffff;
    margin: 1rem 0 0.5rem 0;
    font-weight: 400;
    text-align: center;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #b8b4ff;
    text-align: center;
    margin: 0 0 2rem 0;
    font-style: italic;
}

/* Card Info Button and Modal Styles */
.card-info-btn {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #3732ad;
    color: #ffffff;
    border: 1px solid #7c77ff;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    order: 4;
    font-family: Arial, sans-serif;
    font-style: normal;
    font-weight: bold;
}

.card-info-btn:hover {
    background: #7c77ff;
    border-color: #ffffff;
    transform: scale(1.15);
}

.card-info-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-info-modal-content {
    background: #1a1525;
    border: 2px solid #3732ad;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 40px rgba(55, 50, 173, 0.5);
}

.card-info-modal-close {
    position: absolute;
    right: 1rem;
    top: 0.5rem;
    font-size: 2rem;
    font-weight: bold;
    color: #ffffff;
    cursor: pointer;
    transition: color 0.3s ease;
}

.card-info-modal-close:hover {
    color: #7c77ff;
}

.card-info-modal-text {
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.6;
}

.card-info-modal-text p {
    margin: 0;
}

.card-info-modal-text em {
    color: #7c77ff;
    font-style: normal;
    font-weight: 600;
}

.card-info-modal-text a {
    color: #7c77ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-info-modal-text a:hover {
    color: #b8b4ff;
    text-decoration: underline;
}

/* Search Bar Styles */
.search-container {
    position: relative;
    max-width: 600px;
    margin: 2rem auto 3rem auto;
}

.search-bar {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1rem;
    background: #1a1525;
    color: #ffffff;
    border: 2px solid #3732ad;
    border-radius: 8px;
    font-family: 'Adobe Jenson Pro', 'Crimson Text', 'Times New Roman', serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.search-bar:focus {
    outline: none;
    border-color: #7c77ff;
    background: #262033;
    box-shadow: 0 0 15px rgba(55, 50, 173, 0.3);
}

.search-bar::placeholder {
    color: #7c77ff;
}

.search-results {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: #1a1525;
    border: 2px solid #3732ad;
    border-radius: 8px;
    max-height: 400px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(55, 50, 173, 0.3);
}

.search-result-item {
    display: block;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #3732ad;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #3732ad;
}

.search-result-title {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.search-result-category {
    color: #7c77ff;
    font-size: 0.85rem;
}

/* Subsection Styles */
.subsection {
    margin-bottom: 3rem;
}

.subsection-title {
    font-size: 2rem;
    font-weight: 600;
    color: #7c77ff;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3732ad;
    text-align: center;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .header {
        margin-bottom: 2rem;
    }
    
    .title {
        font-size: 3rem;
        letter-spacing: 1px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-top: 2rem;
    }
    
    .category-card {
        padding: 1rem 0.5rem;
        aspect-ratio: 0.9;
    }
    
    .category-image {
        width: 120px;
        height: 120px;
        margin-bottom: 0.5rem;
    }
    
    .category-name {
        font-size: 1rem;
        margin: 0.5rem 0 0.25rem 0;
    }
    
    .category-count {
        font-size: 0.8rem;
    }
    
    .card-info-btn {
        width: 24px;
        height: 24px;
        font-size: 0.9rem;
        bottom: 0.5rem;
        right: 0.5rem;
    }
    
    .back-link {
        position: fixed;
        top: 10px;
        left: 10px;
        margin-bottom: 0;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
        z-index: 1000;
    }
    
    .page-icon {
        width: 120px;
        height: 120px;
    }
    
    /* Fix info button to use text instead of emoji and remove italic */
    .info-button {
        font-family: Arial, sans-serif;
        font-size: 14px;
        font-weight: bold;
        font-style: normal;
    }
    
    /* Remove italic from card info buttons on mobile */
    .card-info-btn {
        font-style: normal;
    }
    
    /* Fix main info modal sizing for mobile */
    .info-modal-content {
        width: 90%;
        max-width: none;
        margin: 10% auto;
        padding: 1rem;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    /* Fix card info modal text alignment on mobile */
    .card-info-modal-text {
        text-align: left;
    }
    
    /* Fix card info modal sizing for mobile */
    .card-info-modal-content {
        width: 90%;
        max-width: none;
        margin: 10% auto;
        padding: 1rem;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    /* Mobile subsection styles */
    .subsection-title {
        font-size: 1.5rem;
    }
    
    .subsection {
        margin-bottom: 2rem;
    }
}

@media (max-width: 480px) {
    .categories-grid {
        gap: 0.75rem;
    }
    
    .category-card {
        padding: 0.75rem 0.25rem;
    }
    
    .category-image {
        width: 100px;
        height: 100px;
    }
    
    .category-name {
        font-size: 0.9rem;
    }
    
    .category-count {
        font-size: 0.75rem;
    }
}