/* Modern CSS Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Farol.ai inspired palette */
    --primary-color: #0F172A;
    /* Slate 900 */
    --primary-light: #334155;
    /* Slate 700 */

    /* Farol Green/Teal Accent */
    --accent-color: #14B8A6;
    /* Teal 500 */
    --accent-hover: #0D9488;
    /* Teal 600 */
    --accent-light: #CCFBF1;
    /* Teal 100 */
    --accent-dark: #115E59;
    /* Teal 800 */

    --text-main: #1E293B;
    /* Slate 800 */
    --text-light: #64748B;
    /* Slate 500 */
    --bg-color: #FFFFFF;
    --bg-secondary: #F8FAFC;
    /* Slate 50 */
    --white: #FFFFFF;

    /* Gradients */
    --gradient-main: linear-gradient(135deg, #FFFFFF 0%, #F0FDFA 100%);
    --gradient-accent: linear-gradient(135deg, #2DD4BF 0%, #0D9488 100%);
    /* Teal gradient */

    /* Shadows & Radius */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-color-primary: rgba(45, 212, 191, 0.2);

    --radius-card: 1.5rem;
    --radius-btn: 9999px;
    /* Pill shape */
    --radius-input: 1rem;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
.logo {
    font-family: 'Inter', sans-serif;
    /* Unified font stack */
    color: var(--primary-color);
    letter-spacing: -0.02em;
}

.text-gradient {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* Layout Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.header {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo {
    display: inline-flex;
    align-items: center;
}

.logo img {
    height: 32px;
    width: auto;
}

.highlight {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    padding: 6rem 0;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background:
        radial-gradient(circle at top right, #CCFBF1 0%, transparent 35%),
        radial-gradient(circle at bottom left, #E0F2FE 0%, transparent 35%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 5rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3.75rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 800;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.hero-text .subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
    max-width: 90%;
    font-weight: 400;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.features-list {
    list-style: none;
    margin-top: 1rem;
}

.features-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--text-main);
    font-size: 1.05rem;
}

.check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background-color: var(--accent-color);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.875rem;
    flex-shrink: 0;
}

/* Form Card */
.hero-form-wrapper {
    position: relative;
}

.card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: var(--radius-card);
    box-shadow:
        0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 20px 25px -5px rgba(20, 184, 166, 0.15);
    /* Tinted shadow */
    border: 1px solid #F1F5F9;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.card-header {
    margin-bottom: 2rem;
    text-align: center;
}

.card-header h2 {
    font-size: 1.875rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.card-header p {
    color: var(--text-light);
    font-size: 1rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--primary-light);
    white-space: nowrap;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-input);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background-color: #F8FAFC;
    color: var(--text-main);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: var(--white);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--accent-color);
    color: var(--white);
    border: none;
    border-radius: var(--radius-btn);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px var(--shadow-color-primary);
    margin-top: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px var(--shadow-color-primary);
    background-color: var(--accent-hover);
}

.btn-secondary {
    width: 100%;
    padding: 0.875rem;
    background-color: transparent;
    border: 2px solid #E2E8F0;
    color: var(--text-light);
    border-radius: var(--radius-btn);
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background-color: #F1F5F9;
    border-color: #CBD5E1;
    color: var(--text-main);
}

.disclaimer {
    font-size: 0.8rem;
    color: var(--text-light);
    text-align: center;
    margin-top: 1.25rem;
    line-height: 1.4;
}

/* Success State */
.hidden {
    display: none;
}

/* Hidden only on mobile - visible on tablet/desktop */
.hidden-mobile-only {
    display: none;
}

@media (min-width: 769px) {
    .hidden-mobile-only {
        display: block;
    }
}

.success-content {
    text-align: center;
    padding: 1rem 0;
}

.success-icon {
    color: var(--accent-color);
    margin-bottom: 1.5rem;
    animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.success-content h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.next-steps {
    background-color: var(--accent-light);
    border: 1px solid #99F6E4;
    /* Teal 200 */
    border-radius: 1rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
    text-align: left;
}

.next-steps h3 {
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    color: var(--accent-dark);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
}

.next-steps ul {
    list-style: inside disc;
    font-size: 0.95rem;
    color: var(--accent-dark);
}

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

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Info Section */
.info-section {
    background-color: var(--white);
    padding: 6rem 0;
    border-top: 1px solid #F1F5F9;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.info-item h3 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
}

.info-item p {
    color: var(--text-light);
    font-size: 1.125rem;
    line-height: 1.7;
}

/* Footer */
.footer {
    padding: 3rem 0;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    border-top: 1px solid #E2E8F0;
    background-color: var(--bg-secondary);
}

/* Autocomplete Component */
.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.autocomplete-input-container {
    position: relative;
    width: 100%;
}

.autocomplete-input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 1.25rem;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-input);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    background-color: #F8FAFC;
    color: var(--text-main);
}

.autocomplete-input:focus {
    outline: none;
    border-color: var(--accent-color);
    background-color: var(--white);
}

.autocomplete-input::placeholder {
    color: #94A3B8;
}

.autocomplete-clear-btn {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #94A3B8;
    cursor: pointer;
    padding: 0.25rem;
    display: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    transition: all 0.2s;
}

.autocomplete-clear-btn:hover {
    background-color: #F1F5F9;
    color: var(--text-main);
}

.autocomplete-clear-btn.visible {
    display: flex;
}

.autocomplete-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    background: var(--white);
    border: 2px solid var(--accent-color);
    border-radius: var(--radius-input);
    box-shadow: var(--shadow-lg);
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.autocomplete-dropdown.open {
    display: block;
}

.autocomplete-item {
    padding: 0.875rem 1.25rem;
    cursor: pointer;
    transition: background-color 0.15s;
    border-bottom: 1px solid #F1F5F9;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-height: 44px;
    justify-content: center;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background-color: var(--accent-light);
}

.autocomplete-item-code {
    font-weight: 600;
    color: var(--accent-color);
    font-size: 0.875rem;
}

.autocomplete-item-name {
    color: var(--text-light);
    font-size: 0.85rem;
}

.autocomplete-no-results {
    padding: 1.5rem 1.25rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.95rem;
}

.autocomplete-loading {
    padding: 1.5rem 1.25rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1.25rem;
    }

    .hero {
        padding: 2.5rem 0;
        min-height: auto;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.25rem;
        line-height: 1.15;
        max-width: 100%;
    }

    .hero-text .subtitle {
        font-size: 1.125rem;
        margin-left: 0;
        margin-right: 0;
        max-width: 100%;
    }

    .features-list {
        display: inline-block;
        text-align: left;
        margin-bottom: 2rem;
    }

    .features-list li {
        font-size: 1rem;
    }

    .card {
        padding: 2rem;
    }

    .card-header h2 {
        font-size: 1.5rem;
    }

    .info-section {
        padding: 4rem 0;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .info-item h3 {
        font-size: 1.5rem;
    }

    .info-item p {
        font-size: 1rem;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Extra Small Screens */
@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero-content {
        gap: 2rem;
    }

    .hero-text h1 {
        font-size: 1.75rem;
        line-height: 1.2;
        max-width: 100%;
    }

    .hero-text .subtitle {
        font-size: 0.95rem;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    .features-list li {
        font-size: 0.95rem;
        gap: 0.75rem;
    }

    .check-icon {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .card {
        padding: 1.5rem;
    }

    .card-header h2 {
        font-size: 1.375rem;
    }

    .card-header p {
        font-size: 0.9rem;
    }

    .form-group label {
        font-size: 0.8rem;
    }

    .form-group input,
    .form-group select {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .btn-primary {
        padding: 0.875rem;
        font-size: 1rem;
    }

    .info-section {
        padding: 3rem 0;
    }

    .info-grid {
        gap: 2rem;
    }

    .info-item h3 {
        font-size: 1.375rem;
        margin-bottom: 1rem;
    }

    .info-item p {
        font-size: 0.95rem;
    }

    .footer {
        padding: 2rem 0;
        font-size: 0.85rem;
    }
}

/* Dynamic Flight Rows */
.flight-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 0.75rem;
    align-items: end;
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-input);
    animation: fadeIn 0.3s ease-in-out;
    position: relative;
}

.flight-row .form-group:nth-child(1),
.flight-row .form-group:nth-child(2) {
    grid-row: 1;
}

.flight-row .form-group:nth-child(3),
.flight-row .form-group:nth-child(4) {
    grid-row: 2;
}

.flight-row .btn-remove-flight {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 24px;
    height: 24px;
    padding: 0;
    border-radius: 50%;
    transform: none;
}

.flight-row .btn-remove-flight svg {
    width: 14px;
    height: 14px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-add-flight {
    background: transparent;
    border: 2px dashed #CBD5E1;
    color: var(--accent-color);
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--radius-input);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-add-flight:hover {
    border-color: var(--accent-color);
    background-color: var(--accent-light);
}

.btn-remove-flight {
    background: transparent;
    border: 1px solid #E2E8F0;
    color: #94A3B8;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: 1.25rem;
}

.btn-remove-flight:hover {
    background: #FEF2F2;
    border-color: #FECACA;
    color: #EF4444;
    transform: scale(1.05);
}

.btn-remove-flight.hidden {
    display: none;
}

@media (max-width: 768px) {
    .flight-row {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 0.75rem;
        background: #F8FAFC;
        padding: 1rem;
        padding-top: 2.5rem;
        /* Space for remove button */
        border-radius: 0.5rem;
        border: 1px solid #E2E8F0;
        position: relative;
    }

    /* Remove grid-row assignments on mobile so all fields stack */
    .flight-row .form-group:nth-child(1),
    .flight-row .form-group:nth-child(2),
    .flight-row .form-group:nth-child(3),
    .flight-row .form-group:nth-child(4) {
        grid-row: auto;
    }

    .btn-remove-flight {
        position: absolute;
        top: 0.5rem;
        right: 0.5rem;
        width: 32px;
        height: 32px;
        margin-bottom: 0;
    }

    /* Ensure autocomplete inputs are full width on mobile */
    .autocomplete-input {
        font-size: 16px;
        /* Prevents zoom on iOS */
    }

    /* Ensure date and time inputs don't overflow */
    input[type="date"],
    input[type="time"] {
        font-size: 16px;
        /* Prevents zoom on iOS */
        width: 100%;
    }
}

/* WhatsApp Floating Button */
.whatsapp-button {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
    text-decoration: none;
    animation: bounceIn 1s ease-out;
}

.whatsapp-button:hover {
    transform: scale(1.1) translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-button:active {
    transform: scale(0.95);
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .whatsapp-button {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 56px;
        height: 56px;
    }

    .whatsapp-button svg {
        width: 26px;
        height: 26px;
    }
}

@media (max-width: 480px) {
    .whatsapp-button {
        bottom: 1rem;
        right: 1rem;
        width: 52px;
        height: 52px;
    }

    .whatsapp-button svg {
        width: 24px;
        height: 24px;
    }
}