/* =============================================================
   Event Calendar — KTCT College of Nursing
   Loaded only on the Event Calendar page template.
============================================================= */

/* ----- Layout ---------------------------------------- */

.ktct-ec-intro .h2.title span {
    background-image: var(--gradient-1);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-family: var(--font-family-style3);
    display: inline-block;
    animation: titleTextShine 5s ease-in-out infinite;
}

.ktct-event-calendar-section {
    padding: 80px 0 100px;
    background: #f8f9fb;
}

.ktct-ec-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ----- Intro ----------------------------------------- */
.ktct-ec-intro {
    text-align: center;
    margin-bottom: 48px;
}

.ktct-ec-description {
    max-width: 620px;
    margin: 12px auto 0;
    color: #666;
    font-size: 15px;
    line-height: 1.7;
}

/* ----- Two-column layout ----------------------------- */
.ktct-ec-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    align-items: start;
}

@media (max-width: 1024px) {
    .ktct-ec-layout {
        grid-template-columns: 1fr;
    }
}

/* ----- Calendar wrapper ------------------------------ */
.ktct-ec-calendar-wrap {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 32px rgba(0, 53, 84, 0.08);
    overflow: hidden;
}

/* ----- Month navigation ------------------------------ */
.ktct-ec-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--theme-color2, #003554);
    padding: 20px 28px;
}

.ktct-ec-nav-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 13px;
}

.ktct-ec-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    color: #fff;
}

.ktct-ec-month-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.ktct-ec-month-name {
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.ktct-ec-year {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.75);
    font-weight: 500;
}

/* ----- Day labels ------------------------------------ */
.ktct-ec-day-labels {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--theme-color1, #1e6832);
}

.ktct-ec-day-label {
    text-align: center;
    padding: 10px 4px;
    font-size: 12px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.8px;
    text-transform: uppercase;
}

/* ----- Grid ------------------------------------------ */
.ktct-ec-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    border-left: 1px solid #eef0f4;
    border-top: 1px solid #eef0f4;
}

.ktct-ec-cell {
    position: relative;
    min-height: 100px;
    padding: 8px 6px 6px;
    border-right: 1px solid #eef0f4;
    border-bottom: 1px solid #eef0f4;
    background: #fff;
    transition: background 0.15s;
    cursor: default;
}

.ktct-ec-cell:not(.ktct-ec-empty):hover {
    background: #f4fbf6;
    z-index: 1;
}

.ktct-ec-empty {
    background: #fafafa;
    cursor: default;
}

/* ----- Date number ----------------------------------- */
.ktct-ec-date-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 4px;
    transition: background 0.15s, color 0.15s;
}

.ktct-ec-today .ktct-ec-date-num {
    background: var(--theme-color1, #1e6832);
    color: #fff;
    font-weight: 700;
}

/* ----- Event pills ----------------------------------- */
.ktct-ec-event-pills {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ktct-ec-pill {
    display: block;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    color: #fff !important;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.4;
    transition: opacity 0.15s;
}

.ktct-ec-pill:hover {
    opacity: 0.85;
}

.ktct-ec-more {
    font-size: 10px;
    color: var(--theme-color2, #003554);
    font-weight: 600;
    padding: 1px 4px;
}

/* ----- Tooltip --------------------------------------- */
.ktct-ec-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    width: 220px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0, 53, 84, 0.18);
    z-index: 100;
    padding: 12px 14px;
    border-top: 3px solid var(--theme-color1, #1e6832);
}

.ktct-ec-cell.ktct-ec-has-events:hover .ktct-ec-tooltip {
    display: block;
}

/* keep tooltip inside right edge */
.ktct-ec-grid>.ktct-ec-cell:nth-child(7n) .ktct-ec-tooltip,
.ktct-ec-grid>.ktct-ec-cell:nth-child(7n-1) .ktct-ec-tooltip {
    left: auto;
    right: 0;
    transform: none;
}

.ktct-ec-tooltip-event {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid #f0f0f0;
}

.ktct-ec-tooltip-event:last-child {
    border-bottom: none;
}

.ktct-ec-tooltip-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 3px;
}

.ktct-ec-tooltip-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.ktct-ec-tooltip-title {
    font-size: 12px;
    font-weight: 600;
    color: #222;
    text-decoration: none;
    line-height: 1.4;
}

.ktct-ec-tooltip-title:hover {
    color: var(--theme-color1, #1e6832);
}

.ktct-ec-tooltip-time {
    font-size: 11px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ----- Legend ---------------------------------------- */
.ktct-ec-legend {
    display: flex;
    gap: 20px;
    align-items: center;
    padding: 14px 20px;
    border-top: 1px solid #eef0f4;
    background: #fafbfc;
}

.ktct-ec-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.ktct-ec-legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.ktct-ec-legend-today {
    background: var(--theme-color1, #1e6832);
}

.ktct-ec-legend-event {
    background: var(--theme-color3, #218fd1);
}

/* ----- Sidebar --------------------------------------- */
.ktct-ec-sidebar {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 32px rgba(0, 53, 84, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ktct-ec-sidebar-header {
    background: var(--theme-color1, #1e6832);
    padding: 20px 24px;
    display: flex;
    gap: 12px;
    justify-content: center;
    align-items: center;
}

.ktct-ec-sidebar-header i {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.85);
}

.ktct-ec-sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: #fff;
    line-height: 30px;
}

/* ----- Event list in sidebar ------------------------- */
.ktct-ec-event-list {
    list-style: none;
    margin: 0;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 420px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ddd #f5f5f5;
}

.ktct-ec-event-list::-webkit-scrollbar {
    width: 5px;
}

.ktct-ec-event-list::-webkit-scrollbar-track {
    background: #f5f5f5;
}

.ktct-ec-event-list::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.ktct-ec-event-item {
    display: flex;
    gap: 14px;
    align-items: center;
    padding-bottom: 14px;
    border-bottom: 1px solid #f0f2f5;
}

.ktct-ec-event-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* Date badge */
.ktct-ec-event-date-badge {
    flex-shrink: 0;
    width: 48px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 6px 4px;
    color: #003554;
    border: 2px solid #003554;
}

.ktct-ec-badge-day {
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}

.ktct-ec-badge-month {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.88;
    letter-spacing: 0.5px;
}

/* Event details */
.ktct-ec-event-details {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ktct-ec-event-name {
    font-size: 16px;
    font-weight: 600;
    color: #1a2340;
    text-decoration: none;
    line-height: 1.35;
    display: block;
}

.ktct-ec-event-name:hover {
    color: var(--theme-color1, #1e6832);
}

.ktct-ec-event-time {
    font-size: 12px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ktct-ec-event-excerpt {
    font-size: 12px;
    color: #999;
    margin: 0;
    line-height: 1.5;
}

/* No events */
.ktct-ec-no-events {
    padding: 40px 24px;
    text-align: center;
}

.ktct-ec-no-events-icon {
    font-size: 44px;
    color: #ddd;
    margin-bottom: 12px;
}

.ktct-ec-no-events p {
    font-size: 13px;
    color: #aaa;
    margin: 0;
}

/* ----- Quick jump ------------------------------------ */
.ktct-ec-quick-jump {
    padding: 18px 20px;
    border-top: 1px solid #eef0f4;
    background: #fafbfc;
}

.ktct-ec-qj-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.ktct-ec-qj-selects {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ktct-ec-select {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #dde2ea;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    background: #fff;
    outline: none;
    cursor: pointer;
    appearance: auto;
}

.ktct-ec-select:focus {
    border-color: var(--theme-color1, #1e6832);
}

.ktct-ec-go-btn {
    padding: 8px 18px;
    background: var(--theme-color2, #003554);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.ktct-ec-go-btn:hover {
    background: var(--theme-color1, #1e6832);
}

/* ----- Responsive ------------------------------------ */
@media (max-width: 768px) {
    .ktct-event-calendar-section {
        padding: 50px 0 60px;
    }

    .ktct-ec-cell {
        min-height: 68px;
        padding: 5px 3px 4px;
    }

    .ktct-ec-date-num {
        width: 22px;
        height: 22px;
        font-size: 11px;
    }

    .ktct-ec-pill {
        font-size: 9px;
        padding: 1px 4px;
    }

    .ktct-ec-month-name {
        font-size: 18px;
    }

    .ktct-ec-tooltip {
        width: 180px;
    }
}

@media (max-width: 480px) {
    .ktct-ec-cell {
        min-height: 54px;
    }

    .ktct-ec-pill {
        display: none;
    }

    .ktct-ec-has-events .ktct-ec-date-num {
        background: var(--theme-color3, #218fd1);
        color: #fff;
    }
}