@import url('https://fonts.googleapis.com/css2?family=Lora:wght@400;700&display=swap');

/* === CSS Reset & Variables === */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --green: #54a26b;
    --green-dark: #3a6147;
    --white: #ffffff;
    --cream: #faf8f5;
    --gray-light: #f2f0ec;
    --gray-medium: #858585;
    --gray-dark: #333333;
    --gray-border: #ddd8d0;
    --font-stack: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-display: 'Lora', Georgia, 'Times New Roman', serif;
    --max-width: 1100px;
}

html {
    font-family: var(--font-stack);
    color: var(--gray-medium);
    line-height: 1.6;
    font-size: 16px;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--cream);
}

img { max-width: 100%; height: auto; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); text-decoration: underline; }

h1, h2, h3, h4 {
    color: var(--gray-dark);
    font-family: var(--font-display);
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1, h2 {
    padding-bottom: 0.4em;
    border-bottom: 3px solid var(--green);
    display: inline-block;
}

.site-footer h3,
.hero h1,
.page-header h1 {
    border-bottom: none;
    padding-bottom: 0;
    display: block;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
p { margin-bottom: 1em; }

/* === Layout === */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2.5rem;
}

main {
    flex: 1;
}

/* === Header === */
.site-header {
    background: var(--white);
    border-bottom: 2px solid var(--green);
    padding: 1.5rem 0;
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.site-brand {
    text-decoration: none;
    display: flex;
    align-items: center;
}

.site-brand:hover {
    text-decoration: none;
}

.site-logo {
    height: 6.75rem;
    width: auto;
    fill: var(--green);
}

.site-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.site-nav a {
    color: var(--gray-dark);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.site-nav a:hover {
    color: var(--green);
    border-bottom-color: var(--green);
    text-decoration: none;
}

.site-nav a.active {
    color: var(--green);
    border-bottom-color: var(--green);
    border-bottom-width: 3px;
    text-decoration: none;
}

.site-nav .admin-link {
    border-bottom: none;
    opacity: 0.4;
    font-size: 0.9rem;
    margin-left: 0.25rem;
}
.site-nav .admin-link:hover {
    opacity: 1;
    border-bottom: none;
}

/* === Hero === */
.hero {
    background: url('/assets/img/weston-aerial.jpeg') center/cover no-repeat;
    color: var(--white);
    padding: 10rem 0;
    text-align: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.hero .container {
    position: relative;
}

.hero p {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* === Rotating word animation === */
.rotating-word-wrapper {
    display: inline-block;
    position: relative;
    overflow: hidden;
    vertical-align: -0.38em;
    width: 8ch;
    height: 1.4em;
    text-align: center;
    border-bottom: 2px solid rgba(255, 255, 255, 0.6);
}

.rotating-words {
    display: block;
    animation: rotate-words 21s infinite;
}

.rotating-words span {
    display: block;
    height: 1.4em;
    line-height: 1.4em;
}

@keyframes rotate-words {
    0%, 11.3%    { transform: translateY(0); }
    14.3%, 25.6% { transform: translateY(-1.4em); }
    28.6%, 39.9% { transform: translateY(-2.8em); }
    42.9%, 54.2% { transform: translateY(-4.2em); }
    57.1%, 68.4% { transform: translateY(-5.6em); }
    71.4%, 82.7% { transform: translateY(-7.0em); }
    85.7%, 97%   { transform: translateY(-8.4em); }
}

/* === Sections === */
.section {
    padding: 3rem 0;
}

.section-alt {
    background: var(--gray-light);
}

.section-heading {
    text-align: center;
    margin-bottom: 2rem;
}

/* === Cards === */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.card {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 6px;
    padding: 1.5rem;
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card h3 {
    margin-bottom: 0.4rem;
}

.card .meta {
    font-size: 0.85rem;
    color: var(--gray-medium);
    margin-bottom: 0.75rem;
}

.card p {
    margin-bottom: 0;
}

/* === Buttons === */
.btn {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: var(--green);
    color: var(--white);
    border: none;
    border-bottom: 3px solid var(--green-dark);
    border-radius: 4px;
    font-family: var(--font-stack);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
}

.btn:hover {
    filter: brightness(1.2);
    color: var(--white);
    text-decoration: none;
}

.btn:active, .btn-outline:active, .btn-danger:active {
    margin-top: 2px;
    border-bottom-width: 1px;
}

.btn-sm {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
}

.btn.btn-secondary {
    background: var(--white);
    color: var(--green);
    border: 2px solid var(--green);
}

.btn.btn-secondary:hover {
    background: var(--green);
    color: var(--white);
}

.btn-outline {
    display: inline-block;
    background: none;
    border: 1px solid var(--gray-border);
    border-bottom: 3px solid var(--gray-border);
    color: var(--gray-dark);
    border-radius: 4px;
    font-family: var(--font-stack);
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    text-decoration: none;
}
.btn-outline:hover {
    border-color: var(--green);
    border-bottom-color: var(--green);
    color: var(--green);
    text-decoration: none;
}

.btn-danger {
    display: inline-block;
    background: none;
    border: 1px solid #e0b0b0;
    border-bottom: 3px solid #e0b0b0;
    color: #c44;
    border-radius: 4px;
    font-family: var(--font-stack);
    font-size: 0.8rem;
    padding: 0.3rem 0.7rem;
    cursor: pointer;
    text-decoration: none;
}
.btn-danger:hover {
    background: #fee;
    border-bottom-color: #c44;
    text-decoration: none;
}

/* === Forms === */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--gray-dark);
    margin-bottom: 0.3rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--gray-border);
    border-radius: 4px;
    font-family: var(--font-stack);
    font-size: 0.95rem;
    color: var(--gray-dark);
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 2px rgba(74, 124, 89, 0.15);
}

.form-group textarea {
    resize: vertical;
}

/* === Footer === */
.site-footer {
    background: var(--gray-dark);
    color: #ccc;
    padding: 2.5rem 0 1.5rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--white);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.footer-section p {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #aed9ba;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid #555;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.85rem;
}
.footer-bottom a {
    color: var(--white);
}

/* Footer form overrides */
.site-footer .form-group label {
    color: #ccc;
}

.site-footer .form-group input,
.site-footer .form-group textarea {
    background: #444;
    border-color: #555;
    color: #eee;
}

.site-footer .form-group input:focus,
.site-footer .form-group textarea:focus {
    border-color: #aed9ba;
    box-shadow: 0 0 0 2px rgba(174, 217, 186, 0.2);
}

.site-footer .btn {
    background: #aed9ba;
    color: var(--gray-dark);
}

.site-footer .btn:hover {
    background: var(--white);
}

/* === Info message (contact form response) === */
.info-message {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: var(--green-dark);
    padding: 1rem 1.25rem;
    border-radius: 4px;
}

/* === Page header (for inner pages) === */
.page-header {
    background: var(--gray-light);
    border-bottom: 1px solid var(--gray-border);
    padding: 2rem 0;
}

.page-header h1 {
    margin-bottom: 0.25rem;
}

.page-header p {
    color: var(--gray-medium);
    margin-bottom: 0;
}

/* === Event list items === */
.event-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 6px;
    margin-bottom: 1rem;
}

.event-date {
    text-align: center;
    min-width: 60px;
    padding: 0.5rem;
    background: var(--green);
    color: var(--white);
    border-radius: 4px;
    line-height: 1.2;
    flex-shrink: 0;
    max-height: fit-content;
}

.event-date .dow {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.85;
    margin-bottom: 0.25rem;
}

.event-date .month {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-top: 1px solid rgba(255,255,255,0.4);
    padding-top: 0.3rem;
}

.event-date .day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
}

.event-details h3 {
    margin-bottom: 0.2rem;
}

.event-details .meta {
    font-size: 0.85rem;
    color: var(--gray-medium);
}

.event-filters {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1.5rem;
}
.filter-label {
    font-size: 0.8rem;
    color: var(--gray-medium);
    margin-right: 0.25rem;
}
.filter-btn {
    padding: 0.2rem 0.5rem;
    border: 2px solid transparent;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    cursor: pointer;
    opacity: 0.35;
    transition: opacity 0.2s;
}
.filter-btn.active {
    opacity: 1;
}
.filter-btn:hover {
    opacity: 0.8;
}

.event-category-badge {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-top: 0.3rem;
}
.badge-government  { background: #e8eaf6; color: #283593; }
.badge-safety      { background: #fce4ec; color: #b71c1c; }
.badge-community   { background: #e8f5e9; color: #2e7d32; }
.badge-church      { background: #f3e5f5; color: #6a1b9a; }
.badge-dining      { background: #fff3e0; color: #e65100; }
.badge-library     { background: #e0f2f1; color: #00695c; }
.badge-sports      { background: #e3f2fd; color: #1565c0; }
.badge-org         { background: #fff8e1; color: #f57f17; }
.event-cancelled-notice {
    background: #fce4ec;
    border-left: 4px solid #c0392b;
    color: #8e1c1c;
    padding: 0.75rem 1rem;
    border-radius: 0 4px 4px 0;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}
.event-cancelled-notice i {
    color: #c0392b;
    margin-right: 0.3rem;
}
.badge-cancelled   { background: #fce4ec; color: #c0392b; font-size: 0.7rem; font-weight: 600; padding: 0.1rem 0.45rem; border-radius: 3px; display: inline-block; text-transform: uppercase; letter-spacing: 0.03em; }

/* === Today's Events === */

.todays-events {
    margin-bottom: 2rem;
}
.todays-events-label {
    font-family: var(--font-display);
    font-size: 1.1rem;
    color: var(--green);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.todays-events-label i {
    font-size: 0.9rem;
}
.todays-events-grid {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}
.today-event-card {
    flex: 1 1 0;
    min-width: 180px;
    background: var(--white);
    border: 1px solid var(--gray-medium);
    border-radius: 8px;
    padding: 1.25rem 1rem;
    display: flex;
    flex-direction: column;
    min-height: 180px;
    cursor: pointer;
    transition: box-shadow 0.2s, border-color 0.2s;
    position: relative;
}
.today-event-card:hover {
    box-shadow: 0 4px 16px rgba(74, 124, 89, 0.18);
    border-color: var(--green-dark);
}
.today-event-card .today-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--white);
    background: var(--green);
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
    align-self: flex-start;
    margin-bottom: 0.75rem;
}
.today-event-card h3 {
    font-family: var(--font-display);
    font-size: 1rem;
    color: var(--gray-dark);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}
.today-event-card .today-time {
    font-size: 0.85rem;
    color: var(--gray-medium);
    margin-bottom: 0.4rem;
}
.today-event-card .today-location {
    font-size: 0.8rem;
    color: var(--gray-medium);
    margin-top: auto;
}
.today-event-card .today-location i {
    margin-right: 0.2rem;
}
.today-event-card .today-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-top: 0.5rem;
}
.today-event-card .event-category-badge {
    margin-top: 0;
}

@media (max-width: 600px) {
    .todays-events-grid {
        flex-wrap: wrap;
    }
    .today-event-card {
        min-width: 140px;
        min-height: 160px;
        padding: 1rem 0.85rem;
    }
}

/* === View toggle === */

.view-toggle {
    display: flex;
    gap: 0.25rem;
}
.view-btn {
    background: none;
    border: 1px solid var(--gray-border);
    border-radius: 4px;
    padding: 0.35rem 0.6rem;
    cursor: pointer;
    color: var(--gray-medium);
    font-size: 0.85rem;
}
.view-btn.active {
    background: var(--green);
    border-color: var(--green);
    color: var(--white);
}
.view-btn:hover:not(.active) {
    border-color: var(--green);
    color: var(--green);
}

/* === Calendar view === */

.cal-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}
.cal-nav h3 {
    margin: 0;
    min-width: 12rem;
    text-align: center;
    border-bottom: none;
    padding-bottom: 0;
}
.cal-nav h3::after {
    display: none;
}
.cal-nav .btn-outline {
    padding: 0.4rem 0.7rem;
    font-size: 0.8rem;
}
.cal-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: 1px;
}
.cal-dow {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-medium);
    padding: 0.4rem 0;
}
.cal-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: var(--gray-border);
    border: 1px solid var(--gray-border);
    border-radius: 4px;
    overflow: hidden;
}
.cal-cell {
    background: var(--white);
    min-height: 5rem;
    padding: 0.4rem;
    position: relative;
}
.cal-cell.cal-empty {
    background: var(--gray-light);
}
.cal-cell.cal-has-events {
    cursor: pointer;
}
.cal-cell.cal-has-events:hover {
    background: #f8f8f5;
}
.cal-cell.cal-today {
    background: #f0f7f2;
}
.cal-cell.cal-today .cal-day-num {
    background: var(--green);
    color: var(--white);
    border-radius: 50%;
    width: 1.6rem;
    height: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cal-cell.cal-selected {
    outline: 2px solid var(--green);
    outline-offset: -2px;
}
.cal-day-num {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray-dark);
    margin-bottom: 0.3rem;
}
.cal-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.2rem;
}
.cal-badge {
    display: inline-block;
    padding: 0.05rem 0.35rem;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .cal-cell {
        min-height: 3.5rem;
        padding: 0.25rem;
    }
    .cal-day-num {
        font-size: 0.75rem;
    }
    .cal-badge {
        font-size: 0.55rem;
        padding: 0.02rem 0.25rem;
    }
    .cal-dow {
        font-size: 0.6rem;
    }
}

/* === Calendar popover === */

.cal-popover {
    position: fixed;
    position-anchor: --badge-anchor;
    top: anchor(bottom);
    left: anchor(center);
    translate: -50% 0.25rem;
    margin: 0;
    padding: 0.5rem 0.75rem;
    background: var(--gray-dark);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 0.8rem;
    line-height: 1.5;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
}
.cal-popover:popover-open {
    display: block;
}
.cal-badge {
    position: relative;
    anchor-name: none;
}

/* === Event dialog === */

.event-dialog {
    border: none;
    border-radius: 8px;
    padding: 0;
    max-width: 560px;
    width: 90%;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    font-family: var(--font-body);
    position: fixed;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
    margin: 0;
}
.event-dialog.dragging {
    translate: none;
}
.event-dialog::backdrop {
    background: rgba(0,0,0,0.4);
}
.event-dialog-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.5rem 1.5rem 1.75rem;
    gap: 1rem;
    cursor: grab;
    user-select: none;
}
.event-dialog-header:active {
    cursor: grabbing;
}
.event-dialog-header h2 {
    margin: 0;
    font-size: 1.2rem;
    line-height: 1.3;
}
.event-dialog-header h2::after {
    display: none;
}
.dialog-close {
    background: none;
    border: 1px solid var(--gray-border);
    border-radius: 50%;
    width: 1.75rem;
    height: 1.75rem;
    aspect-ratio: 1;
    font-size: 0.85rem;
    cursor: pointer;
    color: var(--gray-medium);
    padding: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dialog-close:hover {
    color: var(--gray-dark);
}
.dialog-close:focus-visible {
    outline: 2px solid var(--gray-medium);
    outline-offset: 1px;
}
.event-dialog-body {
    padding: 0 1.5rem 1.5rem;
}
.event-dialog-meta {
    font-size: 0.9rem;
    color: var(--gray-medium);
    line-height: 1.6;
    margin-bottom: 0.75rem;
}
.event-dialog-meta strong {
    color: var(--gray-dark);
}
.event-dialog-badges {
    margin-bottom: 0.75rem;
}
.event-dialog-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--gray-dark);
    border-top: 1px solid var(--gray-border);
    padding-top: 0.75rem;
    margin-bottom: 0.75rem;
}
.event-dialog-links {
    margin-top: 0.5rem;
}
.event-dialog-links a {
    font-size: 0.85rem;
    color: var(--green);
}
.event-dialog-links a:hover {
    color: var(--green-dark);
}

/* === Article cards === */
.article-card {
    display: flex;
    flex-direction: column;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}
.article-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
}
.article-card-image {
    height: 180px;
    background-size: cover;
    background-position: center;
}
.article-card-body {
    padding: 1.25rem;
    flex: 1;
}
.article-card-body h3 {
    margin-bottom: 0.4rem;
}
.article-card-body p {
    font-size: 0.9rem;
    color: var(--gray-medium);
    margin-bottom: 0.75rem;
}
.article-meta {
    font-size: 0.8rem;
    color: var(--gray-medium);
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}
.article-category-badge {
    display: inline-block;
    padding: 0.1rem 0.45rem;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.4rem;
}
.badge-coverage    { background: #e3f2fd; color: #1565c0; }
.badge-opinion     { background: #fff8e1; color: #f57f17; }
.badge-feature     { background: #e8f5e9; color: #2e7d32; }
.badge-announcement { background: #f3e5f5; color: #6a1b9a; }
.badge-timely       { background: #fbe9e7; color: #d32f2f; }

/* === Article page (single article view) === */
.article-page-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--gray-medium);
    margin-top: 0.25rem;
}
.article-content {
    max-width: 720px;
    margin: 0 auto;
}
.article-featured-image {
    width: 100%;
    border-radius: 6px;
    margin-bottom: 1.5rem;
}
.article-body {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--gray-dark);
}
.article-body p { margin-bottom: 1.25em; }
.article-body h2,
.article-body h3 {
    margin-top: 1.5em;
    display: block;
    border-bottom: none;
    padding-bottom: 0;
}
.article-body img {
    border-radius: 4px;
    margin: 1rem 0;
}
.article-body ol {
    padding-left: 0;
    margin-bottom: 1.25em;
    list-style-position: inside;
}
.article-body ul {
    padding-left: 1.5em;
    margin-bottom: 1.25em;
}
.article-body blockquote {
    border-left: 3px solid var(--green);
    padding-left: 1rem;
    margin: 1.25em 0;
    color: var(--gray-medium);
    font-style: italic;
}
.article-tags {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-border);
}
.article-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--gray-light);
    border-radius: 3px;
    font-size: 0.8rem;
    color: var(--gray-medium);
}

/* === Article filters === */
.article-filters {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 1.5rem;
}

/* === Toast notifications === */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: var(--gray-dark);
    color: var(--white);
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(0.5rem);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.install-toast {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    right: 1.5rem;
    max-width: 420px;
    background: var(--white);
    color: var(--gray-dark);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(1rem);
    transition: opacity 0.3s, transform 0.3s;
    z-index: 1001;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.install-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.install-toast .install-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.install-toast .install-text {
    flex: 1;
    line-height: 1.4;
    user-select: none;
}

.install-toast .install-text strong {
    display: block;
    margin-bottom: 0.15rem;
}

.install-toast .install-dismiss {
    background: none;
    border: none;
    color: var(--gray);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 0.25rem;
    flex-shrink: 0;
    line-height: 1;
}

.install-toast .install-dismiss:hover {
    color: var(--gray-dark);
}

/* === Responsive === */
@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }

    .site-header .container {
        flex-direction: column;
        align-items: flex-start;
    }

    .site-logo {
        margin-bottom: 0.5rem;
    }

    .site-nav {
        gap: 1rem;
    }

    .site-nav .hide-mobile {
        display: none;
    }

    .hero {
        padding: 2.5rem 0;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* === Weather Strip (homepage) === */

.wx-strip {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.85rem 2em;
    text-decoration: none;
    color: inherit;
}
.wx-strip:hover {
    text-decoration: none;
    color: inherit;
}
.wx-strip-today {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
    padding-right: 1.5rem;
    border-right: 1px solid var(--gray-border);
}
.wx-strip-now-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-medium);
    margin-right: 1em;
}
.wx-strip-icon {
    width: 72px;
    height: 72px;
}
.wx-strip-temp {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--gray-dark);
    line-height: 1;
}
.wx-strip-cond {
    font-size: 0.8rem;
    color: var(--gray-medium);
}
.wx-strip-forecast {
    display: flex;
    gap: 1rem;
    flex: 1;
    justify-content: space-around;
    overflow: hidden;
}
.wx-strip-day {
    text-align: center;
    min-width: 0;
}
.wx-strip-day-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--gray-medium);
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}
.wx-strip-day-icon {
    width: 48px;
    height: 48px;
    display: block;
    margin: 0 auto 0.2rem;
}
.wx-strip-day-temps {
    font-size: 0.8rem;
}
.wx-strip-day-temps .wx-hi {
    font-weight: 700;
    color: var(--gray-dark);
}
.wx-strip-day-temps .wx-lo {
    color: var(--gray-medium);
}

@media (max-width: 600px) {
    .wx-strip {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    .wx-strip-today {
        border-right: none;
        padding-right: 0;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--gray-border);
    }
    .wx-strip-forecast {
        justify-content: space-between;
    }
}

/* === Weather Page === */

.wx-current {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.wx-current-main {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}
.wx-current-icon {
    width: 80px;
    height: 80px;
}
.wx-current-temp {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--gray-dark);
    line-height: 1;
}
.wx-current-details {
    line-height: 1.4;
}
.wx-current-condition {
    font-weight: 600;
    color: var(--gray-dark);
    font-size: 1.1rem;
}
.wx-current-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}
.wx-stat {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: var(--gray-medium);
}
.wx-stat i {
    color: var(--green);
    width: 1rem;
    text-align: center;
}

.wx-section-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--gray-dark);
    margin-bottom: 1rem;
}

/* Hourly */
.wx-hourly-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 2rem;
}
.wx-hourly-item {
    flex: 0 0 auto;
    min-width: 60px;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 6px;
    padding: 0.75rem 0.5rem;
    text-align: center;
    font-size: 0.85rem;
}
.wx-hourly-time {
    font-size: 0.7rem;
    color: var(--gray-medium);
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}
.wx-hourly-icon {
    width: 42px;
    height: 42px;
    margin-bottom: 0.3rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}
.wx-hourly-temp {
    font-weight: 700;
    color: var(--gray-dark);
}
.wx-hourly-precip {
    font-size: 0.7rem;
    color: #5b9bd5;
    margin-top: 0.25rem;
}
.wx-hourly-precip i {
    font-size: 0.6rem;
    color: #5b9bd5;
    display: inline;
    margin-bottom: 0;
}

/* Hourly Chart */
.wx-chart-container {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    padding: 1rem;
    margin-top: -1.5rem;
    margin-bottom: 2rem;
}
.wx-chart-container canvas {
    display: block;
    width: 100%;
}

/* Daily */
.wx-daily {
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
}
.wx-daily-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--gray-border);
}
.wx-daily-row:last-child {
    border-bottom: none;
}
.wx-daily-today {
    background: rgba(74, 124, 89, 0.05);
}
.wx-daily-day {
    min-width: 90px;
}
.wx-daily-day strong {
    color: var(--gray-dark);
    display: block;
    font-size: 0.95rem;
}
.wx-daily-date {
    font-size: 0.75rem;
    color: var(--gray-medium);
}
.wx-daily-icon {
    width: 72px;
    text-align: center;
    flex-shrink: 0;
}
.wx-daily-img {
    width: 72px;
    height: 72px;
}
.wx-daily-condition {
    flex: 1;
    font-size: 0.85rem;
    color: var(--gray-medium);
}
.wx-daily-temps {
    display: flex;
    gap: 0.5rem;
    min-width: 80px;
    justify-content: flex-end;
}
.wx-hi {
    font-weight: 700;
    color: var(--gray-dark);
}
.wx-lo {
    color: var(--gray-medium);
}
.wx-daily-meta {
    display: flex;
    gap: 0.75rem;
    min-width: 100px;
    justify-content: flex-end;
    font-size: 0.8rem;
    color: var(--gray-medium);
}
.wx-daily-meta i {
    color: var(--green);
    margin-right: 0.15rem;
}

/* Sunrise/Sunset */
.wx-sun {
    display: flex;
    gap: 2rem;
    margin-bottom: 2rem;
}
.wx-sun-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--white);
    border: 1px solid var(--gray-border);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    flex: 1;
}
.wx-sun-icon {
    width: 48px;
    height: 48px;
}
.wx-sun-label {
    font-size: 0.75rem;
    color: var(--gray-medium);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.wx-sun-time {
    font-weight: 600;
    color: var(--gray-dark);
}

.wx-attribution {
    font-size: 0.75rem;
    color: var(--gray-medium);
    text-align: right;
}

@media (max-width: 768px) {
    .wx-current {
        padding: 1.25rem;
    }
    .wx-current-icon {
        width: 60px;
        height: 60px;
    }
    .wx-current-temp {
        font-size: 2.5rem;
    }
    .wx-daily-row {
        gap: 0.5rem;
        padding: 0.6rem 0.75rem;
    }
    .wx-daily-icon {
        width: 40px;
    }
    .wx-daily-img {
        width: 40px;
        height: 40px;
    }
    .wx-daily-day {
        min-width: 70px;
    }
    .wx-daily-condition {
        display: none;
    }
    .wx-daily-meta {
        min-width: auto;
    }
    .wx-sun {
        flex-direction: column;
        gap: 0.75rem;
    }
}
