﻿/* ==================================================
   Hero Action Area
   ================================================== */

.hero-actions {
    width: calc(100% - 40px);
    max-width: 900px;
    margin: 60px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    box-sizing: border-box;
    transform: translateX(-80px);
}

/* ==================================================
   Shared Cards
   ================================================== */

.hero-card {
    width: 205px;
    height: 170px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    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(8px);
    -webkit-backdrop-filter: blur(8px);
    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,
.hero-card:focus-visible {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.9);
    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: 14px;
    color: #173b7a;
    font-size: 46px;
    line-height: 1;
    transition:
        color 0.25s ease,
        transform 0.25s ease;
}

.hero-card:hover .hero-icon,
.hero-card:focus-visible .hero-icon {
    color: #3f741f;
    transform: scale(1.08);
}

/* ==================================================
   Card Text
   ================================================== */

.hero-card-title {
    display: block;
    margin: 0;
    color: #173b7a;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.2;
}

.hero-card-subtitle {
    display: block;
    margin-top: 7px;
    color: #555;
    font-size: 14px;
    line-height: 1.35;
}

/* ==================================================
   Closed Trip Planner Card
   ================================================== */

.trip-planner-card {
    width: 205px;
    height: 170px;
    position: relative;
    flex: 0 0 auto;
    transition:
        width 0.35s ease,
        height 0.35s ease;
}

.trip-planner-toggle {
    width: 100%;
    height: 170px;
    margin: 0;
    padding: 18px;
    background: rgba(255, 255, 255, 0.72);
    font-family: inherit;
}

.trip-planner-toggle:hover,
.trip-planner-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.9);
}

.trip-planner-prompt {
    width: 100%;
    margin-top: 11px;
    padding-top: 9px;
    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;
}

.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;
        transform: translateX(-35px);
    }

    .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;
        transform: none;
    }

    .hero-card,
    .trip-planner-card,
    .trip-planner-card.is-open {
        width: 100%;
        max-width: 520px;
    }

    .hero-card,
    .trip-planner-card,
    .trip-planner-toggle {
        height: 170px;
    }

    .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;
    }
}