/* ===================================
   EVENTS LOOP BLOCK STYLES
   =================================== */

/* Main block container - ISOLATED to prevent conflicts */
.wp-block-acf-atax-events-loop .events-loop-section {
    width: 100%;
    padding: 80px 20px 80px 20px; /* Same padding as checkmark-list block - main container controls all side spacing */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Content container - 1280px wide as per design */
.events-loop-container {
    max-width: 1120px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 48px; /* Space between header, grid, and button - same as checkmark-list */
    padding: 0; /* No side padding - main container controls it */
}

/* Header Section: Title and Subtitle */
.events-loop-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px; /* Space between title and subtitle */
    padding: 0; /* No side padding - main container controls it */
}

/* Main title styling */
.events-loop-title {
    font-size: 48px; /* Large title as per design */
    font-weight: 700; /* Bold */
    line-height: 1.2;
    color: var(--primary-color, #354477); /* Primary blue color */
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    word-wrap: break-word;
    padding: 0; /* No side padding - main container controls it */
}

/* City Name Styling */
.city-name {
    color: var(--accent-color, #10A1DC);
    position: relative;
    display: inline-block;
    font-family: 'Montserrat', sans-serif;
}


/* Subtitle */
.events-loop-subtitle {
    font-size: 16px;
    font-weight: 400; /* Regular weight */
    line-height: 1.5;
    color: #495057; /* Dark gray text */
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    padding: 0; /* No side padding - main container controls it */
}

/* Events Grid: 3 Event Cards */
.events-loop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Three equal columns */
    gap: 80px; /* Space between event cards */
    width: 100%;
    padding: 0; /* No side padding - main container controls it */
}

/* Individual Event Card */
.event-card {
    background: #EDEFF5; /* Light gray background */
    border-radius: 12px; /* Slightly rounded corners */
    overflow: hidden;
    /* No box shadow as requested */
    transition: transform 0.3s ease;
}

.event-card:hover {
    transform: translateY(-4px);
    /* No hover shadow as requested */
}

/* Event Card Image Container */
.event-card-image {
    position: relative;
    width: 100%;
    height: 150px; /* Reduced height - less tall image */
    overflow: hidden;
}

.event-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    image-rendering: -webkit-optimize-contrast; /* Better image quality on webkit */
    image-rendering: crisp-edges; /* Better image quality */
    backface-visibility: hidden; /* Prevents blur on transform */
}

/* Date Overlay */
.event-date-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #EDEFF5; /* Light gray background */
    color: var(--primary-color, #354477); /* Primary blue font */
    padding: 8px 12px;
    border-radius: 8px;
    text-align: center;
    min-width: 60px;
}

.event-date-day {
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 2px;
    font-family: 'Montserrat', sans-serif;
}

.event-date-number {
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 2px;
    font-family: 'Montserrat', sans-serif;
}

.event-date-month {
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    opacity: 0.9;
    font-family: 'Montserrat', sans-serif;
}

/* Event Card Content */
.event-card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Event Category Tag */
.event-category {
    display: inline-block;
    background: var(--accent-color, #10A1DC);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    align-self: flex-start;
}

/* Event Title */
.event-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary-color, #354477);
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    word-wrap: break-word;
}

/* Event Location */
.event-location {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: #6c757d;
    margin: 0;
    font-family: 'Montserrat', sans-serif;
}

/* Event CTA Link */
.event-cta-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--primary-color, #354477);
    text-decoration: underline;
    font-weight: 600;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    transition: opacity 0.3s ease;
    align-self: flex-start;
    margin-top: 32px;
}

.event-cta-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.event-cta-icon {
    width: 12px;
    height: 12px;
    display: block;
}

/* CTA Button Section */
.events-loop-cta {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0; /* No margin - gap handles spacing */
    padding: 0; /* No side padding - main container controls it */
}

/* ===================================
   RESPONSIVE DESIGN - GLOBAL FRAMEWORK
   =================================== */

/* Tablet (768px-1150px) - Layout optimization, columns stack */
@media (max-width: 1150px) {
    .events-loop-grid {
        grid-template-columns: repeat(2, 1fr); /* Two columns on tablet */
        gap: 20px; /* Reduced gap for tablet */
    }
}

/* Mobile (0px-767px) - Stacked layout, mobile optimization */
@media (max-width: 767px) {
    .wp-block-acf-atax-events-loop .events-loop-section {
        padding: 32px 16px 32px 16px; /* Reduced mobile padding */
    }
    
    .events-loop-container {
        gap: 32px; /* Reduced gap for mobile */
    }
    
    .events-loop-header {
        gap: 12px; /* Reduced gap for mobile */
    }
    
    /* Main title exception - 48px → 36px for mobile readability */
    .events-loop-title {
        font-size: 36px; /* Mobile title scaling */
    }
    
    .events-loop-grid {
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 16px; /* Reduced gap for mobile */
    }
    
    .event-card-image {
        height: 130px; /* Slightly smaller on mobile - proportionally reduced */
    }
    
    .event-card-content {
        padding: 16px; /* Reduced padding on mobile */
        gap: 10px; /* Reduced gap on mobile */
    }
}
