/* =====================================================
   ESTILOS PRINCIPALES - BUSCADOR DE VUELOS COLOMBIA
   Tema: Gris y Azul Oscuro
   ===================================================== */

:root {
    /* Paleta de Colores - Gris y Azul Oscuro */
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;
    
    --blue-50: #EFF6FF;
    --blue-100: #DBEAFE;
    --blue-200: #BFDBFE;
    --blue-300: #93C5FD;
    --blue-400: #60A5FA;
    --blue-500: #3B82F6;
    --blue-600: #2563EB;
    --blue-700: #1D4ED8;
    --blue-800: #1E40AF;
    --blue-900: #1E3A8A;
    --blue-950: #172554;
    
    --primary-color: #1E3A8A;
    --primary-hover: #1E40AF;
    --secondary-color: #64748B;
    --background-color: #F1F5F9;
    --card-background: #FFFFFF;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --border-color: #E2E8F0;
    
    --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 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 350ms ease;
    
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* =====================================================
   RESET Y ESTILOS BASE
   ===================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background-color);
    min-height: 100vh;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-fast);
}

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

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
    border: none;
    outline: none;
}

input, select, textarea {
    font-family: inherit;
    font-size: inherit;
}

/* =====================================================
   HEADER Y NAVEGACIÓN
   ===================================================== */

.header {
    background: var(--primary-color);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

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

.nav-link {
    color: rgba(255, 255, 255, 0.85);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

/* =====================================================
   HERO SECTION
   ===================================================== */

.hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-800) 0%, var(--blue-900) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px 24px;
    max-width: 900px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* =====================================================
   BUSCADOR DE VUELOS
   ===================================================== */

.search-container {
    background: var(--card-background);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 32px;
    max-width: 1100px;
    margin: 0 auto;
}

.search-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.search-tabs {
    display: flex;
    gap: 4px;
    background: var(--gray-100);
    padding: 4px;
    border-radius: var(--radius-lg);
}

.search-tab {
    padding: 10px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-secondary);
    background: transparent;
    transition: all var(--transition-fast);
}

.search-tab:hover {
    color: var(--text-primary);
}

.search-tab.active {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-md);
}

.search-type-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toggle-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.toggle-switch {
    position: relative;
    width: 52px;
    height: 28px;
    background: var(--gray-300);
    border-radius: 14px;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.toggle-switch.active {
    background: var(--primary-color);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.toggle-switch.active::after {
    transform: translateX(24px);
}

/* =====================================================
   FORMULARIO DE BÚSQUEDA
   ===================================================== */

.search-form {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
    background: var(--gray-50);
    transition: all var(--transition-fast);
}

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

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

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

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
    cursor: pointer;
}

.search-button {
    grid-column: span 5;
    padding: 16px 32px;
    background: var(--primary-color);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
}

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

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

.search-button svg {
    width: 22px;
    height: 22px;
}

/* =====================================================
   RESULTADOS DE BÚSQUEDA (OCULTOS POR DEFECTO)
   ===================================================== */

.search-results {
    display: none;
    margin-top: 32px;
}

.search-results.visible {
    display: block;
}

.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.results-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.results-count {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.flight-card {
    background: var(--gray-50);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    gap: 20px;
    align-items: center;
    transition: all var(--transition-fast);
}

.flight-card:hover {
    background: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.flight-info {
    text-align: center;
}

.flight-airline {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.flight-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.flight-route {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.flight-duration {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.flight-duration-line {
    width: 100px;
    height: 2px;
    background: var(--gray-300);
    margin: 8px auto;
    position: relative;
}

.flight-duration-line::before,
.flight-duration-line::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    top: -2px;
}

.flight-duration-line::before {
    left: 0;
}

.flight-duration-line::after {
    right: 0;
}

.flight-price {
    text-align: right;
}

.flight-price-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary-color);
}

.flight-price-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.flight-select-btn {
    margin-top: 8px;
    padding: 8px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.flight-select-btn:hover {
    background: var(--primary-hover);
}

/* =====================================================
   FEATURES Y SERVICES SECTIONS
   ===================================================== */

.features-section,
.services-section {
    padding: 60px 24px;
    background: var(--gray-50);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.features-section h2,
.services-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    text-align: center;
    margin-bottom: 24px;
}

.features-grid,
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.feature-card,
.service-card {
    background: var(--card-background);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all var(--transition-normal);
    border: 1px solid var(--border-color);
}

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

.feature-icon,
.service-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--blue-50);
    border-radius: var(--radius-md);
}

.feature-icon svg,
.service-icon svg {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.feature-card h3,
.service-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.feature-card p,
.service-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* =====================================================
   FOOTER
   ===================================================== */

.footer {
    background: var(--gray-800);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 24px 30px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h3 {
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-section p {
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: white;
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

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

@media (max-width: 1024px) {
    .search-form {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .search-button {
        grid-column: span 3;
    }
    
    .flight-card {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    
    .flight-price {
        grid-column: span 2;
        text-align: center;
        padding-top: 16px;
        border-top: 1px solid var(--border-color);
    }
    
    .features-grid,
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-content {
        padding: 0 16px;
        height: 60px;
    }
    
    .logo {
        font-size: 1.2rem;
    }
    
    .nav {
        display: none;
    }
    
    .hero {
        min-height: 400px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .search-container {
        padding: 20px;
        border-radius: var(--radius-lg);
    }
    
    .search-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .search-form {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .form-group {
        grid-column: span 2;
    }
    
    .search-button {
        grid-column: span 2;
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    .flight-card {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .flight-info,
    .flight-duration {
        padding-bottom: 16px;
        border-bottom: 1px solid var(--border-color);
    }
    
    .flight-price {
        grid-column: span 1;
        padding-top: 16px;
    }
    
    .features-grid,
    .services-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .search-form {
        grid-template-columns: 1fr;
    }
    
    .form-group {
        grid-column: span 1;
    }
    
    .search-button {
        grid-column: span 1;
    }
    
    .search-tabs {
        width: 100%;
        justify-content: center;
    }
    
    .search-tab {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

/* =====================================================
   UTILIDADES
   ===================================================== */

.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
