/* programme-of-events.css */

/* Main container */
main {
    max-width: 1000px;
    margin: 3px auto 10px auto;
    padding: 40px 20px;
    background: rgb(185, 237, 237);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

@media (max-width: 768px) {
    main {
        margin: 3px auto 15px auto;
    }
}

@media (max-width: 600px) {
    main {
        margin: 3px 18px 18px 18px;
    }
}

@media (max-width: 480px) {
    main {
        margin: 3px auto 10px auto;
    }
}

/* Programme title */
.programme-title {
    text-align: center;
    font-family: 'Georgia', serif;
    font-size: 2em;
    font-weight: bold;
    margin-top: -35px;
    margin-bottom: 10px;
    color: #0b0000;
}

/* Events container */
.events-container {
    display: flex;
    flex-direction: column;
    gap: 5;
}

/* Individual event card (horizontal row) */
.event-card {
    display: grid;
    grid-template-columns: 260px 2.0fr .75fr; /*controls the width of the three columns*/
    gap: 15px;
    align-items: stretch;
    padding: 1px;
    background: #78c6e0;
    border: 2px solid #1a1919;
    border-radius: 8px;
    margin: -1px; /* Prevents double borders */
    box-sizing: border-box;
    transition: box-shadow 0.3s ease;
    position: relative;
}

.event-card:hover {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Next Event Badge */
.next-event .event-details::before {
    content: 'NEXT EVENT';
    position: absolute;
    top: 36px;
    right: 8px;
    background-color: #2a046f;
    color: white;
    padding: 4px 12px;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 4px;
    z-index: 1;
}

/* Left column - Event details */
.event-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-right: 1px solid #1a1919;
    padding-right: 15px;
    padding-left: 10px; 
    position: relative;  
}

.event-date {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0b0000;
    margin: 0;
    font-family: 'Helvetica Neue', 'Helvetica', Arial, sans-serif;
}

.event-time {
    font-size: 1.0rem;
    color: #0a0303;
    margin: 3px 0;
}

/* Event location container */
.event-location {
    display: inline-flex;       /* keeps text and links on the same line */
    align-items: center;        /* vertically aligns links and text */
    flex-wrap: wrap;            /* allows wrapping on small screens */
    gap: 10px;                  /* spacing between text and links */
    font-size: 1rem;
    color: #0b0a0a;             /* general text color */
    line-height: 1.6;
}

/* Map link styling */
.location-map-link {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    text-decoration: none;
    color: #2a046f;             /* keeps map link blue */
}

.location-map-link:hover {
    text-decoration: underline;
    color: #1a0356;
}

/* Review link styling */
.read-review-link {
    display: inline-block;
    font-size: 0.9rem;          /* match map link size */
    font-weight: 600;            /* match map link weight */
    margin: 0;
    padding: 0;
    line-height: 1.6;           /* same vertical alignment */
    text-decoration: none;
    color: #e96209;            /* orange for review link */
}

.read-review-link:hover {
    text-decoration: underline;
}

.booking-link {
    display: inline-block;
    padding: 6px 15px;
    background-color: #282727;
    color: #ffffff;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-radius: 0;
    transition: background-color 0.3s ease;
    margin-top: -18px;
    text-align: center;
    max-width: 140px;
    margin-left: auto; /* pushes the button to the right */
    margin-right: -8px;
    margin-bottom: 4px;
}

.booking-link:hover {
    background-color: #1c3f57;
}

/* Link to review if it exists */
/* Read review link for past events */
.read-review-link {
    color: #e96209;          /* orange color */
    font-weight: 600;
    text-decoration: none;
    font-size: 0.9rem;       /* same as .location-map-link */
}
.read-review-link:hover {
    text-decoration: underline;
    color: #a04000;          /* darker orange on hover */
}
/* Middle column - Event title and speaker */
.event-title-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 0px;  /* adjust this value to taste */
    border-right: 1px solid #1a1919;
    padding-right: 15px;
}

.event-title-section h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 6px 0;
    color: #000000;
    line-height: 1.5;
    font-family: 'Helvetica Neue', 'Helvetica', Arial, sans-serif;
}

.event-note {
    font-size: 1.0rem;
    font-weight: 500;
    color: #200356;
    margin: 3px 0;
    font-style: italic;
}

.event-speaker-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #2a046f;
    margin: 12px 0 3px 0;  
    line-height: 1.5;
}

.event-speaker-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2a046f;
    margin: 6px 0 3px 0;  
    line-height: 1.5;
}
/* Right column - Event image */
.event-image {
    width: 175px;
    height: 100%;
    flex-shrink: 0;
    padding-left: 15px;
    /*max-height: 200px;  /* adjust this value to taste */
    overflow: hidden;
    align-self: center;  /* add this */
}

.event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 2px;
    transition: transform 0.3s ease;
}

/* Past and future events separator bar */
.event-separator {
    align-self: flex-start;          /* stops flex from stretching it */
    display: inline-block;           /* small box */
    background-color: #ffb726;       
    color: rgb(16, 15, 15);          
    padding: 4px 12px;               
    font-weight: 800;                
    font-size: 0.85rem;              
    border-radius: 4px;              
    margin: 7px 0 8px 0;            /* margin: TOP  RIGHT  BOTTOM  LEFT */
    text-transform: uppercase;       /* PAST EVENTS */
}

/* Hide booking links on past events */
.event-card.past-event .booking-link {
    display: none;
}

.event-details .event-location {
    margin-bottom: 0;
}

.event-card.past-event {
    opacity: 0.7;
    background: #a8c5cc;
}

.event-card.past-event .event-title-section {
    justify-content: flex-start;
    padding-top: 10px;
}

.event-card.past-event .event-title-section::before {
    content: 'PAST EVENT';
    display: inline-block;
    background-color: #ffb726;
    color: rgb(16, 15, 15);
    padding: 4px 12px;
    font-weight: 800;
    font-size: 0.85rem;
    border-radius: 4px;
    margin-bottom: 8px;
    align-self: flex-start;
}
/* Responsive design for tablets, mobile, and extra small screens */

/* Tablets (≤992px) */
@media screen and (max-width: 992px) {
    .event-card {
        grid-template-columns: 1fr 1.2fr;
        gap: 25px;
        padding: 25px;
    }

    .event-image {
        grid-column: 1 / -1;
        order: -1;
    }

    .event-title-section h2 {
        font-size: 1.7em;
    }

    .programme-title {
        font-size: 2em;
        margin-bottom: 40px;
    }
}

/* Mobile (≤768px) */
@media screen and (max-width: 768px) {
    main {
        padding: 30px 15px;
    }

    .events-container {
        gap: 30px;
    }

    .event-card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px;
    }

    .event-image {
        order: -1;
    }

    .programme-title {
        font-size: 1.8em;
        margin-top: -25px;
        margin-bottom: 15px;
    }

    .event-title-section h2 {
        font-size: 1.5em;
    }

    .event-speaker {
        font-size: 1em;
    }

    .event-date,
    .event-time {
        font-size: 0.95em;
    }

    .booking-link {
        max-width: 100%;
        padding: 12px 20px;
    }

    .event-card.past-event .event-image {
        overflow: visible;
        height: auto;
    }
    .event-card.past-event .event-title-section::before {
        display: none;
    }

    .event-card.past-event .event-image::before {
        content: 'PAST EVENT';
        display: block;
        background-color: #ffb726;
        color: rgb(16, 15, 15);
        padding: 4px 12px;
        font-weight: 800;
        font-size: 0.85rem;
        border-radius: 4px;
        margin-bottom: 8px;
        text-align: center;
    }
}

/* Extra small screens (≤480px) */
@media screen and (max-width: 480px) {
    .programme-title {
        font-size: 1.5em;
        margin-top: -25px;
        margin-bottom: 5px;
    }

    .event-title-section h2 {
        font-size: 1.3em;
    }

    .event-card {
        padding: 15px;
    }

    /* Stack location and review links vertically */
    .event-location {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    /* Ensure review link aligns nicely in stacked layout */
    .event-location .read-review-link {
        display: inline-block;
        margin-left: 0;
    }
}
