/* --- General Body & Typography --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background-color: #f4f7fc;
    color: #333;
}

.container {
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
}

h1, h2, h3 {
    color: #1d3557;
    font-weight: 700;
}

/* --- Header & Navigation --- */
header {
    background: linear-gradient(90deg, #457b9d, #1d3557);
    color: white;
    padding: 15px 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav .logo {
    font-size: 1.5em;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #a8dadc;
}

/* --- Hero Section --- */
.hero {
    text-align: center;
    padding: 40px 20px;
    background-color: #e0f7fa;
    border-radius: 12px;
    margin-bottom: 30px;
}

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

.hero p {
    font-size: 1.2em;
    color: #457b9d;
}

/* --- Card & Form Styles --- */
.card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    padding: 30px;
    margin-bottom: 20px;
}

.form-container h2, .main-content h2 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: #457b9d;
    box-shadow: 0 0 0 3px rgba(69, 123, 157, 0.2);
}

.time-helper-text {
    font-size: 0.9em;
    color: #6c757d;
    margin-top: 5px;
}

.btn {
    display: inline-block;
    width: auto;
    padding: 12px 20px;
    background-color: #e63946;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    text-align: center;
}
form .btn {
    width: 100%;
}


.btn:hover {
    background-color: #d62828;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #457b9d;
}
.btn-secondary:hover {
    background-color: #1d3557;
}


/* --- Plan Page Styles --- */
.plan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.subtitle {
    text-align: left;
    margin-top: -15px;
    margin-bottom: 20px;
    color: #555;
}

.plan-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.plan-item {
    display: flex;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.plan-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.ride-image {
    width: 250px;
    height: 180px;
    object-fit: cover;
}

.plan-item-content {
    padding: 20px;
    flex-grow: 1;
    position: relative; /* For positioning the remove button */
}

.plan-item-content h3 {
    margin: 0 0 10px;
    padding-right: 90px; /* Make space for the button */
}

.ride-description {
    font-style: italic;
    color: #555;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.ride-details {
    display: flex;
    gap: 20px;
    font-size: 0.9em;
    flex-wrap: wrap;
}

.ride-details p {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #495057;
}

.ride-details .height-req {
    color: #e63946;
    font-weight: bold;
}

.time-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: #1d3557;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
}

/* --- Remove Ride Button --- */
.remove-ride-btn {
    position: absolute;
    top: 60px; /* Position below the time badge */
    right: 20px;
    background-color: #ff6b6b;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 0.85em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s, transform 0.2s;
}

.remove-ride-btn:hover {
    background-color: #e63946;
    transform: scale(1.05);
}

/* --- Alert Messages --- */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    text-align: center;
}

.alert-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

.alert-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

/* --- Modal Styles --- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.6);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto; 
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 1200px;
    border-radius: 12px;
    position: relative;
}

.close-btn {
    color: #aaa;
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
}

.map-container {
    position: relative;
    width: 100%;
    max-height: 80vh;
    overflow: hidden;
}

#parkMapImage {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.map-pin {
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: #e63946;
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    font-size: 14px;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    transform: translate(-50%, -50%); /* Center the pin on the coordinate */
    z-index: 10;
}

