/**
 * AMICO News & Events Grid Styles - Based on Figma Design Specifications
 */

.amico-news-events-wrapper {
    width: 100%;
    position: relative;
    margin-bottom: 32px !important;
}

/* =====================
   SHARED FILTER PILL STYLES
   Used by both Tabbed Archive and Events Listing widgets
   ===================== */

.amico-tabbed-archive-widget .filter-pill,
.amico-events-listing-widget .filter-pill {
    padding: 10px 24px !important;
    background: #F5F5F5;
    border: none;
    border-radius: 30px;
    color: #666666;
    cursor: pointer;
    transition: transform 200ms ease, box-shadow 200ms ease, background-color 200ms ease, color 200ms ease;
    position: relative;
    overflow: visible;
    box-sizing: border-box !important;
    min-height: auto !important;
    height: auto !important;
    font-style: normal !important;
}

/* =====================
   SHARED FILTER PILLS CONTAINER
   Used by both Tabbed Archive and Events Listing widgets
   ===================== */
.amico-tabbed-archive-widget .filter-pills,
.amico-events-listing-widget .filter-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    overflow: visible;
}

.amico-tabbed-archive-widget .filter-pill::before,
.amico-events-listing-widget .filter-pill::before {
    content: none !important;
}

/* Perfect vertical centering for tabbed archive + events listing pills */
.amico-tabbed-archive-widget .filter-pill,
.amico-events-listing-widget .filter-pill {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 44px !important;
    /* match .filter-pills height */
    margin: 0 !important;
    /* remove any inherited margins */
    vertical-align: top !important;
    /* prevent baseline alignment issues */
}

/* ====================================
   MOBILE HORIZONTAL SCROLLING PILLS
   ==================================== */
@media (max-width: 1024px) {

    .amico-tabbed-archive-widget .filter-pills,
    .amico-events-listing-widget .filter-pills {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -ms-overflow-style: none;
        /* IE and Edge */
        scrollbar-width: none;
        /* Firefox */
    }
}

.amico-tabbed-archive-widget .filter-pills::-webkit-scrollbar,
.amico-events-listing-widget .filter-pills::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, and Opera */
}

.amico-news-events-wrapper {
    /* padding: 0 16px; */
    box-sizing: border-box;
}

/* Left-align only on smaller screens where scrolling is more likely needed */
@media (max-width: 768px) {

    .amico-tabbed-archive-widget .filter-pills,
    .amico-events-listing-widget .filter-pills {
        justify-content: flex-start;
    }

    .amico-tabbed-archive-widget .filter-pill,
    .amico-events-listing-widget .filter-pill {
        flex-shrink: 0;
        white-space: nowrap;
    }
}

.amico-tabbed-archive-widget .filter-pill:hover,
.amico-events-listing-widget .filter-pill:hover {
    transform: scale(1.04);
    font-style: normal !important;
}

.amico-tabbed-archive-widget .filter-pill.active,
.amico-events-listing-widget .filter-pill.active {
    background: #18191A;
    color: #FFFFFF;
    font-style: normal !important;
}

@media (max-width: 480px) {

    .amico-tabbed-archive-widget .filter-pill,
    .amico-events-listing-widget .filter-pill,
    .amico-tabbed-archive-widget .filter-pill:hover,
    .amico-events-listing-widget .filter-pill:hover,
    .amico-tabbed-archive-widget .filter-pill.active,
    .amico-events-listing-widget .filter-pill.active {
        padding: 7px 16px !important;
        font-style: normal !important;
    }
}

.news-events-grid-container {
    display: grid;
    gap: 24px;
    /* This will be overridden by Elementor's column controls, which is expected. */
    /* We use fit-content to make the container only as wide as its content, and margin auto to center it. */
    width: fit-content;
    margin: 0 auto;
}

/* Grid Item */
.news-event-item {
    opacity: 0;
    position: relative;
    transition: all 0.3s ease;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box;
}

.news-event-item.animated {
    opacity: 1;
}

/* Base Card Styles */
.news-card {
    /* display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0px;
    width: 100%;
    max-width: 400px;
    height: 512px;
    background: #FFFFFF;
    transition: all 0.3s ease;
    position: relative;
    flex: none;
    order: 0;
    flex-grow: 0; */
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    isolation: isolate;

    width: 100%;
    max-width: 400px;
    height: auto;

    background: #FFFFFF;
    border-radius: 0px;
    /* No border radius as per Figma */
    box-shadow: none;
    /* Remove default shadow */
    transition: all 0.3s ease;
    position: relative;

    flex: none;
    order: 0;
    flex-grow: 0;
}

.event-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    isolation: isolate;

    width: 100%;
    max-width: 400px;
    height: auto;

    background: #FFFFFF;
    border-radius: 0px;
    /* No border radius as per Figma */
    box-shadow: none;
    /* Remove default shadow */
    transition: all 0.3s ease;
    position: relative;

    flex: none;
    order: 0;
    flex-grow: 0;
    /* display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    width: 100%;
    max-width: 400px;
    height: 512px;
    background: #FFFFFF;
    transition: all 0.3s ease;
    position: relative;
    flex: none;
    order: 0;
    flex-grow: 0; */
}

/* Hover Animations (only on hover-capable, fine-pointer devices) */
@media (hover: hover) and (pointer: fine) {
    .news-event-item[data-hover="scale"] .news-card:hover,
    .news-event-item[data-hover="scale"] .event-card:hover {
        transform: scale(1.05);
    }

    .news-event-item[data-hover="lift"] .news-card:hover,
    .news-event-item[data-hover="lift"] .event-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    }

    .news-event-item[data-hover="tilt"] .news-card:hover,
    .news-event-item[data-hover="tilt"] .event-card:hover {
        transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
    }

    .news-event-item[data-hover="glow"] .news-card:hover,
    .news-event-item[data-hover="glow"] .event-card:hover {
        box-shadow: 0 0 30px rgba(0, 123, 255, 0.3);
    }
}

/* ===================
   NEWS CARD STYLES
   =================== */

/* News Cover Section - Frame 238684 */
.news-cover-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 12px;
    gap: 97px;

    width: 100%;
    height: 280px;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* Inside auto layout */
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
}

/* News Content Section - Frame 238683 */
.news-content-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;

    width: 100%;
    height: 232px;

    /* UI/White */
    background: #FFFFFF;

    /* Inside auto layout */
    flex: none;
    order: 1;
    flex-grow: 0;
}

/* News Info Container - Frame 1321315848 */
.news-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 12px;

    width: 100%;
    height: auto;

    /* Inside auto layout */
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
}

/* News Title Container - Frame 1321315811 */
.news-title-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 8px;

    width: 100%;
    height: auto;

    /* Inside auto layout */
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
}

/* News Title */
.news-title {
    width: 100%;
    height: auto;

    /* UI/Desktop/H6 Regular */
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    /* or 140% */
    display: flex;
    align-items: center;

    /* UI/Black */
    color: #18191A;

    /* Inside auto layout */
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
    margin: 0;
}

/* News Meta - Frame 238722 */
.news-meta {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 0px;
    gap: 8px;

    width: 100%;
    height: 20px;

    /* Inside auto layout */
    flex: none;
    order: 1;
    align-self: stretch;
    flex-grow: 0;
}

/* News Date */
.news-date {
    width: auto;
    height: 20px;

    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    /* identical to box height, or 143% */
    display: flex;
    align-items: center;

    /* UI/Black */
    color: #18191A;

    /* Inside auto layout */
    flex: none;
    order: 0;
    flex-grow: 0;
}

/* News Description */
.news-description {
    width: 100%;
    height: auto;
    /* min-height: 96px; */

    /* UI/Desktop/Body 3 */
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    /* or 150% */
    display: flex;
    align-items: center;

    /* UI/Black */
    color: #18191A;

    /* Inside auto layout */
    flex: none;
    order: 2;
    align-self: stretch;
    flex-grow: 0;
    margin: 0;
}

/* ===================
   EVENT CARD STYLES
   =================== */

/* Removed duplicate event-card rule - alignment is already set in the main definition */

/* Event Cover Section - Frame 238677 */
.event-cover-section {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 12px;
    gap: 2px;

    width: 100%;
    height: 280px;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    /* Inside auto layout */
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
    position: relative;
}

/* Event Date Badge */
.event-date-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 8px 12px;
    min-width: 74px;
    width: auto;
    max-width: 120px;
    background: #FFFFFF;
    border-radius: 0;
    white-space: nowrap;
    box-sizing: border-box;
}

.event-date-badge .event-label,
.event-date-badge .event-date-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
    width: auto;
    height: auto;
    background: transparent;
}

.event-date-badge .event-label span {
    display: none;
}

.event-date-container {
    display: contents;
}

.event-date-info {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    white-space: nowrap;
}

.event-day {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 24px;
    line-height: 32px;
    color: #18191A;
    text-transform: uppercase;
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.event-month-year {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    font-weight: 300;
    font-size: 14px;
    line-height: 20px;
    color: #18191A;
    text-transform: none;
    display: flex;
    justify-content: center;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Event Content Section - Frame 238683 */
.event-content-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
    align-self: stretch;

    width: 100%;
    min-height: 0;
    height: auto;

    /* UI/White */
    background: #FFFFFF;

    /* Inside auto layout */
    flex: none;
    order: 1;
    flex-grow: 0;
}

/* Event Info Container - Frame 1321315851 */
.event-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0px;
    gap: 12px;

    width: 100%;
    height: auto;

    /* Inside auto layout */
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
}

/* Event Title */
.event-title {
    width: 100%;
    height: auto;

    /* UI/Desktop/H6 Regular */
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    /* identical to box height, or 140% */
    display: flex;
    align-items: center;

    /* UI/Black */
    color: #18191A;

    /* Inside auto layout */
    flex: none;
    order: 0;
    align-self: stretch;
    flex-grow: 0;
    margin: 0;
}

/* Event Meta - Frame 238723 */
.event-meta {
    display: inline-flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 0px;
    gap: 8px;

    width: 100%;
    height: 20px;

    /* Inside auto layout */
    flex: none;
    order: 1;
    align-self: stretch;
    flex-grow: 0;
}

/* Event Time */
.event-time {
    width: 58px;
    height: 20px;

    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    /* identical to box height, or 143% */
    display: flex;
    align-items: center;
    text-transform: uppercase;

    /* UI/Black */
    color: #18191A;

    /* Inside auto layout */
    flex: none;
    order: 0;
    flex-grow: 0;
}

/* Event Divider */
.event-divider {
    width: 5px;
    height: 20px;

    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    /* identical to box height, or 143% */
    display: flex;
    align-items: center;
    text-transform: uppercase;

    /* UI/Black */
    color: #18191A;

    /* Inside auto layout */
    flex: none;
    order: 1;
    flex-grow: 0;
}

/* Event Location */
.event-location {
    width: auto;
    height: 20px;

    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    /* identical to box height, or 143% */
    display: flex;
    align-items: center;
    text-transform: uppercase;

    /* UI/Black */
    color: #18191A;

    /* Inside auto layout */
    flex: 1 1 0;
    order: 2;
    flex-grow: 1;
}

/* Event Subtitle */
.event-subtitle {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    padding: 0px;
    gap: 8px;

    width: 100%;
    height: auto;

    /* Inside auto layout */
    flex: none;
    order: 1;
    align-self: stretch;
    flex-grow: 0;
}

.event-subtitle-text {
    width: 100%;
    height: auto;

    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    /* identical to box height, or 143% */
    display: flex;
    align-items: center;
    text-transform: uppercase;
    white-space: normal;

    /* UI/Black */
    color: #18191A;

    /* Inside auto layout */
    flex: none;
    order: 0;
    flex-grow: 1;
}

/* Event Description */
.event-description {
    width: 100%;
    height: auto;

    /* UI/Desktop/Body 3 */
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    /* or 150% */
    display: block;

    /* UI/Black */
    color: #18191A;

    /* Inside auto layout */
    flex: none;
    order: 1;
    align-self: stretch;
    flex-grow: 0;
    margin: 0;
}

/* =====================
   ANIMATIONS
   ===================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

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

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

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

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

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

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {

    0%,
    20%,
    40%,
    60%,
    80% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
    }

    0% {
        opacity: 0;
        transform: scale3d(.3, .3, .3);
    }

    20% {
        transform: scale3d(1.1, 1.1, 1.1);
    }

    40% {
        transform: scale3d(.9, .9, .9);
    }

    60% {
        opacity: 1;
        transform: scale3d(1.03, 1.03, 1.03);
    }

    80% {
        transform: scale3d(.97, .97, .97);
    }

    100% {
        opacity: 1;
        transform: scale3d(1, 1, 1);
    }
}

/* =====================
   SCOPED OVERRIDES
   Ensure theme styles do not break card layout/typography
   ===================== */

.amico-news-events-wrapper .news-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 0px !important;
    width: 100% !important;
    background: #FFFFFF !important;
    box-sizing: border-box !important;
}

.amico-news-events-wrapper .event-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 0px !important;
    width: 100% !important;
    max-width: 400px !important;
    background: #FFFFFF !important;
    box-sizing: border-box !important;
}

/* Enforce event card visual order regardless of theme overrides */
.amico-news-events-wrapper .event-cover-section {
    order: 0 !important;
}

.amico-news-events-wrapper .event-content-section {
    order: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.amico-news-events-wrapper .event-info {
    order: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.amico-news-events-wrapper .event-title {
    order: 0 !important;
    position: static !important;
}

.amico-news-events-wrapper .event-subtitle {
    order: 1 !important;
}

.amico-news-events-wrapper .event-description {
    order: 1 !important;
}

/* News body enforcement to match Figma */
.amico-news-events-wrapper .news-cover-section {
    order: 0 !important;
}

.amico-news-events-wrapper .news-content-section {
    order: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.amico-news-events-wrapper .news-info {
    order: 0 !important;
    display: flex !important;
    flex-direction: column !important;
}

.amico-news-events-wrapper .news-description {
    order: 1 !important;
}

.amico-news-events-wrapper .news-cover-section,
.amico-news-events-wrapper .event-cover-section {
    width: 100% !important;
    height: 280px !important;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    box-sizing: border-box !important;
}

.amico-news-events-wrapper .news-content-section {
    width: 100% !important;
    height: auto !important;
    /* let height grow with content */
    min-height: auto !important;
    /* keep base height for short content */
    background: #FFFFFF !important;
    padding: 16px 16px 24px !important;
    /* more bottom breathing room */
    box-sizing: border-box !important;
    flex-grow: 0 !important;
}

/* Keep event cards unchanged */
.amico-news-events-wrapper .event-content-section {
    width: 100% !important;
    height: auto !important;
    /* let height grow with content */
    min-height: auto !important;
    /* keep base height for short content */
    background: #FFFFFF !important;
    padding: 16px 16px 16px !important;
    box-sizing: border-box !important;
    flex-grow: 0 !important;
}

.amico-news-events-wrapper .news-title,
.amico-news-events-wrapper .event-title {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    color: #18191A;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    display: flex !important;
    align-items: center !important;
    word-wrap: break-word !important;
    text-shadow: none !important;
    filter: none !important;
}

.amico-news-events-wrapper .news-description,
.amico-news-events-wrapper .event-description {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-style: normal;
    color: #18191A;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    display: block !important;
    /* avoid vertical centering that adds uneven bottom space */
    word-wrap: break-word !important;
}

/* Add a bit more breathing room under the description text for consistency */
.amico-news-events-wrapper .news-description,
.amico-news-events-wrapper .event-description {
    margin: 0 0 0px !important;
}

/* Slightly more space for event descriptions to match perceived spacing */
.amico-news-events-wrapper .event-description {
    margin: 0 !important;
}

.amico-news-events-wrapper .event-time,
.amico-news-events-wrapper .event-divider,
.amico-news-events-wrapper .event-location {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-style: normal !important;
    font-weight: 400 !important;
    font-size: 14px !important;
    line-height: 20px !important;
    color: #18191A !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    text-transform: uppercase !important;
    word-wrap: break-word !important;
}

.amico-news-events-wrapper .event-day {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-style: normal !important;
    font-weight: 400 !important;
    font-size: 24px !important;
    line-height: 32px !important;
    color: #18191A !important;
    text-transform: uppercase !important;
    margin: 0 !important;
    padding: 0 !important;
}

.amico-news-events-wrapper .event-month-year {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-style: normal !important;
    font-weight: 300 !important;
    font-size: 14px !important;
    line-height: 20px !important;
    color: #18191A !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Force proper layout structure */
.amico-news-events-wrapper .news-info,
.amico-news-events-wrapper .event-info {
    width: 100% !important;
    max-width: none !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 0px !important;
    /* gap: 8px !important; */
}

/* News body fine-tuning to match Figma and handle variable lengths */
.amico-news-events-wrapper .news-info,
.amico-news-events-wrapper .news-title-container {
    height: auto !important;
}

.amico-news-events-wrapper .news-meta {
    height: auto !important;
}

.amico-news-events-wrapper .news-date {
    width: auto !important;
    height: auto !important;
}

/* Ensure 12px spacing from date to description while keeping 8px between title and date */


.amico-news-events-wrapper .news-meta,
.amico-news-events-wrapper .event-meta {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    padding: 0px !important;
    gap: 8px !important;
}

/* =====================
   RESPONSIVE DESIGN
   ===================== */

@media (max-width: 1200px) {
    .news-events-grid-container {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
        gap: 25px;
        max-width: 1140px;
        width: 100%;
    }

    /* Allow cards to stretch on tablet/mobile */
    .amico-news-events-wrapper .event-card {
        max-width: none !important;
    }
}

@media (max-width: 900px) {
    .news-events-grid-container {
        grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
        gap: 20px;
        max-width: 760px;
    }

    .news-card,
    .event-card {
        width: 100%;
    }

    .news-cover-section,
    .event-cover-section {
        width: 100%;
        height: 260px;
    }

    .news-content-section,
    .event-content-section {
        width: 100%;
        padding: 16px;
    }

    .news-info,
    .event-info,
    .news-title-container {
        width: 100%;
        max-width: none;
    }

    .news-title,
    .event-title,
    .news-meta,
    .event-meta,
    .news-description,
    .event-description {
        width: 100%;
    }
}

@media (max-width: 600px) {
    .news-events-grid-container {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 100%;
        padding: 0 0px;
    }

    .news-card,
    .event-card {
        width: 100%;
        height: auto;
    }

    .news-cover-section,
    .event-cover-section {
        height: 220px;
    }

    .news-content-section,
    .event-content-section {
        padding: 12px;
    }

    .news-title,
    .event-title {
        height: auto;
    }

    .news-description,
    .event-description {
        height: auto;
    }
    
    /* no card height override here; Elementor controls card height */

    .event-time,
    .event-divider,
    .event-location {
        font-size: 12px;
        line-height: 18px;
    }

    .event-day {
        font-size: 20px;
        line-height: 28px;
    }

    .event-month-year {
        font-size: 12px;
        line-height: 16px;
    }

    .event-date-badge {
        min-width: 60px;
        max-width: 100px;
        padding: 6px 10px;
    }

    .event-day {
        font-size: 20px;
        line-height: 28px;
    }
}

@media (max-width: 480px) {
    .event-date-badge {
        min-width: 50px;
        max-width: 80px;
        padding: 4px 8px;
        top: 8px;
        right: 8px;
    }

    .event-day {
        font-size: 18px;
        line-height: 24px;
    }

    .event-month-year {
        font-size: 10px;
        line-height: 14px;
    }
}

/* Elementor Editor Styles */
.elementor-editor-active .news-event-item {
    opacity: 1 !important;
}

/* Override Elementor column controls to ensure proper centering */
.elementor-widget-amico-news-events .news-events-grid-container {
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

/* Ensure the same specificity as reviews */
.amico-news-events-wrapper .news-events-grid-container {
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
}

/* Empty state */
.elementor-alert {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 15px;
    text-align: center;
    color: #666;
    margin: 20px 0;
}

/* Collapse the grid to one card per row on narrower desktop widths */
@media (max-width: 1400px) {
    .amico-news-events-wrapper .news-events-grid-container {
        grid-template-columns: 1fr !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    .amico-news-events-wrapper .news-event-item,
    .amico-news-events-wrapper .news-card,
    .amico-news-events-wrapper .event-card {
        width: 100% !important;
        max-width: none !important;
    }
}

/* =====================
   CARD META TYPOGRAPHY
   Responsive typography for date and subtitle elements
   ===================== */

/* Desktop - Default (1025px and up) */
.amico-news-events-wrapper .card-meta {
    font-family: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    font-style: normal;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0% !important;
    vertical-align: middle !important;
    color: #18191A;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    text-transform: uppercase;
    word-wrap: break-word !important;
}

/* Tablet (769px to 1024px) - Intermediate sizing */
@media (max-width: 1024px) and (min-width: 769px) {
    .amico-news-events-wrapper .card-meta {
        font-size: 13px !important;
        line-height: 19px !important;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .amico-news-events-wrapper .card-meta {
        font-size: 12px !important;
        line-height: 18px !important;
    }

    /* Allow cards to adjust height based on content on smaller screens */
    .amico-news-events-wrapper .news-card,
    .amico-news-events-wrapper .event-card {
        min-height: 350px !important;
    }
}
