:root {
    --primary-color: #0066cc;
    --secondary-color: #dc3545;
    --accent-color: #f8f9fa;
    --dark-color: #212529;
    --gradient-bg: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    padding-top: 76px;
    line-height: 1.6;
}

/* Mobile optimization for top padding */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }
}

/* Header Styles */
.navbar {
    background: var(--gradient-bg) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 10px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    transform: translateY(-2px);
    color: #fff !important;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-bg);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100"><path d="M0,0V46.29c47.79,22.85,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" fill="%23FFFFFF"></path></svg>') repeat-x;
    background-size: 1000px 100px;
    bottom: -1px;
    height: 100px;
}

.hero-icon {
    font-size: 15rem;
    color: rgba(255, 255, 255, 0.1);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Card Styles */
.card {
    border-radius: 20px;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

/* Form Styles */
.form-control,
.form-select {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-color);
}

/* Radio Button Styles */
.form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.1em;
    border: 2px solid var(--primary-color);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
}

.form-check-label {
    margin-left: 0.5rem;
    cursor: pointer;
    transition: color 0.3s ease;
}

.form-check-label:hover {
    color: var(--primary-color);
}

/* Trip Type Container */
.form-check-inline {
    margin-right: 2rem;
}

/* Return Date Container Animation */
#returnDateContainer,
#fechaVueltaContainer {
    transition: all 0.3s ease;
    overflow: hidden;
}

#returnDateContainer.hidden,
#fechaVueltaContainer.hidden {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

/* Smooth transitions for form fields */
.form-control,
.form-select {
    transition: all 0.3s ease;
}

/* Enhanced trip type selector */
.trip-type-selector {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.trip-type-selector .form-check {
    background: white;
    padding: 10px 15px;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.trip-type-selector .form-check:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

.trip-type-selector .form-check-input:checked+.form-check-label {
    color: var(--primary-color);
    font-weight: 600;
}

/* Button Styles */
.btn {
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
}

.btn-danger {
    background: var(--secondary-color);
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.3);
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.4);
}

/* Feature Icons */
.feature-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    transition: all 0.3s ease;
}

.feature-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

/* Background Patterns */
.bg-light {
    background: linear-gradient(45deg, #f8f9fa 25%, transparent 25%),
        linear-gradient(-45deg, #f8f9fa 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #f8f9fa 75%),
        linear-gradient(-45deg, transparent 75%, #f8f9fa 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

/* Animation Classes */
.animate-fadeIn {
    animation: fadeIn 1s ease-in;
}

.animate-slideUp {
    animation: slideUp 0.8s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

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

/* Footer */
footer {
    background: var(--dark-color) !important;
}

footer a {
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

/* Important Links Section */
.border-top {
    border-color: #e9ecef !important;
    border-width: 2px !important;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: translateY(-1px);
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    border-color: #6c757d;
    color: white;
    transform: translateY(-1px);
}

.btn-outline-danger:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 8px 16px;
    font-weight: 500;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.btn-sm:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Active state for current page */
.btn-outline-primary.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-outline-secondary.active {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

.btn-outline-danger.active {
    background-color: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding-top: 70px;
        /* Reducir padding superior */
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-icon {
        font-size: 8rem;
    }

    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .navbar-brand {
        font-size: 1.5rem;
    }

    /* Formulario responsive */
    .form-control,
    .form-select {
        font-size: 16px;
        /* Prevenir zoom en iOS */
        padding: 14px 16px;
        /* Touch targets mÃ¡s grandes */
    }

    /* Botones responsive */
    .btn {
        min-height: 44px;
        /* Touch target mÃ­nimo */
        padding: 12px 20px;
    }

    .btn-lg {
        padding: 16px 32px;
        font-size: 1.1rem;
    }

    /* Tipo de viaje en mÃ³vil */
    .form-check-inline {
        display: block !important;
        margin-bottom: 1rem;
        margin-right: 0;
    }

    .d-flex.gap-4 {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    /* Cards responsive */
    .card-body {
        padding: 2rem 1.5rem !important;
    }

    /* Important Links Mobile Grid */
    .row.justify-content-center .col-6 {
        margin-bottom: 0.75rem;
    }

    .btn-sm {
        padding: 10px 12px;
        font-size: 0.85rem;
        min-height: 40px;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 80vh;
        padding: 2rem 0;
    }

    .hero-section h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-section .lead {
        font-size: 1rem;
    }

    .btn-lg {
        padding: 12px 30px;
        font-size: 1rem;
    }

    .card-body {
        padding: 1.5rem !important;
    }

    /* Formulario compacto en mÃ³vil */
    .row.g-3 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 1rem;
    }

    /* Links grid 2x2 en mÃ³vil */
    .important-links .row .col-6 {
        padding: 0 0.25rem;
    }

    .important-links .btn-sm {
        font-size: 0.8rem;
        padding: 8px 10px;
        border-radius: 20px;
    }

    /* NavegaciÃ³n mÃ³vil */
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }

    .navbar-nav {
        text-align: center;
        margin-top: 1rem;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        margin: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    /* Texto mÃ¡s legible en mÃ³vil */
    .text-muted {
        font-size: 0.9rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }
}

/* OptimizaciÃ³n para pantallas muy pequeÃ±as */
@media (max-width: 375px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .card-body {
        padding: 1rem !important;
    }

    .btn-sm {
        font-size: 0.75rem;
        padding: 6px 8px;
    }
}

/* Tablets en orientaciÃ³n portrait */
@media (min-width: 577px) and (max-width: 991px) {
    .hero-section h1 {
        font-size: 3rem;
    }

    .hero-icon {
        font-size: 10rem;
    }

    /* Formulario en tablets */
    .form-control,
    .form-select {
        font-size: 16px;
        padding: 12px 16px;
    }

    /* Grid de 2 columnas para links en tablets */
    .important-links .col-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Landscape mÃ³vil */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding: 1rem 0;
    }

    .hero-section h1 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-section .lead {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .btn-lg {
        padding: 8px 24px;
        font-size: 0.9rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Select2 Custom Styles */
.select2-container--default .select2-selection--single {
    border-radius: 12px;
    border: 2px solid #e9ecef;
    height: 48px;
    line-height: 44px;
}

.select2-container--default .select2-selection--single:focus {
    border-color: var(--primary-color);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* ===========================================
   HERO SEARCH FORM STYLES
   =========================================== */

.hero-search-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.hero-search-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}

.hero-search-card .form-control,
.hero-search-card .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 10px 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.hero-search-card .form-control:focus,
.hero-search-card .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.1);
    background: #fff;
}

.hero-search-card .form-label {
    color: var(--dark-color);
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.hero-search-card .btn-primary {
    background: var(--gradient-bg);
    border: none;
    border-radius: 12px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.hero-search-card .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 102, 204, 0.4);
}

.hero-search-card .form-check-label {
    font-size: 0.9rem;
    color: var(--dark-color);
    font-weight: 500;
}

.hero-search-card .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Transiciones suaves para el formulario hero */
.hero-search-card .col-12,
.hero-search-card .col-lg-2,
.hero-search-card .col-md-6,
.hero-search-card .col-md-3,
.hero-search-card .col-md-2,
.hero-search-card .col-md-1 {
    transition: all 0.3s ease;
}

/* Responsive adjustments for hero search */
@media (max-width: 992px) {
    .hero-search-card .row.g-3>div {
        margin-bottom: 15px;
    }

    .hero-search-card .btn-lg {
        padding: 12px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-search-card .row.g-3>div {
        margin-bottom: 15px;
        width: 100% !important;
    }

    .hero-search-card .btn-lg {
        padding: 14px 20px;
        font-size: 1.1rem;
        width: 100%;
        margin-top: 10px;
    }

    /* Stack all form fields vertically on mobile */
    .hero-search-card .col-12 {
        flex: 0 0 auto;
        width: 100%;
    }
}

/* Hero section adjustments */
.hero-section .display-4 {
    font-size: 2.8rem;
}

.hero-section .display-5 {
    font-size: 2.2rem;
}

/* Mobile-first search optimizations */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .hero-section .display-4 {
        font-size: 2.2rem;
    }

    .hero-section .display-5 {
        font-size: 1.8rem;
    }

    /* Make search card more prominent on mobile */
    .hero-search-card {
        margin-top: 1rem;
        border-radius: 15px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    .hero-search-card .card-body {
        padding: 1.5rem !important;
    }

    .hero-search-card h3 {
        font-size: 1.3rem;
        margin-bottom: 1.5rem !important;
    }

    /* Optimize form fields for mobile */
    .hero-search-card .form-control,
    .hero-search-card .form-select {
        padding: 12px 14px;
        font-size: 1rem;
        border-radius: 8px;
    }

    .hero-search-card .form-label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    /* Mobile stats adjustments */
    .hero-stats {
        margin-top: 2rem !important;
        gap: 1.5rem !important;
    }

    .stat-item {
        min-width: 80px;
    }

    .stat-number.h5 {
        font-size: 1.4rem !important;
    }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 992px) {
    .hero-section {
        padding-top: 3rem !important;
        padding-bottom: 3rem !important;
    }

    .hero-search-card {
        margin-top: 1.5rem;
    }
}

/* Utility class for responsive font sizes */
.h4-md {
    font-size: 1.5rem;
}

@media (min-width: 768px) {
    .h4-md {
        font-size: 1.5rem !important;
    }
}