/*
 Theme Name:   Royal Elementor Kit Child
 Template:     royal-elementor-kit
*/

/* 1. Reset Elementor forced heights that are causing the "tower" look */
.elementor-widget-shortcode,
.elementor-widget-shortcode .elementor-widget-container,
.elementor-shortcode {
    height: auto !important; /* Changed from 100% to auto */
    display: block !important;
}

/* 2. The Grid - Centering logic */
.custom-event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    justify-content: center; /* Centers the grid items */
    align-items: stretch;    /* Keeps cards in the same row equal height */
}

/* 3. The Card - Fixed flooring logic */
.event-card {
    display: flex !important;
    flex-direction: column !important;
    background: #fff;
    border: 1px solid #ddd;
    padding: 1.5rem;
    box-sizing: border-box;
    height: 100%; /* Only fills the height of the row, not the screen */
}

/* 4. The Content Wrapper - This does the heavy lifting */
.card-content {
    flex-grow: 1 !important;
    display: flex;
    flex-direction: column;
}

/* 5. The Button - Anchored to the floor */
.view-btn {
    margin-top: 20px !important; /* Ensure space above the button */
    display: block;
    text-align: center;
    background: #0073aa;
    color: #fff !important;
    padding: 12px;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
}

.view-btn.disabled {
    background: #ccc;
    cursor: default;
}

.view-btn:hover:not(.disabled) {
    background: #005a87;
}

/* This is the magic part: it grows to fill all empty space */
.card-content {
    flex-grow: 1 !important; /* Pushes the button to the bottom */
    display: flex;
    flex-direction: column;
}

.badge {
    display: inline-block;
    background: #e1f0ff;
    color: #0073aa;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.sub-events-container {
    margin-top: 15px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
    font-size: 0.9rem;
}

.sub-events-container ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
}

.sub-events-container li {
    padding: 6px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
}

.s-date {
    font-size: 0.7rem;
    background: #444;
    color: #fff;
    padding: 2px 5px;
    border-radius: 3px;
    margin-right: 8px;
    white-space: nowrap;
}

.s-time {
    font-weight: bold;
    color: #0073aa;
    margin-right: 10px;
    min-width: 65px;
}

.additional-info {
    margin-top: 15px;
    font-size: 0.85rem;
    color: #555;
    font-style: italic;
    border-left: 2px solid #0073aa;
    padding-left: 10px;
}