/*
 * mdb-compat.css — Mapeo de clases MDB4 a Bootstrap 5
 * Permite que el HTML existente con clases MDB siga funcionando sobre BS5
 * 2026-04-06
 */

/* === Body padding para navbar fija === */
body { padding-top: 0; }
#top-section { padding-top: 0; margin-top: 56px; }

/* === Navbar hover (esquema buscatucaravana) === */
.navbar { background-color: #058656 !important; min-height: 56px; }
.navbar-nav { gap: 0.1rem !important; }
.navbar-nav .nav-link { color: rgba(255,255,255,.85) !important; padding: .5rem .75rem !important; transition: all .3s ease; }
.navbar-nav .nav-link:hover { background-color: #026647 !important; color: #fff !important; border-radius: 4px; }
.navbar-nav .nav-item.active .nav-link { background-color: #026647 !important; color: white !important; border-radius: 4px !important; }
@media (min-width: 768px) {
  .navbar-brand { width: 8.3333%; margin-right: 0; }
  .navbar-collapse { width: 91.6667%; padding-left: 0; }
}

/* === Sombras z-depth === */
.z-depth-0 { box-shadow: none !important; }
.z-depth-1 { box-shadow: 0 2px 5px 0 rgba(0,0,0,.16), 0 2px 10px 0 rgba(0,0,0,.12) !important; }
.z-depth-2 { box-shadow: 0 5px 11px 0 rgba(0,0,0,.18), 0 4px 15px 0 rgba(0,0,0,.15) !important; }
.z-depth-3 { box-shadow: 0 8px 17px 0 rgba(0,0,0,.2), 0 6px 20px 0 rgba(0,0,0,.19) !important; }
.z-depth-4 { box-shadow: 0 12px 15px 0 rgba(0,0,0,.24), 0 17px 50px 0 rgba(0,0,0,.19) !important; }
.z-depth-5 { box-shadow: 0 16px 28px 0 rgba(0,0,0,.22), 0 25px 55px 0 rgba(0,0,0,.21) !important; }

/* === Efecto waves (simplificado) === */
.waves-effect { cursor: pointer; position: relative; overflow: hidden; transition: background-color .3s; }

/* === Colores MDB → BS5 backgrounds === */
.primary-color       { background-color: #4285f4 !important; color: #fff !important; }
.primary-color-dark  { background-color: #0d47a1 !important; color: #fff !important; }
.default-color       { background-color: #2bbbad !important; color: #fff !important; }
.default-color-dark  { background-color: #00695c !important; color: #fff !important; }
.info-color          { background-color: #33b5e5 !important; color: #fff !important; }
.info-color-dark     { background-color: #09c !important; color: #fff !important; }
.warning-color       { background-color: #fb3 !important; color: #212529 !important; }
.warning-color-dark  { background-color: #f80 !important; color: #fff !important; }
.danger-color        { background-color: #ff3547 !important; color: #fff !important; }
.danger-color-dark   { background-color: #cc0000 !important; color: #fff !important; }
.success-color       { background-color: #00c851 !important; color: #fff !important; }
.success-color-dark  { background-color: #007e33 !important; color: #fff !important; }

/* === Colores con intensidad (darken/lighten) === */
.blue { background-color: #2196f3 !important; }
.blue.darken-1 { background-color: #1e88e5 !important; }
.blue.darken-2 { background-color: #1565c0 !important; }
.blue.darken-3 { background-color: #0d47a1 !important; }
.blue.lighten-1 { background-color: #42a5f5 !important; }
.blue.lighten-2 { background-color: #64b5f6 !important; }
.blue.lighten-3 { background-color: #90caf9 !important; }
.blue.lighten-4 { background-color: #bbdefb !important; }
.blue.lighten-5 { background-color: #e3f2fd !important; }

.red { background-color: #f44336 !important; }
.red.darken-1 { background-color: #e53935 !important; }
.red.darken-2 { background-color: #c62828 !important; }
.red.lighten-1 { background-color: #ef5350 !important; }

.green { background-color: #4caf50 !important; }
.green.darken-1 { background-color: #43a047 !important; }
.green.darken-2 { background-color: #2e7d32 !important; }
.green.lighten-1 { background-color: #66bb6a !important; }
.green.lighten-4 { background-color: #c8e6c9 !important; }
.green.lighten-5 { background-color: #e8f5e9 !important; }

.amber { background-color: #ffc107 !important; }
.amber.lighten-3 { background-color: #ffe082 !important; }
.amber.darken-1 { background-color: #ffb300 !important; }

.light-blue { background-color: #03a9f4 !important; }
.light-blue.lighten-4 { background-color: #b3e5fc !important; }

.grey { background-color: #9e9e9e !important; }
.grey.lighten-3 { background-color: #eee !important; }
.grey.lighten-4 { background-color: #f5f5f5 !important; }
.grey.darken-1 { background-color: #757575 !important; }
.grey.darken-3 { background-color: #424242 !important; }

.white { background-color: #fff !important; }

/* === Textos coloreados MDB === */
.white-text  { color: #fff !important; }
.red-text    { color: #f44336 !important; }
.green-text  { color: #4caf50 !important; }
.blue-text   { color: #2196f3 !important; }

/* === Botones MDB → BS5 === */
.btn-rounded { border-radius: 10em; }
.btn-flat { box-shadow: none; }
.btn-block { display: block; width: 100%; }

/* === Spacing legacy (ml-/mr-/pl-/pr-) === */
.ml-0 { margin-left: 0 !important; }
.ml-1 { margin-left: .25rem !important; }
.ml-2 { margin-left: .5rem !important; }
.ml-3 { margin-left: 1rem !important; }
.ml-4 { margin-left: 1.5rem !important; }
.ml-5 { margin-left: 3rem !important; }
.ml-auto { margin-left: auto !important; }
.mr-0 { margin-right: 0 !important; }
.mr-1 { margin-right: .25rem !important; }
.mr-2 { margin-right: .5rem !important; }
.mr-3 { margin-right: 1rem !important; }
.mr-4 { margin-right: 1.5rem !important; }
.mr-5 { margin-right: 3rem !important; }
.mr-auto { margin-right: auto !important; }
.pl-0 { padding-left: 0 !important; }
.pl-1 { padding-left: .25rem !important; }
.pl-2 { padding-left: .5rem !important; }
.pl-3 { padding-left: 1rem !important; }
.pl-4 { padding-left: 1.5rem !important; }
.pl-5 { padding-left: 3rem !important; }
.pr-0 { padding-right: 0 !important; }
.pr-1 { padding-right: .25rem !important; }
.pr-2 { padding-right: .5rem !important; }
.pr-3 { padding-right: 1rem !important; }
.pr-4 { padding-right: 1.5rem !important; }
.pr-5 { padding-right: 3rem !important; }

/* === float-left/right legacy === */
.float-left { float: left !important; }
.float-right { float: right !important; }

/* === MDB card/panel === */
.hoverable { transition: box-shadow .25s; }
.hoverable:hover { box-shadow: 0 8px 17px 0 rgba(0,0,0,.2), 0 6px 20px 0 rgba(0,0,0,.19); }

/* === btn-floating (boton flotante volver arriba) === */
.btn-floating { display: inline-flex; align-items: center; justify-content: center; width: 47px; height: 47px; padding: 0; border-radius: 50%; text-align: center; cursor: pointer; color: #fff; text-decoration: none; }
.btn-floating.btn-large { width: 56px; height: 56px; }
.btn-floating i { font-size: 1.25rem; }
.fixed-action-btn { position: fixed !important; right: 25px !important; bottom: 25px !important; left: auto !important; z-index: 998; }

/* === mdb-lightbox (galeria fotos) === */
.mdb-lightbox {
  display: flex !important; flex-wrap: wrap !important;
  margin: 0; padding: 0;
}
.mdb-lightbox figure {
  margin: 0 0 8px 0 !important; padding: 4px !important; box-sizing: border-box !important;
  flex: 0 0 auto;
}
.mdb-lightbox figure.col-6 { width: 50% !important; }
.mdb-lightbox figure.col-4 { width: 33.333% !important; }
.mdb-lightbox figure.col-3 { width: 25% !important; }
.mdb-lightbox a { display: block; }
.mdb-lightbox img { max-width: 100%; height: auto; display: block; }

/* === Alertas MDB (close button) === */
.close { border: none; background: transparent; font-size: 1.5rem; font-weight: 700; line-height: 1; opacity: .5; cursor: pointer; }
.close:hover { opacity: .75; }

/* === font-weight legacy === */
.font-weight-bold { font-weight: 700 !important; }
.font-weight-bolder { font-weight: 900 !important; }
.font-weight-normal { font-weight: 400 !important; }

/* === text-justify (eliminado en BS5) === */
.text-justify { text-align: justify !important; }

/* === badge legacy === */
.badge-primary { background-color: #0d6efd; color: #fff; }
.badge-success { background-color: #198754; color: #fff; }
.badge-warning { background-color: #ffc107; color: #212529; }
.badge-danger { background-color: #dc3545; color: #fff; }
.badge-info { background-color: #0dcaf0; color: #212529; }

/* === form-group (eliminado en BS5) === */
.form-group { margin-bottom: 1rem; }

/* === Tablas MDB === */
.table-hover tbody tr:hover { background-color: rgba(0,0,0,.075); }
.table-bordered { border: 1px solid #dee2e6; }
.table-bordered th, .table-bordered td { border: 1px solid #dee2e6; }
.table thead th { vertical-align: bottom; border-bottom: 2px solid #dee2e6; }

/* === Paneles (panel-info etc.) === */
.panel { border: 1px solid #dee2e6; border-radius: .25rem; margin-bottom: 1rem; }
.panel-info { border-color: #bee5eb; }
.panel-body { padding: 1rem; }

/* === Alertas y bloques de contenido === */
.alert-dark { border-radius: .25rem; }
.alert-info { padding: 1.25rem 1.5rem; }
.card-body { padding: 1.25rem; }

/* === Contenido full-width en movil === */
@media (max-width: 767.98px) {
  .alert.alert-info { background-color: transparent; border: none; padding: 0; margin: 0; }
  .wrapper, .wrapper > .container-fluid, .wrapper .container-fluid { padding-left: 0 !important; padding-right: 0 !important; }
  .wrapper .row { margin-left: 0 !important; margin-right: 0 !important; }
  .wrapper .row > [class*="col"] { padding-left: 10px !important; padding-right: 10px !important; }
}

/* === Logo/header spacing === */
#myAlert { margin-bottom: 0.5rem; margin-top: 0; }
#header, #header2 { margin-top: 0; }

/* === Cards y bordes === */
.card.border-primary { border-color: #4285f4 !important; overflow: hidden; }
.card.border-primary > .col-12,
.card.border-primary > div > .col-12 { padding-left: 1rem !important; padding-right: 1rem !important; }
.card.border-primary .container-fluid { padding-left: 1rem; padding-right: 1rem; }
.card.border-primary .col-sm { overflow: hidden; }
.card.border-info { border-color: #33b5e5 !important; }

/* === Footer framework === */
.page-footer { background-color: #e8f5e9; min-height: auto; margin-top: auto; }
.footer-brand-area { background-color: #058656; min-height: 30px; display: flex; justify-content: flex-end; align-items: center; padding-right: 1rem; }
.footer-copy { font-family: 'Kaushan Script', 'Merienda One', cursive; font-size: 12px; color: white; }
.text-link-stable { color: #2c3e50 !important; }
.text-link-stable:hover { color: #1a252f !important; text-decoration: underline !important; }
@media (max-width: 767.98px) {
  .page-footer .container-fluid .row .col-6 a { font-size: 0.75rem !important; }
  .page-footer .container-fluid .row .col-6 .d-flex { gap: 0.25rem !important; }
}

/* === destacado link color === */
a.destacado { color: #0d47a1; text-decoration: none; }
a.destacado:hover { text-decoration: underline; }

/* === cover class para imagenes === */
.cover { object-fit: cover; }

/* === d-table-cell (BS4 compat) === */
.d-sm-table-cell { display: table-cell !important; }

/* === Textos bloques ficha destacado === */
.card.border-primary .card-body,
.card.border-primary .p-2,
.card.border-primary .col-12 {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.1rem;
  line-height: 1.7;
}
.card.border-primary strong { font-weight: 700; }
.card.border-primary td { font-size: 1.1rem; line-height: 1.65; padding: 4px 6px; }
@media (max-width: 767.98px) {
  .card.border-primary .card-body,
  .card.border-primary .p-2,
  .card.border-primary .col-12 { font-size: 1.15rem; line-height: 1.75; }
  .card.border-primary td { font-size: 1.15rem; line-height: 1.7; }
  /* Reducir padding interno de bloques en móvil */
  .card.border-primary .card-body { padding: 0.6rem 0.75rem; }
  .card.border-primary .p-2 { padding: 0.4rem 0.5rem !important; }
  .card.border-primary .z-depth-2 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
  .card.border-primary .row.g-0 { margin: 0; }
  .card.border-primary .mdb-lightbox { margin-top: 0.25rem; }
  .card.border-primary .mdb-lightbox figure,
  .card.border-primary .mdb-lightbox a { margin: 2px; }
  .card.border-primary p { margin-bottom: 0.3rem; }
  .card.border-primary strong { display: inline; }
}

/* === Tablas listado: aspecto moderno === */
th, td { font-family: inherit !important; }
.table { border-collapse: separate; border-spacing: 0; }
.table thead th { border-bottom: 2px solid #058656; padding: 0.75rem 1rem; }
.table tbody tr { transition: background-color .15s ease; }
.table tbody tr:hover { background-color: #e8f5e9 !important; }
.table tbody td { padding: 0.65rem 1rem; vertical-align: middle; border-color: #e9ecef; }
.table tbody td a { text-decoration: none; color: #1a5632; font-weight: 600; }
.table tbody td a:hover { color: #058656; text-decoration: underline; }

/* === Listado campings destacados === */
tr[bgcolor="#ffe0b2"] { background-color: #e8f5e9 !important; }
tr[bgcolor="#ffe0b2"] td { background-color: #e8f5e9 !important; }
.btc-foto-destacado { width: 100px; height: 80px; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.btc-desc-destacado { font-size: 0.8rem; font-weight: normal; margin: 4px 0 0 8px; line-height: 1.4; color: #333; }
@media (max-width: 575.98px) {
  .btc-foto-destacado { width: 70px; height: 60px; }
  .btc-desc-destacado { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.75rem; }
}

/* === Menú móvil inferior (bottom navigation) === */
.btc-bottom-nav {
  display: flex;
  justify-content: space-around;
  align-items: center;
  background-color: #058656;
  min-height: 64px;
  border-radius: 8px;
  margin: 4px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}
.btc-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: rgba(255,255,255,.75);
  padding: 6px 12px;
  border-radius: 12px;
  transition: all .2s ease;
  flex: 1;
}
.btc-nav-item i { font-size: 1.4rem; }
.btc-nav-item span { font-size: 0.7rem; font-weight: 500; margin-top: 2px; }
.btc-nav-item:hover { color: #fff; background-color: rgba(255,255,255,.15); }
.btc-nav-item.btc-nav-active {
  color: #fff;
  background-color: rgba(255,255,255,.2);
  font-weight: 700;
}
.btc-nav-item.btc-nav-active i { font-size: 1.5rem; }
@media (min-width: 768px) {
  .btc-bottom-nav { max-width: 100%; margin: 4px 0; }
  .btc-nav-item { flex-direction: row; gap: 6px; padding: 8px 16px; }
  .btc-nav-item i { font-size: 1.1rem; }
  .btc-nav-item span { font-size: 0.85rem; margin-top: 0; }
}

/* === Input-group: evitar wrap del botón === */
.input-group { flex-wrap: nowrap; }

/* === Botones cercanos (dos lado a lado, compactos) === */
.btc-cerca-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 14px 12px;
  background: #fff; border: 2px solid #058656; border-radius: 12px;
  text-decoration: none; color: #058656;
  transition: all .2s ease;
}
.btc-cerca-btn:hover {
  background: #058656; color: #fff; transform: translateY(-2px);
  box-shadow: 0 6px 16px -6px rgba(0,0,0,.15);
}
.btc-cerca-btn:hover .btc-cerca-icon { color: #fff; }
.btc-cerca-icon { font-size: 1.5rem; color: #058656; transition: color .2s; flex-shrink: 0; }
.btc-cerca-txt { font-weight: 600; font-size: 0.9rem; text-align: center; line-height: 1.3; }
@media (min-width: 768px) {
  .btc-cerca-btn { padding: 18px 16px; }
  .btc-cerca-icon { font-size: 1.8rem; }
  .btc-cerca-txt { font-size: 1rem; }
}

/* === Autocompletado buscador === */
.btc-autocomplete { position: relative; }
.btc-autocomplete-list {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 1050;
  background: #fff; border: 1px solid #dee2e6; border-top: 0;
  border-radius: 0 0 8px 8px; box-shadow: 0 4px 12px rgba(0,0,0,.1);
  max-height: 300px; overflow-y: auto; display: none;
}
.btc-autocomplete-item {
  display: block; padding: 10px 14px; text-decoration: none; color: #1e293b;
  border-bottom: 1px solid #f0f0f0; transition: background .15s;
}
.btc-autocomplete-item:hover, .btc-autocomplete-item.active {
  background: #e8f5e9; color: #058656;
}
.btc-autocomplete-item strong { display: block; font-size: 0.95rem; }
.btc-autocomplete-item small { color: #6c757d; }

/* === Featherlight gallery: flechas siempre visibles === */
.featherlight-next, .featherlight-previous { display: block !important; }
.featherlight-next span, .featherlight-previous span { display: inline-block !important; }
.featherlight-first-slide .featherlight-previous,
.featherlight-last-slide .featherlight-next { display: block !important; opacity: .3; }

/* === Lightbox galería propio === */
#btc-lightbox {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,.92); z-index: 9999;
  align-items: center; justify-content: center;
}
.btc-lb-img { max-width: 92vw; max-height: 88vh; object-fit: contain; }
.btc-lb-close {
  position: absolute; top: 12px; right: 18px; color: #fff; font-size: 2.5rem;
  cursor: pointer; z-index: 10001; line-height: 1;
}
.btc-lb-prev, .btc-lb-next {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: #fff; font-size: 2.5rem; cursor: pointer; z-index: 10001;
  background: rgba(255,255,255,.15); border-radius: 50%;
  width: 50px; height: 50px; display: flex; align-items: center; justify-content: center;
  transition: background .2s;
}
.btc-lb-prev:hover, .btc-lb-next:hover { background: rgba(255,255,255,.35); }
.btc-lb-prev { left: 12px; }
.btc-lb-next { right: 12px; }
.btc-lb-counter {
  position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 1rem; z-index: 10001;
}
@media (max-width: 767.98px) {
  .btc-lb-prev, .btc-lb-next { width: 40px; height: 40px; font-size: 1.8rem; }
  .btc-lb-prev { left: 6px; }
  .btc-lb-next { right: 6px; }
  .btc-lb-close { top: 8px; right: 12px; font-size: 2rem; }
}

/* === Widget meteo integrado === */
.btc-meteo-widget {
  border-top: 1px solid #dee2e6;
  padding: 8px 4px 4px 4px;
}

/* === Boton favorito en ficha === */
.btc-fav-btn {
  background: none; border: 2px solid #dc3545; border-radius: 50%;
  width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
  color: #dc3545; font-size: 1.2rem; cursor: pointer; transition: all .2s;
}
.btc-fav-btn:hover, .btc-fav-btn.active {
  background: #dc3545; color: #fff;
}
