/* css/team_grid_overlay.css - Updated for right-corner overlay and no gaps */

/* --- Page Specific Targeting --- */
.team-page {
     padding: 2rem 1.5rem;
     max-width: 1300px;
     margin: 0 auto;
}

.team-page h1 {
  font-size: 2.8rem;
  font-weight: 300;
  color: #2c3e50;
  margin: 1.5rem 0 1rem 0;
  text-align: center;
  border-bottom: none;
}

.team-page > h1 + p { /* Intro paragraph */
    margin-bottom: 3rem;
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
    max-width: 800px;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* --- Section Styling --- */
.team-page section {
    margin-bottom: 4rem;
}

.team-page section:last-child {
     margin-bottom: 2rem;
}

.team-page section h2 {
  font-size: 2rem;
  font-weight: 400;
  color: #34495e;
  margin: 2.5rem 0 1.5rem 0;
  position: relative;
  padding-bottom: 0.75rem;
  text-align: left;
}

.team-page section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: #3498db;
}

.team-page .section-description {
    color: #666;
    margin-bottom: 2.5rem;
    font-size: 1rem;
    line-height: 1.6;
    max-width: 800px;
    text-align: left;
}

/* --- Team Grid Layout --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0; /* No gap between grid items */
    justify-content: center;
    /* background-color: #000; */ /* Optional: if tiny lines appear between items */
}

.team-grid .loading-message {
    font-style: normal;
    color: #555;
    grid-column: 1 / -1;
    text-align: center;
    font-size: 1.1rem;
    padding: 2rem 0;
}

/* --- Team Member Item Styling --- */
.team-member-item {
    position: relative;
    overflow: visible;
    /* border-radius: 0; */ /* Removed for seamless grid */
    /* box-shadow: none; */ /* Removed for seamless grid */
    background-color: #333; /* Fallback/loading background */
    aspect-ratio: 3 / 4; /* Or your preferred aspect ratio */
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.01);
    /* transition: transform 0.3s ease; */ /* Hover effects might be less desirable in a no-gap grid */
}

/* .team-member-item:hover {
    transform: scale(1.02); /* Optional: can keep a slight scale effect */
/* } */

.team-member-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    /* border-radius: 0; */ /* Removed for seamless grid */
    /* transition: transform 0.4s ease; */
}

/* .team-member-item:hover img {
    transform: scale(1.05);
/* } */

.member-info-overlay {
    position: absolute;
    bottom: 10px; /* Adjust as needed */
    left: 10px;  /* Adjust as needed */
    width: auto;  /* Overlay width will be determined by its content */
    background: rgba(0, 0, 0, 0.70); /* Semi-transparent dark background */
    color: #fff;
    padding: 8px 12px; /* Padding inside the overlay */
    border-radius: 3px; /* Optional: slight rounding for the overlay box itself */
    box-sizing: border-box;
    text-align: left; /* Text inside the overlay will be left-aligned */
}

.member-info-overlay h3 { /* Member Name */
    font-size: 0.8rem; /* Adjust as needed */
    font-weight: 500;
    margin: 0 0 2px 0; /* Space below name */
    line-height: 1.2;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.member-info-overlay .role { /* Member Role */
    font-size: 0.8rem; /* Adjust as needed */
    font-weight: 300;
    color: #e0e0e0;
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    }
    .member-info-overlay {
        padding: 7px 10px;
        bottom: 8px;
        right: 8px;
    }
    .member-info-overlay h3 {
        font-size: 1rem;
    }
    .member-info-overlay .role {
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .team-page h1 {
        font-size: 2.4rem;
    }
    .team-page section h2 {
        font-size: 1.8rem;
    }
    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
     .member-info-overlay {
        padding: 6px 8px;
        bottom: 6px;
        right: 6px;
    }
    .member-info-overlay h3 {
        font-size: 0.9rem;
    }
     .member-info-overlay .role {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .team-page h1 {
        font-size: 2rem;
    }
    .team-page > h1 + p {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    .team-page section h2 {
        font-size: 1.6rem;
    }
    .team-grid {
        grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); /* Allow for smaller cards or go 1fr */
        /* For strictly two columns on small mobile, you might use:
           grid-template-columns: 1fr 1fr;
           If you want single column:
           grid-template-columns: 1fr;
           max-width: 280px;
           margin-left: auto;
           margin-right: auto;
        */
    }
    .member-info-overlay {
        padding: 5px 7px;
        bottom: 5px;
        right: 5px;
    }
    .member-info-overlay h3 {
        font-size: 0.85rem;
    }
    .member-info-overlay .role {
        font-size: 0.65rem;
    }
}

