/* Hero Section */
.hero {
    position: relative;
    background: url('header-image-small.png') no-repeat center top/cover;
    background-position: center 30%; /* Focus on the top 30% of the image */
    height: 40vh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    overflow: hidden; /* Ensure the image doesn't overflow */
}

.hero .container {
    background: rgba(0, 0, 0, 0.5);
    padding: 15px;
    border-radius: 10px;
    width: 100%;
}

.hero h1 {
    font-size: 1.8em;
    margin: 0;
}

.hero p {
    font-size: 1em;
    margin: 5px 0 15px;
    max-width: none;
}

p {
    max-width: 750px;
    margin: 0 auto;
}

/* Buttons */
button {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.btn-primary {
    background: #0080ff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-secondary {
    background: #ddd;
    color: #333;
}

.btn-secondary:hover {
    background: #bbb;
}

#gantt-chart {
    margin: 0 auto;
    max-width: 900px; /* Make the chart responsive */
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .hero {
        height: auto;
        padding: 30px 20px;
    }

    .hero h1 {
        font-size: 1.5em;
    }

    .hero p {
        font-size: 0.9em;
    }

    .btn-primary, .btn-secondary {
        font-size: 14px;
        padding: 8px 16px;
    }

    .container {
        padding: 10px;
    }
    
    /* Improved mobile schedule layout */
    .schedule-container {
        height: 50vh; /* Reduce height on mobile for better usability */
        margin-bottom: 20px; /* Add spacing between table and details pane */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
    
    .event-details {
        height: auto; /* Let it take natural height on mobile */
        max-height: 75vh; /* Limit maximum height but give more space */
        margin-top: 30px; /* Add more spacing from the table */
    }
    
    .event-details-scroll {
        max-height: calc(50vh - 56px); /* Adjust for mobile */
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
    
    #scheduleTable td {
        padding: 10px 8px; /* Reduce padding on mobile for more content space */
    }
    
    /* Make table more touch-friendly */
    .event-row {
        padding: 12px 0;
    }
    
    /* Improve visibility of active row on mobile */
    #scheduleTable tbody tr.active {
        background-color: rgba(13, 110, 253, 0.2); /* More visible highlight */
    }
    
    /* Fix for PDF export button and region indicators on mobile */
    .card-header .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    #exportPdf {
        margin-top: 12px;
        align-self: flex-start;
    }
    
    /* Region indicators spacing on mobile */
    .region-indicator + span {
        white-space: nowrap;
    }
    
    #scheduleTable tbody tr {
        min-height: 50px; /* Ensure touch targets are large enough */
    }
}

.schedule-container {
    height: 80vh;
    overflow-y: auto;
}
.event-details {
    position: sticky;
    top: 0;
    height: 80vh;
}
.event-details .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}
.event-details-scroll {
    overflow-y: auto;
    max-height: calc(80vh - 56px); /* Subtract the header height */
}
.event-row {
    cursor: pointer;
    transition: background-color 0.2s;
}
.event-row:hover {
    background-color: #f8f9fa;
}
.event-row.active {
    background-color: #e9ecef;
}
.event-details-card {
    display: none;
}
.event-details-card.show {
    display: block;
}
.time-cell {
    display: flex;
    align-items: center;
}
.combined-time {
    white-space: nowrap;
}
.utc-time {
    display: block;
    font-weight: bold;
}
.local-time {
    display: block;
    color: #666;
    font-size: 0.85em;
    margin-top: 2px;
}

#scheduleTable {
    border-collapse: separate;
    border-spacing: 0;
}

#scheduleTable thead th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 12px 15px;
    font-weight: 600;
}

#scheduleTable tbody tr {
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

#scheduleTable tbody tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
    border-left: 3px solid #0d6efd;
}

#scheduleTable tbody tr.active {
    background-color: rgba(13, 110, 253, 0.1);
    border-left: 3px solid #0d6efd;
}

#scheduleTable td {
    padding: 12px 15px;
    vertical-align: middle;
}

.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 15px 20px;
}

.card-body {
    padding: 20px;
}

/* Region indicators */
.region-indicators {
    display: flex;
    gap: 5px;
}

.region-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 5px; /* Increased spacing */
}

.region-europe {
    background-color: #1f77b4;
}
.region-eastern {
    background-color: #ff7f0e;
}
.region-western {
    background-color: #2ca02c;
}
.region-asia {
    background-color: #d62728;
}

/* Event details styling */
.event-details-card {
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.event-details-card.show {
    opacity: 1;
    transform: translateY(0);
}

#eventTags .badge {
    font-weight: 500;
    padding: 6px 10px;
    border-radius: 4px;
    margin-bottom: 8px;
}

#eventTitle {
    font-weight: 600;
    line-height: 1.3;
    font-size: 1.4rem;
}

.schedule-container {
    border-radius: 8px;
    overflow: hidden;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Alert styling */
.alert {
    border-radius: 8px;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}