* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    border: none;
    outline: none;
    text-decoration: none;
    scroll-behavior: smooth;
    font-family: --apple-system,  sans-serif,'Segoe UI', Tahoma, Geneva, Verdana;
}

:root {
    --bg-color: #fff;
    --snd-color: #765;
    --text-color: gray;
    --main-color: black;
}

html {
    font-size: 62.5%;
    overflow-x: hidden;
}


body {
    background: var(--main-color);
    color: var(--text-color);
    /* min-height: 100vh;
    line-height: 1.5; */
}

section {
    min-height: 100vh;
    padding: 10rem 9% 2rem;
}

/* blur bg */

.img-grad {
    position: absolute;
    top: 0;
    right: 0;
    opacity: 0.5;
    z-index: -1;
}

.layer-blur {
    height: 0;
    width: 30rem;
    position: absolute;
    top: 20%;
    right: 0;
    box-shadow: 0 0 700px 15px white;
    rotate: -30deg;
    z-index: -1;
}
/* header */





/* .container {
    width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    overflow: hidden;
} */

header {
    position: fixed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    /* padding: 1rem 5rem; */
    padding: 2rem 5%;
    z-index: 1000;
    top: 0;
    right: 0;
    backdrop-filter: blur(10px);
    width: 100%;
    transition: all 0.5s ease
}

.logo {
    margin: 0;
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    color: var(--bg-color);
}

.logo:hover {
    transform: scale(1.05);
}

nav {
    display: flex;
    align-items: center;
    gap: 3rem;
    margin-left: -5%;
}

nav a {
    font-size: 1rem;
    letter-spacing: 0.1rem;
    transition: color 0.2s ease;
    text-decoration: none;
    color: inherit;
}

nav a:hover,
nav a.active {
    color: rgb(230, 104, 104);
}

main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: calc(90vh - 6rem);
}

.home {
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* min-height: calc(90vh - 6rem); */
    gap: 2rem;
}

.home-content {
    max-width: 40rem;
    margin-left: 10%;
    z-index: 999;
    color: var(--bg-color);
}

.home-content h1 {
    font-size: 4rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    margin: 2rem 0;
    line-height: 1.2;
    text-shadow: 0 0 10px gray;
}

.desc {
    font-size: 1.2rem;
    letter-spacing: 0.05em;
    max-width: 35rem;
    color: gray;
}

/*about*/

.about {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    background: rgba(100, 93, 93, 0.37);
}

.heading {
    font-size: 3rem;
    text-align: left;
}

.about-content {
    padding: 0 4rem;
    color: white;
}

.about-content h3 {
    text-align: left;
    line-height: 1.2;
}

/* members */


.members-box {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
    padding: 0 2rem;
}

.members h3 {
    top: 50px;
}

.wrapper {
    display: grid;
    grid-template-columns: repeat(3, 1fr); 
    gap: 3rem;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    top: 20px;
    justify-items: center; 
}

.member-item {
    min-height: 450px;
    width: 100%;
    max-width: 450px;
    border: 0.3rem solid gray;
    border-radius: 2rem;
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    transition: 0.3s ease;
    background: var(--bg-color);
    color: var(--text-color);
    flex-direction: column;
    margin: 0;
    overflow: hidden; 
}


.member-item img {
    width: 12rem; 
    height: 12rem; 
    border-radius: 50%;
    border: 3px solid gray;
    box-shadow: 0 0 15px gray; 
    object-fit: cover; 
    object-position: center; 
    flex-shrink: 0; 
}

.member-item h3 {
    font-size: 2.5rem; 
    text-align: center;
    margin: 0.5rem 0;
    word-break: break-word;
}

.member-item p {
    font-size: 1.4rem;
    text-align: center;
    line-height: 1.4;
    margin: 0;
    padding: 0 1rem;
}


.member-item:nth-child(4),
.member-item:nth-child(5) {
    grid-column: span 1;
}


@media (min-width: 1600px) {
    .wrapper {
        max-width: 1500px;
        grid-template-columns: repeat(3, 1fr);
    }
    
    .member-item {
        max-width: 420px; 
        min-height: 460px;
    }
    
    .member-item img {
        width: 14rem;
        height: 14rem;
    }
    
    .member-item:nth-child(4) {
        grid-column: 2; 
    }
    
    .member-item:nth-child(5) {
        grid-column: 3; 
    }
}


@media (min-width: 1200px) and (max-width: 1599px) {
    .wrapper {
        max-width: 1200px;
        grid-template-columns: repeat(3, 1fr);
    }
    
    .member-item {
        max-width: 350px; 
        min-height: 420px; 
    }
    
    .member-item img {
        width: 11rem; 
        height: 11rem;
    }
    
    .member-item h3 {
        font-size: 2.3rem;
    }
    
    
    .member-item:nth-child(4) {
        grid-column: 2; 
    }
    
    .member-item:nth-child(5) {
        grid-column: 3; 
    }
}

@media (min-width: 1024px) and (max-width: 1199px) {
    .wrapper {
        max-width: 1000px;
        grid-template-columns: repeat(3, 1fr);
    }
    
    .member-item {
        max-width: 300px; 
        min-height: 400px;
        padding: 15px;
    }
    
    .member-item img {
        width: 10rem;
        height: 10rem;
    }
    
    .member-item h3 {
        font-size: 2.1rem;
    }
    
    .member-item p {
        font-size: 1.3rem;
    }
    
  
    .member-item:nth-child(4) {
        grid-column: 2;
    }
    
    .member-item:nth-child(5) {
        grid-column: 3;
    }
}


@media (min-width: 768px) and (max-width: 1023px) {
    .wrapper {
        grid-template-columns: repeat(2, 1fr); 
        max-width: 800px;
        gap: 2.5rem;
    }
    
    .member-item {
        max-width: 320px;
        min-height: 380px;
        padding: 15px;
    }
    
    .member-item img {
        width: 11rem;
        height: 11rem;
    }
    
    .member-item h3 {
        font-size: 2.4rem;
    }
    
    .member-item p {
        font-size: 1.3rem;
    }
    
    .member-item:nth-child(n) {
        grid-column: span 1;
    }
    

    .member-item:nth-child(5) {
        grid-column: 1 / span 2;
        justify-self: center;
        max-width: 320px;
    }
}

@media (min-width: 600px) and (max-width: 767px) {
    .wrapper {
        grid-template-columns: repeat(2, 1fr);
        max-width: 600px;
        gap: 2rem;
    }
    
    .member-item {
        max-width: 260px;
        min-height: 360px;
        padding: 12px;
    }
    
    .member-item img {
        width: 9rem;
        height: 9rem;
        border-width: 2px;
        box-shadow: 0 0 10px gray;
    }
    
    .member-item h3 {
        font-size: 2rem;
    }
    
    .member-item p {
        font-size: 1.2rem;
    }
    
    .member-item:nth-child(5) {
        grid-column: 1 / span 2;
        justify-self: center;
        max-width: 260px;
    }
}

@media (min-width: 480px) and (max-width: 599px) {
    .wrapper {
        grid-template-columns: 1fr;
        max-width: 400px;
        gap: 2rem;
    }
    
    .member-item {
        max-width: 350px;
        min-height: 380px;
        padding: 15px;
    }
    
    .member-item img {
        width: 11rem;
        height: 11rem;
    }
    
    .member-item h3 {
        font-size: 2.3rem;
    }
    
    .member-item p {
        font-size: 1.3rem;
    }
    
    
    .member-item:nth-child(n) {
        grid-column: 1;
    }
}


@media (max-width: 479px) {
    .wrapper {
        grid-template-columns: 1fr;
        max-width: 100%;
        gap: 1.5rem;
        padding: 0 1rem;
    }
    
    .member-item {
        max-width: 100%;
        min-height: 350px;
        padding: 12px;
        width: 100%;
    }
    
    .member-item img {
        width: 10rem;
        height: 10rem;
    }
    
    .member-item h3 {
        font-size: 2.1rem;
    }
    
    .member-item p {
        font-size: 1.2rem;
    }
    
    .members-box {
        padding: 0 1rem;
    }
}

.member-item img {
    aspect-ratio: 1 / 1; 
    background-color: #f0f0f0;
}

/* Lazy loading support */
.member-item img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.member-item img[loading="lazy"].loaded {
    opacity: 1;
}

@media (min-width: 1024px) {
    
    .wrapper:has(.member-item:nth-child(5):last-child) {
        grid-template-rows: auto auto;
    }
    
    .wrapper:has(.member-item:nth-child(5):last-child) .member-item:nth-child(4) {
        grid-column: 2;
        grid-row: 2;
    }
    
    .wrapper:has(.member-item:nth-child(5):last-child) .member-item:nth-child(5) {
        grid-column: 3;
        grid-row: 2;
    }
}

@media (min-width: 768px) {
    .wrapper:has(.member-item:nth-child(4):last-child) {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (min-width: 1024px) {
    .wrapper:has(.member-item:nth-child(6):last-child) {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .wrapper:has(.member-item:nth-child(6):last-child) .member-item:nth-child(n+4) {
        grid-column: span 1;
    }
}

/* hover fx */
@media (hover: hover) and (pointer: fine) {
    .member-item:hover {
        border-color: red;
        transform: scale(1.02);
    }
    
    .member-item:hover img {
        transform: scale(1.05);
        transition: transform 0.3s ease;
    }
}

/* for touch devices */
@media (hover: none) and (pointer: coarse) {
    .member-item:active {
        border-color: red;
        transform: scale(0.98);
    }
    
    .member-item {
        -webkit-tap-highlight-color: transparent;
    }
}

/* hdpi */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .member-item {
        border-width: 0.15rem; 
    }
    
    .member-item img {
        border-width: 1.5px;
    }
}

/* dark mode supp*/
@media (prefers-color-scheme: dark) {
    .member-item {
        background: #1a1a1a;
        color: #e0e0e0;
        border-color: #555;
    }
    
    .member-item img {
        border-color: #666;
        box-shadow: 0 0 15px #444;
        background-color: #2a2a2a;
    }
    
    .member-item:hover {
        border-color: #ff3333;
    }
    
    .member-item:hover img {
        border-color: #ff3333;
    }
}


@media print {
    .member-item {
        border: 1px solid #000;
        min-height: auto;
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .member-item img {
        width: 8rem;
        height: 8rem;
        border: 1px solid #000;
        box-shadow: none;
    }
    
    .member-item:hover {
        transform: none;
        border-color: #000;
    }
}


/* 
.members {
    background: white;
} */

/* .members-box {
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    
}

.members .heading {
    margin-bottom: 5rem;
}

.members-box img{
    width: 15rem;
    border-radius: 50%;
    border: 3px solid gray;
    box-shadow: 0 0 25px gray;
    
}

.wrapper {
    display: grid;
    grid-template-columns: repeat(3,1fr);
    gap: 3rem;
    
}



.member-item {
    min-height: 450px;
    max-width: 450px;
    border: 0.3rem solid gray;
    border-radius: 2rem;
    margin: 0 2rem;
    padding: 20px 20px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    transition: 0.3s ease;
    background: var(--bg-color);
    color: var(--text-color);
    flex-direction: column;
}

.member-item h3 {
    font-size: 3rem;
}

.member-item:hover {
    border-color: red;
    transform: scale(1.02);
} */

/* overlay */

.member-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
}

.member-popup-overlay.active {
    display: flex;
    opacity: 1;
}

.member-popup {
    background: var(--bg-color, #fff);
    color: var(--text-color, #333);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    border: 0.3rem solid gray;
    border-radius: 2rem;
    padding: 30px;
    position: relative;
    transform: translateY(-30px) scale(0.95);
    transition: all 0.4s ease;
    overflow-y: auto;
    box-shadow: 0 0 25px gray;
}


.member-popup-overlay.active .member-popup {
    transform: translateY(0) scale(1);
}

.closepopup {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2.5rem;
    cursor: pointer;
    color: gray;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
    z-index: 10;
}


.closepopup:hover {
    color: red;
    transform: rotate(90deg);
}

.popupcontent {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 30px;
}

.popupleft {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid gray;
}

.popupleft img {
    width: 15rem;
    height: 15rem;
    border-radius: 50%;
    border: 3px solid gray;
    box-shadow: 0 0 25px gray;
    object-fit: cover;
}

.basicinfo {
    text-align: center;
}

.basicinfo h2 {
    font-size: 3rem;
    color: var(--text-color, #333);
    margin-bottom: 0.5rem;
}


.basic-info h3 {
    font-size: 1.8rem;
    color: gray;
    margin-bottom: 0.5rem;
    font-weight: normal;
}

.course-info {
    font-size: 1.5rem;
    color: var(--text-color, #333);
    font-weight: 500;
}


.popupright {
    flex: 1;
}

.detailsgrid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.detailitem {
    padding: 1rem;
    background: rgba(128, 128, 128, 0.1);
    border-radius: 1rem;
    border-left: 4px solid gray;
    transition: 0.3s ease;
}

.detailitem:hover {
    border-left-color: red;
    background: rgba(255, 0, 0, 0.05);
}

.detailitem.full-width {
    grid-column: 1 / -1;
}

.detail-label {
    font-weight: bold;
    color: var(--text-color, #333);
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.detail-value {
    color: var(--text-color, #555);
    font-size: 1.1rem;
    line-height: 1.5;
    word-break: break-word;
}


#popupmotto .detail-value {
    font-style: italic;
    color: red;
    font-size: 1.2rem;
}


#popCrush .detail-value {
    color: #ff4081;
    font-weight: 500;
}



@media (min-width: 768px) {
    .popupcontent {
        flex-direction: row;
        gap: 3rem;
    }
    
    .popupleft {
        width: 250px;
        flex-shrink: 0;
        border-bottom: none;
        border-right: 2px solid gray;
        padding-right: 3rem;
        padding-bottom: 0;
    }
    
    .detailsgrid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .detailitem.full-width {
        grid-column: 1 / -1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.detailitem {
    animation: slideIn 0.5s ease forwards;
    opacity: 0;
}

.detailitem:nth-child(1) { animation-delay: 0.1s; }
.detailitem:nth-child(2) { animation-delay: 0.15s; }
.detailitem:nth-child(3) { animation-delay: 0.2s; }
.detailitem:nth-child(4) { animation-delay: 0.25s; }
.detailitem:nth-child(5) { animation-delay: 0.3s; }
.detailitem:nth-child(6) { animation-delay: 0.35s; }
.detailitem:nth-child(7) { animation-delay: 0.4s; }
.detailitem:nth-child(8) { animation-delay: 0.45s; }
.detailitem:nth-child(9) { animation-delay: 0.5s; }
.detailitem:nth-child(10) { animation-delay: 0.55s; }
.detailitem:nth-child(11) { animation-delay: 0.6s; }
.detailitem:nth-child(12) { animation-delay: 0.65s; }

.member-popup::-webkit-scrollbar {
    width: 8px;
}

.member-popup::-webkit-scrollbar-track {
    background: rgba(128, 128, 128, 0.1);
    border-radius: 10px;
}

.member-popup::-webkit-scrollbar-thumb {
    background: gray;
    border-radius: 10px;
}

.member-popup::-webkit-scrollbar-thumb:hover {
    background: red;
}


/* footer  */

.footer {
    display: flex;
    justify-content: center;
    background: white;
}