/* General Layout and Typography */
#primary {
    max-width: 960px;
    margin: 20px auto;
    padding: 0; /* No padding here, controlled by inner divs */
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 8px;
    font-family: Arial, sans-serif;
    color: #333;
}

/* Event Hero Section (Top part as in the image) */
.event-hero {
    padding: 20px 40px; /* Internal padding for text content */
    background-color: #fff;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.event-header {
    text-align: left; /* Align left as in the image */
    padding-bottom: 20px;
    position: relative; /* Needed for absolute positioning of back button */
}

.event-header .entry-title {
    font-size: 2.8em; /* Slightly larger for the main title */
    color: #333;
    margin-bottom: 0; /* Adjust margin */
    line-height: 1.1;
    text-transform: uppercase; /* As in the reference image */
    display: block;
    visibility: visible;
}

/* Back Button Styles */
.back-button {
    text-decoration: none;
    position: absolute;
    top: 20px; /* Adjust as needed */
    right: 40px; /* Adjust as needed, matching hero padding */
    background-color: #f0f0f0; /* Light gray background */
    color: #333;
    border: 1px solid #ccc;
    padding: 8px 15px;
    font-size: 0.9em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    display: flex; /* Align icon and text */
    align-items: center;
    gap: 5px; /* Space between icon and text */
}

.back-button:hover {
    background-color: #e0e0e0;
    border-color: #bbb;
}

.back-button i {
    font-size: 1.2em; /* Size for MDI icon */
}

/* Event Meta Info (Date Range only now) */
.event-meta-info {
    display: flex;
    justify-content: flex-start; /* Align left as in the image */
    align-items: center;
    gap: 20px; /* Adjusted gap */
    padding: 10px 0; /* Reduced padding */
    font-size: 1em; /* Smaller font for meta info */
    color: #555;
    flex-wrap: wrap;
}

.event-date-range {
    display: flex;
    align-items: center;
    font-weight: normal; /* Less bold for meta info */
}

.event-date-range .calendar-icon i { /* Target the MDI icon specifically */
    font-size: 1.2em; /* Smaller icons */
    margin-right: 5px;
    color: #0073aa; /* WordPress blue, or a custom color */
}

/* New style for the main event photo */
.event-main-photo {
    margin: 20px 0; /* Space above and below the photo */
    border-radius: 8px; /* Optional: subtle rounded corners */
    overflow: hidden; /* Ensures image corners respect border-radius */
}

.event-main-photo img {
    width: 100%;
    height: auto;
    display: block; /* Remove extra space below image */
    object-fit: cover; /* Ensures image covers the area, cropping if necessary */
    max-height: 400px; /* Limit height for large images */
}


/* Event Description */
.event-description {
    padding: 20px 0;
    line-height: 1.6;
    font-size: 1em;
    color: #444; /* Slightly darker text for readability */
    border-top: 1px solid #eee; /* Add a border above description to separate from photo/meta */
    margin-top: 20px; /* Space between photo and description */
}

.event-description p {
    margin-bottom: 15px;
}

/* Event Locations Section */
.event-locations-section {
    padding: 20px 40px; /* Consistent internal padding */
}

.locations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Adjusted min-width for cards */
    gap: 20px; /* Gap between cards */
    justify-content: center;
    align-items: stretch; /* Make cards stretch to equal height */
}

.location-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    cursor: default; /* Changed cursor to default as no selection is made */
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    position: relative;
    background-color: #000; /* Dark background for the card as per image */
    color: #fff; /* White text for contrast */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Push content to bottom */
    min-height: 300px; /* Adjust height to match image more closely */
}

.location-card:hover {
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

/* Removed .location-card.selected styles as selection is no longer relevant for buy button */

.location-image {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.location-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    opacity: 0.7; /* Slightly darken the image for text readability */
}

.location-card:hover .location-image img {
    transform: scale(1.05);
    opacity: 0.8;
}

.location-details {
    position: relative; /* Relative to its parent .location-card */
    padding: 15px;
    background: rgba(255,255,255,0.5); /* Semi-transparent white background */
    backdrop-filter:blur(5px); /* Blurry effect */
    color: #fff;
    text-align: center;
    z-index: 2;
    width: 100%; /* Ensure it spans full width */
    box-sizing: border-box; /* Include padding in width calculation */
}

.location-title {
    margin: 0;
    font-size: 1.5em; /* Larger title for location cards */
    font-weight: bold;
    text-transform: uppercase; /* Uppercase as in the image */
    line-height: 1.2;
    color: #000; /* Make text black for readability on semi-transparent white background */
}

.location-card-dates {
    margin: 5px 0 0;
    font-size: 0.9em;
    color: #000; /* Make text black for readability on semi-transparent white background */
    font-weight: normal; /* Ensure dates are not bold */
}

/* Removed .location-checkbox styles as selection is no longer relevant */
.location-checkbox {
    display: none; /* Hide the checkbox completely */
}

/* Purchase Section */
.event-purchase-section {
    text-align: right; /* Align right as in the image */
    padding: 30px 40px; /* Consistent internal padding */
    background-color: #f9f9f9; /* Light background for this section */
    border-top: 1px solid #eee;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
}

/* Styles for the BUY link (always active) */
.buy-button-link {
    background-color: #0073aa; /* Active color from image */
    color: #fff;
    border: none;
    padding: 15px 40px;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 200px; /* Ensure button has good width */
    text-transform: uppercase; /* As in the image */
    text-decoration: none; /* Remove underline from link */
    display: inline-block; /* Allow padding and width */
}

/* Removed disabled styles as the button is always active */
/* .buy-button-link.disabled { ... } */

.buy-button-link:hover {
    background-color: #005f8f;
}

.no-locations-message {
    text-align: center;
    padding: 50px 20px;
    font-size: 1.1em;
    color: #666;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .event-hero,
    .event-locations-section,
    .event-purchase-section {
        padding: 20px; /* Smaller padding on mobile */
    }

    .event-purchase-section {
        text-align: center; /* Center button on mobile */
    }

    .event-header .entry-title {
        font-size: 2em;
    }

    .event-meta-info {
        flex-direction: column;
        align-items: flex-start; /* Align left for columns */
        gap: 15px;
    }

    .locations-grid {
        grid-template-columns: 1fr; /* Stack cards vertically on small screens */
    }

    .back-button {
        position: static; /* Remove absolute positioning on mobile */
        margin-top: 15px; /* Add some space below title */
        width: 100%;
        justify-content: center; /* Center text and icon */
    }

    .event-main-photo {
        margin: 15px 0;
    }
}