/* Estilos generales */
:root {
    --primary-color: #4682B4;
    --secondary-color: #8A2BE2;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

body {
    font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Particles background */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* Header */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(70, 130, 180, 0.9), rgba(138, 43, 226, 0.9));
    color: white;
    padding: 100px 0;
    text-align: center;
}

.hero-section h1 {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.hero-section p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
}

/* Search Section */
.search-section {
    background: white;
    padding: 60px 0;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1);
}

.search-card {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 15px;
}

/* Results Section */
.results-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.encomendista-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

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

.encomendista-image {
    height: 200px;
    object-fit: cover;
    cursor: pointer;
}

.encomendista-info {
    padding: 1.5rem;
}

.encomendista-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.encomendista-location {
    color: #666;
    margin-bottom: 0.5rem;
}

.encomendista-schedule {
    color: var(--success-color);
    font-weight: 500;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 500;
    transition: all 0.3s ease;
}

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

/* Forms */
.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(70, 130, 180, 0.25);
}

.form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
}

/* Modal */
.modal-content {
    border-radius: 15px;
    border: none;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 15px 15px 0 0;
}

.modal-body {
    padding: 2rem;
}

/* Admin Panel */
.admin-sidebar {
    background: var(--dark-color);
    min-height: 100vh;
    padding: 2rem 0;
}

.admin-sidebar .nav-link {
    color: #adb5bd;
    padding: 1rem 1.5rem;
    border-radius: 5px;
    margin: 0.25rem 1rem;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: var(--primary-color);
    color: white;
}

.admin-content {
    padding: 2rem;
}

/* Login Page */
.login-page {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.login-page .card {
    border: none;
    border-radius: 15px;
}

/* Footer */
.footer {
    background: var(--dark-color);
    color: white;
    padding: 40px 0 20px;
}

.footer h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

.footer a:hover {
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section p {
        font-size: 1.1rem;
    }
    
    .encomendista-card {
        margin-bottom: 1.5rem;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading spinner */
.spinner-border-custom {
    width: 3rem;
    height: 3rem;
    border-width: 0.3em;
}

/* No results */
.no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-results i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ccc;
}

/* Image preview */
.image-preview {
    max-width: 200px;
    max-height: 200px;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* File upload */
.file-upload-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.file-upload-wrapper input[type=file] {
    position: absolute;
    left: -9999px;
}

/* Mejoras específicas para dropdowns en móvil */
@media (max-width: 768px) {
    .form-select {
        font-size: 16px !important; /* Evita zoom automático en iOS */
        min-height: 50px !important; /* Área de toque más grande */
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
        background-position: right 15px center;
        background-repeat: no-repeat;
        background-size: 20px 15px;
        padding-right: 45px !important;
        cursor: pointer;
    }
    
    .form-control {
        font-size: 16px !important;
        min-height: 50px !important;
    }
    
    /* Asegurar que el dropdown de municipios sea visible */
    #municipio {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Estilos específicos para el dropdown de municipios */
#municipio {
    transition: all 0.3s ease;
}

#municipio:disabled {
    background-color: #f8f9fa;
    opacity: 0.6;
}

/* Mejorar la visibilidad de las opciones en móvil */
@media (max-width: 576px) {
    .form-select option {
        padding: 10px;
        font-size: 16px;
    }
}