/* =====================================================================
   Jabal Al-Bena – mobile / tablet overrides
   Loaded AFTER site.css so every rule here wins on small screens.
   ===================================================================== */

/* ---------- Tablets and phones (< 992px) ---------- */
@media (max-width: 991.98px) {
    :root { --header-h: 78px; }
    .main-nav { padding: 8px 0; }
    .navbar-brand .logo { height: 52px; }
    .site-header.scrolled .navbar-brand .logo { height: 44px; }
    body.no-hero main { padding-top: var(--header-h); }
    .page-hero { margin-top: calc(-1 * var(--header-h)); padding: calc(var(--header-h) + 48px) 0 48px; }
    .page-hero::after { display: none; }
    .section { padding: 64px 0; }
}

/* ---------- Phones (< 768px) ---------- */
@media (max-width: 767.98px) {
    :root { --header-h: 72px; }
    .navbar-brand .logo { height: 46px; }

    /* Hero: fill the whole phone screen (svh = the visible part, excluding browser bars) */
    .hero { height: 100vh; height: 100svh; min-height: 100svh; max-height: none; }
    .hero-content { align-items: center; }
    .hero-box { padding-bottom: 40px; }
    .hero-kicker { font-size: .9rem; padding: 5px 12px; margin-bottom: 14px; }
    .hero-title { font-size: 2rem; line-height: 1.3; margin-bottom: 12px; }
    .hero-sub { font-size: 1rem; margin-bottom: 22px; }
    .hero-actions { gap: 10px; }
    .hero-actions .btn { width: 100%; padding: .7rem 1rem; }
    .hero .swiper-pagination { bottom: 20px; }
    .scroll-down { display: none; }

    /* Sections & headings */
    .section { padding: 52px 0; }
    .section-heading { margin-bottom: 26px; }
    .section-heading h2 { font-size: 1.5rem; }
    .section-heading p { font-size: 1rem; }

    /* Inner page banners */
    .page-hero { padding: calc(var(--header-h) + 40px) 0 40px; }
    .page-hero h1 { font-size: 1.65rem; }
    .page-hero .crumbs { font-size: .85rem; }
    .page-hero.small { padding: calc(var(--header-h) + 30px) 0 30px; }

    /* Project page: the info cards sit below the banner instead of overlapping it */
    .project-hero { padding-bottom: 40px; }
    .project-facts { display: grid; grid-template-columns: 1fr 1fr; margin-top: -16px; gap: 10px; }
    .fact { min-width: 0; padding: 12px 14px; gap: 10px; }
    .fact i { font-size: 1.3rem; }
    .fact strong { font-size: .95rem; }
    .project-details .section-heading { margin-top: 8px; }
    .gallery-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .video-wrap video { max-height: 280px; }
    .side-card { padding: 20px; }

    /* About */
    .about-media { padding: 0 0 22px 22px; }
    .about-frame { inset: 22px 22px 0 0; border-width: 3px; }
    .about-badge { padding: 10px 16px; }
    .about-badge strong { font-size: 1.5rem; }
    .goal-list { grid-template-columns: 1fr; gap: 8px; }

    /* Stats */
    .stats-section { padding: 48px 0; }
    .stat-item i { font-size: 1.8rem; }
    .stat-value { font-size: 2.2rem; }
    .stat-label { font-size: .95rem; }

    /* Services / projects cards */
    .service-card { padding: 26px 20px; }
    .service-icon { width: 58px; height: 58px; font-size: 1.7rem; }
    .project-body { padding: 16px 18px 20px; }
    .filter-bar { gap: 8px; margin-bottom: 28px; }
    .filter-chip { padding: 6px 14px; font-size: .9rem; }

    /* Contact */
    .contact-card { padding: 22px 16px; }
    .info-item { padding: 14px 16px; }
    .contact-map, .map-embed { aspect-ratio: 16/11; }

    /* CTA & footer */
    .cta-section { padding: 52px 0; }
    .site-footer { padding-top: 48px; }
    .footer-logo { height: 64px; }
    .footer-bottom { flex-direction: column; text-align: center; gap: 6px; margin-top: 34px; }

    /* Floating buttons */
    .whatsapp-float { bottom: 18px; inset-inline-start: 18px; padding: 12px; }
    .whatsapp-float span { display: none; }
    .back-to-top { bottom: 18px; inset-inline-end: 18px; width: 42px; height: 42px; }
}

/* ---------- Very small phones (< 400px) ---------- */
@media (max-width: 399.98px) {
    .hero-title { font-size: 1.75rem; }
    .project-facts { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: 1fr; }
}

/* ---------- Landscape phones: keep the hero usable ---------- */
@media (max-width: 991.98px) and (orientation: landscape) and (max-height: 500px) {
    .hero { height: auto; min-height: 100svh; }
    .hero-content { position: relative; padding: 110px 0 70px; }
}
