body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
    line-height: 1.6;
}

header {
    background-color: #35424a;
    color: #ffffff;
    padding: 1rem 0;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

header h1 {
    margin: 0;
}

.logo {
    height: 60px;
    vertical-align: middle;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
}

section {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

h2, h3, h4 {
    color: #35424a;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: calc(100% - 22px); 
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

label {
    display: block;
    margin-top: 10px;
    margin-bottom: 5px;
    font-weight: bold;
}

button {
    display: inline-block;
    background-color: #5cb85c;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin-right: 5px;
    margin-bottom: 5px; 
    vertical-align: middle; 
}

button:hover {
    background-color: #4cae4c;
}

#delete-trip-button, .remove-item-button {
    background-color: #d9534f;
}
#delete-trip-button:hover, .remove-item-button:hover {
    background-color: #c9302c;
}

.edit-item-button {
    background-color: #f0ad4e; 
}
.edit-item-button:hover {
    background-color: #ec971f;
}

#cancel-edit-segment-button {
    background-color: #777; 
}
#cancel-edit-segment-button:hover {
    background-color: #666;
}

ul {
    list-style: none;
    padding: 0;
}

ul li {
    background: #f9f9f9;
    border: 1px solid #eee;
    padding: 10px;
    margin-bottom: 8px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; 
}

ul li span { 
    cursor: pointer;
    flex-grow: 1; 
}

ul li > div:last-child { 
    margin-left: 10px; 
    flex-shrink: 0; 
}

.hidden {
    display: none !important;
}

.form-container {
    background-color: #eef;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 15px;
}

#trip-segments-section .form-container button {
    
}

.columns {
    display: flex;
    gap: 20px;
}

.column {
    flex: 1;
    min-width: 300px; 
}

#main-transport-section {
    background-color: #fafafa;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid #eee;
}

#main-transport-display {
    background: #f0f8ff;
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

#main-transport-display p {
    margin: 2px 0;
}

#trip-segments-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.small-text {
    font-size: 0.9em;
    color: #666;
    font-weight: normal;
}

footer {
    text-align: center;
    padding: 20px;
    background-color: #35424a;
    color: white;
    margin-top: 30px;
}

.footer-link {
    color: #a9d2ff;
    text-decoration: none;
}

.footer-link:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        flex-direction: column;
        gap: 10px;
        padding: 1rem;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .logo {
        height: 50px;
    }

    .columns {
        flex-direction: column;
    }
    input[type="text"],
    input[type="number"],
    input[type="date"],
    select,
    textarea {
        width: 100%; 
    }

    ul li {
        flex-direction: column; 
        align-items: flex-start; 
    }
    ul li > div:last-child { 
        margin-left: 0; 
        margin-top: 10px; 
        width: 100%; 
        display: flex;
        justify-content: flex-start; 
    }
     ul li > div:last-child button {
        margin-right: 5px; 
     }

    .travelers-inputs {
        display: flex;
        align-items: center;
        gap: 15px;
        flex-wrap: wrap;
    }
    .travelers-inputs div {
        display: flex;
        align-items: center;
        gap: 5px;
    }
    .travelers-inputs input {
        width: 60px;
        margin-bottom: 0;
    }
    .travelers-inputs label {
        margin: 0;
        font-weight: normal;
    }
    .travelers-inputs button {
        margin-left: auto;
    }

    .travelers-inputs button {
        margin-left: 0;
        width: 100%;
        margin-top: 10px;
    }

    #trip-segments-section .form-container button {
        width: 100%; 
        margin-top: 5px;
    }
    #trip-segments-section .form-container button:first-of-type {
        margin-top: 10px; 
    }

}