/* =====================================================
   Boondockery Public Site Styles
   ===================================================== */

/* Hero */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
                url('/Content/images/hero-bg.jpg') center/cover no-repeat;
    min-height: 480px;
    display: flex;
    align-items: center;
    color: #fff;
}

.hero-section .hero-content {
    text-align: center;
    /*padding: 2rem;*/
    padding-bottom: 6rem; /* Extra space for PWA install banner */
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.hero-section .tagline {
    font-size: 1.8rem;
    font-family: 'Source Code Pro', monospace;
    font-weight: 600;
    margin-top: -0.5rem;
    margin-bottom: 2.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.6);
    letter-spacing: 0.05em;
}

/* Stats bar */
.stats-bar {
    background: #4a7c59;
    color: #fff;
    padding: 1rem 0;
}

.stats-bar .stat-item {
    text-align: center;
}

.stats-bar .stat-number {
    font-size: 2rem;
    font-weight: 700;
}

.stats-bar .stat-label {
    font-size: 0.85rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Location cards */
.location-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.location-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.location-card .card-img-top {
    height: 180px;
    object-fit: cover;
    background: #e9ecef;
}

.location-card .card-img-placeholder {
    height: 180px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #adb5bd;
}

.star-rating {
    color: var(--bdk-text, #333);
}

.terrain-badge {
    font-size: 0.75rem;
    padding: 0.2em 0.6em;
    background: #4a7c59;
    color: #fff;
    border-radius: 12px;
}

/* How it works */
.how-it-works .step-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Activity feed */
.activity-feed .activity-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.activity-feed .activity-item:last-child {
    border-bottom: none;
}

/* Map page */
.map-fullscreen {
    position: fixed;
    top: 56px; /* below navbar */
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

#map-container {
    width: 100%;
    height: 100%;
}

/* Location detail */
.location-detail-header {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 1.5rem 0;
}

.location-detail-section {
    padding: 1.5rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.amenity-chip {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 16px;
    padding: 0.2em 0.75em;
    font-size: 0.82rem;
    margin: 0.2em;
}

.verified-badge {
    background: #1976d2;
    color: #fff;
    border-radius: 4px;
    padding: 0.15em 0.5em;
    font-size: 0.78rem;
}

.closed-badge {
    background: #c62828;
    color: #fff;
    border-radius: 4px;
    padding: 0.15em 0.5em;
    font-size: 0.78rem;
}

/* Review cards */
.review-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

/* =========================================================
   Mobile responsiveness — ≤768px
   ========================================================= */
@media (max-width: 768px) {
    /* Navbar */
    .navbar-brand {
        font-size: 1rem;
    }

    /* Map page — fixed map shrinks to viewport */
    .map-fullscreen {
        top: 56px;
    }

    /* Location detail header */
    .location-detail-header {
        padding: 1rem 0;
    }

    .location-detail-header h1 {
        font-size: 1.4rem;
    }

    /* Featured business / listing cards */
    .listing-card .card-img-top {
        height: 160px;
        object-fit: cover;
    }

    /* Sponsored post layout */
    .sponsored-hero {
        flex-direction: column !important;
    }

    .sponsored-hero img {
        width: 100% !important;
        max-height: 220px;
        object-fit: cover;
    }

    /* AdSense slots — constrain on small screens */
    .adsbygoogle {
        display: block;
        max-width: 100% !important;
    }

    /* Review card condensed */
    .review-card {
        padding: 0.75rem;
    }

    /* Footer columns stack */
    footer .row > div {
        text-align: center !important;
        margin-bottom: 0.75rem;
    }

    footer .row > div:last-child {
        text-align: center !important;
    }

    footer a {
        display: inline-block;
        margin: 0.2rem 0.4rem;
    }

    /* Hide sidebar widgets on mobile */
    .sidebar-widget {
        display: none;
    }

    /* Amenity chips wrap cleanly */
    .amenity-chip {
        font-size: 0.75rem;
        padding: 0.15em 0.55em;
    }
}

/* =========================================================
   Small phones — ≤480px
   ========================================================= */
@media (max-width: 480px) {
    .location-detail-header h1 {
        font-size: 1.2rem;
    }

    .verified-badge,
    .closed-badge {
        font-size: 0.7rem;
    }

    /* Stack nav items tighter */
    .navbar .nav-link {
        padding: 0.3rem 0.5rem;
        font-size: 0.9rem;
    }

    /* Chat responsiveness */
    #chat-container {
        height: calc(100vh - 150px) !important;
    }

    .msg-menu {
        opacity: 1 !important; /* Always show on touch */
    }

    /* Larger touch targets */
    .btn-sm {
        min-height: 38px;
        min-width: 38px;
    }

    /* Form inputs */
    .form-control, .form-select {
        font-size: 16px !important; /* Prevent iOS zoom */
    }

    /* Card stacking */
    .card {
        margin-bottom: 1rem;
    }

    /* Modal fullscreen on mobile */
    .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100%;
    }

    .modal-content {
        height: 100%;
        border-radius: 0;
    }
}

/* =========================================================
   Touch device enhancements
   ========================================================= */
@media (hover: none) and (pointer: coarse) {
    /* Larger tap targets */
    .btn, .nav-link, .dropdown-item {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }

    /* Show context menus without hover */
    .msg:active .msg-menu,
    .location-card:active .card-actions {
        opacity: 1;
    }

    /* Disable hover effects */
    .card:hover {
        transform: none;
    }
}
