.tat-activities-wrapper {
    max-width: 1440px;
    margin: 18px auto 40px;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box; /* Include padding in width calculation */
    font-family: "Urbanist", "Segoe UI", "Helvetica Neue", Arial, "Liberation Sans", sans-serif;
    color: #191919;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

@media (min-width: 1520px) {
    .tat-activities-wrapper {
        padding: 0 40px;
    }
}

.tat-activities-wrapper p:empty,
.tat-activities-wrapper br {
    display: none;
    margin: 0;
    padding: 0;
    height: 0;
}

.tat-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.tat-header p,
.tat-header p:empty {
    display: none;
    margin: 0;
    padding: 0;
    height: 0;
}

.tat-title {
    margin: 0;
    color: #BA1B1B;
    font-family: "Urbanist", sans-serif;
    font-size: 40px;
    font-weight: 500;
    font-style: normal;
    letter-spacing: 0;
    line-height: 100%;
}

.tat-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    min-height: 45px;
    width: 100%;
}

.tat-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    margin-left: auto;
}

.tat-tab-switcher {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tat-tab-btn {
    border: 1px solid #373738;
    background: #FFFFFF;
    color: #373738;
    border-radius: 50px;
    padding: 0 20px;
    height: 32px;
    font-weight: 400;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.tat-tab-btn br {
    display: none;
}

.tat-tab-btn:hover {
    border-color: #BA1B1B;
    color: #BA1B1B;
}

.tat-tab-btn.active {
    background: #BA1B1B1A;
    color: #BA1B1B;
    border: 1px solid #BA1B1B;
    box-shadow: none;
}

.tat-view-all {
    color: #BA1B1B;
    font-weight: 500;
    font-size: 0.95rem;
    text-decoration: underline;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.tat-view-all:hover {
    color: #8b1515;
    text-decoration-thickness: 2px;
}

.tat-carousel-controls {
    display: inline-flex;
    align-items: center;
    gap: 0;
}

.tat-carousel-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: none;
    background: #BA1B1B;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(186, 27, 27, 0.2);
    flex-shrink: 0;
}

.tat-carousel-btn:hover {
    background: #9a1616;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(186, 27, 27, 0.3);
}

.tat-carousel-btn:active {
    transform: scale(0.95);
}

.tat-carousel-btn svg {
    width: 26px;
    height: 26px;
}

.tat-carousel-counter {
    font-family: "Urbanist", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 100%;
    letter-spacing: 0;
    color: #373738;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 6px;
    white-space: nowrap;
}

.tat-carousel-counter .tat-current {
    color: #373738;
}

.tat-activities-wrapper.tat-events-active .tat-view-all,
.tat-activities-wrapper.tat-events-active .tat-carousel-controls {
    display: none;
}

.tat-panels {
    margin-top: 12px;
}

.tat-panel {
    display: none;
    height: 367px;
    overflow: hidden;
    border-radius: 5px;
}

.tat-panel.active {
    display: block;
}

.tat-panel p:empty {
    display: none;
    margin: 0;
    padding: 0;
    height: 0;
}

.tat-news-carousel {
    position: relative;
    width: 100%;
    height: 367px;
    margin: 0;
    padding: 0;
}

.tat-news-carousel p {
    margin: 0;
}

.tat-carousel-container {
    position: relative;
    width: 100%;
    height: 367px;
    margin: 0;
    padding: 0;
}

.tat-news-hero {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: grid;
    grid-template-columns: 42% 58%;
    border-radius: 12px;
    overflow: visible;
    border: none;
    background: #f7f7f7;
    height: 367px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.tat-news-hero.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.tat-hero-image {
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    height: 100%;
    border-radius: 12px 0 0 12px;
    width: 100%;
}

.tat-hero-body {
    background: #b71c1c;
    color: #fff;
    padding: 20px 53px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: center;
    overflow: hidden;
}

.tat-hero-eyebrow {
    display: none;
}

.tat-hero-title {
    margin: 0;
    font-family: "Urbanist", sans-serif;
    font-size: 36px;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0;
    color: #FFFFFF;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(36px * 1.3 * 3);
}

.tat-hero-excerpt {
    margin: 0;
    font-family: "Urbanist", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: 0;
    color: #FFFFFF;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: calc(16px * 1.5 * 4);
}

.tat-hero-excerpt:empty {
    display: none;
}

.tat-hero-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.tat-hero-meta {
    display: flex;
    align-items: center;
    gap: 4px;
    font-family: "Urbanist", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 100%;
    letter-spacing: 0;
    color: #FFFFFF;
}

.tat-hero-date-label {
    font-weight: 400;
}

.tat-hero-date-value {
    font-weight: 400;
}

.tat-hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 151px;
    height: 45px;
    border-radius: 60px;
    background: #838383;
    color: #fff !important;
    font-weight: 400;
    font-size: 16px;
    text-decoration: none;
    transition: background 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.tat-hero-button:hover {
    background: #6a6a6a;
    transform: translateY(-1px);
}


.tat-empty {
    margin: 12px 0;
    padding: 18px;
    background: #f3f4f6;
    border-radius: 10px;
    color: #555;
}

@media (max-width: 1280px) {
    .tat-news-hero {
        grid-template-columns: 45% 55%;
    }
    
    .tat-hero-body {
        padding: 20px 40px;
    }
}

@media (max-width: 1100px) {
    .tat-news-hero {
        grid-template-columns: 50% 50%;
    }
    
    .tat-hero-body {
        padding: 20px 30px;
    }
    
    .tat-carousel-btn {
        width: 42px;
        height: 42px;
    }
    
    .tat-carousel-counter {
        font-size: 15px;
    }
}

@media (max-width: 900px) {
    .tat-news-hero {
        grid-template-columns: 1fr;
        grid-template-rows: 200px auto;
        height: auto;
        min-height: 450px;
    }
    
    .tat-panel {
        height: auto !important;
        min-height: 450px;
    }
    
    /* Make event calendar panel adaptive to its content */
    .tat-panel .esp-event-calendar-wrapper {
        height: auto !important;
    }
    
    .tat-carousel-container {
        height: auto;
        min-height: 450px;
    }
    
    .tat-news-carousel {
        height: auto;
        min-height: 450px;
    }

    .tat-hero-image {
        border-radius: 12px 12px 0 0;
        height: 200px;
    }

    .tat-hero-body {
        padding: 24px 28px 28px;
    }

    .tat-title {
        font-size: 2.2rem;
    }

    .tat-header-row {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .tat-header-right {
        width: 100%;
        justify-content: flex-end;
        margin-left: 0;
    }
    
    .tat-hero-title {
        font-size: 28px;
        -webkit-line-clamp: 2;
        max-height: calc(28px * 1.3 * 2);
    }
    
    .tat-hero-excerpt {
        font-size: 15px;
        -webkit-line-clamp: 3;
        max-height: calc(15px * 1.5 * 3);
    }
}

@media (max-width: 640px) {
    .tat-activities-wrapper {
        padding: 0 16px;
    }
    
    .tat-header {
        align-items: flex-start;
        gap: 16px;
    }

    .tat-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .tat-tab-switcher {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

    .tat-tab-btn {
        font-size: 0.85rem;
        padding: 0 14px;
        height: 36px;
        flex: 0 1 auto;
    }
    
    .tat-news-hero {
        grid-template-rows: 180px auto;
        min-height: 380px;
    }
    
    .tat-panel {
        min-height: 380px;
    }
    
    .tat-carousel-container {
        min-height: 380px;
    }
    
    .tat-news-carousel {
        min-height: 380px;
    }
    
    .tat-hero-image {
        height: 180px;
    }
    
    .tat-hero-body {
        padding: 20px 20px 24px;
        gap: 10px;
    }

    .tat-hero-title {
        font-size: 22px;
        -webkit-line-clamp: 2;
        max-height: calc(22px * 1.3 * 2);
    }

    .tat-hero-excerpt {
        font-size: 14px;
        -webkit-line-clamp: 2;
        max-height: calc(14px * 1.5 * 2);
    }
    
    .tat-hero-meta {
        font-size: 13px;
    }
    
    .tat-hero-button {
        width: 140px;
        height: 42px;
        font-size: 15px;
    }

    .tat-carousel-btn {
        width: 38px;
        height: 38px;
    }

    .tat-carousel-btn svg {
        width: 18px;
        height: 18px;
    }

    .tat-carousel-counter {
        font-size: 13px;
        margin: 0 4px;
    }

    .tat-view-all {
        font-size: 0.85rem;
    }

    .tat-header-right {
        gap: 8px;
    }
}

/* Extra small phones */
@media (max-width: 480px) {
    .tat-title {
        font-size: 1.6rem;
    }
    
    .tat-tab-btn {
        font-size: 0.8rem;
        padding: 0 12px;
        height: 34px;
    }
    
    .tat-news-hero {
        grid-template-rows: 160px auto;
        min-height: 360px;
    }
    
    .tat-panel {
        min-height: 360px;
    }
    
    .tat-carousel-container {
        min-height: 360px;
    }
    
    .tat-news-carousel {
        min-height: 360px;
    }
    
    .tat-hero-image {
        height: 160px;
    }
    
    .tat-hero-body {
        padding: 18px 16px 20px;
        gap: 8px;
    }
    
    .tat-hero-title {
        font-size: 20px;
        -webkit-line-clamp: 2;
        max-height: calc(20px * 1.3 * 2);
    }
    
    .tat-hero-excerpt {
        font-size: 13px;
        -webkit-line-clamp: 2;
        max-height: calc(13px * 1.5 * 2);
    }
    
    .tat-hero-meta {
        font-size: 12px;
    }
    
    .tat-hero-button {
        width: 130px;
        height: 40px;
        font-size: 14px;
    }
    
    .tat-carousel-btn {
        width: 36px;
        height: 36px;
    }
    
    .tat-carousel-btn svg {
        width: 16px;
        height: 16px;
    }
    
    .tat-carousel-counter {
        font-size: 12px;
        margin: 0 3px;
    }
}


