/* ============================================================
   tpl_parish - St. Anthony & St. Rita Parish custom template
   Light blue design. Self-contained: includes base design AND
   styles for mod_parish_events / mod_bulletin_archive.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@500;600;700&family=Source+Sans+3:wght@400;600;700&display=swap');

/* ---------- Design tokens ---------- */
:root {
    --parish-blue:      #4a7fb5;
    --parish-blue-dk:   #35648f;
    --parish-blue-deep: #2c5170;
    --parish-sky:       #6ea3cf;
    --parish-lightblue: #bcd9ef;
    --parish-mist:      #f4f9fc;
    --parish-ink:       #33414f;
    --font-display: "Cormorant Garamond", Georgia, serif;
    --font-body: "Source Sans 3", "Segoe UI", Arial, sans-serif;
}

/* ---------- Base ---------- */
body.par-site {
    font-family: var(--font-body);
    color: var(--parish-ink);
    background: var(--parish-mist);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.par-mid { flex: 1 0 auto; padding: 1.5rem 0.75rem 3rem; width: 100%; }

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 600;
    color: var(--parish-blue-deep);
    letter-spacing: 0.01em;
}

h2 { font-size: 2rem; margin-bottom: 1rem; }
h3 { font-size: 1.4rem; }
p { line-height: 1.65; }

a { color: var(--parish-blue-dk); }
a:hover { color: var(--parish-blue-deep); }

/* ---------- Header ---------- */
.par-header {
    background: linear-gradient(135deg, #5b8cbf 0%, var(--parish-blue) 100%);
    border-bottom: 5px solid var(--parish-lightblue);
    box-shadow: 0 3px 12px rgba(74, 127, 181, 0.3);
}

.par-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    min-height: 4.5rem;
}

.par-brand a {
    color: #fff;
    font-family: var(--font-display);
    font-size: 2.1rem;
    letter-spacing: 0.04em;
    text-decoration: none;
    text-shadow: 0 1px 3px rgba(44, 81, 112, 0.4);
}

.par-nav ul,
.par-nav .navbar-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.par-nav a,
.par-nav .nav-link {
    display: block;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.08em;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-bottom: 3px solid transparent;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.par-nav a:hover,
.par-nav .active > a,
.par-nav .current > a {
    color: #fff;
    border-bottom-color: var(--parish-lightblue);
}

/* Dropdowns (from mod_menu, Bootstrap markup) */
.par-nav .dropdown-menu {
    border-radius: 10px;
    border: 1px solid #e4eef6;
    box-shadow: 0 6px 18px rgba(74, 127, 181, 0.2);
}

.par-nav .dropdown-menu a {
    color: var(--parish-blue-dk);
    text-transform: none;
    letter-spacing: normal;
    border-bottom: none;
}

.par-nav .dropdown-menu a:hover {
    background: var(--parish-mist);
}

/* ---------- Banner / hero ---------- */
.par-banner { margin-bottom: 1.5rem; }

.parish-hero {
    margin: 0;
    border-radius: 0 0 14px 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(74, 127, 181, 0.2);
    position: relative;
}

.parish-hero img {
    width: 100%;
    height: clamp(240px, 38vw, 460px);
    object-fit: cover;
    display: block;
}

.parish-hero .parish-hero-caption {
    position: absolute;
    inset: auto 0 0 0;
    background: linear-gradient(transparent, rgba(44, 81, 112, 0.8));
    color: #fff;
    padding: 2.5rem 2rem 1.25rem;
    font-family: var(--font-display);
    font-size: 1.6rem;
}

/* ---------- Main panel & strips ---------- */
.par-panel {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(74, 127, 181, 0.12);
    height: 100%;
}

.page-header h1 {
    padding-bottom: 0.4rem;
    border-bottom: 3px solid var(--parish-lightblue);
    display: inline-block;
}

.par-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.par-strip .card { margin-bottom: 0; height: 100%; }

.par-sidebar .card { margin-bottom: 1.75rem; }

/* ---------- Cards ---------- */
.card {
    border: 1px solid #e4eef6;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(74, 127, 181, 0.1);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(74, 127, 181, 0.16);
}

.card .card-header {
    background: var(--parish-blue);
    color: #fff;
    border-radius: 11px 11px 0 0;
    font-family: var(--font-display);
    font-size: 1.25rem;
    letter-spacing: 0.05em;
    border: none;
}

/* ---------- Buttons ---------- */
.btn-primary {
    background: var(--parish-blue);
    border: none;
    border-radius: 999px;
    padding: 0.5rem 1.4rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 6px rgba(74, 127, 181, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--parish-blue-dk);
    box-shadow: 0 4px 12px rgba(74, 127, 181, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--parish-blue);
    border-radius: 999px;
    color: var(--parish-blue-dk);
    font-weight: 600;
}

/* ---------- Footer ---------- */
.par-footer {
    background: linear-gradient(180deg, #5b8cbf, #3f6e9e);
    color: rgba(255, 255, 255, 0.9);
    border-top: 4px solid var(--parish-lightblue);
    padding: 2.5rem 0 2rem;
    flex-shrink: 0;
}

.par-footer a { color: #ffffff; text-decoration: underline; }

.par-footer h3 {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 0.75rem;
}

/* ---------- Quote block ---------- */
.parish-quote {
    border: none;
    border-left: 5px solid var(--parish-sky);
    background: linear-gradient(90deg, #eaf3f9, #ffffff);
    border-radius: 0 10px 10px 0;
    padding: 1.1rem 1.4rem;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-style: italic;
    color: #35648f;
    box-shadow: 0 2px 8px rgba(74, 127, 181, 0.1);
}

.parish-quote .quote-attribution {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.95rem;
    font-style: normal;
    font-weight: 700;
    color: var(--parish-blue-deep);
}

/* ---------- Mass schedule table ---------- */
.mass-schedule td,
.mass-schedule th { padding: 0.5rem 0.75rem; }

.mass-schedule tr:nth-child(even) td { background: var(--parish-mist); }

.mass-schedule th {
    color: var(--parish-blue-dk);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
}

/* ============================================================
   mod_parish_events
   ============================================================ */
.parish-events-mod .pe-header {
    background: linear-gradient(120deg, var(--parish-blue), var(--parish-sky));
    color: #fff;
    font-family: var(--font-display);
    font-size: 1.3rem;
    letter-spacing: 0.06em;
    border-radius: 11px 11px 0 0;
}

.pe-calendar {
    width: 100%;
    margin: 0 auto 1.25rem;
    border-collapse: separate;
    border-spacing: 3px;
    table-layout: fixed;
    text-align: center;
}

.pe-calendar caption {
    caption-side: top;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    padding-bottom: 0.5rem;
    color: var(--parish-blue-dk);
}

.pe-calendar th {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #8aa5bd;
    padding: 0.3rem 0;
}

.pe-calendar td {
    padding: 0;
    font-size: 0.88rem;
    height: 2.2rem;
    border-radius: 0.55rem;
    vertical-align: middle;
}

.pe-calendar .pe-daynum { display: inline-block; }

.pe-day.pe-has-event { background: var(--parish-lightblue); }

.pe-day.pe-has-event a {
    color: var(--parish-blue-deep);
    text-decoration: none;
    font-weight: 700;
}

.pe-day.pe-has-event a:hover { text-decoration: underline; }

.pe-dot {
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--parish-blue-deep);
    margin: 1px auto 0;
}

.pe-day.pe-today { box-shadow: inset 0 0 0 2px var(--parish-sky); }

.pe-month-heading {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--parish-sky);
    margin: 1.1rem 0 0.4rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.pe-month-heading::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #dcebf5;
}

.pe-event {
    display: flex;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #e9f2f8;
    align-items: flex-start;
}

.pe-event:last-child { border-bottom: none; }

.pe-badge {
    flex: 0 0 auto;
    width: 2.8rem;
    text-align: center;
    background: #fff;
    border: 2px solid var(--parish-lightblue);
    border-radius: 0.6rem;
    padding: 0.25rem 0 0.3rem;
    box-shadow: 0 1px 4px rgba(74, 127, 181, 0.15);
}

.pe-badge-day {
    display: block;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.3rem;
    line-height: 1;
    color: var(--parish-blue-deep);
}

.pe-badge-mon {
    display: block;
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    color: var(--parish-sky);
}

.pe-event-body { min-width: 0; }

.pe-event .pe-title {
    display: block;
    font-weight: 600;
    color: var(--parish-blue-dk);
    font-size: 1rem;
    line-height: 1.3;
    text-decoration: none;
}

.pe-event .pe-title:hover { text-decoration: underline; }

.pe-when {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #8aa5bd;
    margin-top: 0.15rem;
}

.pe-excerpt {
    display: block;
    font-size: 0.88rem;
    color: #5b6b7c;
    margin-top: 0.2rem;
    line-height: 1.45;
}

.pe-none { color: #777; font-style: italic; }

.pe-viewall-wrap { text-align: center; margin-top: 1rem; }

.pe-viewall {
    display: inline-block;
    border: 2px solid var(--parish-blue);
    color: var(--parish-blue-dk);
    border-radius: 999px;
    padding: 0.35rem 1.25rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.pe-viewall:hover {
    background: var(--parish-blue);
    color: #fff;
    text-decoration: none;
}

.pe-tip {
    position: fixed;
    z-index: 2000;
    background: var(--parish-blue-deep);
    color: #fff;
    font-size: 0.8rem;
    line-height: 1.4;
    padding: 0.45rem 0.7rem;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    max-width: 230px;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.pe-tip.pe-tip-show { opacity: 1; transform: none; }

/* ============================================================
   mod_bulletin_archive
   ============================================================ */
.parish-bulletin-archive .ba-toolbar {
    margin-bottom: 1.25rem;
    max-width: 380px;
}

.parish-bulletin-archive .ba-toolbar input[type="search"] {
    border-radius: 999px;
    padding: 0.6rem 1.2rem;
    border: 2px solid #dde9f2;
    box-shadow: inset 0 1px 3px rgba(74, 127, 181, 0.08);
}

.parish-bulletin-archive .ba-toolbar input[type="search"]:focus {
    border-color: var(--parish-blue);
    outline: none;
}

.parish-bulletin-archive details.ba-year {
    border: 1px solid #dde9f2;
    border-radius: 12px;
    margin-bottom: 0.9rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 8px rgba(74, 127, 181, 0.1);
}

.parish-bulletin-archive details.ba-year > summary {
    cursor: pointer;
    padding: 0.85rem 1.25rem;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.2rem;
    background: linear-gradient(90deg, var(--parish-mist), #fff);
    color: var(--parish-blue-dk);
    list-style-position: inside;
}

.parish-bulletin-archive details.ba-year[open] > summary {
    border-bottom: 2px solid var(--parish-lightblue);
}

.parish-bulletin-archive details.ba-year > summary .badge {
    background: var(--parish-lightblue);
    color: var(--parish-blue-deep);
    border-radius: 999px;
    font-size: 0.75rem;
    vertical-align: middle;
}

.parish-bulletin-archive .ba-list {
    padding: 0.6rem 1.25rem 0.9rem;
}

.parish-bulletin-archive .ba-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid #eef5fa;
}

.parish-bulletin-archive .ba-item:last-child { border-bottom: none; }

.parish-bulletin-archive .ba-date { font-weight: 600; }

.parish-bulletin-archive .ba-download {
    background: var(--parish-blue);
    border: none;
    border-radius: 999px;
    font-size: 0.82rem;
    padding: 0.3rem 1rem;
    font-weight: 600;
}

.parish-bulletin-archive .ba-download:hover { background: var(--parish-blue-dk); }

.parish-bulletin-archive .ba-link {
    font-size: 0.85rem;
    color: var(--parish-blue-dk);
    font-weight: 600;
}

/* ---------- Responsive ---------- */
@media (max-width: 991.98px) {
    .par-header-inner { justify-content: center; text-align: center; }
    .par-nav { width: 100%; }
    .par-nav ul, .par-nav .navbar-nav { justify-content: center; }
}

@media (max-width: 767.98px) {
    h2 { font-size: 1.6rem; }
    .par-panel { padding: 1.25rem; }
    .parish-bulletin-archive .ba-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }
    .pe-event .pe-excerpt { font-size: 0.84rem; }
}
