/* St. Joseph Weekly Schedule — Version 6.0
 * Polished refinement of V4/V1 styling.
 * Event data structure remains unchanged.
 */
.stjws {
    --stj-blue: #86cae9;
    --stj-navy: #191970;
    --stj-cream: #f7f4eb;
    --stj-magenta: #8b008b;
    width: 100%;
    max-width: 1000px;
    margin: 28px auto;
    font-family: Verdana, Arial, sans-serif;
    color: var(--stj-navy);
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0,0,0,.10);
    overflow: hidden;
}

.stjws-church-name {
    margin: 0 0 3px;
    font-size: 21px;
    line-height: 1.3;
    font-weight: 700;
    letter-spacing: .1px;
}
.stjws-location {
    margin: 0 0 9px;
    font-size: 13px;
    line-height: 1.3;
    opacity: .72;
}

.stjws-heading {
    text-align: center;
    padding: 29px 20px 17px;
    background: var(--stj-cream);
    border-bottom: 1px solid rgba(25,25,112,.07);
}
.stjws-heading h2 {
    margin: 0 0 6px;
    font-size: 26px;
    line-height: 1.25;
    font-weight: 500;
    letter-spacing: .15px;
}
.stjws-week-label {
    font-size: 14px;
    opacity: .75;
    line-height: 1.4;
}

.stjws-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 16px;
    background: #fff;
    border-bottom: 1px solid #eeeae1;
}
.stjws-controls a { text-decoration: none; }
.stjws-nav, .stjws-today {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: 1px solid #d8d8d8;
    background: #fff;
    color: var(--stj-navy);
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.stjws-nav:hover, .stjws-today:hover {
    background: rgba(134,202,233,.22);
    border-color: var(--stj-blue);
    color: var(--stj-navy);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,.08);
}
.stjws-nav:focus-visible, .stjws-today:focus-visible {
    outline: 3px solid rgba(139,0,139,.20);
    outline-offset: 2px;
}
.stjws-nav { width: 40px; height: 40px; border-radius: 999px; font-size: 25px; line-height: 1; }
.stjws-today { min-height: 40px; padding: 8px 20px; border-radius: 999px; font-size: 14px; font-weight: 600; }

.stjws-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0,1fr));
    gap: 5px;
    padding: 9px 10px 11px;
    background: var(--stj-cream);
}
.stjws-day {
    position: relative;
    min-height: 88px;
    padding: 10px 4px 9px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--stj-navy);
    cursor: pointer;
    font: inherit;
    transition: background .2s ease, box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.stjws-day:hover {
    background: rgba(134,202,233,.22);
    transform: translateY(-1px);
}
.stjws-day:focus-visible {
    outline: 3px solid rgba(139,0,139,.28);
    outline-offset: 2px;
}
.stjws-day.is-selected {
    background: var(--stj-blue);
    border-color: var(--stj-blue);
    box-shadow: 0 5px 14px rgba(0,0,0,.11);
}
.stjws-day.is-selected:hover { background: var(--stj-blue); }
.stjws-day.is-today:not(.is-selected) {
    border-color: rgba(25,25,112,.30);
    box-shadow: inset 0 0 0 1px rgba(25,25,112,.05);
}
.stjws-day-name { display:block; font-size:12px; font-weight:700; letter-spacing:.2px; }
.stjws-day-number { display:block; margin-top:6px; font-size:25px; font-weight:700; line-height:1; }
.stjws-day-month { display:block; margin-top:5px; font-size:11px; opacity:.7; }
.stjws-today-mark { display:block; margin-top:5px; font-size:8px; line-height:1; font-weight:700; letter-spacing:.5px; opacity:.72; }
.stjws-event-count {
    position:absolute; top:6px; right:7px; min-width:18px; height:18px; padding:0 4px;
    border-radius:999px; background:var(--stj-navy); color:#fff; font-size:10px; line-height:18px;
    box-sizing:border-box;
}

.stjws-panels { padding: 0 22px 28px; }
.stjws-panel { display:none; }
.stjws-panel.is-active { display:block; }
.stjws-panel[hidden] { display:none !important; }
.stjws-panel-heading {
    padding:15px 18px 14px;
    background:#e8e1d4;
    border-bottom:1px solid #d2c8b8;
    border-radius:10px 10px 0 0;
    margin-top:16px;
}
.stjws-panel-heading h3 { margin:0; font-size:21px; line-height:1.35; font-weight:600; }
.stjws-events { display:grid; gap:0; }

.stjws-event {
    position:relative;
    display:grid;
    grid-template-columns:205px minmax(0,1fr);
    gap:22px;
    align-items:start;
    padding:18px 6px;
    border-bottom:1px solid #eee;
    border-radius:7px;
    transition:background .2s ease, padding-left .2s ease, padding-right .2s ease, transform .2s ease, box-shadow .2s ease;
}
.stjws-event:hover {
    background:rgba(134,202,233,.10);
    padding-left:12px;
    padding-right:12px;
    box-shadow:inset 3px 0 0 var(--stj-blue);
}
.stjws-event-time {
    display:inline-flex;
    flex-wrap:nowrap;
    gap:6px;
    align-items:baseline;
    min-width:0;
    white-space:nowrap;
    font-weight:700;
    font-size:15px;
    line-height:1.45;
}
.stjws-event-time span { white-space:nowrap; }
.stjws-event-title { min-width:0; font-size:16px; font-weight:600; line-height:1.45; }
.stjws-event-arabic { margin-top:5px; font-weight:400; font-size:15px; line-height:1.6; opacity:.82; text-align:right; }
.stjws-empty { padding:30px 4px; text-align:center; color:#666; }

@media (max-width:700px) {
    .stjws { border-radius:12px; margin:18px auto; }
    .stjws-heading { padding:22px 16px 14px; }
    .stjws-church-name { font-size:18px; }
    .stjws-location { font-size:12px; margin-bottom:7px; }
    .stjws-heading h2 { font-size:21px; }
    .stjws-days { gap:2px; padding:6px; }
    .stjws-day { min-height:78px; padding:8px 2px; border-radius:9px; }
    .stjws-day-name { font-size:9px; }
    .stjws-day-number { font-size:20px; }
    .stjws-day-month { font-size:9px; }
    .stjws-today-mark { font-size:7px; }
    .stjws-event-count { top:4px; right:3px; min-width:15px; height:15px; line-height:15px; font-size:8px; }
    .stjws-panels { padding:0 14px 20px; }
    .stjws-panel-heading { padding:13px 14px 12px; }
    .stjws-panel-heading h3 { font-size:18px; }
    .stjws-event { grid-template-columns:1fr; gap:5px; padding:15px 3px; }
    .stjws-event:hover { padding-left:8px; padding-right:8px; }
    .stjws-event-time { font-size:14px; }
    .stjws-event-title, .stjws-event-arabic { font-size:15px; }
}

@media (max-width:480px) {
    .stjws-controls { gap:9px; padding-left:10px; padding-right:10px; }
    .stjws-nav { width:36px; height:36px; }
    .stjws-today { padding-left:16px; padding-right:16px; }
    .stjws-week-label { font-size:13px; }
}

@media print {
    .stjws { max-width:none; margin:0; border-radius:0; box-shadow:none; }
    .stjws-controls, .stjws-days { display:none !important; }
    .stjws-panel { display:block !important; }
    .stjws-event:hover { background:transparent; box-shadow:none; padding-left:6px; padding-right:6px; }
}
