* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f7fb;
    color: #172033;
    line-height: 1.5;
}

.container {
    width: min(1100px, 92%);
    margin: auto;
}


/* HERO */

.hero {
    background: linear-gradient(135deg, #172554, #2563eb);
    color: white;
    text-align: center;
    padding: 55px 20px;
}

.logo {
    font-size: 42px;
    margin-bottom: 10px;
}

.hero h1 {
    font-size: clamp(38px, 6vw, 64px);
    margin-bottom: 10px;
}

.hero p {
    font-size: 20px;
    opacity: .9;
}


/* CALCULATOR */

.calculator {
    background: white;
    margin: -30px auto 40px;
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 10px 35px rgba(0,0,0,.1);
    position: relative;
}

.calculator h2 {
    margin-bottom: 25px;
    font-size: 28px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

label {
    font-weight: 700;
    margin-bottom: 7px;
}

input {
    padding: 13px;
    border: 1px solid #ccd3df;
    border-radius: 8px;
    font-size: 16px;
}

input:focus {
    outline: none;
    border-color: #2563eb;
}


.compare-button {
    margin-top: 28px;
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 9px;
    background: #2563eb;
    color: white;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
}

.compare-button:hover {
    background: #1d4ed8;
}


/* RESULTS */

.hidden {
    display: none;
}

.trip-title {
    text-align: center;
    margin-bottom: 25px;
}

.trip-title h2 {
    font-size: 30px;
}


.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}


.travel-card {
    background: white;
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
    border-top: 6px solid;
}

.driving {
    border-color: #16a34a;
}

.flying {
    border-color: #2563eb;
}


.card-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.travel-icon {
    font-size: 42px;
}

.card-header h2 {
    font-size: 28px;
}

.card-header p {
    color: #6b7280;
}


.big-number {
    font-size: 48px;
    font-weight: 800;
    margin-top: 25px;
}

.per-person {
    color: #6b7280;
    margin-bottom: 25px;
}


.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 14px 0;
    border-bottom: 1px solid #e5e7eb;
}


.time-box {
    background: #f1f5f9;
    padding: 18px;
    border-radius: 10px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
}


/* RECOMMENDATION */

.recommendation {
    background: white;
    margin-top: 25px;
    padding: 25px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
}

.recommendation-icon {
    font-size: 45px;
}

.recommendation h2 {
    margin-bottom: 5px;
}


/* COMPARISON */

.comparison-section {
    background: white;
    padding: 30px;
    margin-top: 25px;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
}

.comparison-section h2 {
    margin-bottom: 25px;
}


.time-option {
    margin-bottom: 25px;
}

.time-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 700;
}

.bar {
    height: 25px;
    background: #e5e7eb;
    border-radius: 20px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    width: 0;
    border-radius: 20px;
    transition: width .7s ease;
}

#driveBar {
    background: #16a34a;
}

#flyBar {
    background: #2563eb;
}


/* COST CHART */

.cost-chart {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.cost-chart div {
    background: #f8fafc;
    padding: 25px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    font-size: 20px;
}

.cost-chart strong {
    font-size: 25px;
}


/* FOOTER */

footer {
    text-align: center;
    padding: 45px 20px;
    color: #64748b;
}

.disclaimer {
    font-size: 13px;
    margin-top: 5px;
}


/* MOBILE */

@media (max-width: 700px) {

    .form-grid {
        grid-template-columns: 1fr;
    }

    .comparison-grid {
        grid-template-columns: 1fr;
    }

    .cost-chart {
        grid-template-columns: 1fr;
    }

    .calculator {
        padding: 25px;
    }

    .big-number {
        font-size: 40px;
    }

    .recommendation {
        align-items: flex-start;
    }

}

small {
    color: #64748b;
    margin-top: 5px;
}


.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    color: #2563eb;
    font-weight: 700;
}


.spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #dbeafe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}


@keyframes spin {

    to {
        transform: rotate(360deg);
    }

}


.error {
    margin-top: 20px;
    padding: 15px;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 8px;
    font-weight: 600;
}


.compare-button:disabled {
    opacity: .6;
    cursor: wait;
}


.route-label {
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
}


.notice {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    padding: 20px;
    margin-top: 25px;
    border-radius: 12px;
    color: #7c2d12;
}


.notice p {
    margin-top: 5px;
}


.drive-bar {
    background: #16a34a;
}


.fly-bar {
    background: #2563eb;
}

.required {
    color: #dc2626;
    font-weight: 700;
}

input:invalid:not(:placeholder-shown) {
    border-color: #dc2626;
}

input:valid {
    border-color: #16a34a;
}

.required {
    color: #dc2626;
    font-weight: 700;
}

input:invalid:not(:placeholder-shown) {
    border-color: #dc2626;
}

input:valid {
    border-color: #16a34a;
}