/* ============================================================================
   HEY LSIP — Events styles
   Public listing, detail, homepage widget.
   ============================================================================ */

/* ── Events listing page ─────────────────────────────────────────────────── */

.events-page {
    padding-top: 1.5rem;
    padding-bottom: 3rem;
    background: #fff;
}

.events-toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.25rem;
    margin: 1.5rem 0 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid #e3e1d8;
}

.events-filter {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.events-search {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 320px;
    max-width: 420px;
    background: #fff;
    border: 1px solid #ced4da;
    border-radius: 999px;
    padding: 0 0.75rem;
    min-width: 260px;
}

.events-search:focus-within {
    border-color: #14387a;
    box-shadow: 0 0 0 3px rgba(20, 56, 122, 0.15);
}

.events-search .material-symbols-outlined {
    color: #888;
    font-size: 1.2rem;
}

.events-search input {
    border: none;
    background: transparent;
    padding: 0.55rem 0.5rem;
    flex: 1;
    font-size: 0.95rem;
    outline: none;
}

/* Date-range secondary tabs */
.events-daterange {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.events-daterange-btn {
    padding: 0.35rem 0.85rem;
    border: 1px solid #e6e6e6;
    background: #fff;
    color: #555;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.events-daterange-btn:hover { border-color: #14387a; color: #14387a; }

.events-daterange-btn.active {
    background: #14387a;
    border-color: #14387a;
    color: #fff;
}

.events-daterange-custom {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.85rem;
    background: #fff8e8;
    color: #5b3c00;
    border: 1px solid #fbb13c;
    border-radius: 6px;
    font-size: 0.85rem;
}

.events-daterange-clear {
    background: transparent;
    border: 0;
    color: #5b3c00;
    cursor: pointer;
    padding: 0 0.3rem;
    font-size: 1.1rem;
    line-height: 1;
}

.events-daterange-clear:hover { color: #c73a00; }

/* Featured strip on /events */

.events-featured {
    margin-bottom: 2.5rem;
    padding: 1.5rem;
    background: linear-gradient(180deg, #fff8e8 0%, #ffffff 80%);
    border-left: 4px solid #fbb13c;
    border-radius: 6px;
}

.events-featured-heading {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: #5b3c00;
    margin: 0 0 1rem;
}

.events-featured-heading .material-symbols-outlined {
    color: #fbb13c;
    font-variation-settings: "FILL" 1;
}

.events-featured-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.events-featured-card {
    border-color: #fbb13c !important;
}

.events-filter-btn {
    padding: 0.5rem 1.1rem;
    border: 2px solid #ced4da;
    background: #fff;
    color: #555;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}

.events-filter-btn:hover {
    border-color: #14387a;
    color: #14387a;
}

.events-filter-btn.active {
    background: #14387a;
    border-color: #14387a;
    color: #fff;
    box-shadow: 0 2px 6px rgba(20, 56, 122, 0.25);
}

.events-month {
    margin-bottom: 3rem;
}

.events-month-heading {
    font-size: 1.4rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #14387a;
    display: inline-block;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.event-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    position: relative;
}

.event-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
    color: inherit;
    text-decoration: none;
}

.event-card-date {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #14387a;
    color: #fff;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    z-index: 1;
    min-width: 56px;
}

.event-card-day {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

.event-card-month {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    margin-top: 0.1rem;
}

.event-card-image {
    height: 160px;
    background-size: cover;
    background-position: center;
    background-color: #f4f4f0;
}

.event-card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.event-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #222;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.event-card-meta {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #555;
    font-size: 0.85rem;
}

.event-card-meta .material-symbols-outlined {
    font-size: 1rem;
}

.event-card-preview {
    color: #444;
    font-size: 0.9rem;
    line-height: 1.4;
    margin-top: 0.5rem;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-card-source {
    margin-top: auto;
    padding-top: 0.5rem;
    font-size: 0.75rem;
    color: #888;
    font-style: italic;
}

/* ── Event detail page ───────────────────────────────────────────────────── */

.event-hero {
    position: relative;
    width: 100%;
    height: 360px;
    background-color: #14387a;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.event-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 56, 122, 0.10) 0%, rgba(20, 56, 122, 0.55) 100%);
    pointer-events: none;
}

.event-detail h1,
.site-container--narrow .event-back ~ h1,
.site-container--narrow > h1 {
    font-size: clamp(1.8rem, 3.2vw, 2.5rem);
    line-height: 1.2;
    color: #14387a;
    margin: 0 0 1rem;
    letter-spacing: -0.01em;
}

.event-detail {
    max-width: 820px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

.event-back {
    display: inline-block;
    margin-bottom: 1rem;
    color: #555;
    text-decoration: none;
    font-size: 0.9rem;
}

.event-back:hover {
    color: #14387a;
}

.event-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 1rem 0 1.5rem;
    padding: 1rem 1.25rem;
    background: #f8f8f4;
    border-radius: 6px;
}

.event-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #333;
    font-size: 0.95rem;
}

.event-meta .material-symbols-outlined {
    font-size: 1.2rem;
    color: #14387a;
}

.event-meta-source a {
    color: #14387a;
    text-decoration: none;
}

.event-preview {
    font-size: 1.1rem;
    line-height: 1.55;
    color: #333;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.event-body {
    line-height: 1.65;
    color: #333;
}

.event-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.event-cta {
    margin: 2rem 0;
    text-align: center;
}

.event-cta-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 2rem 0;
}

.event-cta-row .button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.button-outline {
    background: transparent !important;
    color: #14387a !important;
    border: 2px solid #14387a !important;
}

.button-outline:hover {
    background: #14387a !important;
    color: #fff !important;
}

/* ── Homepage widget ─────────────────────────────────────────────────────── */

.upcoming-events-block {
    background: #fff;
    padding: 4rem 1rem;
}

.upcoming-events-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.upcoming-events-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.upcoming-events-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #14387a;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.upcoming-events-all {
    color: #14387a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.15s;
}
.upcoming-events-all:hover { color: #d77c1a; }

.upcoming-events-all:hover {
    text-decoration: underline;
}

.upcoming-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
}

.upcoming-event-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    border: 1px solid #eaeaea;
    box-shadow: 0 2px 6px rgba(15, 42, 92, 0.05);
}

.upcoming-event-card:hover {
    transform: translateY(-3px);
    border-color: #14387a;
    box-shadow: 0 10px 24px rgba(15, 42, 92, 0.13);
    color: inherit;
    text-decoration: none;
}

.upcoming-event-card.featured { border-color: #fbb13c; }

.upcoming-event-media {
    position: relative;
    aspect-ratio: 16 / 9;
    background-color: #14387a;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Subtle gradient over the image so the date tile stays legible on light photos. */
.upcoming-event-card:not(.no-image) .upcoming-event-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 56, 122, 0.45) 0%, rgba(20, 56, 122, 0) 55%);
    pointer-events: none;
}

/* When there's no real image, lay a soft pattern over the brand blue so it doesn't read as a broken card. */
.upcoming-event-card.no-image .upcoming-event-media {
    background: linear-gradient(135deg, #14387a 0%, #1f4ea0 100%);
}
.upcoming-event-card.no-image .upcoming-event-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.10) 0, transparent 40%),
        radial-gradient(circle at 80% 70%, rgba(251, 177, 60, 0.18) 0, transparent 45%);
    pointer-events: none;
}

.upcoming-event-date {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 56px;
    text-align: center;
    background: #fff;
    color: #14387a;
    border-radius: 6px;
    padding: 0.4rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    z-index: 1;
}

.upcoming-event-day {
    font-size: 1.4rem;
    font-weight: 800;
    line-height: 1;
}

.upcoming-event-month {
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    font-weight: 700;
    margin-top: 0.15rem;
    color: #d77c1a;
}

.upcoming-event-featured-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #fbb13c;
    color: #fff;
    border-radius: 999px;
    padding: 0.25rem 0.65rem 0.25rem 0.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    z-index: 2;
}
.upcoming-event-featured-badge .material-symbols-outlined { font-size: 1rem; }

.upcoming-event-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 1rem 1.1rem 1.15rem;
}

.upcoming-event-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #14387a;
    margin: 0 0 0.25rem;
    line-height: 1.3;
}

.upcoming-event-line {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: #555;
}

.upcoming-event-line .material-symbols-outlined {
    font-size: 1rem;
    color: #14387a;
}

.upcoming-event-source {
    margin-top: 0.4rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    font-weight: 600;
}

@media (max-width: 600px) {
    .upcoming-events-block { padding: 2.5rem 1rem; }
    .upcoming-events-header h2 { font-size: 1.5rem; }
}
