/* ============================================================
   Event Calendar Pro — calendar.css v3.1
   Inherits theme: Chakra Petch / Roboto | #FE5900 orange | #030523 navy
   ============================================================ */

/*
 * NOTE: We do NOT import fonts here — the theme already loads
 * Chakra Petch and Roboto via its own stylesheet.
 * We inherit them from the document body.
 */

/* ---------- CSS Variables — match TNS Aspire theme ---------- */
:root {
    --ec-accent: #FE5900;
    --ec-accent-text: #ffffff;
    --ec-card-bg: #ffffff;
    --ec-card-border: #e4e4e4;
    --ec-section-bg: #F7F3EE;
    --ec-radius: 6px;
    --ec-text: #030523;
    --ec-body-text: #434343;
    --ec-muted: #888;
    --ec-shadow: 0px 1px 14px 0px rgba(0, 0, 0, 0.13);
    --ec-shadow-hover: 0px 4px 24px 0px rgba(254, 89, 0, 0.18);
    --ec-tr: 0.4s ease-in-out;
    --ec-line: 1px solid #e4e4e4;
}

/* ---------- Wrapper ---------- */
#ec-pro-wrap {
    font-family: 'Roboto', sans-serif;
    font-size: 17px;
    color: var(--ec-body-text);
    background: var(--ec-section-bg);
    border-radius: var(--ec-radius);
    padding: 40px 36px 56px;
    max-width: 1100px;
    margin: 0 auto;
}

/* ---------- Header ---------- */
.ec-pro-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 32px;
}

.ec-pro-heading {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 38px;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin: 0;
    color: var(--ec-text);
}

@media (max-width: 991px) {
    .ec-pro-heading {
        font-size: 32px;
    }
}

@media (max-width: 767px) {
    .ec-pro-heading {
        font-size: 28px;
    }
}

@media (max-width: 575px) {
    .ec-pro-heading {
        font-size: 24px;
    }
}

.ec-header-controls {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

/* ---------- View Switcher ---------- */
.ec-view-switcher {
    display: flex;
    background: var(--ec-card-bg);
    border: var(--ec-line);
    border-radius: 6px;
    padding: 3px;
    gap: 2px;
}

.ec-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: none;
    border-radius: 4px;
    padding: 8px 18px;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ec-muted);
    cursor: pointer;
    transition: var(--ec-tr);
}

.ec-view-btn.active {
    background: var(--ec-accent);
    color: #ffffff;
}

.ec-view-btn:hover:not(.active) {
    color: var(--ec-accent);
}

/* ---------- Filter Bar ---------- */
.ec-pro-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ec-filter-btn {
    background: var(--ec-card-bg);
    border: var(--ec-line);
    color: var(--ec-muted);
    border-radius: 4px;
    padding: 6px 16px;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--ec-tr);
}

.ec-filter-btn:hover,
.ec-filter-btn.active {
    background: var(--ec-accent);
    border-color: var(--ec-accent);
    color: #ffffff;
}

/* ---------- Month Divider ---------- */
.ec-month-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 36px 0 18px;
    animation: ecFadeUp .3s ease both;
}

.ec-month-divider:first-child {
    margin-top: 0;
}

.ec-month-label {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 4px;
    color: var(--ec-text);
    white-space: nowrap;
    padding: 6px 0;
    position: relative;
    display: inline-block;
}

/* Matches the theme's section-title h6 bar style */
.ec-month-label::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, #FE5900 0%, rgba(201, 203, 223, 0) 100%);
}

.ec-month-label::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(270deg, #FE5900 0%, rgba(201, 203, 223, 0) 100%);
}

.ec-month-line {
    flex: 1;
    height: 1px;
    background: var(--ec-card-border);
}

/* ---------- Event Card ---------- */
.ec-event-card {
    display: grid;
    grid-template-columns: 76px 1fr;
    background: var(--ec-card-bg);
    border: var(--ec-line);
    border-radius: var(--ec-radius);
    overflow: hidden;
    text-decoration: none;
    color: var(--ec-body-text);
    box-shadow: var(--ec-shadow);
    transition: transform var(--ec-tr), box-shadow var(--ec-tr), border-color var(--ec-tr);
    margin-bottom: 14px;
    animation: ecFadeUp .35s ease both;
}

.ec-event-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--ec-shadow-hover);
    border-color: var(--ec-accent);
    color: var(--ec-body-text);
    text-decoration: none;
}

.ec-event-card.ec-today-card {
    border-color: var(--ec-accent);
    border-width: 2px;
}

.ec-event-card.ec-past-card {
    opacity: 0.6;
}

@keyframes ecFadeUp {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Date Pillar ---------- */
.ec-date-pillar {
    background: var(--ec-accent);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    min-height: 110px;
    position: relative;
    flex-shrink: 0;
}

.ec-date-day {
    font-size: 2.2rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.ec-date-month {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.85;
    margin-top: 3px;
    color: #ffffff;
}

.ec-date-year {
    font-size: 0.6rem;
    opacity: 0.6;
    margin-top: 2px;
    color: #ffffff;
}

.ec-date-pillar.ec-multi {
    padding: 10px 4px;
    gap: 2px;
}

.ec-date-pillar.ec-multi .ec-date-part {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ec-date-pillar.ec-multi .ec-date-day {
    font-size: 1.5rem;
}

.ec-date-pillar.ec-multi .ec-date-month {
    font-size: 0.55rem;
    margin-top: 1px;
}

.ec-date-divider {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1;
    margin: 2px 0;
}

.ec-today-badge {
    position: absolute;
    top: 7px;
    right: 7px;
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 2px 5px;
    border-radius: 3px;
}

/* ---------- Card Body ---------- */
.ec-card-body {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;
}

.ec-card-inner {
    display: flex;
    gap: 16px;
    align-items: flex-start;
	align-items:center;
}

.ec-card-thumb {
    width: 130px;
    height: 95px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    border: var(--ec-line);
}

.ec-card-text {
    flex: 1;
    min-width: 0;
}

.ec-card-title {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin: 0 0 5px;
    line-height: 1.3;
    color: var(--ec-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color var(--ec-tr);
}

.ec-event-card:hover .ec-card-title {
    color: var(--ec-accent);
}

.ec-card-excerpt {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    color: var(--ec-muted);
    line-height: 1.6;
    margin: 0 0 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ec-card-meta {
    font-size: 13px;
    color: var(--ec-muted);
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
}

/* Matches theme's link-btn style */
.ec-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-transform: capitalize;
    color: var(--ec-accent);
    text-decoration: none;
    transition: color var(--ec-tr);
}

.ec-card-link svg {
    transition: transform var(--ec-tr);
}

.ec-event-card:hover .ec-card-link {
    color: #930416;
}

.ec-event-card:hover .ec-card-link svg {
    transform: translateX(5px);
}

/* ---------- No Events ---------- */
.ec-no-events {
    text-align: center;
    padding: 60px 20px;
    color: var(--ec-muted);
}

.ec-no-events-icon {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
}

.ec-no-events p {
    font-size: 16px;
    margin: 0;
}

/* ---------- Load More — matches .theme-btn ---------- */
.ec-btn-outline {
    font-size: 16px;
    position: relative;
    z-index: 1;
    overflow: hidden;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background-color: var(--ec-accent);
    display: inline-block;
    padding: 12px 25px;
    border-radius: 6px;
    color: #ffffff;
    width: auto;
    font-family: 'Roboto', sans-serif;
    border: none;
    cursor: pointer;
    transition: color 0.4s ease-in-out;
}

.ec-btn-outline::before {
    content: "";
    position: absolute;
    width: 0;
    top: -10px;
    left: 50%;
    height: 0;
    background-color: #930416;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.8s ease;
    z-index: -1;
}

.ec-btn-outline:hover {
    color: #ffffff;
}

.ec-btn-outline:hover::before {
    width: 800px;
    height: 800px;
    display: inline-block;
}

/* ============================================================
   CALENDAR GRID VIEW
   ============================================================ */

.ec-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 10px;
}

.ec-cal-nav-btn {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--ec-card-bg);
    border: var(--ec-line);
    border-radius: 6px;
    padding: 8px 20px;
    color: var(--ec-accent);
    cursor: pointer;
    transition: var(--ec-tr);
}

.ec-cal-nav-btn:hover {
    background: var(--ec-accent);
    color: #ffffff;
    border-color: var(--ec-accent);
}

.ec-cal-title {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--ec-text);
}

.ec-cal-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 4px;
}

.ec-cal-dow {
    text-align: center;
    font-family: 'Chakra Petch', sans-serif;
    font-size: 11px;
    font-weight: 700;
    color: var(--ec-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 6px 0;
}

.ec-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    animation: ecFadeUp .3s ease both;
}

.ec-cal-cell {
    background: var(--ec-card-bg);
    border: var(--ec-line);
    border-radius: 4px;
    min-height: 90px;
    padding: 8px 6px 6px;
    position: relative;
    transition: var(--ec-tr);
    cursor: default;
}

.ec-cal-cell.ec-has-event {
    cursor: pointer;
    border-color: rgba(254, 89, 0, 0.3);
}

.ec-cal-cell.ec-has-event:hover {
    border-color: var(--ec-accent);
    box-shadow: var(--ec-shadow-hover);
    transform: translateY(-2px);
}

.ec-cal-cell.ec-other-month {
    opacity: 0.35;
    background: transparent;
    border-style: dashed;
}

.ec-cal-cell.ec-today-cell {
    background: rgba(254, 89, 0, 0.06);
    border-color: var(--ec-accent);
}

.ec-cal-day-num {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--ec-muted);
    line-height: 1;
    margin-bottom: 6px;
}

.ec-cal-cell.ec-today-cell .ec-cal-day-num {
    color: var(--ec-accent);
}

.ec-cal-dot-wrap {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ec-cal-event-dot {
    font-family: 'Roboto', sans-serif;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.3;
    color: #ffffff;
    background: var(--ec-accent);
    border-radius: 3px;
    padding: 2px 5px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ec-cal-more {
    font-size: 10px;
    color: var(--ec-accent);
    font-weight: 700;
    font-family: 'Chakra Petch', sans-serif;
    padding-top: 2px;
}

/* Event detail panel */
.ec-cal-detail {
    margin-top: 20px;
    background: var(--ec-card-bg);
    border: var(--ec-line);
    border-radius: var(--ec-radius);
    padding: 22px 24px;
    animation: ecFadeUp .3s ease both;
    border-left: 4px solid var(--ec-accent);
    box-shadow: var(--ec-shadow);
}

.ec-cal-detail h4 {
    font-family: 'Chakra Petch', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--ec-muted);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 14px;
}

.ec-cal-detail-events {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ec-cal-detail-item {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--ec-body-text);
    padding: 12px 14px;
    background: var(--ec-section-bg);
    border-radius: 4px;
    transition: var(--ec-tr);
    border: var(--ec-line);
}

.ec-cal-detail-item:hover {
    border-color: var(--ec-accent);
    color: var(--ec-body-text);
    box-shadow: var(--ec-shadow);
}

.ec-cal-detail-thumb {
    width: 100px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}

.ec-cal-detail-text {
    flex: 1;
}

.ec-cal-detail-title {
    font-size: 20px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    color: var(--ec-text);
    margin: 0 0 4px;
    transition: color var(--ec-tr);
}

.ec-cal-detail-item:hover .ec-cal-detail-title {
    color: var(--ec-accent);
}

.ec-cal-detail-date {
    font-size: 13px;
    color: var(--ec-muted);
    margin: 0;
}

/* ---------- Skeleton ---------- */
.ec-skeleton-card {
    display: grid;
    grid-template-columns: 76px 1fr;
    background: var(--ec-card-bg);
    border: var(--ec-line);
    border-radius: var(--ec-radius);
    overflow: hidden;
    margin-bottom: 14px;
}

.ec-sk {
    background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: ecShimmer 1.5s infinite;
    border-radius: 4px;
}

@keyframes ecShimmer {
    from {
        background-position: 200% 0
    }

    to {
        background-position: -200% 0
    }
}

.ec-sk-date {
    height: 110px;
    border-radius: 0;
    background: rgba(254, 89, 0, 0.18);
}

.ec-sk-body {
    padding: 18px 22px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    background: transparent;
}

.ec-sk-title {
    height: 16px;
    width: 60%;
}

.ec-sk-line {
    height: 11px;
    width: 90%;
}

.ec-sk-short {
    width: 40%;
}

/* ============================================================
   RESPONSIVE — Mobile First
   ============================================================ */

/* Tablet */
@media (max-width: 991px) {
    #ec-pro-wrap {
        padding: 30px 24px 40px;
    }

    .ec-cal-cell {
        min-height: 70px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    #ec-pro-wrap {
        padding: 24px 16px 36px;
    }

    .ec-pro-header {
        flex-direction: column;
        gap: 14px;
    }

    .ec-header-controls {
        align-items: flex-start;
        width: 100%;
    }

    .ec-view-switcher {
        width: 100%;
    }

    .ec-view-btn {
        flex: 1;
        justify-content: center;
    }

    .ec-pro-filter {
        width: 100%;
    }

    /* Compact cards on mobile */
    .ec-event-card {
        grid-template-columns: 62px 1fr;
    }

    .ec-date-pillar {
        min-height: 92px;
        padding: 12px 6px;
    }

    .ec-date-day {
        font-size: 1.7rem;
    }

    .ec-card-body {
        padding: 12px 14px;
    }

    .ec-card-title {
        font-size: 14px;
    }

    .ec-card-excerpt {
        font-size: 13px;
    }

    .ec-card-thumb {
        width: 58px;
        height: 58px;
    }

    /* Calendar smaller cells */
    .ec-cal-cell {
        min-height: 50px;
        padding: 4px 3px;
    }

    .ec-cal-event-dot {
        display: none;
    }

    .ec-cal-cell.ec-has-event::after {
        content: '•';
        color: var(--ec-accent);
        font-size: 1.2rem;
        display: block;
        text-align: center;
        line-height: 1;
    }

    .ec-cal-title {
        font-size: 18px;
    }

    .ec-cal-nav-btn {
        padding: 6px 12px;
        font-size: 11px;
    }

    .ec-cal-dow {
        font-size: 9px;
    }

    .ec-cal-detail {
        padding: 16px 14px;
    }

    .ec-cal-detail-item {
        flex-direction: row;
    }
}

/* Small phones */
@media (max-width: 480px) {
    #ec-pro-wrap {
        padding: 18px 12px 28px;
    }

    .ec-event-card {
        grid-template-columns: 56px 1fr;
    }

    .ec-date-pillar {
        min-height: 80px;
    }

    .ec-date-day {
        font-size: 1.4rem;
    }

    .ec-date-month {
        font-size: 0.55rem;
    }

    .ec-card-body {
        padding: 10px 12px;
    }

    .ec-card-inner {
        gap: 10px;
    }

    .ec-card-thumb {
        width: 48px;
        height: 48px;
    }

    .ec-card-title {
        font-size: 13px;
    }

    /* Stack filter buttons */
    .ec-filter-btn {
        padding: 5px 10px;
        font-size: 10px;
    }

    .ec-cal-grid-header,
    .ec-cal-grid {
        gap: 2px;
    }

    .ec-cal-cell {
        min-height: 40px;
        padding: 3px 2px;
    }

    .ec-cal-day-num {
        font-size: 10px;
    }
}