/* =========================================
   MEMBERS PAGE: CAROUSEL & MODAL LAYOUT
========================================= */

body {
    background-color: #f1f3f6; /* Flipkart-like light grey background */
    color: #333333;
}

/* --- 1. HERO & SEARCH BAR --- */
.members-hero {
    background-color: #ffffff;
    padding: 50px 20px 30px;
    text-align: center;
    border-bottom: 1px solid #eeeeee;
}

.members-hero h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #111111;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.members-hero p {
    color: #cc0000;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 25px;
}

.search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
}

.search-container input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    font-size: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 4px; /* Flipkart style square search */
    outline: none;
    transition: all 0.3s;
    font-family: inherit;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);
}

.search-container input:focus {
    border-color: #cc0000;
    box-shadow: 0 0 5px rgba(204,0,0,0.2);
}

.search-container i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #888;
    font-size: 1.1rem;
}

/* --- 2. GRID LAYOUT --- */
.members-grid-container {
    padding: 40px 0 60px;
}

.members-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

/* Card Styling (Flipkart Mobile App Style) */
.member-card {
    background: #ffffff;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.member-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-3px);
}

.mc-image-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 4/3; /* Slightly shorter than square */
    overflow: hidden;
    background: #f8f8f8;
}

.mc-image-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.5s ease;
}

.member-card:hover .mc-image-wrap img {
    transform: scale(1.05);
}

/* Red Tag */
.mc-tag {
    position: absolute;
    bottom: 0;
    left: 0;
    background-color: #cc0000;
    color: white;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Card Content Bottom */
.mc-content {
    padding: 12px;
    display: flex;
    align-items: center;
    flex: 1;
}

/* Large Number */
.mc-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: #e0e0e0;
    line-height: 1;
    margin-right: 12px;
    min-width: 30px;
    text-align: right;
}

.mc-details {
    flex: 1;
}

.mc-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #212121;
    margin-bottom: 4px;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.mc-subtitle {
    font-size: 0.7rem;
    color: #878787;
    text-transform: uppercase;
}
.mc-subtitle span {
    color: #cc0000;
    font-weight: 600;
}

/* NO RESULTS */
.no-results {
    width: 100%;
    text-align: center;
    padding: 50px;
    font-size: 1.1rem;
    color: #878787;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* =========================================
   3. MODAL / POPUP LAYOUT
========================================= */
.member-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 15px;
}

.member-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.member-modal-content {
    background: #ffffff;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 4px;
    overflow-y: auto;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.member-modal-overlay.active .member-modal-content {
    transform: translateY(0);
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: rgba(0,0,0,0.5);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: #fff;
    cursor: pointer;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.modal-header-img {
    width: 100%;
    height: 300px;
    position: relative;
}

.modal-header-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.modal-header-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
}

.modal-title-area {
    position: absolute;
    bottom: 15px;
    left: 20px;
    right: 20px;
    color: white;
    z-index: 5;
}

.modal-title-area h2 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2px;
    line-height: 1.1;
}

.modal-title-area p {
    font-size: 0.9rem;
    color: #ffcccc;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.modal-body {
    padding: 25px;
}

.modal-glance {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 15px;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #eeeeee;
    margin-bottom: 25px;
}
.modal-glance-item {
    font-size: 0.85rem;
    color: #212121;
}
.modal-glance-item strong {
    color: #878787;
    text-transform: uppercase;
    font-size: 0.75rem;
    display: block;
    margin-bottom: 2px;
}

.modal-section {
    margin-bottom: 20px;
}
.modal-section h3 {
    font-size: 1.1rem;
    color: #cc0000;
    margin-bottom: 8px;
}
.modal-section p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
}

.modal-quote {
    font-size: 1.05rem;
    font-style: italic;
    font-weight: 600;
    color: #212121;
    padding: 15px;
    background: #f8f8f8;
    border-left: 3px solid #cc0000;
    margin: 25px 0;
}

.modal-milestones {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.milestone-box {
    display: flex;
    gap: 15px;
}
.m-year {
    color: #cc0000;
    font-weight: 700;
    font-size: 1rem;
    min-width: 50px;
}
.m-text {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}


/* =========================================
   MOBILE RESPONSIVE
========================================= */
@media (max-width: 1024px) {
    .members-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .members-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .members-hero {
        padding: 30px 15px 20px;
    }
    .members-hero h1 {
        font-size: 1.8rem;
    }
    .members-hero p {
        font-size: 0.8rem;
    }
    
    .mc-number {
        font-size: 1.8rem;
        margin-right: 8px;
        min-width: 25px;
    }
    .mc-content {
        padding: 8px;
    }
    .mc-title {
        font-size: 0.85rem;
    }
    .mc-subtitle {
        font-size: 0.6rem;
    }

    .modal-body {
        padding: 15px;
    }
    .modal-header-img {
        height: 200px;
    }
    .modal-title-area h2 {
        font-size: 1.4rem;
    }
}
