/**
 * Villa de Tezontepec - GeoDirectory
 * Full responsive | Moderno | Atractivo
 * Lugares (gd_place) - single y archive
 */

/* ============================================
   SINGLE PLACE - Sin imagen destacada
   ============================================ */
body.single-gd_place .featured-image.page-header-image-single,
body.single-gd_place .page-header-image-single {
    display: none !important;
}

/* ============================================
   SINGLE - Ocultar hints de admin (opcional)
   ============================================ */
body .geodir-notifications.alert-info {
    border-radius: var(--vdt-radius-md) !important;
    font-size: 0.875rem !important;
}

/* ============================================
   SINGLE - Tabs modernos
   ============================================ */
body .geodir-single-tabs-container {
    margin-top: 0 !important;
}

body .geodir-tabs .geodir-tab-head {
    border-bottom: 2px solid var(--vdt-border-light) !important;
    margin-bottom: var(--vdt-space-xl) !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    scrollbar-width: none !important;
}

body .geodir-tabs .geodir-tab-head::-webkit-scrollbar {
    display: none !important;
}

body .geodir-tabs .nav-tabs {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

body .geodir-tabs .nav-tabs .nav-item {
    margin: 0 !important;
    flex-shrink: 0 !important;
}

body .geodir-tabs .nav-tabs .nav-link {
    padding: var(--vdt-space-md) var(--vdt-space-lg) !important;
    color: var(--vdt-text-secondary) !important;
    font-weight: 500 !important;
    font-size: 0.9375rem !important;
    border: none !important;
    border-radius: var(--vdt-radius-md) var(--vdt-radius-md) 0 0 !important;
    transition: all var(--vdt-transition) !important;
    white-space: nowrap !important;
}

body .geodir-tabs .nav-tabs .nav-link:hover {
    color: var(--vdt-primary) !important;
    background: var(--vdt-primary-light) !important;
}

body .geodir-tabs .nav-tabs .nav-link.active {
    color: var(--vdt-primary) !important;
    background: transparent !important;
    border-bottom: 2px solid var(--vdt-primary) !important;
    margin-bottom: -2px !important;
}

/* ============================================
   SINGLE - Título y meta
   ============================================ */
body .geodir-page-title-container {
    margin-bottom: var(--vdt-space-md) !important;
}

body .geodir-page-title,
body .geodir-page-title.entry-title {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: var(--vdt-text) !important;
    margin: 0 !important;
    line-height: 1.25 !important;
    letter-spacing: -0.02em !important;
}

@media (min-width: 768px) {
    body .geodir-page-title,
    body .geodir-page-title.entry-title {
        font-size: 2.25rem !important;
    }
}

/* Fecha de publicación — barra compacta bajo el título */
body .geodir-post-meta-container:has(.geodir-field-post_date) {
    padding: 0 !important;
    margin-bottom: var(--vdt-space-xl) !important;
    border-bottom: none !important;
}

body .geodir_post_meta.geodir-field-post_date {
    display: inline-flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 0.35rem !important;
    padding: 0.45rem 0.9rem !important;
    margin: 0 0 var(--vdt-space-md) 0 !important;
    background: var(--vdt-bg-secondary) !important;
    border: 1px solid var(--vdt-border) !important;
    border-radius: var(--vdt-radius-full) !important;
    font-size: 0.8125rem !important;
    line-height: 1.4 !important;
    color: var(--vdt-text-secondary) !important;
    white-space: nowrap !important;
}

body .geodir_post_meta.geodir-field-post_date .geodir_post_meta_icon {
    color: var(--vdt-complement) !important;
}

body .geodir_post_meta.geodir-field-post_date .geodir_post_meta_title {
    color: var(--vdt-text-muted) !important;
    font-weight: 500 !important;
}

/* ============================================
   SINGLE - Bloques de meta (dirección, teléfono, etc.)
   ============================================ */
body .geodir-post-meta-container {
    padding: var(--vdt-space-md) 0 !important;
    border-bottom: 1px solid var(--vdt-border-light) !important;
}

body .geodir-post-meta-container:last-of-type {
    border-bottom: none !important;
}

/* Filas con icono + etiqueta + valor (no contenido largo) */
body .geodir_post_meta:not(.geodir-field-post_content):not(.geodir-field-descripcion_rapida) {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 0.25rem 0.35rem !important;
    font-size: 0.9375rem !important;
    line-height: 1.5 !important;
    color: var(--vdt-text) !important;
}

body .geodir_post_meta_icon {
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    width: auto !important;
    min-width: 0 !important;
    gap: 0.35rem !important;
    text-align: left !important;
    color: var(--vdt-primary) !important;
}

body .geodir_post_meta_title {
    white-space: nowrap !important;
    color: var(--vdt-text-muted) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
}

body .geodir_post_meta.geodir-field-address {
    align-items: flex-start !important;
}

body .geodir_post_meta.geodir-field-address [itemprop="streetAddress"] {
    color: var(--vdt-text-secondary) !important;
}

body .geodir_post_meta.geodir-field-address br {
    display: none !important;
}

body .geodir_post_meta.geodir-field-post_category a {
    font-weight: 500 !important;
}

body .geodir_post_meta a {
    color: var(--vdt-primary) !important;
    text-decoration: none !important;
    transition: color var(--vdt-transition) !important;
}

body .geodir_post_meta a:hover {
    color: var(--vdt-primary-hover) !important;
    text-decoration: underline !important;
}

/* WhatsApp / enlaces destacados */
body .geodir_post_meta.geodir-field-whatsapp_link a,
body .geodir_post_meta.geodir-field-website a {
    display: inline-flex !important;
    align-items: center !important;
    gap: var(--vdt-space-sm) !important;
    padding: var(--vdt-space-sm) var(--vdt-space-md) !important;
    background: var(--vdt-primary-light) !important;
    color: var(--vdt-primary) !important;
    border-radius: var(--vdt-radius-full) !important;
    font-weight: 600 !important;
}

body .geodir_post_meta.geodir-field-whatsapp_link a:hover,
body .geodir_post_meta.geodir-field-website a:hover {
    background: var(--vdt-complement) !important;
    color: var(--vdt-text-on-complement) !important;
}

/* ============================================
   SINGLE - Contenido y galería de imágenes
   ============================================ */
body .geodir_post_meta.geodir-field-post_content p,
body .geodir_post_meta.geodir-field-descripcion_rapida p {
    margin: 0 0 var(--vdt-space-md) 0 !important;
    color: var(--vdt-text) !important;
    line-height: 1.7 !important;
}

body .geodir_post_meta figure {
    max-width: 100% !important;
    margin: var(--vdt-space-lg) 0 !important;
    border-radius: var(--vdt-radius-lg) !important;
    overflow: hidden !important;
    box-shadow: var(--vdt-shadow-md) !important;
}

body .geodir_post_meta img,
body .geodir_post_meta figure img,
body .entry-content figure img,
body .geodir-entry-content img,
body .geodir-tabs-content img {
    max-width: 100% !important;
    height: auto !important;
    display: block !important;
    width: 100% !important;
    object-fit: cover !important;
}

/* Grid de imágenes en contenido - responsive */
body .geodir_post_meta.geodir-field-post_content {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--vdt-space-md) !important;
}

body .geodir_post_meta.geodir-field-post_content > p {
    flex: 1 1 100% !important;
}

body .geodir_post_meta.geodir-field-post_content figure {
    flex: 1 1 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

@media (min-width: 480px) {
    body .geodir_post_meta.geodir-field-post_content figure {
        flex: 1 1 calc(50% - var(--vdt-space-md) / 2) !important;
    }
}

@media (min-width: 768px) {
    body .geodir_post_meta.geodir-field-post_content figure {
        flex: 1 1 calc(33.333% - var(--vdt-space-md) * 2 / 3) !important;
    }
}

/* ============================================
   SINGLE - Mapa
   ============================================ */
body .geodir-map-wrap,
body .geodir-post-map-wrap {
    border-radius: var(--vdt-radius-xl) !important;
    overflow: hidden !important;
    box-shadow: var(--vdt-shadow-lg) !important;
    margin: var(--vdt-space-xl) 0 !important;
    border: 1px solid var(--vdt-border-light) !important;
}

body .geodir_map_container {
    border-radius: inherit !important;
    min-height: 260px !important;
}

@media (min-width: 768px) {
    body .geodir_map_container {
        min-height: 425px !important;
    }
}

/* ============================================
   SINGLE - Navegación prev/next
   ============================================ */
body .geodir-pos_navigation {
    margin-top: var(--vdt-space-2xl) !important;
    padding-top: var(--vdt-space-xl) !important;
    border-top: 1px solid var(--vdt-border-light) !important;
}

body .geodir-pos_navigation .row {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--vdt-space-md) !important;
    justify-content: space-between !important;
}

body .geodir-pos_navigation .badge {
    padding: var(--vdt-space-sm) var(--vdt-space-lg) !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    border-radius: var(--vdt-radius-full) !important;
    text-decoration: none !important;
    transition: all var(--vdt-transition) !important;
}

body .geodir-pos_navigation .badge:hover {
    transform: translateY(-2px) !important;
    box-shadow: var(--vdt-shadow-md) !important;
}

/* ============================================
   ARCHIVE - Header
   ============================================ */
body .vdt-gd-archive-header {
    margin-bottom: var(--vdt-space-2xl) !important;
    text-align: center !important;
}

@media (min-width: 768px) {
    body .vdt-gd-archive-header {
        margin-bottom: var(--vdt-space-3xl) !important;
    }
}

body .vdt-gd-archive-title {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    margin-bottom: var(--vdt-space-sm) !important;
}

@media (min-width: 768px) {
    body .vdt-gd-archive-title {
        font-size: 2.25rem !important;
    }
}

body .vdt-gd-archive-desc {
    font-size: 1rem !important;
    color: var(--vdt-text-secondary) !important;
    max-width: 560px !important;
    margin: 0 auto !important;
    line-height: 1.6 !important;
}

/* ============================================
   ARCHIVE - Sin resultados
   ============================================ */
body .vdt-gd-no-posts {
    text-align: center !important;
    padding: var(--vdt-space-4xl) var(--vdt-space-lg) !important;
}

body .vdt-gd-no-posts-icon {
    display: block !important;
    font-size: 4rem !important;
    color: var(--vdt-border) !important;
    margin-bottom: var(--vdt-space-lg) !important;
}

body .vdt-gd-btn {
    display: inline-flex !important;
    align-items: center !important;
    gap: var(--vdt-space-sm) !important;
    padding: var(--vdt-space-md) var(--vdt-space-xl) !important;
    background: var(--vdt-complement) !important;
    color: var(--vdt-text-on-complement) !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    border-radius: var(--vdt-radius-full) !important;
    transition: all var(--vdt-transition) !important;
    margin-top: var(--vdt-space-lg) !important;
}

body .vdt-gd-btn:hover {
    background: var(--vdt-complement-hover) !important;
    transform: translateY(-2px) !important;
    box-shadow: var(--vdt-shadow-card-hover) !important;
}

/* ============================================
   Overflow y responsive global
   ============================================ */
body .vdt-page-main,
body .vdt-single-main,
body .vdt-gd-single-main {
    overflow-x: hidden !important;
}

body .vdt-page-main .site-main,
body .vdt-single-main .site-main {
    overflow-x: hidden !important;
}

body .grid-container {
    max-width: 100% !important;
}

/* ============================================
   GD Loop (cuando GeoDirectory usa su página)
   ============================================ */
body .geodir-loop,
body .gd-loop,
body [class*="geodir-loop"] {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
}

/* ============================================
   Búsqueda GeoDirectory — dark mode + tarjetas VDT
   (fallback si GD renderiza su propio loop)
   ============================================ */
body.vdt-dark.geodir-page-search .geodir-search-container,
body.vdt-dark.geodir-page-search .geodir-search-form-wrapper,
body.vdt-dark.geodir-page-search .geodir-listing-search {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

body.vdt-dark.geodir-page-search .geodir-search,
body.vdt-dark.geodir-page-search .geodir-search-form-wrapper .form-control,
body.vdt-dark.geodir-page-search .geodir-listing-search input,
body.vdt-dark.geodir-page-search .geodir-listing-search select {
    background: var(--vdt-bg-secondary) !important;
    color: var(--vdt-text) !important;
    border: 1px solid var(--vdt-border) !important;
    border-radius: var(--vdt-radius-md) !important;
}

body.vdt-dark.geodir-page-search .geodir_submit_search,
body.vdt-dark.geodir-page-search .btn-primary {
    background: var(--vdt-complement) !important;
    border-color: var(--vdt-complement) !important;
    color: var(--vdt-text-on-complement) !important;
    border-radius: var(--vdt-radius-full) !important;
}

body.vdt-dark.geodir-page-search .geodir-loop-actions-container,
body.vdt-dark.geodir-page-search .geodir-loop-container {
    background: transparent !important;
}

body.vdt-dark.geodir-page-search .geodir-loop-actions-container .nav-link,
body.vdt-dark.geodir-page-search .geodir-loop-actions-container .btn {
    background: var(--vdt-bg-secondary) !important;
    color: var(--vdt-text-secondary) !important;
    border: 1px solid var(--vdt-border) !important;
    border-radius: var(--vdt-radius-md) !important;
}

body.vdt-dark.geodir-page-search .geodir-loop-actions-container .nav-link.active,
body.vdt-dark.geodir-page-search .geodir-loop-actions-container .btn.active {
    background: var(--vdt-primary-light) !important;
    color: var(--vdt-primary) !important;
    border-color: var(--vdt-primary) !important;
}

body.vdt-dark.geodir-page-search .geodir-listing-posts {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--vdt-space-md) !important;
    margin: 0 !important;
    padding: 0 !important;
}

body.vdt-dark.geodir-page-search .geodir-listing-posts > .geodir-post,
body.vdt-dark.geodir-page-search .geodir-listing-posts > .col {
    width: 100% !important;
    max-width: 100% !important;
    flex: 0 0 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.vdt-dark.geodir-page-search .geodir-post,
body.vdt-dark.geodir-page-search .geodir-post .card,
body.vdt-dark.geodir-page-search .geodir-post > div {
    background: var(--vdt-bg-secondary) !important;
    border: 1px solid var(--vdt-border) !important;
    border-radius: var(--vdt-radius-lg) !important;
    box-shadow: var(--vdt-shadow-xs) !important;
    color: var(--vdt-text) !important;
    overflow: hidden !important;
}

body.vdt-dark.geodir-page-search .geodir-post-title,
body.vdt-dark.geodir-page-search .geodir-post-title a,
body.vdt-dark.geodir-page-search .geodir-post h3,
body.vdt-dark.geodir-page-search .geodir-post h3 a {
    color: var(--vdt-text-heading) !important;
    font-size: 1.0625rem !important;
    font-weight: 600 !important;
    text-decoration: none !important;
}

body.vdt-dark.geodir-page-search .geodir-post-title a:hover,
body.vdt-dark.geodir-page-search .geodir-post h3 a:hover {
    color: var(--vdt-complement) !important;
}

body.vdt-dark.geodir-page-search .geodir-post .geodir_post_meta,
body.vdt-dark.geodir-page-search .geodir-post p,
body.vdt-dark.geodir-page-search .geodir-post .geodir-i-text {
    color: var(--vdt-text-secondary) !important;
    font-size: 0.875rem !important;
}

body.vdt-dark.geodir-page-search .geodir-post .geodir-i-taxonomy,
body.vdt-dark.geodir-page-search .geodir-post .geodir-i-address,
body.vdt-dark.geodir-page-search .geodir-post .geodir-i-tags {
    color: var(--vdt-text-muted) !important;
}

body.vdt-dark.geodir-page-search .geodir-map-wrap,
body.vdt-dark.geodir-page-search .geodir-archive-map-wrap {
    border: 1px solid var(--vdt-border) !important;
    border-radius: var(--vdt-radius-xl) !important;
    overflow: hidden !important;
    margin-bottom: var(--vdt-space-xl) !important;
}

body.vdt-dark.geodir-page-search .geodir-map-canvas,
body.vdt-dark.geodir-page-search .geodir_map_container {
    background: var(--vdt-bg-secondary) !important;
}

body.vdt-dark.geodir-page-search .alert,
body.vdt-dark.geodir-page-search .geodir-notifications {
    background: var(--vdt-bg-secondary) !important;
    color: var(--vdt-text-secondary) !important;
    border: 1px solid var(--vdt-border) !important;
    border-radius: var(--vdt-radius-md) !important;
}

body.vdt-dark.geodir-page-search .pagination .page-numbers,
body.vdt-dark.geodir-page-search .page-numbers {
    background: var(--vdt-bg-secondary) !important;
    color: var(--vdt-text-secondary) !important;
    border: 1px solid var(--vdt-border) !important;
    border-radius: var(--vdt-radius-sm) !important;
}

body.vdt-dark.geodir-page-search .pagination .page-numbers.current,
body.vdt-dark.geodir-page-search .page-numbers.current {
    background: var(--vdt-primary-light) !important;
    color: var(--vdt-primary) !important;
    border-color: var(--vdt-primary) !important;
}

body.vdt-dark.geodir-page-search .text-muted,
body.vdt-dark.geodir-page-search .text-body-secondary {
    color: var(--vdt-text-muted) !important;
}

body.vdt-dark.geodir-page-search .bg-white,
body.vdt-dark.geodir-page-search .bg-light {
    background: var(--vdt-bg-secondary) !important;
}

body.vdt-dark.geodir-page-search .border,
body.vdt-dark.geodir-page-search .card {
    border-color: var(--vdt-border) !important;
}
