:root {
    /* --- Palette Modern --- */
    --vt-color-primary: #1F2C54;       /* Accent Color */
    --vt-color-primary-hover: #16203c;
    --vt-color-secondary: #64748b;     /* Slate 500 */
    --vt-color-bg: #f8fafc;            /* Slate 50 */
    --vt-color-surface: #ffffff;       /* White */
    --vt-color-border: #e2e8f0;        /* Slate 200 */
    --vt-color-text: #1e293b;          /* Slate 800 */
    --vt-color-text-muted: #94a3b8;    /* Slate 400 */
    --vt-color-success: #10b981;       /* Emerald 500 */
    --vt-color-danger: #ef4444;        /* Red 500 */
    --vt-color-warning: #f59e0b;       /* Amber 500 */

    /* --- Spacing & Radius --- */
    --vt-radius-sm: 0.375rem;
    --vt-radius-md: 0.75rem;       /* 12px */
    --vt-radius-lg: 1rem;          /* 16px */
    --vt-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --vt-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --vt-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --vt-shadow-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.vt-filters-wrapper, .vt-listado-wrapper, .vt-quick-search-wrapper {
    box-sizing: border-box;
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--vt-color-text);
    line-height: 1.5;
}
.vt-filters-wrapper *, .vt-listado-wrapper *, .vt-quick-search-wrapper * { box-sizing: border-box; }

/* --- 1. FILTROS --- */
.vt-filters-wrapper {
    background: var(--vt-color-surface);
    border: 1px solid var(--vt-color-border);
    border-radius: var(--vt-radius-lg);
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--vt-shadow-md);
}

.vt-filters-form .vt-filter-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    align-items: flex-end;
}

.vt-filters-form .vt-filter-item {
    flex: 1 1 200px;
    display: flex;
    flex-direction: column;
}
.vt-filters-form .vt-filter-item.vt-filter-keyword { flex: 2 1 300px; }

.vt-filters-form label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--vt-color-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.05em;
}

.vt-filters-form input, .vt-filters-form select {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--vt-color-border);
    border-radius: var(--vt-radius-md);
    background-color: var(--vt-color-bg);
    font-size: 0.95rem;
    color: var(--vt-color-text);
    transition: all 0.2s ease;
}
.vt-filters-form input:focus, .vt-filters-form select:focus {
    border-color: var(--vt-color-primary);
    background-color: var(--vt-color-surface);
    box-shadow: 0 0 0 3px rgba(31, 44, 84, 0.1); /* Accent color with opacity */
    outline: none;
}

.vt-filters-form .vt-filter-range .range-inputs {
    display: flex;
    align-items: center;
    gap: 10px;
}

.vt-filter-actions {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--vt-color-border);
    text-align: right;
}

.vt-filter-button-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--vt-color-secondary);
    background-color: var(--vt-color-bg);
    border-radius: var(--vt-radius-md);
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid var(--vt-color-border);
}
.vt-filter-button-clear:hover {
    background-color: #e2e8f0;
    color: var(--vt-color-text);
    border-color: #cbd5e1;
}

/* --- 2. GRID --- */
#vt-listado-container { position: relative; transition: opacity 0.3s; }

.vt-listado-summary {
    font-size: 0.95rem;
    color: var(--vt-color-secondary);
    margin-bottom: 30px;
    border-bottom: 1px solid var(--vt-color-border);
    padding-bottom: 15px;
}

.vt-listado-empresas-wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 30px;
}

/* --- 3. CARD --- */
.vt-empresa-card {
    background: var(--vt-color-surface);
    border: 1px solid var(--vt-color-border);
    border-radius: var(--vt-radius-lg);
    overflow: hidden;
    box-shadow: var(--vt-shadow-sm);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
}

.vt-empresa-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--vt-shadow-hover);
    border-color: #cbd5e0;
}

.vt-card-link-wrapper {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.vt-card-image-wrapper {
    position: relative;
    height: 240px;
    background-color: #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid var(--vt-color-border);
}

.vt-card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Changed to cover for better look */
    transition: transform 0.5s ease;
}
.vt-empresa-card:hover .vt-card-image-wrapper img { transform: scale(1.05); }

.vt-card-badges-top {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
    z-index: 2;
}
.vt-badge-ref {
    background: rgba(31, 44, 84, 0.9); /* Primary color with opacity */
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: var(--vt-radius-sm);
    backdrop-filter: blur(4px);
}
.vt-badge-destacado {
    background: var(--vt-color-warning);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: var(--vt-radius-sm);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.vt-card-badge-status {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: var(--vt-color-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.vt-card-body {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.vt-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--vt-color-primary);
    margin: 0 0 10px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
}

.vt-card-meta-location {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--vt-color-secondary);
    margin-bottom: 15px;
}
.vt-card-meta-location .dashicons { font-size: 16px; width: 16px; height: 16px; color: var(--vt-color-text-muted); }

.vt-card-excerpt {
    font-size: 0.9rem;
    color: var(--vt-color-text);
    margin-bottom: 20px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.vt-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto; /* Push to bottom of body */
}
.vt-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.02em;
}
.vt-tag-sector { background-color: #eff6ff; color: #1d4ed8; }
.vt-tag-activity { background-color: #f5f3ff; color: #7c3aed; }
.vt-tag-surface { background-color: var(--vt-color-bg); color: var(--vt-color-secondary); border: 1px solid var(--vt-color-border); }

.vt-card-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--vt-color-border);
    background-color: #fafafa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.vt-price-block .price-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--vt-color-text-muted);
    font-weight: 700;
    margin-bottom: 2px;
    display: block;
}
.vt-price-block .price-value.main {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--vt-color-primary);
}
.vt-price-block .price-value.sub {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--vt-color-secondary);
    text-align: right;
}

/* --- PAGINACIÓN --- */
.vt-pagination-wrapper { margin-top: 50px; display: flex; justify-content: center; }
.vt-pagination { list-style: none; padding: 0; margin: 0; display: flex; gap: 8px; }
.vt-pagination-item .page-numbers {
    display: flex; align-items: center; justify-content: center;
    min-width: 40px; height: 40px;
    background: var(--vt-color-surface); 
    border: 1px solid var(--vt-color-border);
    color: var(--vt-color-secondary); 
    text-decoration: none;
    border-radius: var(--vt-radius-md); 
    font-weight: 600;
    transition: all 0.2s;
}
.vt-pagination-item .page-numbers:hover, .vt-pagination-item .page-numbers.current {
    background: var(--vt-color-primary); 
    color: #fff; 
    border-color: var(--vt-color-primary);
    box-shadow: 0 4px 6px -1px rgba(31, 44, 84, 0.3);
}

@media (max-width: 1024px) {
    .vt-listado-empresas-wrapper { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .vt-listado-empresas-wrapper { grid-template-columns: 1fr; }
    .vt-filters-form .vt-filter-group { flex-direction: column; align-items: stretch; }
    .vt-filters-form .vt-filter-item { flex-basis: auto; }
}

/* Colores de estado */
.vt-card-badge-status.status-publicado { background: var(--vt-color-primary); }
.vt-card-badge-status.status-traspasado { background: var(--vt-color-danger); }
.vt-card-badge-status.status-cerrado { background: var(--vt-color-secondary); }


/* --- SECCIÓN 4: HOME LISTINGS (Fichas por Sector en Pestañas) --- */
.vt-home-listings-wrapper {
    background-color: var(--vt-color-bg);
    padding: 80px 20px;
    position: relative;
}
.vt-home-listings-container {
    max-width: 1200px;
    margin: 0 auto;
}

.vt-hl-tab-switcher {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 50px;
    border-bottom: 0;
    padding-bottom: 0;
    flex-wrap: wrap;
}

.vt-hl-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--vt-color-secondary);
    background: var(--vt-color-surface);
    border: 1px solid var(--vt-color-border);
    border-radius: 30px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: var(--vt-shadow-sm);
}

.vt-hl-tab:hover {
    background-color: #fff;
    color: var(--vt-color-primary);
    transform: translateY(-2px);
    box-shadow: var(--vt-shadow-md);
}

.vt-hl-tab.active {
    background-color: var(--vt-color-primary);
    color: #ffffff;
    border-color: var(--vt-color-primary);
    box-shadow: 0 4px 12px rgba(31, 44, 84, 0.3);
}
.vt-hl-tab::after { display: none; } /* Remove old underline style */

.vt-hl-content-area {
    margin-top: 30px;
}

.vt-hl-tab-content { display: none; animation: fadeIn 0.5s ease; }
.vt-hl-tab-content.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Ajuste responsive para las pestañas de la home */
@media (max-width: 768px) {
    .vt-hl-tab-switcher {
        gap: 10px;
    }
    .vt-hl-tab {
        font-size: 0.9rem;
        padding: 10px 20px;
        flex: 1 1 auto;
    }
    .vt-home-listings-wrapper { padding: 50px 15px; }
}

/* --- RESET --- */
.vt-quick-search-wrapper {
    box-sizing: border-box;
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--vt-color-text);
    line-height: 1.5;
}
.vt-quick-search-wrapper * { box-sizing: border-box; }

/* --- BUSCADOR RÁPIDO --- */
.vt-quick-search-wrapper {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    width: 100%;
    position: relative;
    z-index: 10;
}

.vt-quick-search-container {
    background: var(--vt-color-surface);
    border-radius: var(--vt-radius-lg);
    box-shadow: var(--vt-shadow-lg);
    padding: 40px;
    max-width: 1100px;
    width: 100%;
    border: 1px solid rgba(255,255,255,0.5);
    backdrop-filter: blur(10px);
}

/* --- PESTAÑAS (ESTILO OUTLINE AZUL) --- */
.vt-qs-tab-switcher {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--vt-color-border);
}

.vt-qs-tab {
    display: inline-block;
    padding: 10px 25px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--vt-color-primary);
    border: 2px solid var(--vt-color-primary);
    background: transparent;
    border-radius: 30px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
    outline: none;
}

.vt-qs-tab:hover {
    background-color: #ebf8ff;
    transform: translateY(-1px);
}

.vt-qs-tab.active {
    background-color: var(--vt-color-primary);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(31, 44, 84, 0.3);
}

/* --- FORMULARIO --- */
.vt-quick-search-form { position: relative; min-height: 80px; }

.vt-qs-fields-container {
    display: none;
    width: 100%;
    align-items: flex-end;
    gap: 20px;
}
.vt-qs-fields-container.active { display: flex; flex-wrap: wrap; }

/* Items */
.vt-qs-item { flex: 1 1 200px; position: relative; }
.vt-qs-item label {
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    color: var(--vt-color-secondary); margin-bottom: 8px; display: flex; align-items: center; letter-spacing: 0.05em;
}
.vt-qs-item label .dashicons {
    font-size: 16px; width: 16px; height: 16px; color: var(--vt-color-primary); margin-right: 6px;
}

/* SELECTORES */
.custom-select-wrapper { position: relative; width: 100%; }
.custom-select-wrapper .hidden-select { display: none !important; visibility: hidden !important; }

.custom-select-display {
    background-color: var(--vt-color-bg);
    border: 1px solid var(--vt-color-border);
    border-radius: var(--vt-radius-md);
    padding: 0 15px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--vt-color-text);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
}
.custom-select-display::after {
    content: '\f140'; font-family: 'dashicons'; font-size: 18px; color: var(--vt-color-text-muted); flex-shrink: 0; margin-left: 10px;
}
.custom-select-wrapper.open .custom-select-display {
    border-color: var(--vt-color-primary); background-color: #fff; box-shadow: 0 0 0 3px rgba(31, 44, 84, 0.1);
}

.custom-select-options {
    display: none; position: absolute; top: calc(100% + 5px); left: 0; right: 0;
    background: #fff; border: 1px solid var(--vt-color-border); border-radius: var(--vt-radius-md);
    box-shadow: var(--vt-shadow-lg); z-index: 100;
    max-height: 300px; overflow-y: auto; padding: 5px;
}
.custom-select-option {
    padding: 12px 15px; font-size: 0.9rem; color: var(--vt-color-text); border-radius: var(--vt-radius-sm); cursor: pointer; transition: background 0.1s;
}
.custom-select-option:hover { background-color: #eff6ff; color: var(--vt-color-primary); }

/* Botón Buscar */
.vt-qs-action { flex: 0 0 auto; }
.vt-qs-button {
    background: linear-gradient(135deg, #2563eb 0%, #1F2C54 100%);
    color: #fff; border: none; border-radius: var(--vt-radius-md); height: 52px; width: 60px;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s; box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
    margin-top: 25px;
}
.vt-qs-button:hover { transform: translateY(-2px); box-shadow: 0 10px 25px rgba(37, 99, 235, 0.5); }
.vt-qs-button .dashicons { font-size: 26px; width: 26px; height: 26px; color: #fff; }

@media (max-width: 768px) {
    .vt-quick-search-container { padding: 25px 20px; }
    .vt-qs-tab-switcher { flex-direction: row; overflow-x: auto; padding-bottom: 10px; }
    .vt-qs-tab { white-space: nowrap; font-size: 0.9rem; padding: 8px 15px; }
    .vt-qs-fields-container { flex-direction: column; align-items: stretch; gap: 15px; }
    .vt-qs-item { width: 100%; }
    .vt-qs-button { width: 100%; margin-top: 10px; }
}

/* =========================================
   SECCIÓN 5: FICHA INDIVIDUAL (EMPRESA / EMPRENDEDOR)
   ========================================= */

.vt-ficha-container {
    width: 100%;
    background: var(--vt-color-surface);
    border-radius: var(--vt-radius-lg);
    box-shadow: var(--vt-shadow-lg);
    overflow: hidden;
    border: 1px solid var(--vt-color-border);
    margin-bottom: 30px;
}

/* --- CABECERA --- */
.vt-ficha-header {
    background: linear-gradient(135deg, #1F2C54 0%, #2a4365 100%);
    color: #fff;
    padding: 40px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    position: relative;
}

.vt-ficha-header-main {
    flex: 1;
}

.vt-ficha-ref {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    padding: 6px 12px;
    border-radius: var(--vt-radius-sm);
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 0.05em;
    backdrop-filter: blur(4px);
}

.vt-ficha-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin: 0 0 15px 0;
    line-height: 1.2;
    color: #fff !important;
}

.vt-ficha-location {
    font-size: 1.1rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}
.vt-ficha-location .dashicons { font-size: 20px; width: 20px; height: 20px; }

.vt-ficha-price-box {
    text-align: right;
    background: rgba(255,255,255,0.1);
    padding: 20px 30px;
    border-radius: var(--vt-radius-md);
    min-width: 200px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
}

.vt-ficha-price-box .label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    opacity: 0.9;
    margin-bottom: 4px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.vt-ficha-price-box .amount {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
}

.vt-price-sub {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.2);
}
.vt-price-sub .amount { font-size: 1.4rem; }

/* --- IMAGEN HERO --- */
.vt-ficha-hero-image {
    width: 100%;
    height: 450px;
    background: var(--vt-color-bg);
    position: relative;
    overflow: hidden;
}
.vt-ficha-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- CUERPO --- */
.vt-ficha-body {
    padding: 50px;
}

.vt-ficha-main-col.full-width {
    width: 100%;
}

/* --- SECCIONES --- */
.vt-ficha-section {
    margin-bottom: 50px;
}
.vt-ficha-section:last-child { margin-bottom: 0; }

.vt-section-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--vt-color-primary);
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--vt-color-border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.vt-section-title .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: var(--vt-color-secondary);
}

.vt-section-content {
    font-size: 1.05rem;
    color: var(--vt-color-text);
    line-height: 1.8;
}
.vt-section-content p { margin-bottom: 20px; }

/* --- GRID DETALLES --- */
.vt-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.vt-detail-item {
    background: var(--vt-color-bg);
    padding: 20px;
    border-radius: var(--vt-radius-md);
    border: 1px solid var(--vt-color-border);
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.2s ease;
}
.vt-detail-item:hover {
    background: #fff;
    border-color: var(--vt-color-primary);
    box-shadow: var(--vt-shadow-md);
    transform: translateY(-2px);
}

.vt-detail-icon {
    width: 48px;
    height: 48px;
    background: #e0e7ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.vt-detail-icon .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: var(--vt-color-primary);
}

.vt-detail-content {
    display: flex;
    flex-direction: column;
}

.vt-detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--vt-color-secondary);
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: 0.02em;
}

.vt-detail-value {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--vt-color-text);
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .vt-ficha-header { flex-direction: column; padding: 30px; }
    .vt-ficha-price-box { width: 100%; text-align: left; margin-top: 20px; }
    .vt-ficha-body { padding: 30px; }
    .vt-ficha-hero-image { height: 300px; }
}

@media (max-width: 600px) {
    .vt-ficha-title { font-size: 1.8rem; }
    .vt-details-grid { grid-template-columns: 1fr; }
}