/**
 * Sermon Cards - Basic Starter Styles
 * 
 * These are minimal styles to ensure sermon cards are functional out of the box.
 * You can override these styles in your theme or disable them entirely.
 */

/* Basic Grid Layout */
.sermon-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1rem 0;
}

/* Card Container */
.sermon-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.sermon-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Card Header */
.sermon-card-header {
    padding: 1.25rem 1.25rem 1rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.sermon-title {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    line-height: 1.3;
    color: #333;
    font-weight: 600;
}

.sermon-speaker {
    color: #666;
    font-style: italic;
    font-size: 0.9rem;
    margin: 0;
}

/* Card Body */
.sermon-card-body {
    padding: 1.25rem;
}

.sermon-text {
    background: #f0f7ff;
    padding: 0.75rem;
    border-left: 3px solid #007cba;
    margin-bottom: 1rem;
    font-weight: 500;
    color: #2c3e50;
    font-size: 0.95rem;
}

.sermon-series {
    background: #e8f5e8;
    color: #2e7d32;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    display: inline-block;
    margin-bottom: 1rem;
    font-weight: 500;
}

.sermon-description {
    color: #555;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.sermon-excerpt {
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Card Footer */
.sermon-card-footer {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Links */
.sermon-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.sermon-link {
    padding: 0.4rem 0.8rem;
    background: #007cba;
    color: white !important;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
    display: inline-block;
}

.sermon-link:hover {
    background: #005a87;
    color: white !important;
    text-decoration: none;
}

.sermon-link:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
    color: white !important;
}

/* Specific link types */
.sermon-audio-link {
    background: #e74c3c;
}

.sermon-audio-link:hover {
    background: #c0392b;
}

.sermon-video-link {
    background: #9b59b6;
}

.sermon-video-link:hover {
    background: #8e44ad;
}

.sermon-text-link {
    background: #f39c12;
}

.sermon-text-link:hover {
    background: #d68910;
}

/* Additional Links */
.sermon-additional-link {
    background: #27ae60;
}

.sermon-additional-link:hover {
    background: #229954;
}

/* Additional link types based on type field */
.sermon-link-download {
    background: #8e44ad;
}

.sermon-link-download:hover {
    background: #7d3c98;
}

.sermon-link-external {
    background: #3498db;
}

.sermon-link-external:hover {
    background: #2980b9;
}

.sermon-link-video {
    background: #e67e22;
}

.sermon-link-video:hover {
    background: #d35400;
}

.sermon-link-audio {
    background: #e74c3c;
}

.sermon-link-audio:hover {
    background: #c0392b;
}

.sermon-link-other {
    background: #95a5a6;
}

.sermon-link-other:hover {
    background: #7f8c8d;
}

/* Additional Links Container */
.sermon-additional-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.sermon-all-links .sermon-main-links {
    margin-bottom: 0.5rem;
}

.sermon-all-links .sermon-additional-links {
    margin-top: 0.5rem;
}

/* Date */
.sermon-date {
    color: #777;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .sermon-cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 0.5rem 0;
    }
    
    .sermon-card-header,
    .sermon-card-body,
    .sermon-card-footer {
        padding: 1rem;
    }
    
    .sermon-card-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .sermon-links {
        justify-content: center;
        margin-bottom: 0.5rem;
    }
    
    .sermon-date {
        text-align: center;
        white-space: normal;
    }
}

/* Small tablets */
@media (min-width: 768px) and (max-width: 991px) {
    .sermon-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Accessibility */
.sermon-card:focus-within {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .sermon-card {
        border: 1px solid #ccc;
        box-shadow: none;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .sermon-link {
        background: transparent !important;
        color: #333 !important;
        border: 1px solid #333 !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .sermon-card {
        border: 2px solid #000;
    }
    
    .sermon-card-header {
        background: #f0f0f0;
        border-bottom: 2px solid #000;
    }
    
    .sermon-text {
        background: #f0f0f0;
        border-left: 4px solid #000;
    }
}