﻿/* ==================================================
   Hero Action Area
   ================================================== */

.hero-actions {
    width: calc(100% - 40px);
    max-width: 1040px;
    margin: 60px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 26px;
    box-sizing: border-box;
}

/* ==================================================
   Shared Cards
   ================================================== */

.hero-card {
    width: 240px;
    height: 200px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.76);
    color: #173b7a;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14), 0 0 18px rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
    font-family: inherit;
    cursor: pointer;
    transition: transform 0.25s ease, background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

    .hero-card:hover {
        transform: translateY(-7px);
        background: rgba(255, 255, 255, 0.88);
        border-color: rgba(255, 255, 255, 0.85);
        box-shadow: 0 18px 40px rgba(0, 0, 0, 0.2), 0 0 22px rgba(255, 255, 255, 0.18);
    }

    .hero-card:focus-visible {
        outline: 3px solid #fdb515;
        outline-offset: 4px;
    }

/* ==================================================
   Font Awesome Icons
   ================================================== */

.hero-icon {
    margin-bottom: 18px;
    color: #173b7a;
    font-size: 56px;
    line-height: 1;
    transition: color 0.25s ease, transform 0.25s ease;
}

.hero-card:hover .hero-icon {
    color: #3f741f;
    transform: scale(1.08);
}

/* ==================================================
   Card Text
   ================================================== */

.hero-card-title {
    display: block;
    margin: 0;
    color: #173b7a;
    font-size: 26px;
    font-weight: 400;
    line-height: 1.2;
}

.hero-card-subtitle {
    display: block;
    margin-top: 8px;
    color: #555;
    font-size: 15px;
    line-height: 1.4;
}

/* ==================================================
   Closed Trip Planner Card
   ================================================== */

.trip-planner-card {
    width: 240px;
    height: 200px;
    position: relative;
    flex: 0 0 auto;
    transition: width 0.35s ease, height 0.35s ease;
}

.trip-planner-toggle {
    width: 100%;
    height: 200px;
    margin: 0;
    font-family: inherit;
}

.trip-planner-prompt {
    width: 100%;
    margin-top: 14px;
    padding-top: 11px;
    border-top: 1px solid rgba(23, 59, 122, 0.18);
    color: #173b7a;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
}

/* ==================================================
   Expanded Trip Planner
   ================================================== */

.trip-planner-card.is-open {
    width: 430px;
    height: auto;
}

    .trip-planner-card.is-open .trip-planner-toggle {
        display: none;
    }

.trip-planner-form {
    width: 100%;
    padding: 26px;
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.22), 0 0 22px rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
}

.trip-planner-card.is-open .trip-planner-form {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ==================================================
   Planner Header
   ================================================== */

.trip-planner-form-header {
    margin-bottom: 22px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.trip-planner-heading-group {
    min-width: 0;
}

.planner-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .planner-heading i {
        color: #3f741f;
        font-size: 28px;
        line-height: 1;
    }

    .planner-heading h2 {
        margin: 0;
        color: #3f741f;
        font-size: 28px;
        font-weight: 400;
        line-height: 1.2;
    }

.trip-planner-form-header p {
    margin: 8px 0 0;
    color: #444;
    font-size: 14px;
    line-height: 1.5;
}

.trip-planner-close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    padding: 0;
    border: 1px solid #bfc7d2;
    border-radius: 50%;
    background: #fff;
    color: #173b7a;
    font-family: Arial, sans-serif;
    font-size: 26px;
    line-height: 34px;
    text-align: center;
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

    .trip-planner-close:hover {
        border-color: #173b7a;
        background: #f3f6fa;
        color: #0f2f65;
    }

    .trip-planner-close:focus-visible {
        outline: 3px solid #fdb515;
        outline-offset: 3px;
    }

/* ==================================================
   Form Fields
   ================================================== */

.tp-field {
    min-width: 0;
    margin-bottom: 16px;
}

    .tp-field label,
    .tp-options legend {
        display: block;
        margin-bottom: 6px;
        color: #173b7a;
        font-size: 14px;
        font-weight: 600;
    }

    .tp-field input {
        width: 100%;
        height: 46px;
        padding: 0 12px;
        border: 1px solid #98a5b6;
        border-radius: 6px;
        background: #fff;
        color: #222;
        font-family: inherit;
        font-size: 16px;
        box-sizing: border-box;
    }

        .tp-field input::placeholder {
            color: #666;
            opacity: 1;
        }

        .tp-field input:hover {
            border-color: #66768b;
        }

        .tp-field input:focus {
            border-color: #17468f;
            outline: 3px solid rgba(23, 70, 143, 0.22);
            outline-offset: 1px;
        }

        /* Prevent the date-picker background icon from being cropped. */

        .tp-field input.tcal {
            padding-right: 38px;
        }

/* ==================================================
   Trip Type Radio Buttons
   ================================================== */

.tp-options {
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

.tp-option-row {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.tp-option {
    display: flex;
    align-items: center;
    gap: 7px;
}

    .tp-option input {
        width: 18px;
        height: 18px;
        margin: 0;
        accent-color: #173b7a;
    }

    .tp-option label {
        margin: 0;
        color: #333;
        font-size: 15px;
        font-weight: 400;
        cursor: pointer;
    }

/* ==================================================
   Date and Time
   ================================================== */

.tp-date-time-row {
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

    .tp-date-time-row .tp-field {
        margin-bottom: 0;
    }

/* ==================================================
   Plan My Trip Button
   ================================================== */

#tp-submit {
    width: 100%;
    min-height: 48px;
    padding: 11px 18px;
    border: 0;
    border-radius: 6px;
    background: #173b7a;
    color: #fff;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}

    #tp-submit:hover {
        background: #0f2f65;
        transform: translateY(-2px);
        box-shadow: 0 7px 16px rgba(23, 59, 122, 0.28);
    }

    #tp-submit:focus-visible {
        outline: 3px solid #fdb515;
        outline-offset: 3px;
    }

/* ==================================================
   Tablet
   ================================================== */

@media (max-width: 980px) {
    .hero-actions {
        max-width: 720px;
        flex-wrap: wrap;
    }

    .trip-planner-card.is-open {
        width: 100%;
        max-width: 540px;
        order: -1;
    }

        .trip-planner-card.is-open .trip-planner-form {
            margin: 0 auto;
        }
}

/* ==================================================
   Mobile
   ================================================== */

@media (max-width: 700px) {
    .hero-actions {
        width: calc(100% - 28px);
        margin: 35px auto;
        flex-direction: column;
        align-items: center;
        gap: 18px;
    }

    .hero-card,
    .trip-planner-card,
    .trip-planner-card.is-open {
        width: 100%;
        max-width: 520px;
    }

    .hero-card,
    .trip-planner-card,
    .trip-planner-toggle {
        height: 185px;
    }

        .trip-planner-card.is-open {
            height: auto;
        }
}

@media (max-width: 500px) {
    .trip-planner-form {
        padding: 21px;
    }

    .trip-planner-form-header {
        gap: 12px;
    }

    .planner-heading h2 {
        font-size: 24px;
    }

    .tp-date-time-row {
        grid-template-columns: 1fr;
    }

    .tp-option-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }
}

/* ==================================================
   Reduced Motion
   ================================================== */

@media (prefers-reduced-motion: reduce) {
    .hero-card,
    .hero-icon,
    .trip-planner-card,
    .trip-planner-form,
    #tp-submit {
        transition: none;
    }
}
