/**
 * lectionary-app.css
 * Version: 1.5.0
 * Date: March 22, 2026 10:00 AM EST
 *
 * Core application styles for ICCEC Lectionary - matches Prayer site aesthetic.
 * - v1.5.0: Thin gray cell borders; liturgical season background colors
 *           at ~50% opacity on event days; gold outline for white/gold days.
 * - v1.4.0: Fixed DOW row height — added height:auto !important and
 *           padding:2px !important to override td height:70px rule.
 * - v1.3.0: Footer: removed cec-na.org link, height set to ~1.2x text.
 * - v1.2.0: Calendar month header uses darker/desaturated red (#6b1a1a);
 *           day-of-week row height reduced to snug fit.
 * - v1.1.0: Changed nav bar and footer backgrounds from black (#333) to dark
 *           gray (#4a4a4a); made footer single-line layout.
 * - v1.0.0: Complete GUI overhaul matching Prayer site design language.
 */

/* ============================================
   1. CSS Variables & Base Styles
   ============================================ */
:root {
    /* Primary liturgical accent */
    --primary-red: #8B0000;
    --primary-red-light: #a52a2a;

    /* Secondary green accent (matching Prayer) */
    --primary-green: #4a7c59;
    --hover-green: #3d6648;
    --light-green: #e8f3ed;
    --border-green: #6b9f7f;

    /* Liturgical Season Colors (muted, professional) */
    --advent-blue: #3a5a8c;
    --christmas-gold: #b8941e;
    --epiphany-green: #4a7c59;
    --lent-purple: #5c4070;
    --easter-gold: #c9a824;
    --pentecost-red: #a0332c;
    --ordinary-green: #4a7c59;
    --holy-week-black: #222222;
    --saints-red: #9b2335;
    --feasts-gold: #b8941e;

    /* UI Colors */
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #fafafa;
    --border-color: #dddddd;
    --border-light: #eeeeee;

    /* Typography */
    --font-serif: Georgia, 'Times New Roman', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

    /* Shadows (subtle) */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: var(--font-serif);
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: normal;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

a {
    color: var(--primary-green);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--hover-green);
    text-decoration: underline;
}

/* ============================================
   2. Header Styles
   ============================================ */
.app-header {
    background: var(--bg-primary);
    border-bottom: 4px solid var(--primary-red);
    padding: 1rem 0 0.5rem 0;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.header-logo {
    height: auto;
    max-height: 5rem;
    width: auto;
}

.header-center {
    text-align: center;
}

.header-title {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 2rem;
    color: var(--primary-red);
    margin: 0;
    font-weight: 600;
}

.header-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* ============================================
   3. Navigation
   ============================================ */
.nav-menu {
    background-color: #4a4a4a;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.nav-item {
    color: #ffffff;
    padding: 0.75rem 1.25rem;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-family: var(--font-sans);
    font-size: 0.9rem;
}

.nav-item:hover {
    background-color: #5a5a5a;
    border-bottom-color: var(--primary-red);
    color: #fcb222;
    text-decoration: none;
}

.nav-item.active {
    background-color: #5a5a5a;
    border-bottom-color: var(--primary-red);
    color: #ffffff;
}

.nav-item i {
    margin-right: 0.5rem;
    font-size: 0.875rem;
}

/* ============================================
   4. Content Area
   ============================================ */
.content-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1.5rem 20px 2rem;
}

.content-card {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

/* ============================================
   5. Year Selector
   ============================================ */
.year-selector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.year-selector label {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.year-selector input[type="text"],
.year-selector input[type="number"] {
    font-family: var(--font-sans);
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    width: 120px;
    text-align: center;
    transition: border-color 0.2s;
}

.year-selector input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(74, 124, 89, 0.15);
}

.year-selector button,
.btn-primary {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    padding: 0.5rem 1.5rem;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
    font-weight: 500;
}

.year-selector button:hover,
.btn-primary:hover {
    background: var(--hover-green);
}

.year-info {
    text-align: center;
    margin-bottom: 0.5rem;
}

.year-info .year-display {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-family: var(--font-sans);
}

.year-info .cycle-display {
    font-size: 0.95rem;
    color: var(--primary-green);
    font-style: italic;
}

.month-jump {
    text-align: center;
    margin-bottom: 1rem;
}

.month-jump a {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    padding: 0.375rem 0.875rem;
    background: #f9f9f9;
    color: var(--primary-green);
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.month-jump a:hover {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
    text-decoration: none;
}

/* ============================================
   6. Calendar Table Styles
   ============================================ */
.calendar-grid {
    margin-bottom: 2.5rem;
}

.calendar-grid table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    table-layout: fixed;
}

.calendar-grid .month_nm {
    text-align: center;
    background-color: #6b1a1a;
    color: #fff;
    padding: 12px;
    font-size: 1.4rem;
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.calendar-grid .day_nm {
    text-align: center;
    background-color: #555;
    color: #fff;
    padding: 2px 4px !important;
    height: auto !important;
    font-size: 0.75rem;
    font-family: var(--font-sans);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    vertical-align: middle;
}

.calendar-grid td {
    border: 1px solid #ccc;
    padding: 6px 5px;
    font-size: 0.85rem;
    font-weight: 400;
    background-color: var(--bg-primary);
    height: 70px;
    vertical-align: top;
    font-family: var(--font-sans);
}

/* Default event background (fallback) */
.calendar-grid .event {
    background-color: #f0f7f2;
}

/* ---- Liturgical season backgrounds (~50% opacity) ---- */

/* Advent – deep blue */
.calendar-grid .season-advent {
    background-color: rgba(58, 90, 140, 0.15);
}

/* Lent – muted purple */
.calendar-grid .season-lent {
    background-color: rgba(92, 64, 112, 0.15);
}

/* Holy Week – solemn dark */
.calendar-grid .season-holyweek {
    background-color: rgba(34, 34, 34, 0.10);
}

/* Saints / Martyrs / Pentecost – red */
.calendar-grid .season-red {
    background-color: rgba(155, 35, 53, 0.12);
}

/* White/Gold feasts – gold outline, no tinted background */
.calendar-grid .season-gold {
    background-color: var(--bg-primary);
    box-shadow: inset 0 0 0 2px #c9a824;
}

/* Ordinary Time – green */
.calendar-grid .season-green {
    background-color: rgba(74, 124, 89, 0.12);
}

.calendar-grid .sunday {
    color: #6b1a1a;
    font-weight: 700;
    font-size: 0.9rem;
}

.calendar-grid .eventname {
    font-size: 0.7rem !important;
    line-height: 1.3;
    margin-top: 2px;
}

.calendar-grid .eventname a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
}

.calendar-grid .eventname a:hover {
    color: var(--hover-green);
    text-decoration: underline;
}

.fix_height {
    height: auto;
}

/* ============================================
   7. Footer
   ============================================ */
.app-footer {
    background: #4a4a4a;
    color: #cccccc;
    text-align: center;
    padding: 0 20px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    margin-top: 2rem;
    line-height: 1.2;
    height: calc(0.85rem * 1.2 + 2px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-footer p {
    margin: 0;
}

.app-footer a {
    color: #cccccc;
}

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

/* ============================================
   8. Responsive
   ============================================ */
@media only screen and (max-width: 768px) {
    .header-title {
        font-size: 1.4rem;
    }

    .header-logo {
        max-height: 3.5rem;
    }

    .header-content {
        flex-direction: column;
        gap: 0.5rem;
    }

    .nav-content {
        flex-wrap: wrap;
    }

    .nav-item {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }

    .content-card {
        padding: 1rem;
    }

    .calendar-grid table {
        font-size: 0.75rem;
    }

    .calendar-grid td {
        padding: 4px 2px;
        height: 55px;
        font-size: 0.7rem;
    }

    .calendar-grid .day_nm {
        font-size: 0.6rem;
        padding: 1px 2px !important;
        height: auto !important;
    }

    .calendar-grid .month_nm {
        font-size: 1.1rem;
        padding: 10px;
    }

    .calendar-grid .eventname {
        font-size: 0.6rem !important;
    }

    .calendar-grid .sunday {
        font-size: 0.75rem;
    }

    .year-selector {
        flex-direction: column;
        gap: 0.5rem;
    }
}

@media only screen and (max-width: 480px) {
    .calendar-grid .day_nm {
        font-size: 0.5rem;
        padding: 1px 1px !important;
        height: auto !important;
    }

    .calendar-grid td {
        padding: 3px 1px;
        height: 50px;
    }
}
