/* Ajustes responsive comunes a todas las pantallas de InmoGest */
img, video, iframe { max-width: 100%; }
html, body { overflow-x: hidden; }

/* Encabezados con título + botones: bajan de línea si no entran */
.d-flex.justify-content-between { flex-wrap: wrap; gap: .5rem; }
.card-header.d-flex { flex-wrap: wrap; gap: .5rem; }
.btn-group { flex-wrap: wrap; }

/* Tablas: nunca rompen el ancho de la pantalla */
.table-responsive { -webkit-overflow-scrolling: touch; }
.table td, .table th { vertical-align: middle; }

/* Botón flotante de "Instalar app" (portal público) */
.ig-instalar {
    position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 1080;
    display: flex; align-items: center; gap: 10px;
    background: #fff; border: 1px solid #DCE4ED; border-radius: 14px;
    padding: 10px 12px; box-shadow: 0 8px 24px rgba(16,35,63,.18);
    max-width: 480px; margin: 0 auto;
}
.ig-instalar.d-none { display: none !important; }
.ig-instalar img { border-radius: 10px; }

/* Pie con logo */
.ig-footer-logo { height: 28px; width: auto; opacity: .85; }

@media (max-width: 767.98px) {
    .container, .container-fluid { padding-left: 12px; padding-right: 12px; }
    h1, .h1 { font-size: 1.6rem; }
    h2, .h2 { font-size: 1.4rem; }
    h3, .h3 { font-size: 1.2rem; }
    .card-body.p-4, .card-body.p-5 { padding: 1rem !important; }
    .card-header.d-flex > form { width: 100%; }
    .card-header.d-flex > form .form-control { flex: 1 1 auto; width: auto !important; }

    /* Tablas de listados: texto más compacto */
    .table { font-size: .875rem; }
    .table .btn-sm { padding: .2rem .45rem; }

    /* Formularios: botones principales a todo el ancho */
    form > .btn-lg, form > .d-grid .btn { width: 100%; }

    /* Fotos del portal */
    .foto-principal { height: 240px !important; }
    .inmueble-card-img { height: 180px !important; }
    .hero { padding: 32px 0 !important; }

    /* Liquidación mensual (ficha del contrato): cada fila se apila */
    .ig-liq tr { display: flex; flex-wrap: wrap; align-items: center; border-bottom: 1px solid #DCE4ED; padding: 6px 0; }
    .ig-liq td { border: 0 !important; padding: 2px 4px !important; }
    .ig-liq td:first-child { width: 100% !important; }
    .ig-liq td:nth-child(2) { flex: 1 1 auto; width: auto !important; }
    .ig-liq td:nth-child(2) form { justify-content: flex-start !important; }
    .ig-liq td:nth-child(2) input { max-width: none !important; }
    .ig-liq td:nth-child(3) { width: auto !important; }
    .ig-liq tr.fw-bold td:nth-child(2) { text-align: right; }
}
