/*
Theme Name: Viajes Turisticos
Theme URI: https://viajesturisticos.com
Author: Tu Nombre
Author URI: https://tunombre.com
Description: Tema especializado en traslados turísticos con sistema de reservas, gestión de rutas, vehículos y conductores. Integración con iZipay.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: viajes-turisticos
Tags: transportation, booking, tourism, responsive, bootstrap

Viajes Turisticos - Tema WordPress para transporte turístico
*/

/* ===================================
   VARIABLES CSS
====================================== */
:root {
    --color-primario: #003580;
    --color-secundario: #00a651;
    --color-acento: #feba02;
    --color-texto: #333333;
    --color-gris: #f5f5f5;
    --color-blanco: #ffffff;
    --fuente-principal: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --sombra-card: 0 2px 12px rgba(0,0,0,0.1);
    --radio-borde: 8px;
}

/* ===================================
   RESET Y BASE
====================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--fuente-principal);
    color: var(--color-texto);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===================================
   HEADER Y NAVEGACIÓN
====================================== */
.main-header {
    background: var(--color-blanco);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand img {
    height: 40px;
}

.nav-link {
    font-weight: 500;
    color: var(--color-texto) !important;
    transition: color 0.3s;
}

.nav-link:hover {
    color: var(--color-primario) !important;
}

.btn-reservar {
    background: var(--color-secundario);
    color: var(--color-blanco) !important;
    padding: 8px 24px;
    border-radius: 25px;
    font-weight: 600;
}

.btn-reservar:hover {
    background: #008f45;
    transform: translateY(-2px);
}

/* ===================================
   HERO SECTION
====================================== */
.hero-section {
    background: linear-gradient(135deg, var(--color-primario) 0%, #0056b3 100%);
    color: var(--color-blanco);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('assets/images/pattern.png') repeat;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* ===================================
   BUSCADOR DE RUTAS
====================================== */
.search-box {
    background: var(--color-blanco);
    padding: 30px;
    border-radius: var(--radio-borde);
    box-shadow: var(--sombra-card);
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.form-control, .form-select {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 16px;
    transition: all 0.3s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 0.2rem rgba(0,53,128,0.25);
}

/* ===================================
   CARD DE RUTA
====================================== */
.ruta-card {
    background: var(--color-blanco);
    border-radius: var(--radio-borde);
    box-shadow: var(--sombra-card);
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    border: 1px solid #e8e8e8;
}

.ruta-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.ruta-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.ruta-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.ruta-card:hover .ruta-image img {
    transform: scale(1.1);
}

.ruta-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--color-secundario);
    color: var(--color-blanco);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.ruta-content {
    padding: 25px;
}

.ruta-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--color-primario);
}

.ruta-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 14px;
}

.meta-item i {
    color: var(--color-secundario);
}

.ruta-price {
    font-size: 32px;
    font-weight: 700;
    color: var(--color-secundario);
    margin: 20px 0;
}

.ruta-price span {
    font-size: 14px;
    color: #666;
    font-weight: 400;
}

/* ===================================
   SELECCIÓN DE ASIENTOS
====================================== */
.seat-selector {
    background: var(--color-gris);
    padding: 20px;
    border-radius: var(--radio-borde);
    margin: 20px 0;
}

.seats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 400px;
    margin: 20px auto;
}

.seat {
    aspect-ratio: 1;
    background: var(--color-blanco);
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.seat:hover:not(.occupied) {
    border-color: var(--color-primario);
    background: #e3f2fd;
}

.seat.selected {
    background: var(--color-secundario);
    border-color: var(--color-secundario);
    color: var(--color-blanco);
}

.seat.occupied {
    background: #ccc;
    border-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.seat-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 15px;
    font-size: 13px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid #ddd;
}

.legend-box.available { background: var(--color-blanco); }
.legend-box.selected { background: var(--color-secundario); border-color: var(--color-secundario); }
.legend-box.occupied { background: #ccc; border-color: #ccc; }

/* ===================================
   INFORMACIÓN DEL VEHÍCULO
====================================== */
.vehicle-info {
    background: var(--color-blanco);
    border-radius: var(--radio-borde);
    padding: 25px;
    box-shadow: var(--sombra-card);
    margin: 20px 0;
}

.vehicle-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--color-gris);
}

.vehicle-image {
    width: 120px;
    height: 80px;
    object-fit: contain;
}

.vehicle-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.feature-item i {
    color: var(--color-secundario);
    font-size: 18px;
}

/* ===================================
   PERFIL DEL CONDUCTOR
====================================== */
.driver-card {
    background: var(--color-blanco);
    border-radius: var(--radio-borde);
    padding: 25px;
    box-shadow: var(--sombra-card);
    margin: 20px 0;
}

.driver-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.driver-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--color-gris);
}

.driver-rating {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.stars {
    color: var(--color-acento);
}

/* ===================================
   TIMELINE DE RUTA
====================================== */
.route-timeline {
    position: relative;
    padding: 20px 0;
}

.timeline-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    position: relative;
}

.timeline-item:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 40px;
    bottom: -20px;
    width: 2px;
    background: #e0e0e0;
}

.timeline-marker {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-primario);
    color: var(--color-blanco);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
    font-weight: 600;
}

.timeline-marker.start { background: var(--color-secundario); }
.timeline-marker.end { background: #dc3545; }

.timeline-content {
    flex: 1;
    background: var(--color-gris);
    padding: 15px;
    border-radius: var(--radio-borde);
}

.timeline-time {
    font-weight: 600;
    color: var(--color-primario);
    margin-bottom: 5px;
}

.timeline-place {
    font-weight: 600;
    margin-bottom: 3px;
}

.timeline-desc {
    font-size: 13px;
    color: #666;
}

/* ===================================
   RESUMEN DE RESERVA
====================================== */
.booking-summary {
    background: var(--color-blanco);
    border-radius: var(--radio-borde);
    padding: 30px;
    box-shadow: var(--sombra-card);
    position: sticky;
    top: 100px;
}

.summary-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--color-primario);
    border-bottom: 2px solid var(--color-gris);
    padding-bottom: 15px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.summary-row.total {
    font-size: 24px;
    font-weight: 700;
    color: var(--color-secundario);
    border-bottom: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 3px solid var(--color-primario);
}

.btn-checkout {
    width: 100%;
    padding: 15px;
    font-size: 18px;
    font-weight: 700;
    background: var(--color-secundario);
    border: none;
    border-radius: 8px;
    color: var(--color-blanco);
    margin-top: 20px;
    transition: all 0.3s;
}

.btn-checkout:hover {
    background: #008f45;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,166,81,0.3);
}

/* ===================================
   WHATSAPP FLOAT BUTTON
====================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: var(--color-blanco);
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(37,211,102,0.4);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37,211,102,0.6);
}

/* ===================================
   RESPONSIVE
====================================== */
@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0;
    }
    
    .search-box {
        margin: 20px;
        padding: 20px;
    }
    
    .seats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
    }
    
    .vehicle-features {
        grid-template-columns: 1fr;
    }
    
    .ruta-meta {
        flex-direction: column;
        gap: 10px;
    }
}

/* ===================================
   ANIMACIONES WOW
====================================== */
.wow {
    visibility: hidden;
}

.animate__animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.animate__fadeInUp {
    animation-name: fadeInUp;
}

/* Mejora visual de asientos */
.seats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    max-width: 300px;
    margin: 20px auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.seat {
    aspect-ratio: 1;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #495057;
}

.seat:hover:not(.occupied) {
    border-color: #003580;
    background: #e3f2fd;
    transform: scale(1.05);
}

.seat.selected {
    background: #00a651;
    border-color: #00a651;
    color: white;
    box-shadow: 0 2px 8px rgba(0, 166, 81, 0.3);
}

.seat.occupied {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
    cursor: not-allowed;
    opacity: 0.7;
}

.seat-legend {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 15px;
    font-size: 13px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-box {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid #dee2e6;
}

.legend-box.available { 
    background: white; 
}
.legend-box.selected { 
    background: #00a651; 
    border-color: #00a651; 
}
.legend-box.occupied { 
    background: #6c757d; 
    border-color: #6c757d; 
}


/* Modal de reserva */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    border-radius: 12px 12px 0 0;
    padding: 20px 25px;
}

.modal-body {
    padding: 30px;
}

#paso-resumen .bg-light {
    background: #f8f9fa !important;
    border: 1px solid #e9ecef;
}

#form-datos-pasajero .form-control {
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.3s;
}

#form-datos-pasajero .form-control:focus {
    border-color: #003580;
    box-shadow: 0 0 0 0.2rem rgba(0,53,128,0.15);
}

#form-datos-pasajero label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

.btn-success {
    background: #00a651;
    border-color: #00a651;
}

.btn-success:hover {
    background: #008f45;
    border-color: #008f45;
}