/* ---------------------------------------------------------
   style.css - Estilos generales del marketplace
   Todo referencia las variables definidas en variables.css
   --------------------------------------------------------- */

* { box-sizing: border-box; }

body {
    font-family: var(--font);
    color: var(--text-primary);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: var(--brand); }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4, h5, h6 { color: var(--brand-dark); font-weight: 700; }

/* ---------- Navbar ---------- */
.navbar-viarar {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 0.85rem 0;
}





.logo-viarar { color: var(--brand-dark); display: inline-flex; }



.navbar-nav .nav-link {
    color: var(--text-primary);
    font-weight: 500;
    margin: 0 0.5rem;
    border-radius: var(--radius-md);
    padding: 0.4rem 0.75rem !important;
    transition: background 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.navbar-nav .nav-link:hover { background: var(--bg-hover); color: var(--brand-dark); }
.badge-nuevo {
    background: var(--brand-dark);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 0.1em 0.5em;
    border-radius: var(--radius-full);
    letter-spacing: 0.02em;
    transform: translateY(-1px);
}
.publicar-link {
    color: var(--brand-dark);
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.4rem 0.5rem;
}
.publicar-link:hover { color: var(--brand); }
.icon-btn {
    width: 40px; height: 40px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border);
    background: var(--bg);
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--brand-dark);
    font-size: 1.1rem;
}
.icon-btn.navbar-toggler { padding: 0; }
.icon-btn.navbar-toggler:focus { box-shadow: none; }
.icon-btn-fill {
    background: var(--brand-dark);
    color: #fff;
    border-color: var(--brand-dark);
}
.icon-btn-fill::after { display: none; }

/* ---------- Botones ---------- */
.btn-brand {
    background: var(--brand);
    border: 1px solid var(--brand);
    color: #fff;
    font-weight: 600;
    border-radius: var(--radius-md);
    padding: 0.5rem 1.1rem;
    transition: background 0.15s ease, transform 0.1s ease;
}
.btn-brand:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-outline-brand {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--brand-dark);
    font-weight: 600;
    border-radius: var(--radius-md);
}
.btn-outline-brand:hover { background: var(--bg-hover); color: var(--brand-dark); }
.btn-social {
    width: 38px; height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-full);
    background: var(--bg-hover);
    color: var(--brand-dark);
}

/* ---------- Alertas flash ---------- */
.alert-viarar {
    border-radius: var(--radius-md);
    padding: 0.9rem 1.1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.alert-success-viarar { background: #EAF3EF; color: var(--brand-dark); border-color: var(--brand); }
.alert-danger-viarar { background: #FBEAEA; color: #7A2E2E; border-color: #E3B3B3; }
.alert-info-viarar { background: var(--bg-hover); color: var(--text-primary); }

/* ---------- Hero con buscador ---------- */
.hero-viarar {
    background-color: var(--brand-dark);
    background-image: radial-gradient(rgba(255,255,255,0.14) 1.5px, transparent 1.5px);
    background-size: 18px 18px;
    padding: 4rem 1rem 5rem;
    color: #fff;
}
.hero-titulo {
    font-weight: 700;
    letter-spacing: 0.12em;
    font-size: 1.6rem;
    color: #EDEBE4;
    text-transform: uppercase;
}
@media (min-width: 768px) {
    .hero-titulo { font-size: 2.1rem; }
}
.hero-ciudades { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.6rem; }
.pill-ciudad {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--radius-full);
    padding: 0.4rem 1.1rem;
    font-size: 0.9rem;
    font-weight: 500;
}
.pill-ciudad:hover { background: rgba(255,255,255,0.22); color: #fff; }

.buscador-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 1.25rem;
    border: 1px solid var(--border);
}
.buscador-card .form-label { font-weight: 600; font-size: 0.8rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .03em; }
.buscador-card .form-control, .buscador-card .form-select {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}
.buscador-card .form-control:focus, .buscador-card .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(47,93,80,0.15);
}

/* ---------- Buscador tipo pill (hero de inicio) ---------- */
.buscador-pill {
    max-width: 900px;
    border-radius: var(--radius-full);
    padding: 0.5rem;
    border: none;
}
.buscador-form { display: flex; align-items: center; }
.buscador-campo {
    flex: 1;
    padding: 0.4rem 1.1rem;
    text-align: left;
    border-right: 1px solid var(--border);
}
.buscador-campo:last-of-type { border-right: none; }
.buscador-pill .buscador-campo .form-label { margin-bottom: 0.1rem; }
.buscador-pill .buscador-campo .form-control,
.buscador-pill .buscador-campo .form-select {
    border: none;
    padding: 0;
    font-size: 0.92rem;
    color: var(--text-secondary);
    background: transparent;
    border-radius: 0;
}
.buscador-pill .buscador-campo .form-control:focus,
.buscador-pill .buscador-campo .form-select:focus { box-shadow: none; }
.buscador-btn {
    flex-shrink: 0;
    width: 52px; height: 52px;
    border-radius: 50%;
    border: none;
    background: var(--brand-dark);
    color: #fff;
    font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    margin-left: 0.5rem;
}
.buscador-btn:hover { background: var(--brand); color: #fff; }

@media (max-width: 767px) {
    .buscador-pill { border-radius: var(--radius-lg); padding: 0.75rem; }
    .buscador-form { flex-direction: column; align-items: stretch; gap: 0.25rem; }
    .buscador-pill .buscador-campo { border-right: none; border-bottom: 1px solid var(--border); padding: 0.6rem 0.4rem; }
    .buscador-pill .buscador-campo:last-of-type { border-bottom: none; }
    .buscador-btn { width: 100%; height: 48px; border-radius: var(--radius-full); margin-left: 0; margin-top: 0.5rem; }
}

/* ---------- CTA verde ---------- */
.cta-viarar {
    background: var(--brand-dark);
    color: #fff;
    border-radius: var(--radius-lg);
    padding: 3rem 1.5rem;
}
.cta-viarar h2 { font-weight: 700; margin-bottom: 0.75rem; }
.cta-viarar p { color: rgba(255,255,255,0.8); max-width: 560px; margin: 0 auto 1.5rem; }
.btn-cta {
    background: #fff;
    color: var(--brand-dark);
    font-weight: 700;
    border-radius: var(--radius-full);
    padding: 0.7rem 1.8rem;
    border: none;
}
.btn-cta:hover { background: #EDEBE4; color: var(--brand-dark); }

/* ---------- Carrusel de destacados ---------- */
.carrusel-wrap { position: relative; }
.carrusel {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding-bottom: 0.5rem;
}
.carrusel::-webkit-scrollbar { display: none; }
.carrusel-item {
    flex: 0 0 auto;
    width: 280px;
    scroll-snap-align: start;
}
.carrusel-flecha {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: var(--shadow-md);
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
    color: var(--brand-dark);
}
.carrusel-prev { left: -8px; }
.carrusel-next { right: -8px; }
@media (max-width: 767px) {
    .carrusel-flecha { display: none; }
}
.carrusel-dots { display: flex; justify-content: center; gap: 0.4rem; margin-top: 0.75rem; }
.carrusel-dots .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--border); cursor: pointer; }
.carrusel-dots .dot.activo { background: var(--brand-dark); width: 20px; border-radius: 4px; }

/* ---------- Cards de propiedad ---------- */
.card-alojamiento {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    height: 100%;
}
.card-alojamiento:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.card-alojamiento .card-img-top {
    height: 210px;
    object-fit: cover;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.card-alojamiento .card-body { padding: 1.1rem; }
.card-alojamiento .badge-ciudad {
    color: var(--text-secondary);
    font-size: 0.82rem;
}
.card-alojamiento .precio {
    font-weight: 800;
    color: var(--brand-dark);
    font-size: 1.1rem;
}
.card-alojamiento .precio small { font-weight: 500; color: var(--text-secondary); font-size: 0.75rem; }

.card-fav-btn {
    position: absolute;
    top: 12px; right: 12px;
    width: 36px; height: 36px;
    border-radius: var(--radius-full);
    background: rgba(255,255,255,0.9);
    display: flex; align-items: center; justify-content: center;
    color: var(--brand-dark);
    box-shadow: var(--shadow-sm);
    border: none;
}

/* ---------- Formularios generales ---------- */
.form-control, .form-select {
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    padding: 0.55rem 0.85rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem rgba(47,93,80,0.15);
}
.form-label { font-weight: 600; color: var(--text-primary); }

/* ---------- Auth ---------- */
.auth-body { background: var(--bg-hover); min-height: 100vh; }
.auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }
.auth-card {
    background: var(--bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    width: 100%;
    max-width: 440px;
}
.auth-brand {
    display: block;
    text-align: center;
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--brand-dark);
    margin-bottom: 1.5rem;
}

/* ---------- Detalle de alojamiento ---------- */
.galeria-detalle img { border-radius: var(--radius-lg); object-fit: cover; }
.amenity-pill {
    display: inline-flex; align-items: center; gap: 0.4rem;
    background: var(--bg-hover);
    padding: 0.45rem 0.9rem;
    border-radius: var(--radius-full);
    font-size: 0.88rem;
    margin: 0.2rem;
}
.precio-detalle {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--brand-dark);
}
.box-reserva {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    position: sticky;
    top: 100px;
}
.resenia-item { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.resenia-item:last-child { border-bottom: none; }
.estrella { color: #E0A94A; }

/* ---------- Badges de estado ---------- */
.badge-estado { border-radius: var(--radius-full); padding: 0.35em 0.8em; font-weight: 600; font-size: 0.75rem; }
.badge-publicado { background: #EAF3EF; color: var(--brand-dark); }
.badge-borrador { background: var(--bg-hover); color: var(--text-secondary); }
.badge-pausado { background: #FBEAEA; color: #7A2E2E; }
.badge-pendiente { background: #FFF3E0; color: #8A5A15; }
.badge-aceptada { background: #EAF3EF; color: var(--brand-dark); }
.badge-rechazada { background: #FBEAEA; color: #7A2E2E; }

/* ---------- Footer ---------- */
.footer-viarar {
    background: var(--brand-dark);
    color: #E9E3D9;
    margin-top: 4rem;
}
.footer-viarar h5, .footer-viarar h6 { color: #fff; }
.footer-viarar a { color: #C9D8D2; }
.footer-viarar a:hover { color: #fff; }
.footer-brand { font-weight: 800; display: flex; align-items: center; gap: 0.5rem; }
.footer-links li { margin-bottom: 0.5rem; }
.text-secondary-viarar { color: var(--text-secondary); }

/* ---------- Mapa Leaflet ---------- */
.mapa-alojamiento { height: 320px; border-radius: var(--radius-lg); border: 1px solid var(--border); }

/* ---------- Blog ---------- */
.card-noticia {
    position: relative;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: 100%;
}
.card-noticia img { height: 190px; object-fit: cover; }
.contenido-noticia img { max-width: 100%; border-radius: var(--radius-md); }

/* ---------- Clasificados ---------- */
.card-clasificado { position: relative; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); height: 100%; }
.card-clasificado img { height: 180px; object-fit: cover; }
.whatsapp-link { background: #25D366; color: #fff !important; border-radius: var(--radius-md); padding: 0.6rem 1rem; display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; }
.whatsapp-link:hover { opacity: 0.9; color: #fff !important; }

/* ---------- Paginación ---------- */
.pagination .page-link { color: var(--brand-dark); border-color: var(--border); border-radius: var(--radius-md); margin: 0 2px; }
.pagination .page-item.active .page-link { background: var(--brand); border-color: var(--brand); }

@media (max-width: 991px) {
    .box-reserva { position: static; }
}

.card-link{
    display:block;
    color:inherit;
}

.card-link:hover{
    color:inherit;
    text-decoration:none;
}

/* ---------- Explorar (mapa general) ---------- */
.explorar-wrap {
    display: grid;
    grid-template-columns: 320px 1fr;
    height: calc(100vh - 78px);
}
.explorar-filtros {
    padding: 1.25rem;
    overflow-y: auto;
    border-right: 1px solid var(--border);
    background: var(--bg);
}
.filtro-tipo { margin-bottom: 0.5rem; }
.filtro-tipo .form-check { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; }
.punto-leyenda {
    display: inline-block;
    width: 12px; height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.punto-alojamiento { background: #2F5D50; }
.punto-experiencia { background: #E0A94A; }
.punto-negocio { background: #3E7CB1; }
.punto-clasificado { background: #B15E3E; }

.mapa-explorar { width: 100%; height: 100%; }
.marcador-explorar span {
    display: block;
    width: 16px; height: 16px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.explorar-lista { display: flex; flex-direction: column; gap: 0.5rem; }
.explorar-item {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    color: var(--text-primary);
}
.explorar-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.explorar-item .punto-leyenda { margin-top: 0.35rem; }

@media (max-width: 767px) {
    .explorar-wrap { grid-template-columns: 1fr; grid-template-rows: auto 1fr; height: auto; }
    .explorar-filtros { border-right: none; border-bottom: 1px solid var(--border); max-height: 220px; }
    .mapa-explorar { height: 60vh; }
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
}
.navbar-brand .logo-img,
.navbar-brand img.logo-img {
    height: 45px !important;
    width: auto !important;
    max-height: 45px;
    display: block;
}

/* ---------- Lightbox de galería ---------- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 25, 22, 0.94);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
.lightbox-overlay.activo { display: flex; }

.lightbox-img {
    max-width: 88vw;
    max-height: 84vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    opacity: 1;
    transition: opacity 0.15s ease;
}
.lightbox-fade-out { opacity: 0; }
.lightbox-fade-in { opacity: 1; }

.lightbox-video-wrapper {
    width: 88vw;
    max-width: 960px;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #000;
}
.lightbox-video {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ---------- Miniatura de video en la galería (junto a las fotos) ---------- */
.video-lightbox-thumb {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: var(--radius-md);
}
.video-lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.video-lightbox-thumb .play-icono {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 54px; height: 54px;
    border-radius: 50%;
    background: rgba(15, 25, 22, 0.72);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    pointer-events: none;
}

.lightbox-cerrar {
    position: absolute;
    top: 18px; right: 18px;
    width: 44px; height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
}
.lightbox-cerrar:hover { background: rgba(255,255,255,0.22); }

.lightbox-flecha {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 52px; height: 52px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 1.4rem;
    display: flex; align-items: center; justify-content: center;
}
.lightbox-flecha:hover { background: rgba(255,255,255,0.22); }
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }

.lightbox-contador {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.85rem;
    background: rgba(255,255,255,0.12);
    padding: 0.25rem 0.9rem;
    border-radius: var(--radius-full);
}

@media (max-width: 767px) {
    .lightbox-flecha { display: none; }
    .lightbox-img { max-width: 94vw; max-height: 78vh; }
}