﻿/* Sermon Page Specific Styles */

/* Page Layout */
.sermon-page {
    background-color: #f8f9fa;
    min-height: 100vh;
}

/* Header */
.header {
    background: linear-gradient(135deg, #2c5530 0%, #4a7c59 100%);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 20px rgba(44, 85, 48, 0.3);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand .brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
}

.nav-brand .brand-logo {
    width: 40px;
    height: 40px;
    margin-right: 10px;
    border-radius: 50%;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Mobile Navigation */
.mobile-menu-container {
    display: none;
}

.mobile-menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 8px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: all 0.3s ease;
}

.mobile-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem;
    min-width: 200px;
    display: none;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu a {
    display: block;
    color: #2c5530;
    text-decoration: none;
    padding: 0.75rem;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.mobile-menu a:hover,
.mobile-menu a.active {
    background-color: #f0f8f0;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #2c5530 0%, #4a7c59 100%);
    color: white;
    padding: 4rem 0 3rem 0;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-description {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Controls Section */
.controls-section {
    background: white;
    padding: 2rem 0;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 80px;
    z-index: 50;
}

.controls-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
    justify-content: space-between;
}

/* Search Container */
.search-container {
    position: relative;
    flex: 1;
    max-width: 400px;
    min-width: 250px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 12px 45px 12px 45px;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #2c5530;
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.search-clear {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    display: none;
}

.search-clear.show {
    display: block;
}

/* Filter Container */
.filter-container {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 10px 20px;
    border: 2px solid #e9ecef;
    background: white;
    color: #495057;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: #2c5530;
    color: #2c5530;
}

.filter-btn.active {
    background: #2c5530;
    border-color: #2c5530;
    color: white;
}

/* View Toggle */
.view-toggle {
    display: flex;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.view-btn {
    padding: 10px 15px;
    background: white;
    border: none;
    color: #495057;
    cursor: pointer;
    transition: all 0.3s ease;
}

.view-btn:hover {
    background: #f8f9fa;
}

.view-btn.active {
    background: #2c5530;
    color: white;
}

/* Sermons Section */
.sermons-section {
    padding: 3rem 0;
    min-height: 60vh;
}

/* Loading State */
.loading-container {
    text-align: center;
    padding: 4rem 0;
}

.loading-spinner {
    font-size: 2rem;
    color: #2c5530;
    margin-bottom: 1rem;
}

.loading-text {
    font-size: 1.1rem;
    color: #6c757d;
}

/* No Results State */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
}

.no-results-icon {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 1.5rem;
}

.no-results-title {
    font-size: 1.5rem;
    color: #495057;
    margin-bottom: 1rem;
}

.no-results-text {
    color: #6c757d;
    margin-bottom: 2rem;
}

.btn-reset-filters {
    background: #2c5530;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-reset-filters:hover {
    background: #1e3a21;
    transform: translateY(-2px);
}

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

.sermons-grid.list-view {
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Sermon Card */
.sermon-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    height: fit-content;
}

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

.sermon-image {
    position: relative;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
}

.sermon-image img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: contain;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.sermon-card:hover .sermon-image img {
    transform: scale(1.05);
}

.sermon-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, rgba(44, 85, 48, 0.8) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sermon-card:hover .sermon-overlay {
    opacity: 1;
}

.view-text {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    text-align: center;
}

.sermon-info {
    padding: 1.5rem;
}

.sermon-date {
    color: #2c5530;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.sermon-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #212529;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.sermon-description {
    color: #6c757d;
    line-height: 1.5;
    margin-bottom: 1rem;
}

/* List View Styling */
.sermons-grid.list-view .sermon-card {
    display: flex;
    align-items: flex-start;
    min-height: 200px;
}

.sermons-grid.list-view .sermon-image {
    width: 200px;
    flex-shrink: 0;
    min-height: 200px;
    max-height: 300px;
}

.sermons-grid.list-view .sermon-image img {
    max-height: 300px;
}

.sermons-grid.list-view .sermon-info {
    flex: 1;
    padding: 1.5rem;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 2rem;
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    padding: 2rem 2rem 1rem 2rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c5530;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f8f9fa;
    color: #2c5530;
}

.modal-body {
    padding: 2rem;
}

.sermon-preview-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center;
}

.modal-sermon-image {
    width: 100%;
    max-width: none;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.sermon-info {
    width: 100%;
    text-align: center;
}

.sermon-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: center;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #2c5530;
    color: white;
}

.btn-primary:hover {
    background: #1e3a21;
    transform: translateY(-2px);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: #2c5530;
    color: white;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left p {
    margin-bottom: 0.5rem;
}

.footer-privacy-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin-right: 1rem;
    transition: color 0.3s ease;
}

.footer-privacy-link:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: white;
}

.footer-logo-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
    
    .mobile-menu-container {
        display: block;
        position: relative;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .controls-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-container {
        max-width: none;
    }
    
    .filter-container {
        justify-content: center;
    }
    
    .view-toggle {
        align-self: center;
    }
    
    .sermons-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
    
    .sermons-grid.list-view .sermon-card {
        flex-direction: column;
        max-height: none;
    }
    
    .sermons-grid.list-view .sermon-image {
        width: 100%;
        aspect-ratio: 3/4;
    }
    
    .sermon-preview-container {
        flex-direction: column;
    }
    
    .modal-sermon-image {
        max-width: none;
        width: 100%;
    }
    
    .sermon-actions {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .page-header {
        padding: 3rem 0 2rem 0;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .controls-section {
        padding: 1.5rem 0;
    }
    
    .modal {
        padding: 1rem;
    }
    
    .modal-header,
    .modal-body {
        padding: 1.5rem;
    }
    
    .sermons-grid {
        grid-template-columns: 1fr;
    }
}

/* Animation Classes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus styles for accessibility */
*:focus {
    outline: 2px solid #2c5530;
    outline-offset: 2px;
}

button:focus,
input:focus,
a:focus {
    outline: 2px solid #2c5530;
    outline-offset: 2px;
}
