/**
 * Barber Gallery/Directory Styles
 */

/* Container */
.barber-gallery-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.barber-gallery-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color, #FFFFFF);
    position: relative;
}

.barber-gallery-container h1::after {
    content: '';
    display: block;
    width: 100px;
    height: 2px;
    background-color: var(--accent-color, #d0a84a);
    margin: 10px auto 0;
}

/* Location Filters */
.location-filter {
    margin-bottom: 40px;
    text-align: center;
}

.location-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.location-link {
    display: inline-block;
    padding: 8px 16px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(208, 168, 74, 0.3);
    color: var(--primary-color, #FFFFFF);
    text-decoration: none;
    border-radius: 30px;
    transition: all 0.3s ease;
}

.location-link:hover {
    background-color: rgba(208, 168, 74, 0.2);
    border-color: var(--accent-color, #d0a84a);
}

.location-link.active {
    background-color: var(--accent-color, #d0a84a);
    color: black;
    border-color: var(--accent-color, #d0a84a);
}

/* Barber Cards */
.barber-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.barber-card {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.barber-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color, #d0a84a);
}

.barber-card-image {
    position: relative;
    height: 250px;
    overflow: hidden;
    flex-shrink: 0;
}

.barber-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top; /* Position from top to show faces */
    transition: transform 0.5s ease;
    background-color: #1a1a1a; /* Added background color as fallback */
}

.barber-card:hover .barber-card-image img {
    transform: scale(1.05);
}

.profile-pic-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #1a1a1a;
    background-image: linear-gradient(45deg, #222222 25%, #1a1a1a 25%, #1a1a1a 50%, #222222 50%, #222222 75%, #1a1a1a 75%, #1a1a1a 100%);
    background-size: 10px 10px;
}

.profile-pic-placeholder span {
    font-size: 100px;
    color: var(--accent-color, #d0a84a);
    opacity: 0.8;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.barber-card-info {
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.barber-name {
    font-size: 1.5rem;
    margin: 0 0 10px;
    color: var(--primary-color, #FFFFFF);
}

.barber-location {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--primary-color, #FFFFFF);
    opacity: 0.8;
    font-size: 0.9rem;
}

.barber-instagram {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.barber-instagram a {
    color: var(--accent-color, #d0a84a);
    text-decoration: none;
    transition: color 0.3s ease;
}

.barber-instagram a:hover {
    text-decoration: underline;
}

.barber-stats {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
}

.photo-count {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color, #FFFFFF);
    opacity: 0.8;
    font-size: 0.9rem;
}

.view-profile-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 0px); /* Adjust for container padding */
    margin-top: auto; /* Push to bottom */
    padding: 10px;
    background-color: var(--accent-color, #d0a84a);
    color: black;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.3s ease;
    text-align: center;
    clear: both; /* Ensure it appears below other elements */
    position: relative; /* Establish positioning context */
    box-sizing: border-box; /* Include padding in width calculation */
    max-width: 160px; /* Limit width to prevent overflow */
    margin-left: auto;
    margin-right: auto;
}

.view-profile-button:hover {
    background-color: #b8941f;
}

/* Empty State */
.empty-barbers {
    text-align: center;
    padding: 50px 0;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .barber-cards {
        grid-template-columns: 1fr;
    }
    
    .location-links {
        flex-direction: column;
        align-items: center;
    }
    
    .location-link {
        width: 100%;
        max-width: 300px;
    }
}