/* ==========================================================================
   WIG CALENDAR & RESOURCES - COMPLETE GLASSMORPHIC THEME
   ========================================================================== */

/* 1. Global CSS Variables */
:root {
    --wig-bg-top: #eef8f8;
    --wig-bg-mid: #f5f2fb;
    --wig-bg-bottom: #eaf6f1;
    --wig-green-primary: #00a86b;
    --wig-green-dark: #00794d;
    --wig-green-gradient-start: #00a86b;
    --wig-green-gradient-end: #0b8070;
    --wig-gold: #0d7f75;
    --wig-gold-light: #34b7a8;
    --wig-text-dark: #073f36;
    --wig-text-muted: #51635f;
    --wig-card-bg: rgba(255, 255, 255, 0.85);
    --wig-card-border: #d8e5df;
    --wig-pill-bg: #e2ede8;
}

/* 2. Base Page Structure */
.wig-calendar-page {
    background: linear-gradient(180deg, var(--wig-bg-top) 0%, var(--wig-bg-mid) 42%, var(--wig-bg-bottom) 100%);
    color: var(--wig-text-dark);
    padding: 4rem 0;
    min-height: 100vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wig-calendar-shell {
    margin: 0 auto;
    max-width: 1140px;
    padding: 0 .75rem;
    width: 100%;
}

/* 3. Hero Section & Typography */
.wig-calendar-hero {
    margin: 0 auto 2.5rem;
    max-width: 1140px;
    text-align: left;
}

.wig-calendar-kicker {
    color: #d4a017;
    font-size: 0.85rem;
    font-weight: 900;
    letter-spacing: 0.18em;
    margin-bottom: 0.6rem;
    text-transform: uppercase;
}

.wig-calendar-intro .wig-calendar-email-link {
    color: inherit;
    font: inherit;
    text-decoration: none;
}

.wig-calendar-intro .wig-calendar-email-link:hover,
.wig-calendar-intro .wig-calendar-email-link:focus {
    text-decoration: underline;
}

.wig-calendar-title,
.wig-calendar-hero h1 {
    font-size: clamp(2.15rem, 3.6vw, 3.65rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: 0;
    margin: 0 0 1rem 0;
    background: linear-gradient(135deg, #00794d 0%, #00a86b 45%, #4ea853 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-align: left;
}

.wig-calendar-divider {
    width: 100%;
    height: 1px;
    background: rgba(179, 128, 20, 0.22);
    margin-bottom: 1.75rem;
}

.wig-calendar-intro {
    background: var(--wig-card-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--wig-card-border);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(7, 63, 54, 0.05);
    color: var(--wig-text-muted);
    font-size: 1.02rem;
    line-height: 1.7;
    margin-top: 1.5rem;
    padding: 1.5rem;
}

.wig-calendar-intro p {
    margin-bottom: 0;
}

/* 4. Main Board Shell & Modern Toolbar Header */
.wig-calendar-board {
    background: linear-gradient(135deg, rgba(227, 249, 244, 0.94), rgba(246, 242, 252, 0.94));
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(82, 184, 169, 0.26);
    border-radius: 18px;
    box-shadow: 0 24px 52px rgba(20, 86, 82, 0.14);
    overflow: hidden;
}

.wig-calendar-toolbar {
    align-items: center;
    background: linear-gradient(135deg, #04735f 0%, #07936f 48%, #075f70 100%);
    color: #ffffff;
    display: grid;
    gap: 1rem;
    grid-template-columns: 44px minmax(0, 1fr) 44px auto;
    padding: 1.35rem 1.65rem;
    position: relative;
}

.wig-calendar-toolbar h2 {
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    font-weight: 900;
    letter-spacing: 0;
    margin: 0;
    text-align: center;
    text-shadow: 0 4px 18px rgba(0, 42, 39, 0.2);
}

.wig-calendar-nav-button,
.wig-calendar-jump-button,
.wig-calendar-modal-close {
    align-items: center;
    border: 0;
    display: inline-flex;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.wig-calendar-nav-button {
    background: rgba(191, 243, 231, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    color: #04735f;
    font-size: 1.8rem;
    height: 42px;
    line-height: 1;
    width: 42px;
}

.wig-calendar-nav-button:hover,
.wig-calendar-nav-button:focus {
    background: #ffffff;
    color: var(--wig-green-dark);
    transform: translateY(-1px);
}

.wig-calendar-jump {
    align-items: end;
    display: flex;
    gap: 0.55rem;
}

.wig-calendar-jump label {
    display: grid;
    gap: 0.25rem;
}

.wig-calendar-jump span {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.72rem;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
}

.wig-calendar-jump select {
    appearance: none;
    background: #f7fbff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    color: #071b45;
    cursor: pointer;
    font-weight: 850;
    min-height: 42px;
    min-width: 110px;
    padding: 0.45rem 1.8rem 0.45rem 0.75rem;
}

.wig-calendar-jump-button {
    background: linear-gradient(135deg, #07614f, #043c46);
    border-radius: 12px;
    color: #ffffff;
    font-size: 0.94rem;
    font-weight: 900;
    height: 42px;
    min-width: 58px;
    padding: 0 1rem;
    box-shadow: 0 10px 22px rgba(1, 48, 42, 0.28);
}

.wig-calendar-jump-button:hover,
.wig-calendar-jump-button:focus {
    background: var(--wig-green-primary);
    transform: translateY(-1px);
}

/* 5. Calendar Grid Layout & Cell Styling */
.wig-calendar-grid-wrap {
    overflow-x: auto;
    padding: 0.45rem 0.7rem 1rem;
}

.wig-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(138px, 1fr));
    min-width: 880px;
    background: transparent;
    gap: 0.42rem;
    padding: 0;
}

.wig-calendar-weekday {
    background: linear-gradient(135deg, #9df1cf, #6fdcb6);
    border: 1px solid rgba(45, 154, 130, 0.24);
    border-radius: 11px;
    color: #073f36;
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding: 0.95rem 0.65rem;
    text-align: center;
    text-transform: uppercase;
}

.wig-calendar-weekday:nth-child(7) {
    background: linear-gradient(135deg, #ffd5e2, #f6b9c8);
    color: #9a1231;
}

.wig-calendar-day {
    background: linear-gradient(145deg, #effafa 0%, #e8f8f2 100%);
    border: 1px solid rgba(77, 173, 165, 0.28);
    border-radius: 11px;
    box-shadow: 0 8px 18px rgba(11, 93, 88, 0.07);
    color: #061a47;
    min-height: 134px;
    padding: 0.75rem;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.wig-calendar-day:hover,
.wig-calendar-day:focus-within {
    border-color: rgba(3, 137, 108, 0.44);
    box-shadow: 0 12px 28px rgba(11, 93, 88, 0.12);
    transform: translateY(-1px);
    z-index: 5;
}

.wig-calendar-day:nth-child(7n) {
    background: linear-gradient(145deg, #fff0f4 0%, #fbe5ed 100%);
    border-color: rgba(214, 120, 151, 0.28);
}

.wig-calendar-day-has-event,
.wig-calendar-day-has-event:nth-child(7n) {
    background: linear-gradient(145deg, #04896a 0%, #03a574 58%, #08715e 100%);
    border-color: rgba(255, 255, 255, 0.38);
    box-shadow: 0 12px 26px rgba(3, 132, 101, 0.22);
    color: #ffffff;
}

.wig-calendar-day-muted {
    background: linear-gradient(145deg, #dde5e8 0%, #cfd9dc 100%);
    border-color: rgba(119, 137, 143, 0.18);
    color: #6e8488;
    opacity: 0.9;
}

.wig-calendar-day-muted.wig-calendar-day-has-event {
    background: linear-gradient(145deg, #7aa99c 0%, #66938a 100%);
    color: rgba(255, 255, 255, 0.9);
}

.wig-calendar-day-today {
    box-shadow: inset 0 0 0 2px rgba(9, 131, 113, 0.35), 0 12px 28px rgba(11, 93, 88, 0.13);
}

.wig-calendar-day-has-event.wig-calendar-day-today {
    box-shadow: inset 0 0 0 2px #ffffff, 0 14px 30px rgba(3, 132, 101, 0.28);
}

.wig-calendar-day-head {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    min-height: 1.65rem;
}

.wig-calendar-day-head time,
.wig-calendar-day-number {
    color: #061a47 !important;
    font-size: 1.2rem;
    font-weight: 950 !important;
    line-height: 1;
    text-shadow: none;
}

.wig-calendar-day-number {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0;
}

.wig-calendar-day-has-event .wig-calendar-day-head time,
.wig-calendar-day-has-event .wig-calendar-day-number {
    color: #ffffff !important;
}

.wig-calendar-day-head span,
.wig-calendar-today-badge {
    background: #ffffff;
    color: #08715e;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 900;
    padding: 0.24rem 0.65rem;
    box-shadow: 0 5px 12px rgba(0, 69, 60, 0.13);
}

/* 6. Event Cards */
.wig-calendar-event-stack {
    display: grid;
    gap: 0.5rem;
    margin-top: 0.62rem;
}

.wig-calendar-event-pill {
    align-items: center;
    background: linear-gradient(135deg, #fff8ee 0%, #eef9ff 100%);
    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: 10px;
    box-shadow: 0 7px 14px rgba(0, 42, 39, 0.14);
    color: #071b45 !important;
    cursor: pointer;
    display: flex;
    gap: 0.58rem;
    min-height: 58px;
    padding: 0.55rem 0.6rem;
    text-align: left;
    text-shadow: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    width: 100%;
}

.wig-calendar-event-pill:hover,
.wig-calendar-event-pill:focus {
    box-shadow: 0 10px 20px rgba(0, 42, 39, 0.18);
    color: #071b45 !important;
    transform: translateY(-1px);
}

.wig-calendar-event-stack .wig-calendar-event-pill:nth-child(2n) {
    background: linear-gradient(135deg, #f6eeff 0%, #eefbf4 100%);
}

.wig-calendar-event-icon {
    align-items: center;
    background: linear-gradient(135deg, #0f8f77, #16b88d);
    border-radius: 50%;
    color: #ffffff;
    display: inline-flex;
    flex: 0 0 28px;
    font-size: 0.96rem;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.wig-calendar-event-stack .wig-calendar-event-pill:nth-child(2n) .wig-calendar-event-icon {
    background: linear-gradient(135deg, #5067d8, #8a5deb);
}

.wig-calendar-event-copy {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
    width: 100%;
}

.wig-calendar-event-copy strong {
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1.22;
    overflow-wrap: anywhere;
    white-space: normal;
    word-break: break-word;
}

.wig-calendar-event-copy > span {
    align-items: center;
    color: #103b3a;
    display: inline-flex;
    font-size: 0.7rem;
    font-weight: 800;
    gap: 0.18rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.wig-calendar-more-button {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.45);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.3rem 0.5rem;
    text-align: center;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.wig-calendar-more-button:hover,
.wig-calendar-more-button:focus {
    background: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

/* 7. Contact Cards Layout & Accent Alignment */
.wig-calendar-contact-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    margin-top: 2rem;
}

.wig-calendar-contact-card {
    background: #ffffff;
    border: 1px solid var(--wig-card-border);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(7, 63, 54, 0.05);
    display: flex;
    flex-direction: row;
    overflow: hidden;
}

.wig-calendar-card-accent {
    background: linear-gradient(180deg, var(--wig-green-gradient-start) 0%, var(--wig-green-gradient-end) 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    width: 70px;
    padding: 1rem 0.5rem;
    text-align: center;
}

.wig-calendar-card-accent .accent-icon {
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.wig-calendar-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.wig-calendar-card-content h2 {
    color: var(--wig-text-dark);
    font-size: 1.25rem;
    font-weight: 900;
    margin: 0 0 0.75rem 0;
}

.wig-calendar-address,
.wig-calendar-email-text {
    color: var(--wig-text-muted);
    font-size: 1.02rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.wig-calendar-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* 8. Action Buttons */
.btn-solid-green {
    background: linear-gradient(135deg, var(--wig-green-primary) 0%, var(--wig-green-dark) 100%);
    border: 0;
    border-radius: 10px;
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 800;
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 168, 107, 0.25);
    transition: all 0.2s ease;
}

.btn-solid-green:hover,
.btn-solid-green:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 168, 107, 0.35);
}

.btn-outline-green {
    background: transparent;
    border: 1.5px solid var(--wig-green-primary);
    border-radius: 10px;
    color: var(--wig-green-dark) !important;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    font-weight: 800;
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-outline-green:hover,
.btn-outline-green:focus {
    background: rgba(0, 168, 107, 0.08);
    transform: translateY(-2px);
}

/* 9. Event Pop-up Modal */
.wig-calendar-modal {
    inset: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    transition: opacity 0.22s ease;
    z-index: 2000;
}

.wig-calendar-modal.is-open {
    opacity: 1;
    pointer-events: auto;
}

.wig-calendar-modal-backdrop {
    background: rgba(7, 63, 54, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    inset: 0;
    position: absolute;
}

.wig-calendar-modal-card {
    background: #ffffff;
    border: 1px solid var(--wig-card-border);
    border-radius: 16px;
    box-shadow: 0 28px 60px rgba(7, 63, 54, 0.2);
    left: 50%;
    max-height: min(720px, calc(100vh - 2rem));
    max-width: min(640px, calc(100vw - 1.5rem));
    overflow-y: auto;
    padding: 1.75rem;
    position: absolute;
    top: 50%;
    transform: translate(-50%, -47%) scale(0.98);
    transition: transform 0.22s ease;
    width: 100%;
}

.wig-calendar-modal.is-open .wig-calendar-modal-card {
    transform: translate(-50%, -50%) scale(1);
}

.wig-calendar-modal-close {
    background: #f0f5f3;
    border-radius: 50%;
    color: var(--wig-text-dark);
    font-size: 1.5rem;
    height: 36px;
    line-height: 1;
    position: absolute;
    right: 1rem;
    top: 1rem;
    width: 36px;
}

.wig-calendar-modal-close:hover,
.wig-calendar-modal-close:focus {
    background: var(--wig-green-primary);
    color: #ffffff;
}

.wig-calendar-modal-date {
    color: var(--wig-gold);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    padding-right: 3rem;
    text-transform: uppercase;
}

.wig-calendar-modal-card h2 {
    color: var(--wig-text-dark);
    font-size: clamp(1.45rem, 4vw, 2rem);
    font-weight: 950;
    line-height: 1.15;
    margin: 0.45rem 3rem 0.7rem 0;
}

.wig-calendar-modal-location {
    background: #f0f7f4;
    border-left: 4px solid var(--wig-green-primary);
    border-radius: 6px;
    color: var(--wig-text-dark);
    font-weight: 800;
    margin-bottom: 1rem;
    padding: 0.7rem 0.85rem;
}

.wig-calendar-modal-summary {
    color: var(--wig-text-muted);
    line-height: 1.75;
    white-space: pre-line;
}

.wig-calendar-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

/* 10. Responsive Breakpoints */
@media (max-width: 900px) {
    .wig-calendar-contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575px) {
    .wig-calendar-card-accent {
        min-width: 55px;
        width: 55px;
    }
    
    .wig-calendar-toolbar {
        grid-template-columns: 36px minmax(0, 1fr) 36px;
    }
    
    .wig-calendar-jump {
        grid-column: span 3;
        justify-content: center;
        margin-top: 0.5rem;
    }
}

@media (min-width: 1400px) {
    .wig-calendar-shell,
    .wig-calendar-hero {
        max-width: 1320px;
    }
}
