/* General Styles */
:root {
    /* Theme Colors */
    --bg-odd: #272727;
    --bg-even: #2f2f2f;
    --border-color: #000;
    --primary-color: #4CAF50;
    --primary-hover: #45a049;
    --accent-limited: #f39c12;
    --accent-soldout: #e74c3c;
    --status-cancelled: #e74c3c;
    --status-rescheduled: #3498db;
    --text-on-sale: #4CAF50;

    /* Layout Spacing */
    --padding-standard: 16px;
    --gap-standard: 8px;

    /* Base Font Size */
    --font-base-size: 16px;
}

/* Main Container Styles */
.tour-info-listing {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 20px 0;
    padding: 0;
    border: 1px solid var(--border-color);
}

/* Row Styling */
.tour-info-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: var(--padding-standard);
    border-bottom: 1px solid var(--border-color);
    font-size: var(--font-base-size);
    background-color: var(--bg-even);
}

/* Alternate Row Background Color */
.tour-info-row:nth-child(odd) {
    background-color: var(--bg-odd);
}

/* Remove Bottom Border for Last Row */
.tour-info-row:last-child {
    border-bottom: none;
}

/* Column Styling */
.tour-info-col {
    padding: var(--gap-standard);
    display: flex;
    align-items: center;
    text-align: left;
}

/* 4-Column Layout for Past Tours */
.tour-wrapper.past-tour .tour-info-row {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.tour-wrapper.past-tour .tour-info-col:nth-child(1) { flex: 0 0 25%; }
.tour-wrapper.past-tour .tour-info-col:nth-child(2), 
.tour-wrapper.past-tour .tour-info-col:nth-child(3), 
.tour-wrapper.past-tour .tour-info-col:nth-child(4) { flex: 0 0 25%; }

/* Hide 5th Column for Past Tours */
.tour-wrapper.past-tour .tour-info-col:nth-child(5) {
    display: none;
}

/* 5-Column Layout for Current Tours */
.tour-wrapper.current-tour .tour-info-row {
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr;
}

.tour-wrapper.current-tour .tour-info-col:nth-child(1) { flex: 0 0 14%; }
.tour-wrapper.current-tour .tour-info-col:nth-child(2), 
.tour-wrapper.current-tour .tour-info-col:nth-child(3), 
.tour-wrapper.current-tour .tour-info-col:nth-child(4) { flex: 0 0 22%; }
.tour-wrapper.current-tour .tour-info-col:nth-child(5) { flex: 0 0 20%; }

/* Medium Screen Adjustments */
@media (min-width: 640px) and (max-width: 1024px) {
    .tour-info-row { font-size: 16px; }
    .tour-wrapper.past-tour .tour-info-col:nth-child(-n+4) { flex: 0 0 25%; }
    .tour-wrapper.current-tour .tour-info-col:nth-child(-n+4) { flex: 0 0 25%; }
    .tour-wrapper.current-tour .tour-info-col:nth-child(5) { flex: 0 0 100%; }
}

/* Mobile Screen Adjustments */
@media (max-width: 640px) {
    .tour-info-row {
        flex-direction: column;
        font-size: 16px;
    }
    .tour-info-col {
        flex: 1 1 100%;
        padding: var(--gap-standard) 0;
        border-bottom: 1px solid #000;
    }
    .tour-info-col:last-child {
        border-bottom: none;
    }
    .tour-info-col:nth-child(1) {
        font-size: 1.25em;
        font-weight: 600;
    }
    .tour-info-col.empty-col {
        display: none;
    }
}

/* Button Styles */
.buy-tickets-link, .tickets-on-sale-label, .cancelled-status, .rescheduled-status, .tickets-on-sale-date {
    display: inline-block;
    padding: 8px 12px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    transition: background-color 0.3s ease;
    text-align: center;
    width: 100%;
    line-height: 1.2;
}

/* Button Hover Colors */
.buy-tickets-link:hover,
.buy-tickets-link.limited:hover,
.buy-tickets-link.soldout:hover {
    color: #1b1b1b !important;
}

.buy-tickets-link { background-color: var(--primary-color); }
.buy-tickets-link.limited { background-color: var(--accent-limited); }
.buy-tickets-link.soldout { background-color: var(--accent-soldout); }
.cancelled-status { color: var(--status-cancelled); background-color: #1b1b1b; }
.rescheduled-status { color: var(--status-rescheduled); background-color: #1b1b1b; }
.tickets-on-sale-date { color: var(--text-on-sale); background-color: #1b1b1b; }

/* Button Margins for Smaller Screens */
@media (max-width: 1024px) {
    .buy-tickets-link, .tickets-on-sale-label {
        display: block;
        margin-top: 8px;
    }
    .cancelled-status, .rescheduled-status, .tickets-on-sale-date {
        margin-top: 8px;
    }
}