/* ===========================================
   directorium.css - Estilos propios de Directorium
   Overrides sobre la plantilla TownHub
   =========================================== */

/* --- Fix: icono de categoría centrado en el círculo rosa (tarjetas de empresas) --- */
.listing-item-category {
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===========================================
   CARDS DE EMPRESAS - Homogéneas y compactas
   =========================================== */

/* Grid uniforme para resultados de búsqueda */
.listing-item-container .container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
/* Bug real detectado con traza: .container trae el clearfix de Bootstrap
   (::before/::after con content:" "; display:table;) heredado de plugins.css.
   Al pasar el contenedor a grid, esos pseudo-elementos pasan a contar como
   celdas reales de la grilla: el ::before ocupa la primera posición (vacía)
   y corre todas las tarjetas un lugar. El clearfix no tiene sentido en un
   layout de grid (era para floats), así que se desactiva aca. */
.listing-item-container .container::before,
.listing-item-container .container::after {
    content: none;
    display: none;
}
@media (max-width: 992px) {
    .listing-item-container .container {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 576px) {
    .listing-item-container .container {
        grid-template-columns: 1fr;
    }
}

/* ── Página de búsqueda / sector: NO hay mapa ──
   El tema original deja .col-list-wrap como columna flotante sin anchura
   (la width:850px viene comentada) porque esperaba un mapa ocupando el resto.
   Sin mapa, ese float colapsa cuando hay pocos/0 resultados y la página se
   ve "en blanco". Forzamos que la lista ocupe todo el ancho. */
.col-list-wrap {
    width: 100% !important;
    float: none !important;
    min-height: auto !important;   /* el tema reservaba 100vh (hueco enorme con pocos resultados) */
    background: transparent !important;
}
.list-main-wrap-header {
    width: 100% !important;
}
/* Con pocos resultados, recortar el relleno inferior gigante del listado */
.listing-item-container {
    padding: 24px 0 24px !important;
    min-height: auto !important;
}
/* Estado vacío / error: que ocupe toda la fila del grid y quede centrado */
#results-grid-container > div[style*="text-align:center"],
.listing-item-container .container > div[style*="text-align:center"] {
    grid-column: 1 / -1;
}

/* ── Desplegables del buscador (Chosen): que NO queden cortados ── */
/* El tema recortaba el panel desplegable por overflow/z-index de los
   contenedores. Lo dejamos por encima y visible. */
.listsearch-input-wrap,
.listsearch-input-wrap .container,
.listsearch-input-wrap .main-search-input,
.list-main-wrap-header,
.header-search_container {
    overflow: visible !important;
}
.listsearch-input-wrap { position: relative; z-index: 200; }
.chosen-container { z-index: 210; }
.chosen-container .chosen-drop {
    z-index: 1002 !important;
    box-shadow: 0 12px 30px rgba(28,49,87,.18);
    border-radius: 0 0 10px 10px;
    border-color: #e6ecf5;
}
.chosen-container .chosen-results { max-height: 260px; }

/* ── Restyle de la barra de búsqueda de resultados (más moderna) ── */
.listsearch-input-wrap.lws_mobile {
    background: transparent !important;
    border-bottom: none !important;
    padding: 22px 0 8px !important;
}
.listsearch-input-wrap.lws_mobile .main-search-input {
    height: 60px;
    border-radius: 14px !important;
    border: 1px solid #e6ecf5 !important;
    box-shadow: 0 8px 24px rgba(28,49,87,.08) !important;
    padding-right: 168px;
}
.listsearch-input-wrap.lws_mobile .main-search-input-item {
    height: 58px;
    border-right: 1px solid #eef2f8;
    padding: 0 6px;
}
.listsearch-input-wrap.lws_mobile .main-search-input-item input { height: 58px; }
/* Alinear los selects Chosen con la altura/estilo del resto de la barra */
.listsearch-input-wrap .chosen-container { width: 100% !important; font-size: 14px; }
.listsearch-input-wrap .chosen-container-single .chosen-single {
    height: 58px;
    line-height: 58px;
    padding: 0 14px 0 38px;
    border: none;
    background: transparent;
    box-shadow: none;
    color: #4b5a72;
    border-radius: 0;
}
.listsearch-input-wrap .chosen-container-single .chosen-single span { margin-right: 22px; }
.listsearch-input-wrap.lws_mobile .main-search-button {
    height: 58px;
    width: 168px;
    border-radius: 0 14px 14px 0;
    letter-spacing: .3px;
}

/* Reset de propiedades del tema base que interfieren con el grid CSS */
.listing-item-container .listing-item {
    width: 100% !important;
    min-width: 0 !important; /* evita que el título con nowrap "reviente" la columna del grid (blowout) */
    float: none !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
}

/* Cards verticales: imagen arriba, contenido abajo */
.listing-item-container .geodir-category-listing {
    height: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.listing-item-container .geodir-category-img {
    float: none !important;
    width: 100% !important;
}
.listing-item-container .geodir-category-img-wrap {
    height: 200px !important;
    border-radius: 10px 10px 0 0;
}
.listing-item-container .geodir-category-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px !important;
    width: auto !important;
}
.listing-item-container .geodir-category-footer {
    border-top: 1px solid #f0f0f0;
    padding-top: 10px !important;
    margin-top: 12px !important;
}

/* Imagen de la card: tamaño fijo y recortada */
.geodir-category-img-wrap {
    display: block;
    height: 200px;
    overflow: hidden;
    position: relative;
}
.geodir-category-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}
.geodir-category-img-wrap:hover img {
    transform: scale(1.05);
}

/* Contenido de la card: compacto */
.geodir-category-content {
    padding: 15px !important;
}
.geodir-category-content-title-item h3 {
    font-size: 16px !important;
    margin-bottom: 5px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    float: none !important; /* el tema base flota el h3 (float:left), lo que con nowrap
                                le deja crecer al ancho del texto y anula el ellipsis */
    display: block;
    width: 100%;
}
.geodir-category-location {
    margin-top: 2px !important;
    font-size: 13px;
}
.geodir-category-footer {
    padding-top: 10px !important;
    margin-top: 10px !important;
    border-top: 1px solid #f0f0f0;
}

/* Card completa: sombra suave y bordes */
.geodir-category-listing {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    background: #fff;
    transition: box-shadow 0.3s ease;
}
.geodir-category-listing:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

/* Carrusel del home: altura uniforme para todas las slides */
.listing-slider .listing-item {
    margin-bottom: 0;
}
.listing-slider .swiper-slide {
    height: auto !important;
    display: flex;
    flex-direction: column;
}
.listing-slider .listing-slider-item {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.listing-slider .listing-item,
.listing-slider .listing_carditem,
.listing-slider .geodir-category-listing {
    height: 100%;
    display: flex;
    flex-direction: column;
}
/* Imagen del slider: altura fija uniforme */
.listing-slider .geodir-category-img {
    height: 220px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}
.listing-slider .geodir-category-img-wrap {
    height: 100% !important;
    display: block;
    cursor: pointer;
}
.listing-slider .geodir-category-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
/* Overlay de info sobre la imagen del slider */
.listing-slider .geodir-category-opt {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(30,40,80,0.92) 0%, rgba(30,40,80,0.5) 60%, transparent 100%);
    padding: 20px 15px 15px;
    color: #fff;
    pointer-events: none;
}
.listing-slider .geodir-category-opt_title h4 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.listing-slider .geodir-category-opt_title h4 a {
    color: #fff;
    text-decoration: none;
    pointer-events: auto;
}
.listing-slider .geodir-category-location a {
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    pointer-events: auto;
    margin-right: 10px;
}
.listing-slider .listing_carditem_footer {
    margin-top: 8px;
    pointer-events: auto;
}
.listing-slider .listing_carditem_footer .listing-item-category-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    pointer-events: auto;
}
.listing-slider .listing_carditem_footer .listing-item-category-wrap > span {
    top: 0;
}
.listing-slider .listing_carditem_footer .listing-item-category {
    flex-shrink: 0;
}
.listing-slider .listing_carditem_footer span {
    color: rgba(255,255,255,0.85);
    font-size: 12px;
}
/* Borde y sombra de card del slider */
.listing-slider .geodir-category-listing {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,0.15);
    background: #fff;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.listing-slider .geodir-category-listing:hover {
    box-shadow: 0 8px 28px rgba(0,0,0,0.22);
    transform: translateY(-2px);
}

/* ===========================================
   FICHA DETALLE - Eliminar espacio vacío
   =========================================== */

/* Reducir espacio entre secciones */
.list-single-main-item {
    margin-bottom: 15px !important;
    padding: 20px !important;
}

/* Si no hay descripción, no dejar espacio vacío */
.list-single-main-item_content:empty {
    display: none;
}
.list-single-main-item_content p:empty {
    display: none;
}

/* Sidebar más compacto */
.box-widget-item-header {
    padding: 12px 15px !important;
}
.box-widget-content {
    padding: 15px !important;
}

/* Imagen default: centrada con fondo gris suave */
.geodir-category-img-wrap img[src*="default_empresa"] {
    object-fit: contain;
    background: #f0f4f8;
    padding: 20px;
}

/* --- Fix: icono de lupa centrado en el botón de búsqueda del header --- */
.header-search_btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.header-search_btn i {
    margin: 0;
}

/* --- Grid para formularios (alta de empresa) --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 20px;
    width: 100%;
    float: left;
}
.form-grid .form-full {
    grid-column: 1 / -1;
}
.form-grid .form-third {
    grid-column: span 1;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

@media (max-width: 767px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Selects estilizados en formularios --- */
.form-grid select {
    float: left;
    border: 1px solid #e5e7f2;
    background: #f9f9f9;
    width: 100%;
    padding: 15px 20px;
    border-radius: 4px;
    color: #7d93b2;
    font-size: 12px;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    margin-bottom: 20px;
    font-family: 'Roboto';
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237d93b2' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    cursor: pointer;
}
.form-grid select:focus {
    background-color: #fff;
    box-shadow: 0px 10px 14px 0px rgba(12, 0, 46, 0.06);
}

/* --- Sección título dentro del formulario --- */
.form-section-title {
    grid-column: 1 / -1;
    text-align: left;
    padding: 15px 0 5px;
    margin-top: 10px;
    border-bottom: 1px solid #e5e7f2;
    margin-bottom: 15px;
}
.form-section-title h5 {
    color: #566985;
    font-size: 14px;
    font-weight: 600;
}
.form-section-title h5 i {
    margin-right: 8px;
    color: #7d93b2;
}

/* --- Botón de envío del formulario --- */
.form-grid .form-submit {
    grid-column: 1 / -1;
    padding-top: 15px;
}

/* ============================================================
   FORMULARIO DE ALTA — diseño simplificado
   ============================================================ */

/* Texto intro sobre el form */
.dir-alta-intro {
    font-size: 15px;
    color: #7d93b2;
    margin: 0 0 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eef1f8;
}
.dir-alta-form .form-grid {
    column-gap: 26px;
    row-gap: 24px;
}

/* Botón toggle "Añadir más detalles" */
.dir-alta-extras-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    margin: 24px 0 0;
    padding: 14px 20px;
    background: #f4f8ff;
    border: 1.5px dashed #b8d0f0;
    border-radius: 8px;
    color: #4DB7FE;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    text-align: left;
}
.dir-alta-extras-toggle:hover {
    background: #e8f3ff;
    border-color: #4DB7FE;
}
.dir-alta-extras-toggle i {
    font-size: 18px;
    flex-shrink: 0;
}

/* Contenedor colapsable de extras — altura controlada por JS */
.dir-alta-extras {
    overflow: hidden;
    height: auto;
    opacity: 1;
}
.dir-alta-extras .form-grid {
    padding-top: 20px;
    border-top: 1px solid #eef1f8;
    margin-top: 20px;
    column-gap: 26px;
    row-gap: 24px;
}

/* Estados compartidos por el alta y la edición. */
.dir-alta-extras[hidden],
.empresa-schedule [hidden],
.empresa-form-feedback[hidden] { display: none !important; }
.empresa-form-feedback,
.empresa-draft-note {
    clear: both;
    padding: 14px 18px;
    margin: 0 0 22px;
    border: 1px solid #e5e7f2;
    border-radius: 6px;
    background: #f9f9f9;
    color: #566985;
    line-height: 1.6;
    font-size: 14px;
}
.empresa-form-feedback.is-error {
    background: #fbe5d6;
    border-color: transparent;
    color: #c00000;
}
.campo-error {
    color: #c00000;
    font-size: 13px;
    line-height: 1.5;
    margin-top: 6px;
    flex-basis: 100%;
}
[data-empresa-form] [aria-invalid="true"] { border-color: #c00000 !important; }
[data-empresa-form] input:focus-visible,
[data-empresa-form] select:focus-visible,
[data-empresa-form] textarea:focus-visible,
[data-empresa-form] button:focus-visible {
    outline: 2px solid #4DB7FE;
    outline-offset: 3px;
}
[data-empresa-form] button:disabled { cursor: wait; opacity: .7; }
.empresa-field-help {
    margin: 8px 0 14px;
    color: #566985;
    line-height: 1.6;
    font-size: 14px;
}
.empresa-schedule-switch { display: flex !important; align-items: center; gap: 10px; }
.empresa-schedule-switch input { width: auto !important; margin: 0 !important; }
.empresa-schedule .hours-inputs { flex-wrap: wrap; }
.empresa-schedule .scheduler-day-row { flex-direction: row; text-align: left; }
.empresa-schedule .day-status { width: auto !important; float: none; margin: 0 0 0 auto !important; }
.empresa-schedule .day-status input { width: auto !important; margin: 0 !important; float: none; }
.empresa-schedule .day-closed .hours-inputs { display: none; }
.empresa-schedule .hours-slot {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: 6px;
    align-items: center;
    flex: 1 1 265px;
}
.empresa-schedule .hours-slot small { grid-column: 1 / -1; color: #566985; font-size: 12px; text-align: left; }
.empresa-schedule .hours-slot input[type="time"] { width: 100% !important; min-width: 0; height: 44px; padding: 6px 4px !important; float: none; box-sizing: border-box; }
.empresa-schedule .hours-slot .campo-error { grid-column: 1 / -1; }
.empresa-schedule .copy-hours-btn { width: 100%; font-family: inherit; min-height: 44px; }
.empresa-steps {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0 auto 30px;
}
.empresa-steps li { display: flex; gap: 9px; align-items: center; color: #7d93b2; font-size: 14px; }
.empresa-steps li > span { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid #e5e7f2; border-radius: 50%; }
.empresa-steps .is-current { color: #384F95; }
.empresa-steps .is-current > span { background: #f9f9f9; border-color: #4DB7FE; }
.empresa-steps [aria-current="step"] { font-weight: 700; }
@media (max-width: 768px) {
    [data-empresa-form] input:not([type="checkbox"]):not([type="hidden"]),
    [data-empresa-form] select,
    [data-empresa-form] textarea { font-size: 16px !important; }
    .empresa-schedule .scheduler-day-row { flex-wrap: wrap; }
    .empresa-schedule .scheduler-day-row > .hours-inputs { flex: 0 0 100%; width: 100%; order: 3; }
    .empresa-steps { gap: 12px; justify-content: flex-start; }
    .empresa-steps li { font-size: 13px; }
    .empresa-schedule .day-status { min-height: 44px; margin-left: auto; }
}
.dir-alta-form .form-grid > div {
    padding: 2px 0;
}
.dir-alta-form .form-grid input[type="text"],
.dir-alta-form .form-grid input[type="email"],
.dir-alta-form .form-grid input[type="number"],
.dir-alta-form .form-grid select,
.dir-alta-form .form-grid textarea {
    padding: 17px 20px;
}
.dir-alta-field-help {
    display: block;
    margin: 8px 0 2px;
    color: #7d93b2;
    font-size: 12px;
    line-height: 1.35;
}

/* Bloque de envío */
.dir-alta-submit {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid #eef1f8;
    text-align: center;
}
.dir-alta-btn {
    width: auto !important;
    padding: 16px 44px !important;
    font-size: 16px !important;
    border-radius: 6px !important;
}
.dir-alta-legal-note {
    margin-top: 14px;
    font-size: 12px;
    color: #aab5c8;
}
.dir-alta-legal-note i {
    margin-right: 4px;
}

/* ===========================================
   LEGIBILIDAD Y CONSISTENCIA DEL FORMULARIO
   (alta-empresa / editar-empresa)
   =========================================== */

/* Labels: el tema los deja en #878C9F (muy claro y cuesta leerlos) */
.custom-form label {
    color: #3a4a63 !important;
    font-size: 13.5px;
    font-weight: 600;
}

/* Texto escrito y valores de selects: más oscuro y un punto más grande */
.custom-form input[type="text"],
.custom-form input[type="email"],
.custom-form input[type="password"],
.custom-form input[type="number"],
.custom-form textarea,
.form-grid select {
    color: #2d3c55 !important;
    font-size: 13.5px !important;
}

/* En el formulario de alta los inputs NO llevan icono dentro,
   así que quitamos el sangrado de 45px que el tema reserva para él */
.form-grid input[type="text"],
.form-grid input[type="email"],
.form-grid input[type="password"],
.form-grid input[type="number"] {
    padding-left: 20px !important;
}

/* El campo numérico (Año de inicio) no heredaba el estilo de los inputs de
   texto del tema, por eso se veía estrecho y descolocado. Lo igualamos. */
.custom-form input[type="number"] {
    float: left;
    border: 1px solid #e5e7f2;
    background: #f9f9f9;
    width: 100%;
    padding: 15px 20px;
    border-radius: 4px;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
    margin-bottom: 20px;
}
.custom-form input[type="number"]:focus {
    background: #fff;
    box-shadow: 0px 10px 14px 0px rgba(12, 0, 46, 0.06);
}

/* ===========================================
   SUBIDOR DE IMAGEN + LOGO (alta y editar)
   Reemplaza el layout flex que se descuadraba en PC
   =========================================== */
.dir-img-uploader {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 6px 0 10px;
    width: 100%;
}
@media (max-width: 767px) {
    .dir-img-uploader { grid-template-columns: 1fr; }
}
.dir-img-card {
    border: 1px solid #e6ecf5;
    border-radius: 14px;
    padding: 18px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(28,49,87,.05);
    text-align: center;
}
.dir-img-card h4 {
    font-size: 14px;
    font-weight: 700;
    color: #3a4a63;
    margin: 0 0 4px;
}
.dir-img-card .dir-img-hint {
    font-size: 11.5px;
    color: #9aa7bd;
    margin: 0 0 14px;
    line-height: 1.5;
}
.dir-img-preview {
    width: 100%;
    height: 160px;
    border-radius: 10px;
    border: 1px dashed #d4ddec;
    background-color: #f7f9fc;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b7c2d6;
    font-size: 34px;
    margin-bottom: 14px;
    overflow: hidden;
}
.dir-img-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dir-img-preview.is-logo { background-color: #fff; }
.dir-img-preview.is-logo img { object-fit: contain; padding: 12px; }

/* Botón "Seleccionar archivo" homogéneo (oculta el input feo del navegador) */
/* Nota: es un <label>, así que subimos especificidad (.dir-img-card ...) para
   ganar a las reglas del tema (.custom-form label { width:100%; float:left }
   y .custom-form label i { position:absolute } que superponían el icono). */
.dir-img-card .dir-img-filebtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto !important;
    float: none !important;
    padding: 10px 18px;
    border-radius: 8px;
    background: #eef5ff;
    color: #2b97e0;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
    text-align: center;
}
.dir-img-card .dir-img-filebtn i {
    position: static !important;
    top: auto !important;
    left: auto !important;
    padding-right: 0 !important;
    font-size: 14px;
}
.dir-img-filebtn:hover { background: #dcecff; }
.dir-img-filebtn input[type="file"] {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    border: 0;
}
.dir-img-filename {
    display: block;
    font-size: 11px;
    color: #7d93b2;
    margin-top: 8px;
    min-height: 14px;
    word-break: break-all;
}
.dir-img-capture {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e6ecf5;
}
.dir-img-capture .btn { float: none !important; margin: 0 !important; }

/* --- Mensajes de notificación --- */
.form-notification {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    width: 100%;
    float: left;
}
.form-notification.success {
    background: #e2efda;
    color: #548235;
}
.form-notification.error {
    background: #fbe5d6;
    color: #c00000;
}

/* --- Bloque de aviso (no logueado, sin resultados) --- */
.info-block {
    text-align: center;
    padding: 60px 0;
}
.info-block h3 {
    margin-bottom: 15px;
    color: #566985;
}
.info-block p {
    color: #7d93b2;
    margin-bottom: 25px;
}

/* --- Fix: botón usuario en header cuando hay sesión activa --- */
#logged {
    cursor: pointer;
}

/* --- Iconos del hero quick-search: fondo circular semitransparente --- */
.hero-categories li a i {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    transition: background 0.25s, border-color 0.25s;
    font-size: 22px !important;
}
.hero-categories li a:hover i {
    background: rgba(255, 255, 255, 0.30) !important;
    border-color: rgba(255, 255, 255, 0.6);
}

/* --- Fix: ocultar texto fantasma de fondo en secciones (plantilla TownHub) --- */
.section-title .section-subtitle {
    display: none;
}

/* --- Fix: horario - quitar / suelta al final --- */
.opening-hours li span:last-child {
    text-align: right;
}

/* --- Tabla de información en ficha de empresa --- */
.detalle-tabla {
    width: 100%;
    border-collapse: collapse;
}
.detalle-tabla tr {
    border-bottom: 1px solid #f0f0f0;
}
.detalle-tabla tr:last-child {
    border-bottom: none;
}
.detalle-tabla td {
    padding: 12px 8px;
    font-size: 14px;
    vertical-align: top;
}
.detalle-label {
    color: #7d93b2;
    white-space: nowrap;
    width: 160px;
    font-weight: 500;
}
.detalle-label i {
    color: #4DB7FE;
    width: 22px;
    text-align: center;
    margin-right: 8px;
}
.detalle-valor {
    color: #566985;
    font-weight: 600;
}

/* --- Responsive: tabla de detalle en móvil --- */
@media (max-width: 767px) {
    .detalle-label {
        width: auto;
        display: block;
        padding-bottom: 2px;
    }
    .detalle-valor {
        display: block;
        padding-top: 0;
    }
}

/* ===========================================
   MEJORAS GLOBALES DE UX
   =========================================== */

/* Tipografía base más limpia y legible */
body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* FIX OPACIDAD: asegurar que #main sea visible tras loader */
#main {
    opacity: 1 !important;
    transition: opacity 0.3s ease;
}
/* Loader: ocultar tras animación de forma fiable */
.loader-wrap {
    transition: opacity 0.4s ease;
}

/* Contraste mejorado para texto sobre fondo oscuro */
.hero-section h1,
.hero-section h2,
.hero-section p,
.parallax-section h1,
.parallax-section h2,
.parallax-section p,
.section-title h2 span {
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Overlay más oscuro en hero para mejor contraste */
.hero-section .overlay,
.parallax-section .overlay {
    background: rgba(0,0,0,0.45) !important;
}

/* Links del menú: hover claro */
.main-menu a:hover,
.nav-holder .main-menu a:hover {
    color: #4DB7FE !important;
    transition: color 0.2s ease;
}

/* Botones: respuesta con sombra, sin desplazamiento */
.btn,
.btn.color2-bg,
a.btn {
    border-radius: 6px !important;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: box-shadow 180ms ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px !important;
}
.btn:hover,
.btn.color2-bg:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
/* El tema posiciona los iconos de botón en absolute (right:20px) para un
   efecto de círculo deslizante, pero con nuestros botones inline-flex eso
   hacía que el icono se superpusiera al texto (se veía "raro"). Lo dejamos
   fluir en línea con el texto. */
.btn i {
    position: static !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    top: auto !important;
    right: auto !important;
    line-height: inherit !important;
}
.btn:hover i {
    right: auto !important;
    box-shadow: none !important;
}

/* Iconografía consistente: solo usar fa-light (fal) */
.fal, .fas, .far {
    font-family: 'Font Awesome 5 Pro' !important;
}

/* Espaciado uniforme entre secciones — compacto */
section {
    padding: 30px 0 !important;
}
section + section {
    padding-top: 10px !important;
}
/* Respiración vertical entre secciones del homepage */
#wrapper .content > section,
#wrapper .content > div > section {
    padding-top: 70px;
    padding-bottom: 70px;
}
/* Slider de empresas: el tema ya añade padding propio, ajustamos sin exceso */
.slw-sec {
    padding-top: 60px !important;
    padding-bottom: 60px !important;
}
/* Sectores: mantener el ritmo pero sin exceso bajo el hero */
#sec-sectores {
    padding-top: 70px;
    padding-bottom: 60px;
}
/* CTA ya tiene su padding propio (90px), no duplicar */
.dir-cta-section {
    margin: 0;
}
@media (max-width: 768px) {
    #wrapper .content > section,
    #wrapper .content > div > section {
        padding-top: 50px;
        padding-bottom: 50px;
    }
    .slw-sec {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }
}

/* Contenedores con padding mínimo para evitar texto pegado a bordes */
.container {
    padding-left: 15px;
    padding-right: 15px;
}

/* ===========================================
   BREADCRUMBS - Saber dónde estás
   =========================================== */
.breadcrumbs,
.dir-breadcrumb {
    font-size: 13px;
    color: #7d93b2;
    padding: 10px 0;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}
.breadcrumbs a,
.dir-breadcrumb a {
    color: #4DB7FE;
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumbs a:hover,
.dir-breadcrumb a:hover {
    color: #2590d8;
    text-decoration: underline;
}
.breadcrumbs span,
.dir-breadcrumb span.current {
    color: #566985;
    font-weight: 600;
}
.dir-breadcrumb .sep {
    color: #bcc8d8;
    font-size: 12px;
}

/* Indicador de página activa en menú de navegación */
.main-menu a.act-link {
    color: #4DB7FE !important;
    font-weight: 700;
}
.main-menu a.act-link::after {
    content: '';
    display: block;
    height: 2px;
    background: #4DB7FE;
    border-radius: 2px;
    margin-top: 2px;
}

/* Cabecera de resultados: título + filtros activos */
.list-main-wrap-header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}
.list-main-wrap-title h2 {
    top: 0;
    font-size: 20px;
    font-weight: 700;
    color: #384F95;
    margin: 4px 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.list-main-wrap-title h2 #results-count {
    font-size: 14px;
    color: #7d93b2;
    font-weight: 400;
}
.dir-active-filters-wrap {
    clear: both;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    margin-top: 10px;
}
.dir-active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.dir-filter-pill {
    background: #eef7ff;
    border: 1px solid #c8e8ff;
    color: #2590d8;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 22px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 40px;
    text-decoration: none;
}
.dir-filter-pill:focus-visible { outline: 2px solid #4DB7FE; outline-offset: 3px; }
.dir-filter-pill:hover { border-color: #4DB7FE; }
.dir-search-state { grid-column: 1 / -1; }
.clear-filters {
    color: #4b5a72;
    background: #f4f7fb;
    border: 1px solid #dde7f0;
    border-radius: 22px;
    padding: 8px 14px;
    font-size: 13px;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.clear-filters:hover {
    background: #eef7ff;
    border-color: #c8e8ff;
    color: #2573ad;
}

/* --- Grid de tarjetas de sector (reemplaza pills) --- */
.dir-sector-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr)) !important;
    gap: 16px !important;
    padding: 10px 0;
    float: none !important;
    width: 100% !important;
}
.dir-sector-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center;
    padding: 28px 12px 22px !important;
    background: #fff !important;
    border: 1px solid #e8edf5 !important;
    border-radius: 14px;
    color: #566985 !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    line-height: 1.3;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    float: none !important;
    width: auto !important;
}
.dir-sector-card:hover {
    border-color: #4DB7FE !important;
    color: #4DB7FE !important;
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(77,183,254,0.15) !important;
    text-decoration: none !important;
}
.dir-sector-card-icon {
    width: 62px !important;
    height: 62px !important;
    border-radius: 50%;
    background: linear-gradient(135deg, #e8f4ff 0%, #cce8ff 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 auto 14px !important;
    font-size: 24px !important;
    color: #4DB7FE !important;
    transition: all 0.25s ease;
    float: none !important;
}
.dir-sector-card:hover .dir-sector-card-icon {
    background: linear-gradient(135deg, #4DB7FE 0%, #1a7bd0 100%) !important;
    color: #fff !important;
}

/* --- Barra de estadísticas bajo el hero --- */
.dir-stats-bar {
    background: #fff;
    border-bottom: 1px solid #eef1f8;
    padding: 0;
    overflow: hidden;
}
.dir-stats-wrap {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;
    float: none !important;
}
.dir-stat {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    padding: 22px 48px;
    gap: 2px;
    float: none !important;
}
.dir-stat-num {
    font-size: 28px !important;
    font-weight: 800;
    color: #2c3e68;
    line-height: 1;
    display: block !important;
}
.dir-stat-label {
    font-size: 12px;
    color: #96a7be;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    display: block !important;
}
.dir-stat-sep {
    width: 1px;
    background: #eef1f8;
    margin: 16px 0;
    align-self: stretch;
    float: none !important;
}
@media (max-width: 767px) {
    .dir-stat { padding: 16px 22px; }
    .dir-stat-num { font-size: 22px !important; }
    .dir-stat-sep { display: none !important; }
    .dir-sector-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)) !important; gap: 10px !important; }
    .dir-sector-card { padding: 18px 8px 14px !important; }
    .dir-sector-card-icon { width: 50px !important; height: 50px !important; font-size: 20px !important; }
}

/* --- Sección "Cómo funciona" con iconos visibles --- */
.process-wrap ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    list-style: none;
    padding: 0;
    align-items: start;
}
@media (max-width: 992px) {
    .process-wrap ul {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}
/* Reset base-theme width:33.3% que en un grid cell resulta en ~11% del contenedor */
.process-wrap ul li {
    width: 100% !important;
    float: none !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    text-align: center;
}
.process-item {
    background: #f9fbff;
    border: 1px solid #e1e8f2;
    border-radius: 14px;
    padding: 28px 18px;
    text-align: center;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}
.process-count {
    display: block;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    margin: 0 auto 16px !important;
    width: 50px !important;
    height: 50px !important;
    line-height: 50px !important;
    text-align: center !important;
    border-radius: 50% !important;
    background: #fff !important;
    border: 2px solid #e1e8f2 !important;
    color: #4DB7FE !important;
    font-size: 18px !important;
    font-weight: 800 !important;
    box-shadow: 0 8px 18px rgba(77,183,254,0.16) !important;
}
.process-item .time-line-icon {
    position: relative !important;
    margin-bottom: 15px !important;
    width: 70px !important;
    height: 70px !important;
    border-radius: 50% !important;
    background: transparent !important;
    background-image: none !important;
    color: #4DB7FE !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: 2px solid #4DB7FE !important;
    font-size: 0 !important;
}
.process-item .time-line-icon i {
    font-size: 28px !important;
    color: #4DB7FE !important;
}
.process-item h4 {
    font-size: 16px;
    font-weight: 700;
    color: #566985;
    margin-bottom: 10px;
}
.process-item p {
    font-size: 13px;
    color: #7d93b2;
    line-height: 1.7;
}
.pr-dec {
    display: none;
}
.process-end {
    text-align: center;
    margin-top: 30px;
}
.process-end i {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #27ae60;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

/* --- Paginación de resultados --- */
.dir-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #e1e8f2;
    border-radius: 6px;
    background: #fff;
    color: #566985;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}
.dir-page-btn:hover {
    border-color: #4DB7FE;
    color: #4DB7FE;
}
.dir-page-btn--active {
    background: #384F95;
    border-color: #384F95;
    color: #fff;
    cursor: default;
}
.dir-page-btn--active:hover {
    background: #384F95;
    color: #fff;
}

/* --- Dropdowns del buscador: respaldo si chosen-select no carga --- */
.main-search-input-item select {
    width: 100%;
    height: 50px;
    border: none;
    background: #fff;
    color: #566985;
    font-size: 14px;
    padding: 0 15px;
    appearance: auto;
    cursor: pointer;
}

/* ===========================================
   FIX CRÍTICO: Barra de búsqueda en buscar.php
   TownHub oculta .lws_mobile por defecto con display:none
   Forzar visibilidad y layout horizontal en desktop
   =========================================== */
.listsearch-input-wrap.lws_mobile {
    display: block !important;
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 14px 0;
}
.listsearch-input-wrap.lws_mobile .main-search-input {
    display: flex !important;
    align-items: center;
    flex-wrap: nowrap;
    gap: 0;
    padding-right: 170px;
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border: 1px solid #e1e8f2;
    overflow: hidden;
}
.listsearch-input-wrap.lws_mobile .main-search-input-item {
    float: none !important;
    width: auto !important;
    flex: 1;
    border-right: 1px solid #eee;
    height: 52px;
    display: flex;
    align-items: center;
    padding: 0 5px;
    min-width: 0;
    position: relative;
}
.listsearch-input-wrap.lws_mobile .main-search-input-item:last-of-type {
    border-right: none;
}
.listsearch-input-wrap.lws_mobile .main-search-input-item input {
    height: 52px;
    border: none;
    width: 100%;
    padding-left: 36px;
    font-size: 14px;
    color: #4b5a72;
    background: transparent;
    outline: none;
}
.listsearch-input-wrap.lws_mobile .main-search-input-item label {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    color: #7d93b2;
    font-size: 14px;
}
.listsearch-input-wrap.lws_mobile .main-search-input-item select {
    height: 52px;
    border: none;
    font-size: 13px;
    color: #4b5a72;
    background: transparent;
    -webkit-appearance: none;
       -moz-appearance: none;
            appearance: none;
}
.listsearch-input-wrap.lws_mobile .main-search-input-item select::-ms-expand {
    display: none;
}
.listsearch-input-wrap.lws_mobile .main-search-button {
    position: absolute;
    right: 0;
    top: 0;
    height: 52px;
    width: 170px;
    border: none;
    border-radius: 0 8px 8px 0;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
@media (max-width: 768px) {
    .listsearch-input-wrap.lws_mobile .main-search-input {
        flex-wrap: wrap;
        height: auto;
        padding: 0;
        border-radius: 8px;
    }
    .listsearch-input-wrap.lws_mobile .main-search-input-item {
        flex: 1 1 100%;
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    .listsearch-input-wrap.lws_mobile .main-search-button {
        position: static;
        width: 100%;
        border-radius: 0 0 8px 8px;
        height: 48px;
    }
}

/* --- Carrusel de empresas: fix tamaño (sin ancho fijo que choca con slidesPerView) --- */
.listing-slider .swiper-slide {
    max-width: 90vw;
    height: auto;
}

/* --- Autocomplete dropdown --- */
.dir-search-field { position: relative; }
.autocomplete-dropdown[hidden] { display: none !important; }
.dir-search-status { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e1e8f2;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 9999;
    max-height: 250px;
    overflow-y: auto;
}

/* --- Items del buscador predictivo (autocompletado) --- */
.autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f3f9;
    transition: background 0.15s ease;
}
.autocomplete-item:last-child { border-bottom: none; }
.autocomplete-item:hover,
.autocomplete-item.ac-active {
    background: #f5f8fd;
}
.autocomplete-item .ac-img {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
}
.autocomplete-item .ac-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.autocomplete-item .ac-nombre {
    font-size: 13px;
    font-weight: 600;
    color: #273044;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.autocomplete-item .ac-nombre strong { color: #4DB7FE; font-weight: 700; }
.autocomplete-item .ac-ciudad {
    font-size: 11px;
    color: #7d93b2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.autocomplete-item .ac-ciudad i { margin-right: 3px; }
.autocomplete-item .ac-arrow {
    flex-shrink: 0;
    font-size: 12px;
    color: #c2cde0;
}

/* --- Estado vacío y "ver todos" --- */
.autocomplete-empty {
    padding: 14px 12px;
    font-size: 13px;
    color: #7d93b2;
    text-align: center;
}
.autocomplete-empty i { margin-right: 6px; }
.autocomplete-empty.is-error { color: #c00000; }
.autocomplete-viewall {
    display: block;
    padding: 10px 12px;
    font-size: 12px;
    color: #4DB7FE;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border-top: 1px solid #f0f3f9;
    background: #f9fbff;
}
.autocomplete-viewall:hover, .autocomplete-viewall.ac-active { background: #f0f6ff; }
.autocomplete-viewall i { margin-right: 5px; }

/* --- Skeleton (loading) del autocompletado --- */
.ac-skeleton-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
}
.ac-skeleton-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.skeleton {
    background: linear-gradient(90deg, #eef1f7 25%, #e2e7f0 37%, #eef1f7 63%);
    background-size: 400% 100%;
    animation: skeleton-loading 1.4s ease infinite;
    border-radius: 4px;
}
.skeleton-img {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 6px;
}
.skeleton-text { height: 10px; }
.skeleton-text.short { height: 9px; }
@keyframes skeleton-loading {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

/* --- Ficha de empresa: barra de stats (Desde / Empleados / Ámbito) --- */
/* justify-content:center evita que, cuando solo hay 1 stat presente (los otros
   dos campos son opcionales y suelen faltar), el bloque se estire a lo ancho de
   toda la tarjeta dejando una caja enorme casi vacía. */
.detalle-stats-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    border: 1px solid #e1e8f2;
    border-radius: 6px;
    overflow: hidden;
}
/* El contenedor flex es de bloque y se estira al 100% del padre por defecto,
   asi que aunque el item interno ya este centrado y acotado, el borde/fondo
   de la fila seguia ocupando todo el ancho cuando hay un solo stat. Con
   :has() lo encogemos al contenido solo en ese caso. */
.detalle-stats-row:has(> .detalle-stat:only-child) {
    width: fit-content;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.detalle-stat {
    flex: 1 1 200px;
    max-width: 240px;
    text-align: center;
    padding: 18px 12px;
    background: #f9fbff;
}
.detalle-stat:not(:last-child) {
    border-right: 1px solid #e1e8f2;
}
.detalle-stat-numero {
    font-size: 22px;
    font-weight: 700;
    color: #273044;
    line-height: 1.2;
}
.detalle-stat-label {
    font-size: 12px;
    color: #7d93b2;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ===========================================
   RESPONSIVE MÓVIL
   =========================================== */

@media (max-width: 768px) {

    /* --- Secciones más compactas en móvil --- */
    section {
        padding: 25px 0 !important;
    }

    /* --- Botones mínimo 44px para ser tocables --- */
    .btn,
    .btn.color2-bg,
    a.btn {
        min-height: 44px;
        min-width: 44px;
        font-size: 14px;
    }

    /* --- Botones de acción en detalle: scroll horizontal --- */
    .detalle-acciones {
        overflow-x: auto;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }
    .detalle-accion {
        white-space: nowrap;
        padding: 8px 14px !important;
        font-size: 12px !important;
        flex-shrink: 0;
    }

    /* --- Ficha detalle: columnas a una sola --- */
    .detalle-stat {
        padding: 10px 8px !important;
    }
    .detalle-stat-numero {
        font-size: 18px !important;
    }

    /* --- Mapa más pequeño en móvil --- */
    .mapa-container iframe {
        height: 200px !important;
    }

    /* --- Sectores: pills más compactos --- */
    .listing-filters.gallery-filters {
        gap: 6px;
        padding: 5px 0;
    }
    .listing-filters .gallery-filter {
        padding: 8px 16px;
        font-size: 12px;
    }

    /* --- Carrusel: ancho completo en móvil --- */
    .listing-slider .swiper-slide {
        width: 85vw !important;
    }

    /* --- Mi Perfil: card empresa vinculada --- */
    .list-single-main-item_content > div[style*="display:flex"] {
        flex-direction: column;
        text-align: center;
    }

    /* --- Horario en sidebar: texto más pequeño --- */
    .horario-lista li {
        font-size: 12px !important;
    }

    /* --- Propietario box --- */
    .propietario-box {
        margin-top: 10px !important;
        padding: 14px !important;
    }

    /* --- Editor de horarios en editar empresa --- */
    .scheduler-day-row {
        flex-direction: column;
        gap: 8px;
    }
    .scheduler-day-row .day-label {
        min-width: auto;
    }
    .scheduler-day-row .hours-inputs {
        flex-wrap: wrap;
        gap: 4px;
    }
    .scheduler-day-row .hours-inputs input[type="time"] {
        width: 80px;
        font-size: 12px;
    }

    /* --- Menú móvil: agregar Mi Perfil --- */
    .nav-holder.main-menu ul li a[href="/mi-perfil.php"] {
        display: block;
    }
}

/* --- Perfil: usa los bloques, formularios y botones del tema Directorium --- */
.dir-profile { text-align: left; }
.dir-profile-hero .section-title h1 { float: left; width: 100%; color: #fff; font-family: 'Raleway', sans-serif; font-size: 32px; font-weight: 800; line-height: 1.3; }
.dir-profile-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 24px; }
.dir-profile-heading h2 { color: #566985; font-size: 20px; font-weight: 600; margin-bottom: 8px; }
.dir-profile p { font-size: 13px; line-height: 1.7; color: #7d93b2; margin: 0 0 14px; }
.dir-profile-layout { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2fr); gap: 30px; align-items: start; }
.dir-profile-layout > * { min-width: 0; }
.dir-profile-layout > main { grid-column: 2; grid-row: 1; }
.dir-profile-layout > aside { grid-column: 1; grid-row: 1; }
.dir-profile .dir-profile-panel { float: none; display: flow-root; width: auto; padding: 0 !important; margin: 0 0 24px; }
.dir-profile-panel > .list-single-main-item_content { float: none; display: flow-root; width: auto; box-sizing: border-box; }
.dir-profile .list-single-main-item-title, .dir-profile .box-widget-item-header { margin-bottom: 12px; text-align: left; }
.dir-profile .list-single-main-item-title h2, .dir-profile .box-widget-item-header h2 { color: #566985; font-size: 16px; font-weight: 600; margin: 0; line-height: 1.5; }
.dir-profile-panel-heading { display: flex; align-items: center; justify-content: flex-start; gap: 12px; }
.dir-profile-count { font-size: 13px; color: #7d93b2; }
.dir-profile .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 12px 24px; border: 0; font-family: inherit; line-height: 1.5; text-align: center; }
.dir-profile-heading .btn { padding-right: 50px; }
.dir-profile-text-button { display: inline-block; min-height: 44px; background: transparent; border: 0; padding: 10px 0; color: #566985; font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.dir-profile button:disabled { opacity: .65; cursor: default; }
.dir-profile button:focus-visible, .dir-profile a:focus-visible, .dir-profile input:focus-visible { outline: 2px solid #4DB7FE; outline-offset: 3px; }
.dir-profile-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; clear: both; }
.dir-profile .dir-profile-actions .btn { margin-top: 0; }
.dir-profile-company { display: flex; gap: 18px; align-items: center; padding: 20px 0; border-bottom: 1px solid #eee; }
.dir-profile-company:first-child { padding-top: 0; }
.dir-profile-company:last-child { border-bottom: 0; padding-bottom: 0; }
.dir-profile-company > img { width: 76px; height: 76px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }
.dir-profile-company-info { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.dir-profile-company-info h3, .dir-profile-notice h3 { color: #566985; font-size: 16px; font-weight: 600; margin: 8px 0; }
.dir-profile-company-actions { display: flex; flex-direction: column; gap: 10px; text-align: center; font-size: 12px; flex-shrink: 0; }
.dir-profile-company-actions > a:not(.btn) { color: #384F95; }
.dir-profile-badge { display: inline-block; font-size: 12px; font-weight: 500; color: #384F95; }
.dir-profile-empty { padding: 10px 0 0; }
.dir-profile-notice, .dir-profile-feedback { clear: both; padding: 15px 20px; margin-bottom: 20px; background: #f9f9f9; border: 1px solid #e5e7f2; border-radius: 6px; color: #566985; font-size: 13px; line-height: 1.7; overflow-wrap: anywhere; }
.dir-profile-notice.is-error, .dir-profile-feedback.is-error { background: #fbe5d6; color: #c00000; border-color: transparent; }
.dir-profile-feedback > a { margin-top: 12px; }
.dir-profile-email { overflow-wrap: anywhere; }
.dir-profile .dir-profile-form { float: none; display: flow-root; width: 100%; margin: 20px 0 0; }
.dir-profile-form label { margin-bottom: 10px; }
.dir-profile-form input[type="text"], .dir-profile-form input[type="email"] { box-sizing: border-box; padding: 15px 20px; font-family: inherit; }
.dir-profile-form > p { clear: both; }
.dir-profile-form input[aria-invalid="true"] { border-color: #c00000; }
.dir-profile .dir-profile-help { font-size: 12px; color: #7d93b2; }
.dir-profile-form input.dir-profile-code { max-width: 280px; letter-spacing: .18em; font-size: 22px; }
.dir-profile-form input.dir-profile-code::placeholder { font-size: 20px; }
.dir-profile-resend { clear: both; border-top: 1px solid #eee; margin-top: 24px; padding-top: 20px; }
.dir-profile [hidden] { display: none !important; }
.dir-profile-dialog { width: min(520px, calc(100vw - 32px)); box-sizing: border-box; margin: auto; border: 1px solid #e5e7f2; border-radius: 10px; padding: 30px; color: #566985; z-index: 9999; }
.dir-profile-dialog h2 { color: #566985; font-size: 18px; font-weight: 600; margin-bottom: 18px; }
.dir-profile-dialog::backdrop { background: rgba(0, 0, 0, .7); }
@media (max-width: 991px) {
    .dir-profile-layout { grid-template-columns: minmax(0, 1fr); }
    .dir-profile-layout > main { grid-column: 1; grid-row: 1; }
    .dir-profile-layout > aside { grid-column: 1; grid-row: 2; }
    .dir-profile-heading { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 550px) {
    .dir-profile-panel > .list-single-main-item_content { padding: 10px 20px 24px; }
    .dir-profile .list-single-main-item-title, .dir-profile .box-widget-item-header { padding: 18px 20px; }
    .dir-profile-company { flex-wrap: wrap; gap: 12px; }
    .dir-profile-company-info { flex-basis: calc(100% - 100px); }
    .dir-profile-company-actions { flex-direction: row; flex-wrap: wrap; align-items: center; width: 100%; }
    .dir-profile-actions { align-items: stretch; flex-direction: column; }
    .dir-profile-actions > * { width: 100%; }
    .dir-profile-form input[type="text"], .dir-profile-form input[type="email"] { font-size: 16px; }
}

/* --- Scheduler estilos base (alta y editar empresa) --- */
.scheduler-container {
    border: 1px solid #e5e7f2;
    border-radius: 6px;
    padding: 15px;
    background: #f9fbff;
}
.scheduler-day-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}
.scheduler-day-row:last-of-type {
    border-bottom: none;
}
.scheduler-day-row .day-label {
    font-weight: 600;
    color: #566985;
    font-size: 13px;
    min-width: 90px;
    text-transform: capitalize;
}
.scheduler-day-row .hours-inputs {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
}
.scheduler-day-row .hours-inputs input[type="time"] {
    padding: 6px 8px;
    border: 1px solid #e1e8f2;
    border-radius: 4px;
    font-size: 13px;
    color: #566985;
}
.scheduler-day-row .hours-sep {
    color: #7d93b2;
    font-size: 12px;
}
.scheduler-day-row .day-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #27ae60;
    cursor: pointer;
}
.scheduler-day-row.day-closed .hours-inputs {
    opacity: 0.3;
    pointer-events: none;
}
.scheduler-day-row.day-closed .day-status span {
    color: #e74c3c;
}
.copy-hours-btn {
    text-align: center;
    margin-top: 12px;
    padding: 10px;
    background: #fff;
    border: 1px dashed #4DB7FE;
    border-radius: 4px;
    color: #4DB7FE;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.copy-hours-btn:hover {
    background: #f0f8ff;
}

/* ===========================================
   PÁGINA 404
   =========================================== */
.dir-404-wrap {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}
.dir-404-inner {
    text-align: center;
    max-width: 520px;
}
.dir-404-number {
    font-size: 120px;
    font-weight: 800;
    line-height: 1;
    color: #e1e8f2;
    letter-spacing: -6px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #384F95, #4DB7FE);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.dir-404-title {
    font-size: 26px;
    font-weight: 700;
    color: #384F95;
    margin: 0 0 14px;
}
.dir-404-text {
    font-size: 15px;
    color: #7d93b2;
    line-height: 1.7;
    margin: 0 0 36px;
}
.dir-404-actions {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.dir-404-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: box-shadow 180ms ease;
}
.dir-404-btn:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.dir-404-btn--primary {
    background: linear-gradient(135deg, #384F95, #4DB7FE);
    color: #fff;
}
.dir-404-btn--secondary {
    background: #f4f7fd;
    color: #384F95;
    border: 1px solid #d6e0f0;
}
.dir-404-btn--secondary:hover { color: #384F95; }

/* ===========================================
   CTA SECTION - Registrar empresa
   =========================================== */
.dir-cta-section {
    position: relative;
    padding: 90px 0;
    background: linear-gradient(135deg, #1a2f72 0%, #384F95 45%, #4a9fd4 100%);
    overflow: hidden;
    text-align: center;
}

/* Formas decorativas de fondo */
.dir-cta-shape {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}
.dir-cta-shape--1 {
    width: 500px; height: 500px;
    top: -180px; left: -120px;
    background: rgba(255,255,255,0.05);
}
.dir-cta-shape--2 {
    width: 320px; height: 320px;
    bottom: -120px; right: -80px;
    background: rgba(255,255,255,0.06);
}
.dir-cta-shape--3 {
    width: 160px; height: 160px;
    top: 30px; right: 15%;
    background: rgba(255,255,255,0.04);
}

.dir-cta-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dir-cta-icon-wrap {
    width: 76px; height: 76px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: #fff;
    margin-bottom: 28px;
    backdrop-filter: blur(4px);
}

.dir-cta-title {
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 14px;
    max-width: 620px;
    line-height: 1.25;
    letter-spacing: -0.3px;
}

.dir-cta-subtitle {
    color: rgba(255,255,255,0.8);
    font-size: 16px;
    margin: 0 0 36px;
    max-width: 500px;
    line-height: 1.6;
}

.dir-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 38px;
    background: #fff;
    color: #384F95;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 180ms ease;
    margin-bottom: 28px;
    letter-spacing: 0.2px;
}
.dir-cta-btn:hover {
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

.dir-cta-trust {
    display: flex;
    gap: 28px;
    color: rgba(255,255,255,0.65);
    font-size: 13px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
    padding: 0;
}
.dir-cta-trust li {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
}
.dir-cta-trust li i {
    color: #7dd3fc;
    font-size: 12px;
}

@media (max-width: 768px) {
    .dir-cta-section { padding: 70px 0; }
    .dir-cta-title { font-size: 26px; }
    .dir-cta-subtitle { font-size: 15px; }
}
@media (max-width: 480px) {
    .dir-cta-title { font-size: 22px; }
    .dir-cta-trust { gap: 14px; font-size: 12px; }
    .dir-cta-btn { padding: 14px 28px; font-size: 15px; }
}
