/* Orthodox Daily Resources - Simple, Clean Design */

:root {
    /* Simple, reverent colors */
    --text-color: #2c2c2c;
    --bg-color: #fafafa;
    --section-bg: #ffffff;
    --border-color: #d4af37;
    --accent-color: #8b6914;
    --light-bg: #f5f5f5;
    --text-muted: #666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'EB Garamond', serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    font-size: 18px;
}

/* Navigation */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--section-bg);
    border-bottom: 2px solid var(--border-color);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-family: 'Cinzel', serif;
    font-weight: 500;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
}

.main-nav a:hover {
    color: var(--accent-color);
}

/* Main Container */
.main-container {
    padding-top: 80px;
}

/* Section Styling */
section {
    padding: 4rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.section-title {
    font-family: 'Cinzel', serif;
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-color);
    text-align: center;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

/* Header Section */
.header-section {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--section-bg);
    border-bottom: 1px solid #e0e0e0;
}

.header-content {
    max-width: 800px;
    margin: 0 auto;
}

.main-title {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
    font-style: italic;
}

/* Daily Prayers Section */
.daily-prayers-section {
    background: var(--section-bg);
    padding: 4rem 2rem;
}

.daily-prayers-content {
    max-width: 900px;
    margin: 0 auto;
}

.prayer-service-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0 3rem;
    flex-wrap: wrap;
}

.service-btn {
    background: var(--section-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 0.8rem 1.5rem;
    font-family: 'Cinzel', serif;
    font-weight: 500;
    font-size: 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-btn:hover {
    background: var(--light-bg);
    border-color: var(--accent-color);
}

.service-btn.active {
    background: var(--border-color);
    color: var(--section-bg);
    border-color: var(--border-color);
}

/* Prayer Display Area - Opens between buttons and tiles */
.prayer-display-area {
    display: none; /* Hidden by default */
    background: #ffffff;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 3rem;
    margin: 2.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    animation: slideDown 0.4s ease;
}

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

.prayer-display-content {
    max-width: 800px;
    margin: 0 auto;
}

.prayer-prompt {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    font-size: 1.1rem;
    padding: 1rem;
}

.prayer-display-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.prayer-display-icon {
    font-size: 2.5rem;
    margin-right: 1rem;
}

.prayer-display-title {
    font-family: 'Cinzel', serif;
    font-size: 1.8rem;
    color: var(--accent-color);
    font-weight: 600;
    flex: 1;
}

.prayer-close-btn {
    background: transparent;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.prayer-close-btn:hover {
    background: var(--border-color);
    border-color: var(--border-color);
    color: #ffffff;
}

.prayer-full-text {
    font-family: 'EB Garamond', serif;
    font-size: 1.25rem;
    line-height: 2.2;
    color: var(--text-color);
    white-space: pre-line;
}

.prayer-full-text p {
    margin-bottom: 2rem;
}

/* Prayer Tiles - Simplified (no expansion, no scrollbars) */
.prayer-tiles-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.prayer-tile {
    background: var(--section-bg);
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 140px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.prayer-tile:hover {
    border-color: var(--border-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.prayer-tile.active {
    border-color: var(--border-color);
    background: var(--light-bg);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.prayer-tile-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.prayer-tile-title {
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    color: var(--text-color);
    font-weight: 600;
    line-height: 1.4;
}

/* Readings Section - Clean white space for reading */
.readings-section {
    background: #ffffff;
    padding: 4rem 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.readings-content {
    max-width: 950px;
    margin: 0 auto;
}

/* Readings Controls */
.readings-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--section-bg);
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    gap: 1.5rem;
}

.calendar-toggle-container {
    flex: 1;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.calendar-toggle-label {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 500;
}

.calendar-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.calendar-btn {
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    font-weight: 500;
    background: var(--section-bg);
    color: var(--text-color);
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.calendar-btn:hover {
    background: var(--light-bg);
    border-color: var(--accent-color);
}

.calendar-btn.active {
    background: var(--border-color);
    color: var(--section-bg);
    border-color: var(--border-color);
}

.date-picker-container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.date-picker-container label {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: var(--text-color);
    font-weight: 500;
}

#datePicker {
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    font-family: 'EB Garamond', serif;
    font-size: 1rem;
    background: var(--section-bg);
    color: var(--text-color);
    cursor: pointer;
    transition: border-color 0.3s ease;
}

#datePicker:hover {
    border-color: var(--accent-color);
}

#datePicker:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.reading-display {
    background: #ffffff;
    padding: 0;
    margin-top: 2rem;
    border: none;
}

.reading-content {
    background: #ffffff;
}

.reading-date {
    font-family: 'Cinzel', serif;
    color: var(--accent-color);
    font-weight: 500;
    margin-bottom: 2.5rem;
    font-size: 1.3rem;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e0e0e0;
}

.feast-name {
    color: var(--accent-color);
    font-style: italic;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    text-align: center;
}

/* Epistle and Gospel Reading Boxes - Clean, minimal like OCA */
.epistle-reading, .gospel-reading {
    margin: 2.5rem 0;
    padding: 2.5rem;
    background: #fafafa;
    border-left: 4px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Reading headers (EPISTLE, GOSPEL) */
.reading-header {
    font-family: 'Cinzel', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.reading-citation {
    font-family: 'Cinzel', serif;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    font-style: italic;
}

.reading-text {
    font-size: 1.2rem;
    line-height: 2;
    color: var(--text-color);
    font-family: 'EB Garamond', serif;
    margin-top: 1rem;
}

/* Scripture paragraphs - like bible.com */
.scripture-paragraph {
    margin-bottom: 1.5rem;
    text-indent: 2rem;
    text-align: justify;
}

.scripture-paragraph:first-child {
    text-indent: 0;
}

/* Verse numbers - superscript style like bible.com */
.verse-number {
    font-weight: 700;
    color: var(--accent-color);
    font-size: 0.7em;
    margin-right: 0.2rem;
    vertical-align: super;
    line-height: 0;
}

.error-message {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 2rem;
}

/* Footer */
.main-footer {
    background: var(--section-bg);
    padding: 2rem;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    margin-top: 3rem;
}

.footer-content p {
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }
    
    .main-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .prayer-tiles-container {
        grid-template-columns: 1fr;
    }
    
    /* Prayer Display Area - Mobile */
    .prayer-display-area {
        padding: 2rem 1.5rem;
        margin: 2rem 0;
    }
    
    .prayer-display-header {
        flex-wrap: wrap;
    }
    
    .prayer-display-title {
        font-size: 1.5rem;
    }
    
    .prayer-full-text {
        font-size: 1.15rem;
        line-height: 2;
    }
    
    section {
        padding: 2rem 1rem;
    }
    
    .readings-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .calendar-toggle-container {
        width: 100%;
    }
    
    .calendar-buttons {
        width: 100%;
    }
    
    .calendar-btn {
        flex: 1;
        min-width: 150px;
    }
    
    .date-picker-container {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    
    #datePicker {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 1.75rem;
    }
    
    .subtitle {
        font-size: 1rem;
    }
    
    .service-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

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

/* CSS Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Loading state styles */
.loading-message {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-color);
    padding: 2rem;
}

.loading-message.warning {
    color: #856404;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
}

.loading-message small {
    font-size: 0.9rem;
    display: block;
    margin-top: 0.5rem;
}

.loading-spinner {
    display: inline-block;
    animation: spin 2s linear infinite;
    margin-right: 0.5rem;
}

.error-message {
    color: #721c24;
    background: #f8d7da;
    border: 2px solid #f5c6cb;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1rem;
}

.error-message a {
    color: #491217;
    font-weight: bold;
    text-decoration: underline;
}
