/**
 * Leonards Homes — Mobile & tablet responsive overrides
 */

html {
    overflow-x: clip;
}

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

/* ---- Page heroes / breadcrumbs ---- */
.bg-breadcrumb {
    background-attachment: scroll !important;
}

.bg-breadcrumb .display-3,
.bg-breadcrumb h3.display-3 {
    font-size: clamp(1.65rem, 5.5vw, 3rem);
    line-height: 1.2;
}

@media (max-width: 767.98px) {
    .bg-breadcrumb {
        padding: 72px 0 28px !important;
    }

    .bg-breadcrumb .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .breadcrumb {
        font-size: 0.85rem;
        flex-wrap: wrap;
    }
}

/* ---- Section titles ---- */
@media (max-width: 767.98px) {
    .section-title::before,
    .section-title::after {
        display: none;
    }

    .section-heading {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }
}

/* ---- Navbar brand ---- */
@media (max-width: 575.98px) {
    .navbar-brand .brand-text {
        font-size: 0.95rem !important;
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .site-navbar {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
    }
}

/* ---- Hero carousel ---- */
@media (max-width: 575.98px) {
    .carousel-header .carousel-inner .carousel-item {
        min-height: 58vh;
    }

    .carousel-header .carousel-inner .carousel-item .carousel-caption {
        padding: 56px 10px 72px;
    }

    .hero-content-panel {
        padding: 1.15rem 0.85rem;
    }

    .hero-title {
        font-size: clamp(1.4rem, 6vw, 1.85rem);
    }

    .hero-lead {
        font-size: 0.88rem;
        margin-bottom: 1rem;
    }

    .hero-search-wrap {
        margin-top: -20px;
        padding-bottom: 1rem;
    }

    .hero-indicators {
        margin-bottom: 2.5rem !important;
    }

    .hero-actions .btn {
        width: 100%;
        min-width: 0 !important;
    }
}

/* ---- About image ---- */
@media (max-width: 767.98px) {
    .about-image-frame::before {
        top: 8px;
        left: 8px;
        right: -8px;
        bottom: -8px;
    }

    .about-image-frame img {
        min-height: 220px;
    }

    .about-badge {
        bottom: 12px;
        right: 12px;
        padding: 10px 14px;
    }

    .about-badge-number {
        font-size: 1.35rem;
    }
}

/* ---- Property cards ---- */
@media (max-width: 575.98px) {
    .property-card-img {
        height: 220px;
    }

    .property-price {
        font-size: 0.85rem;
        padding: 6px 10px;
        max-width: calc(100% - 32px);
        word-break: break-word;
    }

    .property-card-body {
        padding: 1.15rem;
    }

    .property-card-body .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .property-card-body .btn + .btn {
        margin-left: 0 !important;
    }
}

/* ---- Stats, search, forms ---- */
@media (max-width: 575.98px) {
    .sale-stat-number {
        font-size: 1.25rem;
    }

    .sale-stat-label {
        font-size: 0.72rem;
    }

    .sale-search-panel,
    .sale-form-card {
        padding: 1.25rem !important;
    }

    .sale-search-panel .btn,
    .hero-search-form .btn {
        padding-top: 0.55rem !important;
        padding-bottom: 0.55rem !important;
    }

    .hostel-form-section-title {
        font-size: 1rem;
    }
}

/* ---- Section nav pills ---- */
@media (max-width: 575.98px) {
    .dev-nav-pill {
        width: 100%;
        justify-content: center;
    }
}

/* ---- Contact map ---- */
@media (max-width: 767.98px) {
    .contact-map-iframe {
        height: clamp(260px, 45vh, 400px) !important;
    }

    .contact-card,
    .contact-info-card {
        margin-bottom: 1rem;
    }
}

/* ---- Footer ---- */
@media (max-width: 991.98px) {
    .footer-grid {
        --bs-gutter-x: 0.85rem;
        --bs-gutter-y: 1.75rem;
    }

    .footer-col {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        min-width: 0;
    }

    .footer-brand,
    .footer-heading,
    .footer-links,
    .footer-contact-list,
    .footer-social {
        text-align: left;
        width: 100%;
    }

    .footer-col-brand .footer-brand {
        margin-bottom: 0.75rem !important;
    }

    .footer-brand-heading {
        margin-bottom: 0.75rem;
    }

    .footer-logo-link {
        justify-content: flex-start;
        gap: 0.5rem;
        margin-bottom: 0.65rem;
    }

    .footer-logo-link span {
        font-size: 0.95rem;
        line-height: 1.25;
    }

    .footer-logo {
        height: 40px;
    }

    .footer-tagline {
        font-size: 0.78rem;
        line-height: 1.5;
        margin-bottom: 0;
    }

    .footer-heading {
        font-size: 0.9rem;
        margin-top: 0;
        margin-bottom: 0.75rem;
        padding-bottom: 0.45rem;
        width: 100%;
    }

    .footer-heading > i {
        font-size: 0.82rem;
        flex-shrink: 0;
    }

    .footer-links li {
        margin-bottom: 0.35rem;
    }

    .footer-links a {
        display: flex;
        align-items: flex-start;
        gap: 0.45rem;
        font-size: 0.78rem;
        line-height: 1.35;
        padding: 0.15rem 0;
        transform: none;
    }

    .footer-links a i {
        width: 14px;
        margin-top: 0.15rem;
        font-size: 0.72rem;
        flex-shrink: 0;
    }

    .footer-contact-list li {
        justify-content: flex-start;
        align-items: flex-start;
        text-align: left;
        max-width: none;
        margin-left: 0;
        margin-right: 0;
        gap: 0.5rem;
        margin-bottom: 0.55rem;
    }

    .footer-icon {
        width: 26px;
        height: 26px;
        font-size: 0.68rem;
        border-radius: 7px;
        margin-top: 0.05rem;
    }

    .footer-contact-list a {
        font-size: 0.78rem;
        line-height: 1.35;
        padding-top: 0;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .footer-social {
        margin-top: 0.85rem;
        padding-top: 0.75rem;
        width: 100%;
    }

    .footer-social-label {
        font-size: 0.72rem;
        margin-bottom: 0.55rem;
    }

    .footer-social-links {
        justify-content: flex-start;
        gap: 0.45rem;
    }

    .footer-social-links a {
        width: 32px;
        height: 32px;
        font-size: 0.82rem;
    }
}

@media (max-width: 575.98px) {
    .footer-grid {
        --bs-gutter-x: 0.65rem;
    }

    .footer-heading {
        font-size: 0.84rem;
    }

    .footer-links a,
    .footer-contact-list a {
        font-size: 0.74rem;
    }
}

/* ---- CTA sections ---- */
@media (max-width: 767.98px) {
    .home-cta-inner {
        padding: 2rem 1.25rem;
        text-align: center;
    }

    .home-cta-inner .btn {
        width: 100%;
        margin: 0 0 0.5rem !important;
    }
}

/* ---- Tables (public) ---- */
@media (max-width: 767.98px) {
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }
}

/* ---- General containers ---- */
@media (max-width: 575.98px) {
    .container,
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .py-5 {
        padding-top: 2.5rem !important;
        padding-bottom: 2.5rem !important;
    }
}
