/* --- public/css/masseur-list.css --- */

/* =========================================
   1. HERO & PAGE LAYOUT
   ========================================= */
.masseur-directory-page {
    padding-bottom: 80px;
    background-color: #F8FAFC; 
    min-height: 100vh;
}

.directory-hero-banner {
    background: linear-gradient(135deg, var(--brand-primary, #0A2540) 0%, var(--brand-accent, #1B9A93) 100%) !important;
    border-bottom-left-radius: 32px;
    border-bottom-right-radius: 32px;
}

.directory-hero-banner::before,
.directory-hero-banner .hero-overlay {
    display: none !important;
}

.directory-hero-banner .hero-content h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 12px;
    letter-spacing: 1px;
    color: #FFFFFF;
    text-shadow: none; 
}

.directory-hero-banner .hero-content p {
    font-size: 1.1rem;
    font-weight: 500;
    opacity: 0.9;
    color: #FFFFFF;
    max-width: 600px;
}

/* =========================================
   2. FILTER / SORT BAR
   ========================================= */
.filter-bar-wrapper {
    margin-top: -26px; 
    position: relative;
    z-index: 10;
    display: flex;
    justify-content: center;
    padding: 0 20px;
}

.filter-controls {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(225, 232, 237, 0.8);
    border-radius: 50px;
    display: inline-flex;
    padding: 6px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.filter-btn {
    background: transparent;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted, #6B7280);
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    color: var(--brand-primary, #0A2540);
}

.filter-btn.active {
    background: var(--brand-primary, #0A2540);
    color: #FFFFFF;
    box-shadow: 0 4px 15px rgba(10, 37, 64, 0.2);
}

/* =========================================
   3. ROSTER GRID & LOAD MORE
   ========================================= */
.directory-content {
    margin-top: 40px;
}

.masseur-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 32px;
}

.load-more-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.load-more-btn {
    background: #FFFFFF;
    color: var(--brand-primary, #0A2540);
    border: 1px solid rgba(225, 232, 237, 0.8);
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.load-more-btn:hover {
    background: #F8FAFC;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

/* =========================================
   4. THE MASSEUR CARD
   ========================================= */
.directory-card {
    background: #FFFFFF;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(225, 232, 237, 0.8);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none; 
    color: inherit;
    /* Opacity starts at 0 for the JS fade-in animation */
    opacity: 0;
}

.directory-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.1);
}

@keyframes fadeUpIn {
    0% { opacity: 0; transform: translateY(15px); }
    100% { opacity: 1; transform: translateY(0); }
}

.card-photo-wrapper {
    width: 100%;
    aspect-ratio: 3 / 4; 
    position: relative;
    overflow: hidden; 
    border-bottom: 1px solid rgba(225, 232, 237, 0.5);
    background-color: #F1F5F9;
}

.card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top; 
    transition: transform 0.5s ease; 
}

.directory-card:hover .card-photo {
    transform: scale(1.05);
}

/* --- THE PREMIUM FALLBACK FIX --- */
.fallback-photo {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%); /* Deep slate mystery */
    display: flex;
    align-items: center;
    justify-content: center;
}

.fallback-photo i {
    font-size: 4.5rem;
    color: rgba(255, 255, 255, 0.15); /* Subtle watermark icon */
}

/* Glassmorphism Overlays */
.glass-badge {
    position: absolute;
    background: rgba(10, 37, 64, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #FFFFFF;
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-badge.top-right {
    top: 16px;
    right: 16px;
    padding: 6px 12px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.glass-badge.top-right .star-icon {
    color: #FBBF24; 
}

.glass-badge.top-right .review-count {
    font-weight: 500;
    font-size: 0.75rem;
    opacity: 0.9;
}

.glass-badge.bottom-left {
    bottom: 16px;
    left: 16px;
    font-size: 0.85rem;
    padding: 6px 14px;
    background: rgba(27, 154, 147, 0.85); 
}

/* Card Information */
.card-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.masseur-name {
    font-size: 1.4rem;
    font-weight: 900;
    color: var(--text-main, #1F2937);
    margin-bottom: 6px;
}

.store-location {
    font-size: 0.9rem;
    color: var(--text-muted, #6B7280);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}

.store-location i {
    color: var(--brand-accent, #1B9A93);
}

.card-vitals {
    margin-top: auto; 
    padding-top: 16px;
    border-top: 1px dashed var(--border-light, #E1E8ED);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vitals-text {
    font-size: 0.85rem;
    color: #9CA3AF;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Graceful degradation for empty vitals */
.empty-vitals {
    font-style: italic;
    color: #CBD5E1;
    font-weight: 500;
}

.forward-icon {
    color: #CBD5E1;
    font-size: 1rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.directory-card:hover .forward-icon {
    color: var(--brand-primary, #0A2540);
    transform: translateX(4px); 
}


/* =========================================
   5. MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 1024px) {
    .masseur-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .directory-hero-banner {
        border-bottom-left-radius: 20px;
        border-bottom-right-radius: 20px;
    }

    .directory-hero-banner .hero-content h1 {
        font-size: 2rem;
    }

    .filter-bar-wrapper {
        margin-top: -20px;
        padding: 0 16px;
    }

    .filter-controls {
        width: 100%;
        display: flex;
    }

    .filter-btn {
        flex: 1;
        padding: 10px 8px;
        font-size: 0.9rem;
    }

    /* Force 2 columns on mobile */
    .masseur-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px; 
    }

    .directory-card {
        border-radius: 16px;
    }

    .glass-badge.top-right {
        top: 10px;
        right: 10px;
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .glass-badge.top-right .review-count {
        font-size: 0.65rem;
    }

    .glass-badge.bottom-left {
        bottom: 10px;
        left: 10px;
        padding: 4px 10px;
        font-size: 0.75rem;
    }

    .card-info {
        padding: 12px;
    }

    .masseur-name {
        font-size: 1.15rem;
    }

    .store-location {
        font-size: 0.8rem;
        margin-bottom: 12px;
    }

    .card-vitals {
        padding-top: 12px;
    }

    .vitals-text {
        font-size: 0.75rem;
    }
    
    .load-more-btn {
        width: 100%;
        justify-content: center;
    }
}