/* ============================================
   ESTILO CSS - SEREX CARGO
   Color principal: #C6E3F5 (CMYK 20,7,0,2)
   ============================================ */

/* RESET Y CONFIGURACIÓN BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333333;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #FFFFFF;
}

/* HEADER - hdr000 */
#hdr000 {
    background: #C6E3F5;
    color: #333333;
    height: 10vh;
    min-height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* NAVEGACIÓN - nav000 */
#nav000 {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* LOGO */
.logo-container {
    flex: 0 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
}

.logo-image {
    height: 45px;
    width: auto;
    object-fit: contain;
}

/* MENÚ PRINCIPAL - mnu000 */
#mnu000 {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
    height: 100%;
}

/* ITEMS DEL MENÚ */
.mnu-item {
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

/* ENLACES DEL MENÚ - VERSIÓN CORREGIDA */
.mnu-link {
    color: #333333 !important;
    text-decoration: none !important;
    font-weight: bold;
    padding: 0 1.5rem;
    white-space: nowrap;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
    font-size: 0.95rem;
    position: relative;
    min-width: 100px;
    text-align: center;
    background: transparent !important;
}

/* HOVER - ROJO TRANSLÚCIDO, TEXTO BLANCO */
.mnu-link:hover {
    color: #FFFFFF !important;
}

.mnu-link:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(139, 0, 0, 0.7);
    z-index: 1;
}

/* ACTIVE/SELECCIONADO - ROJO SÓLIDO, TEXTO BLANCO */
.mnu-link.active {
    color: #FFFFFF !important;
}

.mnu-link.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #8B0000;
    z-index: 1;
}

/* EL TEXTO SOBRE EL FONDO */
.mnu-link span {
    position: relative;
    z-index: 2;
}

/* TOGGLE MENÚ MÓVIL - tgl000 */
#tgl000 {
    display: none;
    flex-direction: column;
    cursor: pointer;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}

.tgl-bar {
    width: 25px;
    height: 3px;
    background: #333333;
    margin: 3px 0;
    transition: 0.3s;
}

/* CONTENIDO PRINCIPAL - crp000 */
#crp000 {
    flex: 1;
    margin-top: 10vh;
    margin-bottom: 15vh;
    overflow-y: auto;
    height: 75vh;
    background: #F0F9FF;
    position: relative;
}

/* CONTENEDOR DE PÁGINA - pgc000 */
#pgc000 {
    min-height: 100%;
}

/* CONTENIDO DE BIENVENIDA TEMPORAL */
.welcome-section {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #C6E3F5 0%, #A8D4F0 100%);
    color: #333333;
    text-align: center;
    padding: 2rem;
}

.welcome-content {
    max-width: 800px;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid rgba(198, 227, 245, 0.3);
}

#h1-001 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #8B0000;
}

#p001 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #333333;
}

#p002 {
    font-size: 1rem;
    margin-bottom: 2rem;
    color: #666666;
}

/* BOTÓN PRIMARIO */
.btn-primary {
    background: #8B0000;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary:hover {
    background: #A00000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: #C6E3F5;
    color: #333333;
    border: none;
    padding: 12px 30px;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.btn-secondary:hover {
    background: #A8D4F0;
    transform: translateY(-2px);
}

/* FOOTER - ftr000 - ROJO CARMÍN CON LETRAS BLANCAS */
#ftr000 {
    background: #8B0000;
    color: #FFFFFF;
    height: 15vh;
    min-height: 80px;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding-top: 1rem;
}

.ftr-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    height: calc(100% - 40px);
}

.ftr-section {
    flex: 1;
    padding: 0 1rem;
    min-width: 200px;
}

.ftr-section h3 {
    color: #FFFFFF;
    margin-bottom: 0.5rem;
    font-size: 1rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 0.3rem;
}

.ftr-section p {
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    color: #FFFFFF;
    opacity: 0.9;
}

.ftr-link {
    color: #FFFFFF !important;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 0.3rem;
    opacity: 0.9;
}

.ftr-link:hover {
    color: #C6E3F5 !important;
    text-decoration: underline;
    opacity: 1;
}

/* SECCIÓN DERECHOS */
.ftr-bottom {
    background: rgba(102, 0, 0, 0.8);
    text-align: center;
    padding: 0.5rem;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#p008 {
    font-size: 0.8rem;
    color: #FFFFFF;
    opacity: 0.9;
    margin: 0;
}

/* CONTENIDO CARGADO (por jva000) */
#ctc000 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    background: #FFFFFF;
    min-height: 100%;
    box-shadow: 0 0 10px rgba(198, 227, 245, 0.2);
}

/* SCROLLBAR PERSONALIZADO */
#crp000::-webkit-scrollbar {
    width: 10px;
}

#crp000::-webkit-scrollbar-track {
    background: #F0F9FF;
    border-radius: 5px;
}

#crp000::-webkit-scrollbar-thumb {
    background: #C6E3F5;
    border-radius: 5px;
}

#crp000::-webkit-scrollbar-thumb:hover {
    background: #A8D4F0;
}

/* ============================================
   ESTILOS PARA CONTENIDO CARGADO
   ============================================ */

/* Contenedores generales */
.form-container, .contact-container, .confirmation-container {
    background: #FFFFFF;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(198, 227, 245, 0.3);
    margin-bottom: 2rem;
    border: 1px solid #E8F4FD;
}

.content-text {
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.content-text p {
    margin-bottom: 1rem;
    color: #333333;
}

/* Tablas */
.data-table, .quote-table, .contact-table, .rates-table, .form-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: #FFFFFF;
    box-shadow: 0 2px 5px rgba(198, 227, 245, 0.2);
}

.data-table th, .quote-table th, .contact-table th, 
.rates-table th, .form-table th {
    background: #C6E3F5;
    color: #333333;
    padding: 0.75rem;
    text-align: left;
    font-weight: bold;
    border: 1px solid #A8D4F0;
}

.data-table td, .quote-table td, .contact-table td, 
.rates-table td, .form-table td {
    padding: 0.75rem;
    border: 1px solid #E8F4FD;
    color: #333333;
}

.data-table tr:nth-child(even), 
.quote-table tr:nth-child(even),
.rates-table tbody tr:nth-child(even),
.form-table tr:nth-child(even) {
    background: #F8FCFF;
}

.data-table tr:hover, 
.quote-table tr:hover,
.contact-table tr:hover,
.rates-table tbody tr:hover,
.form-table tr:hover {
    background: #F0F9FF;
}

/* Formularios */
.form-table input, .form-table select, .form-table textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #C6E3F5;
    border-radius: 4px;
    font-size: 1rem;
    background: #FFFFFF;
}

.form-table input:focus, .form-table select:focus, .form-table textarea:focus {
    outline: none;
    border-color: #8B0000;
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.1);
}

.form-table textarea {
    min-height: 80px;
    resize: vertical;
}

/* Notas */
.note {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
    margin: 0.5rem 0;
    padding-left: 1rem;
    border-left: 3px solid #C6E3F5;
}

/* Mensajes */
.message-box {
    padding: 1rem;
    border-radius: 5px;
    margin: 1.5rem 0;
}

.message-box.success {
    background: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

.message-box.error {
    background: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

/* Secciones de contacto */
.contact-section {
    margin-bottom: 2rem;
}

.contact-section h2 {
    color: #8B0000;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #C6E3F5;
}

/* Instrucciones y detalles */
.instructions {
    background: #F8FCFF;
    padding: 1.5rem;
    border-radius: 5px;
    border-left: 4px solid #C6E3F5;
    margin: 1.5rem 0;
}

.instructions h3 {
    color: #333333;
    margin-bottom: 1rem;
}

.instructions ul {
    padding-left: 1.5rem;
}

.instructions li {
    margin-bottom: 0.5rem;
    color: #555555;
}

.confirmation-details {
    background: #FFFFFF;
    padding: 1.5rem;
    border-radius: 5px;
    border: 1px solid #C6E3F5;
}

/* Contenedor de tablas */
.table-container {
    overflow-x: auto;
    margin: 2rem 0;
}

/* Encabezados en contenido cargado */
#ctc000 h1 {
    color: #8B0000;
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #C6E3F5;
}

#ctc000 h2 {
    color: #333333;
    font-size: 1.8rem;
    margin: 1.5rem 0 1rem 0;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid #E8F4FD;
}

#ctc000 h3 {
    color: #333333;
    font-size: 1.5rem;
    margin: 1.2rem 0 0.8rem 0;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    #hdr000 {
        height: 8vh;
        min-height: 55px;
    }
    
    #crp000 {
        margin-top: 8vh;
        margin-bottom: 15vh;
        height: 77vh;
    }
    
    #tgl000 {
        display: flex;
    }
    
    #mnu000 {
        position: fixed;
        left: -100%;
        top: 8vh;
        flex-direction: column;
        background: #C6E3F5;
        width: 100%;
        height: calc(100vh - 8vh);
        transition: 0.3s;
        padding-top: 1rem;
        overflow-y: auto;
        z-index: 999;
        gap: 0;
    }
    
    #mnu000.active {
        left: 0;
    }
    
    .mnu-item {
        height: 60px;
        width: 100%;
        border-bottom: 1px solid rgba(51, 51, 51, 0.1);
    }
    
    .mnu-link {
        width: 100%;
        justify-content: center;
        padding: 0 2rem;
        font-size: 1rem;
        color: #333333 !important;
        min-width: auto;
    }
    
    /* Ajustes hover/active para móvil */
    .mnu-link:hover::before,
    .mnu-link.active::before {
        background: #8B0000;
    }
    
    .mnu-link:hover,
    .mnu-link.active {
        color: #FFFFFF !important;
    }
    
    .ftr-container {
        flex-direction: column;
        height: auto;
        padding: 1rem 20px;
    }
    
    .ftr-section {
        width: 100%;
        margin-bottom: 1.5rem;
        padding: 0;
        text-align: center;
    }
    
    .ftr-section h3 {
        font-size: 1.1rem;
    }
    
    .welcome-content {
        padding: 1.5rem;
    }
    
    #h1-001 {
        font-size: 2rem;
    }
    
    #p001 {
        font-size: 1.1rem;
    }
    
    .form-container, .contact-container, .confirmation-container {
        padding: 1rem;
    }
    
    .form-table, .data-table, .quote-table, .contact-table, .rates-table {
        font-size: 0.9rem;
    }
    
    .form-table th, 
    .form-table td,
    .data-table th,
    .data-table td,
    .quote-table th,
    .quote-table td {
        padding: 0.5rem;
    }
    
    .logo-image {
        height: 35px;
    }
}

@media (max-width: 480px) {
    #hdr000 {
        height: 7vh;
        min-height: 50px;
    }
    
    #crp000 {
        margin-top: 7vh;
        margin-bottom: 15vh;
        height: 78vh;
    }
    
    #mnu000 {
        top: 7vh;
        height: calc(100vh - 7vh);
    }
    
    .mnu-item {
        height: 55px;
    }
    
    .logo-image {
        height: 30px;
    }
    
    .welcome-section {
        padding: 1rem;
    }
    
    .welcome-content {
        padding: 1rem;
    }
    
    #h1-001 {
        font-size: 1.8rem;
    }
    
    .btn-primary, .btn-secondary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    #ftr000 {
        height: 20vh;
        min-height: 100px;
    }
}

/* Añadir al final del archivo estilo.css */

/* Estilos para loading y error */
.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.error {
    text-align: center;
    padding: 2rem;
    color: #F44336;
    background: #F8D7DA;
    border-radius: 5px;
    border: 1px solid #F5C6CB;
}

/* Result container para tracking */
.result-container {
    padding: 1rem;
    background: #F8FCFF;
    border-radius: 5px;
    border: 1px solid #C6E3F5;
    margin-top: 1rem;
}

.result-info {
    padding: 1.5rem;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.result-info h4 {
    color: #8B0000;
    margin-bottom: 1rem;
    border-bottom: 2px solid #C6E3F5;
    padding-bottom: 0.5rem;
}

.tracking-details {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #F0F9FF;
    border-radius: 5px;
    border-left: 4px solid #8B0000;
}

.tracking-details p {
    margin-bottom: 0.5rem;
}

.tracking-details strong {
    color: #333;
    min-width: 200px;
    display: inline-block;
}

/* Notificaciones */
.notification {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    padding: 15px 20px !important;
    border-radius: 5px !important;
    color: white !important;
    z-index: 9999 !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15) !important;
    max-width: 400px !important;
}

.notification.success {
    background: #4CAF50 !important;
}

.notification.error {
    background: #F44336 !important;
}

.notification.info {
    background: #2196F3 !important;
}

/* Estilos para resultados de tracking */
.tracking-result {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-top: 1rem;
}

.package-info, .tracking-history, .no-history {
    padding: 1.5rem;
}

.package-info h4, .tracking-history h4 {
    color: #8B0000;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #C6E3F5;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.info-table th {
    text-align: left;
    width: 150px;
    padding: 0.5rem;
    color: #333;
    font-weight: normal;
    background: #F8FCFF;
}

.info-table td {
    padding: 0.5rem;
    border-bottom: 1px solid #E8F4FD;
}

.status {
    background: #C6E3F5;
    color: #333;
    padding: 0.25rem 0.5rem;
    border-radius: 3px;
    font-weight: bold;
}

.history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.history-table thead {
    background: #8B0000;
    color: white;
}

.history-table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: bold;
}

.history-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #E8F4FD;
}

.history-table tr:nth-child(even) {
    background: #F8FCFF;
}

.history-table tr:hover {
    background: #F0F9FF;
}

.error-message {
    background: #F8D7DA;
    color: #721C24;
    padding: 1.5rem;
    border-radius: 5px;
    border: 1px solid #F5C6CB;
    text-align: center;
}

.error-message h4 {
    color: #721C24;
    margin-bottom: 1rem;
}

.loading {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

.no-history {
    text-align: center;
    padding: 2rem;
    color: #666;
    background: #F8FCFF;
    border-radius: 5px;
    border: 1px dashed #C6E3F5;
}