/* friends.css: New Carousel & Navigation Showcase Layout */

h3 {
    text-align: center;
}

/* --- 1. SHOWCASE LAYOUT (Desktop Grid / Mobile Stack) --- */
.friends-showcase-layout {
    display: grid;
    /* Default: Mobile/Small screen stack */
    grid-template-columns: 1fr;
    padding: 20px 0;
}

/* --- 2. FRIEND CAROUSEL STYLES (The Big Showcase) --- */
.friend-carousel {
    /* Enable horizontal scrolling and Flex layout */
    display: flex;
    overflow-x: scroll;
    padding-bottom: 20px; /* Space for scrollbar */
    gap: 30px; /* Space between cards */
    
    /* Crucial for smooth, centered scrolling */
    scroll-snap-type: x mandatory;
    scroll-padding: 0 10%; /* Ensures side cards are partially visible */

    /* Hide the scrollbar (optional, but cleaner) */
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

/* Hide the scrollbar in WebKit browsers */
.friend-carousel::-webkit-scrollbar {
    display: none;
}

.friend-card {
    /* Mobile/Small Screen Card Width */
    flex: 0 0 85vw; /* Take up 85% of viewport width */
    max-width: 500px; /* Limit max size on very large screens */
    height: auto;
    
    border: 1px solid var(--border-color);
    background-color: var(--color-secondary);
    color: var(--color-primary);
    
    display: flex;
    flex-direction: column;
    
    /* Ensure the card snaps to the center */
    scroll-snap-align: center;
}

/* Card Content Styling */
.card-media {
    /* Set a fixed height for the media area for consistency */
    position: relative;
    width: 100%;
    /* 16:10 Aspect Ratio (10/16 * 100% = 62.5%) */
    padding-bottom: 62.50%; /* <-- Enforces a fixed height relative to width */
    height: 0; /* Important: sets the base height to zero for the padding trick */
    overflow: hidden;
    filter: grayscale(100%); /* Apply the Noir style */
}

.card-media img {
    position: absolute; /* Add this if not present, to respect the padding-bottom container */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

.card-details {
    padding: 0px 20px 20px 20px; /* Reduced from 20px */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 2em;
    margin-bottom: 0px; /* Reduced from 5px */
    font-family: var(--font-family-header);
}

.card-vocation {
    font-style: italic;
    font-size: 0.9em;
    opacity: 0.7;
    margin-bottom: 10px;
}

.card-bio {
    flex-grow: 1; /* Pushes the footer down */
    margin-bottom: 5px; /* Reduced from 15px */
}

/* Card Footer and Links */
.card-footer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px dashed var(--border-color);
    padding-top: 10px;
    font-size: 0.85em;
}

.card-links a {
    margin-left: 10px;
    font-size: 1.2em;
}

/* --- 3. MEDIA EMBED RESPONSIVENESS (Showcase Video/Audio) --- */
.media-embed-wrapper {
    position: relative;
    width: 100%;
    /* 16:9 Aspect Ratio (9/16 * 100% = 56.25%) */
    padding-bottom: 56.25%; 
    height: 0;
    overflow: hidden;
}

.media-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    /* Remove grayscale filter from the media player content */
    filter: none;
}

/* --- 4. NAVIGATION LIST STYLES (The Clickable Names) --- */
.friend-nav-list {
    display: flex;
    flex-wrap: nowrap; /* Mobile: Horizontal row */
    overflow-x: scroll;
    gap: 15px;
    padding: 10px 0;
    justify-content: flex-start;
    
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none; /* Firefox */
}

.friend-nav-list::-webkit-scrollbar {
    display: none;
}

.nav-button {
    /* Style the button to look like part of the text/nav */
    flex-shrink: 0; /* Important: prevents shrinking in the row layout */
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px 15px;
    font-size: 1.1em;
    font-family: var(--font-family-body);
    color: var(--color-primary);
    opacity: 0.5;
    transition: opacity 0.3s, border-bottom 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap; /* Prevents button text from wrapping */
}

.nav-button:hover {
    opacity: 0.8;
}

.nav-button.active {
    opacity: 1;
    border-bottom: 2px solid var(--color-primary);
    font-weight: bold;
}


/* --- 5. RESPONSIVENESS: DESKTOP LAYOUT (Min 900px) --- */
@media (min-width: 900px) {
    .friends-showcase-layout {
        /* Desktop: Two-column layout */
        /* Carousel takes ~70%, Nav Column takes ~30% */
        grid-template-columns: 3fr 1fr;
        gap: 40px;
        align-items: start; /* Align items to the top of the grid area */
        max-width: 1200px;
        margin: 0 auto;
    }

    .friend-carousel {
        /* Desktop: Ensure carousel content is slightly less wide than the container */
        scroll-padding: 0 5%; 
        
        /* Make the cards slightly wider for a grander showcase */
        gap: 50px;
    }
    
    .friend-card {
        /* Desktop: Larger card size in the showcase */
        flex: 0 0 450px; 
    }

    .friend-nav-list {
        /* Desktop: Vertical Column for navigation */
        flex-direction: column;
        overflow-x: hidden; /* Prevent horizontal scrolling */
        overflow-y: auto; /* Enable vertical scrolling if many friends */
        max-height: 556px; /* Limit column height */
        border-left: 1px solid var(--border-color);
        padding: 10px 0 10px 20px;
    }

    .nav-button {
        /* Adjust padding for vertical column */
        padding: 8px 0;
        text-align: left;
    }
}

/* --- 5. RESPONSIVENESS: TABLET LAYOUT (Min 768px) --- */
@media (max-width: 768px) {
    h3 {
        text-align: center;
        font-size: 1rem;
        padding-bottom: 0;
    }
}