/* ===== Reset & Base ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navy: #1a237e;
    --navy-light: #283593;
    --navy-dark: #0d1642;
    --blue-accent: #283593;
    --blue-bright: #1a237e;
    --light-bg: #f0f4f8;
    --white: #ffffff;
    --gray-100: #f5f7fa;
    --gray-200: #e8ecf1;
    --gray-400: #9aa5b4;
    --gray-600: #5a6577;
    --gray-800: #2d3748;
    --text: #1a202c;
    --error: #e53e3e;
    --success: #38a169;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 14px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --radius: 50px;
    --radius-sm: 12px;
    --transition: all 0.3s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* ===== Header ===== */
.header {
    background: var(--white);
    border-bottom: 2px solid var(--light-bg);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--navy);
}

.logo-img {
    height: 45px;
    width: auto;
}

.logo-text {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -0.5px;
}

.phone-link {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--navy);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    transition: var(--transition);
}

.phone-link:hover {
    color: var(--navy-light);
}

.phone-icon {
    width: 20px;
    height: 20px;
}

/* ===== Hero ===== */
.hero {
    flex: 1;
    background: var(--light-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px 60px;
}

.hero-content {
    max-width: 700px;
    width: 100%;
    text-align: center;
}

.hero-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gray-800);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.hero-subtitle {
    font-size: 0.9rem;
    color: var(--gray-400);
    font-style: italic;
    margin-bottom: 32px;
}

/* ===== Form Container ===== */
.form-container {
    background: transparent;
    position: relative;
    min-height: 200px;
    margin-bottom: 40px;
}

.progress-bar {
    width: 200px;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    margin: 0 auto 30px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 16.66%;
    background: var(--blue-bright);
    border-radius: 2px;
    transition: width 0.4s ease;
}

/* ===== Form Steps ===== */
.form-step {
    display: none;
    animation: fadeSlideIn 0.4s ease;
}

.form-step.active {
    display: block;
}

@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-question {
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--gray-800);
    margin-bottom: 24px;
    line-height: 1.3;
}

.step-question strong {
    font-weight: 700;
}

/* ===== Input Group (inline input + button) ===== */
.input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 8px;
}

.form-input {
    padding: 14px 24px;
    font-size: 1rem;
    font-family: inherit;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    outline: none;
    transition: var(--transition);
    background: var(--white);
    color: var(--text);
    min-width: 220px;
}

.form-input:focus {
    border-color: var(--blue-bright);
    box-shadow: 0 0 0 3px rgba(41, 182, 246, 0.15);
}

.form-input::placeholder {
    color: var(--gray-400);
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239aa5b4' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    padding-right: 44px;
}

.btn-primary {
    padding: 14px 32px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    letter-spacing: 1px;
    color: var(--white);
    background: var(--blue-bright);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.btn-primary:hover {
    background: var(--blue-accent);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-full {
    width: 100%;
    max-width: 360px;
    margin: 16px auto 8px;
    display: block;
}

.btn-outline {
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    color: var(--navy);
    background: transparent;
    border: 2px solid var(--navy);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: block;
    text-align: center;
    max-width: 360px;
    margin: 0 auto;
}

.btn-outline:hover {
    background: var(--navy);
    color: var(--white);
}

/* ===== Details & Name Groups ===== */
.details-group,
.name-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 8px;
}

.details-group .form-input,
.name-group .form-input {
    flex: 1;
    min-width: 0;
}

/* ===== Back Link ===== */
.step-back {
    color: var(--gray-400);
    font-size: 0.85rem;
    cursor: pointer;
    margin-top: 12px;
    transition: var(--transition);
}

.step-back:hover {
    color: var(--gray-600);
}

/* ===== Error Message ===== */
.error-msg {
    color: var(--error);
    font-size: 0.85rem;
    margin-top: 8px;
    min-height: 20px;
}

/* ===== Confirmation (Step 7) ===== */
.confirmation {
    text-align: center;
}

.check-circle {
    width: 64px;
    height: 64px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    animation: scaleIn 0.5s ease;
}

.check-circle svg {
    width: 32px;
    height: 32px;
    color: var(--white);
}

@keyframes scaleIn {
    from { transform: scale(0); }
    to { transform: scale(1); }
}

.confirm-text {
    color: var(--gray-600);
    font-size: 1rem;
    margin-bottom: 24px;
}

.confirm-summary {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 20px 24px;
    margin-bottom: 24px;
    text-align: left;
    box-shadow: var(--shadow-sm);
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--gray-100);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row span {
    color: var(--gray-400);
}

.summary-row strong {
    color: var(--gray-800);
}

.btn-book {
    background: var(--navy);
    margin-bottom: 12px;
}

.btn-book:hover {
    background: var(--navy-light);
}

.confirm-or {
    color: var(--gray-400);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

/* ===== Truck Area ===== */
.truck-area {
    margin-top: 10px;
}

.truck-graphic {
    display: flex;
    justify-content: center;
}

.truck-svg {
    width: 280px;
    height: auto;
    opacity: 0.7;
}

.truck-tagline {
    color: var(--gray-600);
    font-size: 0.95rem;
    margin-top: 8px;
}

/* ===== Footer ===== */
.footer {
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    padding: 16px 24px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--gray-400);
}

.footer-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--gray-600);
}

.footer-sep {
    color: var(--gray-200);
}

/* ===== Tablet Responsive ===== */
@media (max-width: 768px) {
    .header-inner {
        padding: 10px 16px;
    }

    .logo-text {
        font-size: 1.2rem;
    }

    .phone-link {
        font-size: 1rem;
    }

    .hero {
        padding: 30px 20px 50px;
    }

    .step-question {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .form-input {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .truck-svg {
        width: 240px;
    }
}

/* ===== Mobile Responsive ===== */
@media (max-width: 640px) {
    /* Header */
    .header-inner {
        padding: 8px 12px;
    }

    .logo {
        gap: 8px;
    }

    .logo-img {
        height: 36px;
    }

    .logo-text {
        font-size: 1.05rem;
    }

    .phone-link {
        font-size: 0.9rem;
        gap: 5px;
        padding: 8px 14px;
        background: var(--navy);
        color: var(--white);
        border-radius: var(--radius);
        font-weight: 700;
    }

    .phone-link:hover {
        color: var(--white);
        background: var(--navy-light);
    }

    .phone-icon {
        width: 16px;
        height: 16px;
    }

    /* Hero */
    .hero {
        padding: 24px 16px 36px;
        min-height: calc(100vh - 60px);
        min-height: calc(100dvh - 60px);
        align-items: flex-start;
        padding-top: 10vh;
    }

    .hero-content {
        max-width: 100%;
    }

    .hero-title {
        font-size: 0.95rem;
        margin-bottom: 2px;
    }

    .hero-subtitle {
        font-size: 0.8rem;
        margin-bottom: 24px;
    }

    /* Form */
    .form-container {
        min-height: 180px;
        margin-bottom: 30px;
    }

    .progress-bar {
        width: 160px;
        margin-bottom: 24px;
    }

    .step-question {
        font-size: 1.3rem;
        margin-bottom: 18px;
        padding: 0 4px;
    }

    .input-group {
        flex-direction: column;
        gap: 10px;
    }

    .form-input {
        min-width: 100%;
        width: 100%;
        text-align: center;
        padding: 14px 20px;
        font-size: 1rem;
        border-radius: var(--radius-sm);
    }

    .form-select {
        text-align: left;
        text-align-last: center;
        background-position: right 14px center;
        padding-right: 40px;
        border-radius: var(--radius-sm);
    }

    .details-group,
    .name-group {
        flex-direction: column;
        gap: 10px;
    }

    .btn-primary {
        width: 100%;
        padding: 16px 28px;
        font-size: 1rem;
        border-radius: var(--radius-sm);
    }

    .btn-full {
        max-width: 100%;
    }

    .btn-outline {
        max-width: 100%;
        border-radius: var(--radius-sm);
        padding: 16px 28px;
    }

    /* Back link - larger touch target */
    .step-back {
        padding: 10px 0;
        font-size: 0.9rem;
        margin-top: 8px;
    }

    /* Error */
    .error-msg {
        font-size: 0.8rem;
    }

    /* Confirmation */
    .check-circle {
        width: 56px;
        height: 56px;
        margin-bottom: 16px;
    }

    .check-circle svg {
        width: 28px;
        height: 28px;
    }

    .confirm-text {
        font-size: 0.9rem;
        margin-bottom: 20px;
        padding: 0 8px;
    }

    .confirm-summary {
        padding: 16px;
        border-radius: 10px;
        margin-bottom: 20px;
    }

    .summary-row {
        font-size: 0.85rem;
        padding: 6px 0;
    }

    .btn-book {
        margin-bottom: 10px;
    }

    /* Truck area */
    .truck-svg {
        width: 200px;
    }

    .truck-tagline {
        font-size: 0.85rem;
    }

    /* Footer */
    .footer {
        padding: 14px 16px;
    }

    .footer-inner {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }

    .footer-inner p,
    .footer-links {
        font-size: 0.75rem;
    }
}

/* ===== Small Phones (360px and below) ===== */
@media (max-width: 380px) {
    .hero {
        padding-top: 6vh;
    }

    .step-question {
        font-size: 1.15rem;
    }

    .hero-title {
        font-size: 0.85rem;
    }

    .logo-img {
        height: 30px;
    }

    .logo-text {
        font-size: 0.95rem;
    }

    .phone-link {
        font-size: 0.8rem;
        padding: 6px 12px;
    }

    .form-input {
        padding: 12px 16px;
        font-size: 0.95rem;
    }

    .btn-primary {
        padding: 14px 24px;
        font-size: 0.95rem;
    }
}

/* ===== Touch & Interaction Improvements ===== */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets for mobile */
    .btn-primary,
    .btn-outline {
        min-height: 48px;
    }

    .form-input {
        min-height: 48px;
    }

    .step-back {
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Remove hover effects on touch devices */
    .btn-primary:hover {
        transform: none;
    }

    /* Active state for touch feedback */
    .btn-primary:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    .btn-outline:active {
        transform: scale(0.98);
    }
}

/* ===== Landscape phone ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 16px 24px 24px;
        align-items: center;
    }

    .truck-area {
        display: none;
    }

    .hero-subtitle {
        margin-bottom: 16px;
    }
}

/* ===== Safe area support for notched phones ===== */
@supports (padding: max(0px)) {
    .header-inner {
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }

    .hero {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }

    .footer {
        padding-bottom: max(14px, env(safe-area-inset-bottom));
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
}
