/* ===== CSS RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #111827;
    background-color: #F8F9FA;
    font-size: 16px;
}

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
    /* Colors */
    --primary-500: #20B2AA;
    --primary-700: #008B8B;
    --primary-100: #E0F7F6;
    
    --neutral-900: #111827;
    --neutral-600: #4B5563;
    --neutral-400: #9CA3AF;
    --neutral-200: #E5E7EB;
    
    --bg-page: #F8F9FA;
    --bg-surface: #FFFFFF;
    
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    
    /* Typography */
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Spacing */
    --space-xs: 8px;
    --space-sm: 12px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;
    --space-xxxl: 64px;
    --space-hero: 96px;
    
    /* Border Radius */
    --radius: 12px;
    
    /* Shadows */
    --shadow-md: 0px 4px 12px rgba(32, 178, 170, 0.08);
    --shadow-lg: 0px 8px 24px rgba(32, 178, 170, 0.15);
    
    /* Transitions */
    --transition-fast: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== TYPOGRAPHY ===== */
h1 {
    font-size: 48px;
    font-weight: var(--font-weight-bold);
    line-height: 56px;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-md);
}

h2 {
    font-size: 32px;
    font-weight: var(--font-weight-bold);
    line-height: 40px;
    letter-spacing: -0.01em;
    margin-bottom: var(--space-lg);
}

h3 {
    font-size: 24px;
    font-weight: var(--font-weight-semibold);
    line-height: 32px;
    margin-bottom: var(--space-md);
}

p {
    font-size: 16px;
    font-weight: var(--font-weight-regular);
    line-height: 24px;
    margin-bottom: var(--space-md);
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--neutral-200);
    z-index: 1000;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 24px;
    font-weight: var(--font-weight-semibold);
    color: var(--neutral-900);
}

.contact-link {
    font-size: 16px;
    font-weight: var(--font-weight-regular);
    color: var(--neutral-600);
    text-decoration: none;
    transition: var(--transition-fast);
}

.contact-link:hover {
    color: var(--primary-500);
}

/* ===== HERO SECTION ===== */
.hero {
    padding: calc(var(--space-hero) + 72px) 0 var(--space-hero);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    color: var(--neutral-900);
    margin-bottom: var(--space-md);
}

.hero-subtitle {
    font-size: 18px;
    color: var(--neutral-600);
    margin-bottom: var(--space-xxl);
}

/* ===== SEARCH CARD ===== */
.search-card {
    background: var(--bg-surface);
    border-radius: var(--radius);
    padding: var(--space-xxl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--neutral-200);
}

/* ===== FORM STYLES ===== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

/* Clase para ocultar elementos dinámicamente */
.hidden {
    display: none !important;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 14px;
    font-weight: var(--font-weight-medium);
    color: var(--neutral-600);
    margin-bottom: var(--space-sm);
}

.icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.form-input {
    height: 56px;
    background: var(--bg-surface);
    border: 1px solid var(--neutral-200);
    border-radius: var(--radius);
    padding: var(--space-md) var(--space-lg);
    font-size: 16px;
    font-family: inherit;
    color: var(--neutral-900);
    transition: var(--transition-fast);
    cursor: pointer;
}

.form-input:hover {
    border-color: var(--primary-500);
    box-shadow: var(--shadow-md);
}

.form-input:focus {
    outline: none;
    border: 2px solid var(--primary-500);
    box-shadow: var(--shadow-md);
}

.form-input option {
    padding: var(--space-md);
    color: var(--neutral-900);
}

/* Checkbox Styles */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    align-items: flex-start;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    cursor: pointer;
    font-size: 16px;
    color: var(--neutral-900);
}

.checkbox-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--neutral-200);
    border-radius: 4px;
    background: var(--bg-surface);
    transition: var(--transition-fast);
    position: relative;
    flex-shrink: 0;
    cursor: pointer;
}

.checkbox-input[type="radio"] + .checkbox-custom {
    border-radius: 50%;
}

.checkbox-input[type="radio"]:checked + .checkbox-custom {
    background: var(--primary-500);
    border-color: var(--primary-500);
}

.checkbox-input[type="radio"]:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.checkbox-input:checked + .checkbox-custom {
    background: var(--primary-500);
    border-color: var(--primary-500);
}

.checkbox-input:checked + .checkbox-custom::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 6px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* ===== SEARCH BUTTON ===== */
.submit-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: var(--space-xl);
}

.search-button {
    width: 100%;
    max-width: 300px;
    height: 56px;
    background: var(--primary-500);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: var(--font-weight-semibold);
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    text-transform: none;
    letter-spacing: 0.5px;
}

.search-button:hover {
    background: var(--primary-700);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.search-button:active {
    transform: translateY(0px) scale(0.98);
}

.button-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* ===== FEATURES SECTION ===== */
.features {
    padding: var(--space-xxxl) 0;
    background: var(--bg-surface);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
    margin-top: var(--space-xl);
}

.feature-card {
    text-align: center;
    padding: var(--space-xl);
    background: var(--bg-page);
    border-radius: var(--radius);
    border: 1px solid var(--neutral-200);
    transition: var(--transition-fast);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-500);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-lg);
    padding: var(--space-md);
    background: var(--primary-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 32px;
    height: 32px;
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: var(--space-xxxl) 0;
    background: var(--bg-page);
}

.contact-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-surface);
    border-radius: var(--radius);
    border: 1px solid var(--neutral-200);
    box-shadow: var(--shadow-md);
}

.contact-item svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

/* ===== FOOTER ===== */
.footer {
    padding: var(--space-xl) 0;
    background: var(--neutral-900);
    color: var(--bg-surface);
    text-align: center;
}

.footer-content p {
    margin-bottom: var(--space-sm);
    opacity: 0.8;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablets */
@media (max-width: 768px) {
    h1 {
        font-size: 36px;
        line-height: 44px;
    }
    
    h2 {
        font-size: 28px;
        line-height: 36px;
    }
    
    .hero {
        padding: calc(var(--space-xl) + 72px) 0 var(--space-xl);
    }
    
    .search-card {
        padding: var(--space-xl);
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(5, auto);
        gap: var(--space-md);
    }
    
    .form-group:nth-child(3),
    .form-group:nth-child(4),
    .form-group:nth-child(5) {
        grid-column: 1;
    }
    
    .submit-container {
        grid-column: 1;
        margin-top: var(--space-md);
    }
    
    .nav-container {
        padding: 0 var(--space-md);
    }
    
    .container {
        padding: 0 var(--space-md);
    }
}

/* Mobile */
@media (max-width: 480px) {
    .logo span {
        font-size: 20px;
    }
    
    .contact-link {
        font-size: 14px;
    }
    
    h1 {
        font-size: 32px;
        line-height: 40px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .search-card {
        padding: var(--space-lg);
    }
    
    .form-input {
        height: 52px;
        padding: var(--space-md);
    }
    
    .checkbox-group {
        gap: var(--space-sm);
    }
    
    .checkbox-label {
        padding: var(--space-sm);
        font-size: 14px;
    }
    
    .search-button {
        height: 52px;
        font-size: 14px;
        max-width: 250px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }
    
    .feature-card {
        padding: var(--space-lg);
    }
    
    .contact-item {
        padding: var(--space-md);
        flex-direction: column;
        text-align: center;
    }
}

/* Large screens */
@media (min-width: 1024px) {
    .form-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto auto auto;
        gap: var(--space-lg);
        margin-bottom: var(--space-xl);
    }
    
    /* Primera fila: Origen y Destino */
    .form-group:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }
    
    .form-group:nth-child(2) {
        grid-column: 2;
        grid-row: 1;
    }
    
    /* Segunda fila: Tipo de Viaje */
    .form-group:nth-child(3) {
        grid-column: 1 / span 2;
        grid-row: 2;
        align-self: start;
    }
    
    /* Fechas */
    .form-group:nth-child(4) {
        grid-column: 1;
        grid-row: 3;
        align-self: start;
    }
    
    .form-group:nth-child(5) {
        grid-column: 2;
        grid-row: 3;
        align-self: start;
    }
    
    .submit-container {
        grid-column: 1 / span 2;
        grid-row: 4;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-top: var(--space-lg);
    }
    
    .search-button {
        min-width: 200px;
        height: 56px;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-card {
    animation: fadeInUp 600ms ease-out;
}

.feature-card {
    animation: fadeInUp 600ms ease-out;
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus styles for accessibility */
.form-input:focus,
.checkbox-input:focus + .checkbox-custom,
.search-button:focus,
.contact-link:focus {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-500: #006666;
        --neutral-900: #000000;
        --neutral-600: #333333;
    }
}