/* ============================================
   Mobile App Experience
   Only applies to screens <= 768px
   ============================================ */

@media (max-width: 768px) {

    /* Smooth scrolling & momentum */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior-y: contain;
    }

    /* Edge-to-edge content */
    body {
        padding-bottom: 70px; /* room for bottom nav */
        -webkit-tap-highlight-color: transparent;
    }

    body, p {
        margin: 0;
    }

    #main {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }

    /* Compact sticky header */
    #header {
        position: sticky;
        top: 0;
        z-index: 1000;
        background: #fdfcf9;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding: 6px 10px !important;
        box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    }

    #header .logo {
        display: none !important;
    }

    /* Phone numbers in header — horizontal row */
    #header .col-sm-12 {
        padding: 0 !important;
    }

    #header .col-sm-12 > div {
        margin-top: 0 !important;
        display: flex;
        justify-content: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .info-box-subtitle {
        font-size: 18px !important;
        justify-content: center !important;
    }

    /* Hide the desktop hamburger nav — bottom nav replaces it */
    #header .navbar {
        display: none !important;
    }

    /* ---- Bottom Navigation Bar ---- */
    .mobile-bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9999;
        background: #1a1a1a;
        display: flex;
        justify-content: space-around;
        align-items: stretch;
        height: 60px;
        box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .mobile-bottom-nav a {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: #888;
        text-decoration: none;
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 0.3px;
        transition: color 0.2s;
        min-height: 44px; /* touch target */
        padding: 4px 0;
        position: relative;
    }

    .mobile-bottom-nav a i {
        font-size: 20px;
        margin-bottom: 3px;
        transition: transform 0.2s;
    }

    .mobile-bottom-nav a:active i {
        transform: scale(0.85);
    }

    .mobile-bottom-nav a.active,
    .mobile-bottom-nav a:hover {
        color: #DAB255;
    }

    .mobile-bottom-nav a.nav-phone {
        color: #DAB255;
    }

    .mobile-bottom-nav a.nav-phone i {
        font-size: 22px;
        background: #DAB255;
        color: #000;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 0;
        margin-top: -14px;
        box-shadow: 0 2px 8px rgba(218,178,85,0.4);
    }

    /* Hide bottom nav on desktop */
    .mobile-bottom-nav {
        display: flex;
    }

    /* ---- Content sections edge-to-edge ---- */
    section, .section-padding {
        padding: 15px 0;
    }

    .ts-features .container,
    #news .container {
        padding: 0 8px !important;
    }

    /* ---- Full-width product cards ---- */
    .col-xs-12 {
        padding: 4px !important;
    }

    .latest-post {
        margin-bottom: 12px;
        border-radius: 8px;
        overflow: hidden;
    }

    .latest-post .post-body {
        padding: 10px 12px;
        height: auto;
    }

    .latest-post .post-title {
        font-size: 15px !important;
        line-height: 20px !important;
    }

    .latest-image {
        height: 180px !important;
        object-fit: cover;
    }

    /* ---- Gallery grid: 2 columns tight ---- */
    .gallery-img {
        height: auto !important;
        aspect-ratio: 1;
        object-fit: cover;
        border-radius: 4px;
    }

    #lightgallery {
        display: flex;
        flex-wrap: wrap;
    }

    #lightgallery > a {
        flex: 0 0 50%;
        max-width: 50%;
    }

    #lightgallery .col-md-3,
    #lightgallery .col-sm-3,
    #lightgallery .col-xs-4 {
        width: 100% !important;
        padding: 2px !important;
    }

    /* ---- Album detail page ---- */
    .image-top {
        float: none !important;
        width: 100% !important;
        max-height: none !important;
        margin: 0 0 12px 0 !important;
        border-radius: 0;
    }

    /* Slider full-bleed */
    .banner-area {
        height: 250px;
        margin-top: 0 !important;
    }

    #owl-demo {
        height: 250px;
    }

    #owl-demo .item div {
        height: 250px !important;
        background-position: center;
    }

    /* Banner title */
    .banner-title {
        font-size: 22px;
        padding: 10px;
    }

    /* ---- Section headings ---- */
    h1 {
        font-size: 22px;
        padding: 0 12px;
    }

    h2.into-sub-title,
    h3.into-sub-title {
        font-size: 18px;
        padding: 0 12px;
    }

    .ts-features .container > h3,
    .ts-features .container > h4,
    .ts-features .container > h5,
    .ts-features .container > p,
    .container > h3:not(.into-sub-title),
    .container > h4,
    .container > h5,
    .container > p {
        padding: 0 12px;
        font-size: 14px;
    }

    /* ---- Contact page service boxes ---- */
    .ts-service-box-bg {
        min-height: auto;
        padding: 20px 15px;
        margin: 0 8px 12px;
        border-radius: 10px;
    }

    /* ---- Buttons ---- */
    .btn-primary {
        display: block;
        width: calc(100% - 24px);
        margin: 10px 12px;
        padding: 14px 20px;
        font-size: 16px;
        border-radius: 10px;
        text-align: center;
    }

    /* Load more button — don't make full width */
    #load-more-btn {
        display: inline-block;
        width: auto;
    }

    /* ---- Footer compact ---- */
    .footer-main {
        padding: 20px 12px 10px;
    }

    .footer-widget {
        margin-top: 20px !important;
    }

    .footer-logo {
        width: 120px;
    }

    .footer .widget-title {
        margin-bottom: 15px;
    }

    .copyright {
        padding: 10px 12px;
        margin-bottom: 60px; /* above bottom nav */
    }

    /* ---- Pagination ---- */
    .pagination > a {
        width: auto;
        height: auto;
        padding: 10px 14px;
        font-size: 14px;
        border-radius: 6px;
    }

    /* ---- CKEditor content images ---- */
    .container img,
    section img:not(.gallery-img):not(.latest-image):not(.footer-logo):not(.menu_img) {
        max-width: 100%;
        height: auto;
    }

    /* ---- Decorative elements: hide on mobile ---- */
    .whatwedo {
        display: none;
    }

    /* Map full width */
    .map, .map iframe {
        width: 100% !important;
        height: 300px !important;
    }

    /* ---- Gallery page columns ---- */
    .column {
        flex: 50% !important;
        max-width: 50% !important;
    }

    /* Owl carousel photos */
    #albom_photos .item img {
        height: 180px !important;
        object-fit: cover;
        border-radius: 6px;
    }

    /* Facts area (dark section with CTA) */
    #facts .container {
        border-radius: 0 !important;
        padding: 20px 12px !important;
    }

    /* Dropdown menu for products (if shown) */
    .dropdown-menu {
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    .dropdown-menu > li > a {
        padding: 10px 15px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* Hide bottom nav on desktop */
@media (min-width: 769px) {
    .mobile-bottom-nav {
        display: none !important;
    }
}
