/* ==========================================================================
   CSS Reset and Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: #333333;
    background-color: #f9f9f9;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: #2c3e50;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #2980b9;
}

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
    background-color: #2c3e50;
    color: #ffffff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #ffffff;
    text-decoration: none;
}

.logo img {
    height: 60px;
    width: auto;
    display: block;
}

.logo-text h1 {
    margin: 0;
    font-size: 1.8rem;
    color: #ffffff;
}

.tagline {
    font-size: 0.9rem;
    opacity: 0.8;
    margin: 0;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

.main-nav a {
    color: #ffffff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
}

.main-nav a:hover,
.main-nav a.active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 0.5rem 0;
    display: none;
    z-index: 1000;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    color: #333333;
    display: block;
    padding: 0.75rem 1.5rem;
}

.dropdown-menu a:hover {
    background-color: #f8f9fa;
    color: #3498db;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: #3498db;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    text-align: center;
}

.btn:hover {
    background-color: #2980b9;
    color: #ffffff;
}

.btn-primary {
    background-color: #e74c3c;
}

.btn-primary:hover {
    background-color: #c0392b;
}

.btn-secondary {
    background-color: #95a5a6;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    background: linear-gradient(rgba(44, 62, 80, 0.9), rgba(44, 62, 80, 0.9)), 
                url('../images/holyland-bg.jpg') center/cover;
    color: #ffffff;
    padding: 5rem 0;
    text-align: center;
}

.hero-content h1 {
    color: #ffffff;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero .tagline {
    font-size: 1.5rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   Featured Section
   ========================================================================== */
.featured-section {
    padding: 4rem 0;
    background-color: #ffffff;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.featured-card {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.featured-header {
    padding: 1.5rem;
    background-color: #2c3e50;
    color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.featured-header h3 {
    margin: 0;
    color: #ffffff;
}

.featured-theme {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.featured-body {
    padding: 1.5rem;
}

.featured-body p {
    margin-bottom: 1rem;
    color: #666666;
}

.featured-link {
    color: #3498db;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.featured-link:hover {
    color: #2980b9;
}

/* ==========================================================================
   Categories Preview
   ========================================================================== */
.categories-preview {
    padding: 4rem 0;
    background-color: #f8f9fa;
}

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

.category-item {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #333333;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.category-item:hover {
    border-color: #3498db;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.category-name {
    font-weight: 500;
    color: #2c3e50;
}

.category-count {
    background: #3498db;
    color: #ffffff;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ==========================================================================
   Page Header
   ========================================================================== */
.page-header {
    text-align: center;
    padding: 3rem 0;
}

.page-description {
    color: #666666;
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   Categories Navigation
   ========================================================================== */
.categories-navigation {
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.category-tag {
    background: #ecf0f1;
    color: #2c3e50;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.category-tag:hover {
    background: #3498db;
    color: #ffffff;
}

/* ==========================================================================
   Search Section
   ========================================================================== */
.search-section {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

/* ==========================================================================
   Psalms Grid and Cards
   ========================================================================== */
.psalms-container {
    margin: 3rem 0;
}

.psalms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.psalm-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.psalm-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.psalm-card-header {
    padding: 1.5rem 1.5rem 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.psalm-number {
    background: #2c3e50;
    color: #ffffff;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    font-size: 0.9rem;
}

.psalm-theme {
    background: #ecf0f1;
    color: #7f8c8d;
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-size: 0.8rem;
}

.psalm-title {
    padding: 0 1.5rem;
    margin: 0.5rem 0;
    color: #2c3e50;
}

.psalm-excerpt {
    padding: 0 1.5rem;
    color: #666666;
    line-height: 1.6;
    flex-grow: 1;
}

.psalm-card-footer {
    padding: 1rem 1.5rem 1.5rem;
    margin-top: auto;
}

.psalm-link {
    color: #3498db;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.psalm-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.psalm-pagination {
    text-align: center;
    padding: 2rem 0;
}

.pagination-links {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.pagination-link {
    padding: 0.5rem 1rem;
    background: #ecf0f1;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination-link:hover {
    background: #3498db;
    color: #ffffff;
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */
.breadcrumb {
    padding: 1.5rem 0;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #3498db;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   Psalm Detail Page
   ========================================================================== */
.psalm-detail-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin: 2rem 0;
}

.psalm-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #ecf0f1;
}

.psalm-subtitle {
    color: #7f8c8d;
    font-weight: normal;
    font-size: 1.5rem;
    margin-top: 0.5rem;
}

.psalm-meta {
    margin-top: 1rem;
    color: #666666;
}

.meta-label {
    font-weight: bold;
    color: #2c3e50;
}

.explanation-section,
.context-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.explanation-section h3,
.context-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

.explanation-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.context-points {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.context-point {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.context-point h4 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   Psalm Navigation
   ========================================================================== */
.psalm-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #ecf0f1;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.nav-link {
    padding: 0.75rem 1.5rem;
    background: #ecf0f1;
    color: #2c3e50;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: #3498db;
    color: #ffffff;
}

.nav-link.all {
    background: #2c3e50;
    color: #ffffff;
}

.psalm-select select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background: #ffffff;
    color: #333333;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.psalm-sidebar {
    margin-top: 1rem;
}

.sidebar-widget {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.sidebar-widget h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e74c3c;
}

.related-list,
.category-list {
    list-style: none;
}

.related-list li,
.category-list li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #ecf0f1;
}

.related-list li:last-child,
.category-list li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.related-list a,
.category-list a {
    color: #333333;
    display: block;
}

.related-list a:hover,
.category-list a:hover {
    color: #3498db;
}

.related-title {
    display: block;
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 0.2rem;
}

/* ==========================================================================
   Category Page
   ========================================================================== */
.category-header {
    text-align: center;
    padding: 3rem 0;
    background: #ffffff;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.category-description {
    font-size: 1.2rem;
    color: #666666;
    max-width: 600px;
    margin: 1rem auto;
}

.category-stats {
    margin-top: 1rem;
}

.psalm-count {
    display: inline-block;
    background: #3498db;
    color: #ffffff;
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: bold;
}

.category-intro {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.category-intro h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.category-navigation {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #ecf0f1;
    text-align: center;
}

.back-to-psalms {
    margin-top: 2rem;
}

/* ==========================================================================
   About Page
   ========================================================================== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-section {
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.features-list,
.tech-list {
    list-style: none;
    padding-left: 1.5rem;
}

.features-list li,
.tech-list li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.features-list li:before,
.tech-list li:before {
    content: "•";
    color: #3498db;
    position: absolute;
    left: 0;
}

.server-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
}

.cta-section {
    text-align: center;
    margin: 3rem 0;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* ==========================================================================
   Contact Page
   ========================================================================== */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin: 2rem 0;
}

.contact-info,
.contact-form {
    background: #ffffff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.info-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #ecf0f1;
}

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

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

/* ==========================================================================
   Alerts
   ========================================================================== */
.alert {
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 1px solid transparent;
}

.alert.success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert.error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert.info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
    text-align: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
    background-color: #2c3e50;
    color: #ffffff;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

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

.footer-section h3 {
    color: #ffffff;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #bdc3c7;
}

.footer-section a:hover {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #bdc3c7;
    font-size: 0.9rem;
}

.server-info {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    opacity: 0.7;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .main-nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
        border-radius: 0 0 8px 8px;
    }
    
    .main-nav ul.active {
        display: flex;
    }
    
    .main-nav a {
        color: #333333;
        display: block;
        padding: 0.75rem 1rem;
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: #f8f9fa;
        margin: 0.5rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero .tagline {
        font-size: 1.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .featured-grid,
    .psalms-grid,
    .categories-list {
        grid-template-columns: 1fr;
    }
    
    .psalm-detail-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .category-tags {
        justify-content: center;
    }
    
    .context-points {
        grid-template-columns: 1fr;
    }
    
    .search-section {
        flex-direction: column;
    }
    
    .search-box,
    .search-section .btn {
        width: 100%;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .cta-section {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .logo a {
        justify-content: center;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .featured-section,
    .categories-preview {
        padding: 2rem 0;
    }
    
    .psalm-card-header {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
}