/* Page Header */
.page-header {
    background: linear-gradient(rgba(33, 27, 30, 0.7), rgba(33, 27, 30, 0.7)), url('../../img/posto-abastecimento-1.png');
    background-size: cover;
    background-position: center;
    color: var(--tertiary-color);
    padding: 7rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
}

/* Map Section */
.map-section {
    padding: 2rem 0;
    background-color: var(--light-gray);
    position: relative;
    z-index: 1;
}

.map-section h2 {
    position: relative;
    padding-bottom: 0.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.map-section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.map-container {
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
}

/* Ensure map doesn't overlap header - force all map elements below header */
.leaflet-container {
    z-index: 1 !important;
    position: relative !important;
}

.leaflet-map-pane {
    z-index: 1 !important;
    position: relative !important;
}

.leaflet-tile-pane {
    z-index: 2 !important;
    position: relative !important;
}

.leaflet-overlay-pane {
    z-index: 4 !important;
    position: relative !important;
}

.leaflet-marker-pane {
    z-index: 5 !important;
    position: relative !important;
}

.leaflet-popup-pane {
    z-index: 7 !important;
    position: relative !important;
}

.leaflet-control-container {
    z-index: 8 !important;
    position: relative !important;
}

/* Force all map controls and popups to stay below header */
.leaflet-top,
.leaflet-bottom {
    z-index: 8 !important;
}

.leaflet-control {
    z-index: 8 !important;
}

.leaflet-popup {
    z-index: 8 !important;
}

/* Custom Map Styles */
.station-marker {
    background-color: var(--primary-color);
    border: 3px solid var(--tertiary-color);
    border-radius: 50%;
    color: var(--tertiary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.station-marker:hover {
    transform: scale(1.1);
}

/* Station Popup Styles */
.station-popup {
    max-width: 300px;
}

.station-popup h3 {
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.popup-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.popup-info {
    margin-bottom: 1rem;
}

.popup-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.popup-info i {
    color: var(--primary-color);
    width: 20px;
}

.popup-services h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.popup-services ul {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.popup-services li {
    margin-bottom: 0.25rem;
}

.popup-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-sm {
    padding: 8px 12px;
    font-size: 0.9rem;
}

/* Stations Details Section */
.stations-details {
    padding: 4rem 0;
    overflow: hidden;
    position: relative;
}

.stations-details h2 {
    position: relative;
    padding-bottom: 0.5rem;
}

.stations-details h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
}

.stations-details::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(65, 190, 186, 0.1), transparent);
    animation: slideIn 8s ease-in-out infinite;
}

.stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.station-detail-card {
    background-color: var(--tertiary-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.station-detail-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.station-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--medium-gray);
}

.station-header h3 {
    margin-bottom: 0;
    color: var(--primary-color);
}

.station-info {
    padding: 1.5rem;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-top: 0.2rem;
    width: 24px;
}

.info-item h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.schedule-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.schedule-info .day {
    display: flex;
    justify-content: space-between;
}

.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.services-list li {
    background-color: var(--light-gray);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.9rem;
}

.station-actions {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid var(--medium-gray);
}

.station-actions .btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .stations-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 4rem 0;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    .map-container {
        height: 400px;
    }
    
    .station-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .info-item {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .station-actions {
        flex-direction: column;
    }
    
    .popup-actions {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .page-header {
        padding: 3rem 0;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .map-container {
        height: 300px;
    }
    
    .station-info {
        padding: 1rem;
    }
    
    .station-actions {
        padding: 1rem;
    }
}

/* Add floating animation to station cards */
.station-detail-card:nth-child(1) {
    animation: float 6s ease-in-out infinite;
    animation-delay: 0s;
}

.station-detail-card:nth-child(2) {
    animation: float 6s ease-in-out infinite;
    animation-delay: 2s;
}

/* Animation keyframes */
@keyframes slideIn {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: -100%;
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}