﻿/* Estilos específicos para la sección de oficinas Serpost */
.serpost-locator {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Segoe UI', Arial, sans-serif;
}

.serpost-title {
    text-align: center;
    margin-bottom: 25px;
}

.serpost-title h1 {
    color: #1a2962;
    font-size: 32px;
    margin-bottom: 5px;
    font-weight: 600;
}

.serpost-title p {
    color: #6c757d;
    font-size: 18px;
    margin: 0 auto;
}

/* Barra de búsqueda mejorada - MÁS GRANDE */
.serpost-search {
    margin: 0 auto 15px;
    max-width: 900px;
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 50px;
    transition: all 0.3s ease;
}

.serpost-search input {
    width: 100%;
    padding: 20px 140px 20px 25px;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    font-size: 17px;
    transition: all 0.3s ease;
}

.serpost-search input:focus {
    outline: none;
    border-color: #1a2962;
    box-shadow: 0 0 0 3px rgba(26, 41, 98, 0.1);
}

.serpost-search button {
    position: absolute;
    right: 8px;
    top: 8px;
    background-color: #e41e26;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-weight: 500;
    font-size: 16px;
}

.serpost-search button .material-icons {
    margin-right: 8px;
}

/* Sección de oficinas */
.serpost-offices h2 {
    color: #1a2962;
    font-size: 24px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
}

.serpost-office-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Tarjeta de oficina OPTIMIZADA */
.serpost-office-card {
    background-color: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.serpost-office-card:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
}

.serpost-office-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background-color: #1a2962;
    color: #ffffff;
}

.serpost-office-title {
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

/* Se ha eliminado el apartado "Abierto ahora" (reglas de .serpost-status) */

/* Sección del cuerpo de la tarjeta */
.serpost-office-body {
    padding: 15px 20px;
}

/* Contenedor principal de información - MÁS COMPACTO */
.serpost-info-container {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 15px;
    align-items: start;
}

/* Columna izquierda con dirección y horarios */
.serpost-info-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Sección de dirección */
.serpost-address {
    display: flex;
    align-items: flex-start;
}

.serpost-address .material-icons {
    color: #e41e26;
    margin-right: 10px;
    min-width: 24px;
    margin-top: 2px;
}

.serpost-address p {
    color: #333;
    line-height: 1.4;
    margin: 0;
    font-size: 14px;
}

/* Sección de horarios */
.serpost-hours {
    display: flex;
    align-items: flex-start;
}

.serpost-hours .material-icons {
    color: #e41e26;
    margin-right: 10px;
    min-width: 24px;
    margin-top: 2px;
}

.serpost-hours-details {
    color: #333;
    line-height: 1.4;
}

.serpost-hours-details p {
    margin: 0 0 3px 0;
    font-size: 14px;
}

/* Botón "Más información" - POSICIÓN MEJORADA */
.serpost-more-info-btn {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    color: #1a2962;
    border-radius: 6px;
    padding: 8px 15px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    height: fit-content;
}

.serpost-more-info-btn .material-icons {
    margin-right: 5px;
    font-size: 18px;
    transition: transform 0.3s ease;
}

.serpost-more-info-btn:hover {
    background-color: #e9ecef;
}

.serpost-more-info-btn.active .material-icons {
    transform: rotate(180deg);
}

/* Información adicional (expandible) - REDISEÑADA similar a la imagen */
.serpost-additional-info {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-top: 0;
    grid-column: 1 / -1;
}

.serpost-additional-info.show {
    max-height: 350px;
    opacity: 1;
    margin-top: 15px;
    padding: 20px;
}

/* Contenido de la información expandible - REDISEÑADO */
.serpost-details-grid {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) 2fr;
    gap: 20px;
}

/* Sección de información de contacto - ESTILO ACTUALIZADO */
.serpost-contact-section {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e1e1e1;
}

.serpost-contact-section h4 {
    color: #e41e26;
    font-size: 16px;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
}

.serpost-contact-section h4 .material-icons {
    margin-right: 8px;
    font-size: 20px;
}

.serpost-contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    padding: 8px 10px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.serpost-contact-item:hover {
    background-color: #f8f9fa;
}

.serpost-contact-item:last-child {
    margin-bottom: 0;
}

.serpost-contact-item .material-icons {
    color: #e41e26;
    margin-right: 10px;
    font-size: 22px;
}

.serpost-contact-item a {
    color: #333;
    text-decoration: none;
    font-size: 15px;
}

.serpost-contact-item a:hover {
    color: #e41e26;
}

/* Sección del mapa - AMPLIADA */
.serpost-map-section {
    background-color: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e1e1e1;
}

.serpost-map-section h4 {
    color: #e41e26;
    font-size: 16px;
    margin: 0 0 15px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
}

.serpost-map-section h4 .material-icons {
    margin-right: 8px;
    font-size: 20px;
}

.serpost-map-container {
    height: 200px;
    background-color: #f0f0f0;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.serpost-map-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    background-color: #f0f0f0;
    z-index: 1;
}

.serpost-map-placeholder .material-icons {
    margin-right: 8px;
    font-size: 24px;
    color: #e41e26;
}

.serpost-map-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.serpost-map-view-link {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: #1a2962;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.serpost-map-view-link:hover {
    color: #e41e26;
}

/* Paginación */
.serpost-pagination {
    display: flex;
    justify-content: center;
    margin-top: 30px;
    gap: 5px;
}

.serpost-pagination a {
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    color: #1a2962;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 6px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.serpost-pagination a.active {
    background-color: #1a2962;
    color: white;
    border-color: #1a2962;
}

/* Diseño responsivo */
@media (max-width: 900px) {
    .serpost-details-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .serpost-office-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .serpost-info-container {
        grid-template-columns: 1fr;
    }

    .serpost-more-info-btn {
        width: 100%;
        justify-content: center;
        margin-top: 10px;
    }
}

/* Estilos para los tabs */
.serpost-tabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    margin: 20px 0;
}

.serpost-tab-btn {
    padding: 12px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
    cursor: pointer;
    transition: all 0.2s ease;
}

.serpost-tab-btn:hover {
    color: #1a2962;
}

.serpost-tab-btn.active {
    color: #1a2962;
    border-bottom: 2px solid #e41e26;
}

/* Contenido de los tabs */
.serpost-tab-content {
    position: relative;
}

.serpost-tab-pane {
    display: none;
}

.serpost-tab-pane.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Etiqueta para servicios restringidos */
.serpost-tag {
    background-color: #ffb23f;
    color: #333;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
    text-transform: uppercase;
}

/* Mensaje de no resultados */
.serpost-no-results {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    color: #6c757d;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

/* Mensaje de error */
.serpost-error {
    text-align: center;
    padding: 20px;
    font-size: 16px;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    margin: 20px 0;
}

/* Mejoras de accesibilidad - enfoque visible */
.serpost-tab-btn:focus,
.serpost-more-info-btn:focus,
.serpost-search input:focus,
.serpost-search button:focus {
    outline: none;
}

/* Mejoras para dispositivos móviles */
@media (max-width: 768px) {
    .serpost-tabs {
        flex-wrap: wrap;
    }
    
    .serpost-tab-btn {
        flex: 1;
        text-align: center;
        padding: 10px;
        font-size: 14px;
    }
    
    .serpost-details-grid {
        grid-template-columns: 1fr;
    }
    
    .serpost-search input {
        padding: 15px 120px 15px 15px;
        font-size: 15px;
    }
    
    .serpost-search button {
        padding: 8px 15px;
        font-size: 14px;
    }
}

.serpost-whatsapp-info {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6c757d;
    margin-top: 5px;
}

.serpost-whatsapp-info .material-icons {
    font-size: 18px;
}
    
.autocomplete-items {
    position: absolute;
    background-color: white;
    border: none; /* Eliminar el borde */
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Mantener sombra para un diseño limpio */
    margin-top: 5px;
}

.autocomplete-item {
    padding: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background-color 0.2s ease;
}

.autocomplete-item:hover {
    background-color: #f0f0f0;
}

.autocomplete-item:active {
    background-color: #e9ecef;
}

.autocomplete-item.active {
    background-color: #e9ecef; /* Color de fondo para la opción activa */
    color: #1a2962; /* Color del texto para la opción activa */
}