/* --- Universal Styles & "Scholar's Desk" Dark Theme --- */
* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.8;
    color: #EAEAEA;
    background-color: #121212;
    background-image: radial-gradient(ellipse at top, #2d3436, #121212);
    background-attachment: fixed;
}
.container { width: 90%; max-width: 1100px; margin: 0 auto; }
h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', serif;
    color: #FFFFFF;
    line-height: 1.3;
    font-weight: 700;
}
h2 { font-size: 3rem; } h3 { font-size: 2.2rem; } h4 { font-size: 1.5rem; }

/* --- Buttons --- */
.btn { display: inline-block; padding: 12px 30px; border-radius: 2px; font-weight: 600; text-decoration: none; transition: all 0.3s ease; cursor: pointer; text-transform: uppercase; letter-spacing: 0.5px; font-size: 0.9rem; }
.btn-primary { background-color: #C0A062; color: #121212; border: 2px solid #C0A062; }
.btn-primary:hover { background-color: transparent; color: #C0A062; }
.btn-secondary { border: 2px solid #C0A062; color: #C0A062; background: transparent; }
.btn-secondary:hover { background-color: #C0A062; color: #121212; }

/* --- UPDATED: Header & Navigation --- */
.main-header { background-color: rgba(18, 18, 18, 0.85); backdrop-filter: blur(10px); padding: 15px 0; position: sticky; top: 0; z-index: 1000; border-bottom: 1px solid #2a2a2a; }
.main-header .container { display: flex; justify-content: space-between; align-items: center; }
.logo {
    text-decoration: none; /* Removes the default link underline */
}
.logo h1 {
    font-size: 1.8rem;
    transition: color 0.3s ease; /* Adds smooth color change on hover */
}
/* This new rule adds the hover effect to the title */
.logo:hover h1 {
    color: #C0A062; /* Changes text color to the accent gold on hover */
}
.main-nav ul { list-style: none; display: flex; }
.main-nav ul li { margin-left: 35px; }
.main-nav ul li a { color: #EAEAEA; text-decoration: none; font-weight: 600; transition: color 0.3s ease, border-color 0.3s ease; padding-bottom: 5px; border-bottom: 2px solid transparent; }
.main-nav ul li a:hover { color: #C0A062; border-bottom-color: #C0A062; }

/* --- Homepage Sections --- */
.hero-section { text-align: center; padding: 120px 0; }
.hero-section h2 { max-width: 800px; margin: 0 auto 20px auto; }
.hero-section p { font-size: 1.2rem; max-width: 600px; margin: 0 auto 30px auto; color: #cccccc; }
.web-pages-section, .join-us-section { background-color: rgba(0,0,0,0.2); padding: 80px 0;}

/* --- Page Buttons (Articles) --- */
.page-buttons-grid { display: grid; gap: 30px; margin-top: 40px; grid-template-columns: 1fr; }
.page-button { background-color: #1f1f1f; padding: 30px; text-decoration: none; border: 1px solid #333; transition: all 0.3s ease; display: flex; flex-direction: column; }
.page-button:hover { transform: translateY(-5px); border-color: #C0A062; box-shadow: 0 5px 15px rgba(0,0,0,0.2); text-decoration: none; }
.page-button h4 { color: #FFFFFF; margin-bottom: 10px; }
.page-button p { color: #bbbbbb; font-size: 1rem; flex-grow: 1; }

/* --- Aesthetic Members Section --- */
.members-section { text-align: center; padding: 80px 0; }
.members-grid { 
    display: grid; 
    gap: 30px; 
    margin-top: 40px; 
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); 
    justify-items: center; 
}
.member-card { text-align: center; padding: 15px; }

/* Common styling for member images and placeholder */
.member-card img,
.member-card .member-img-placeholder {
    width: 140px; /* Consistent size */
    height: 140px; /* Consistent size */
    border-radius: 50%; /* Makes them circular */
    object-fit: cover; /* Ensures images fill the circle nicely */
    margin: 0 auto 15px auto;
    border: 3px solid #C0A062;
    transition: all 0.3s ease;
}

/* Specific styling for the placeholder */
.member-card .member-img-placeholder {
    background-color: #2a2a2a; /* A darker background for the blank circle */
    /* Optional: Add an icon or initial for visual cue */
    display: flex;
    justify-content: center;
    align-items: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 3rem; /* Adjust size of initial if added */
    color: #C0A062; /* Color of initial if added */
    /* You could also use a pseudo-element for an 'L' initial: */
    /* content: 'L'; */
}


.member-card:hover img,
.member-card:hover .member-img-placeholder { /* Apply hover to placeholder as well */
    transform: scale(1.05);
}

.member-card h4 { display: inline-block; padding-bottom: 12px; margin-bottom: 12px; font-size: 1.4rem; border-bottom: 1px solid rgba(192, 160, 98, 0.4); }
.member-details { min-height: 8em; } /* Keep this to ensure consistent card height */
.member-designation { color: #a0a0a0; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.member-quote { font-style: italic; color: #bbbbbb; font-size: 0.95rem; line-height: 1.5; }

/* --- Contact Page & Form Styles --- */
.contact-page-section { text-align: center; padding: 80px 0; }
.contact-page-section p { max-width: 650px; margin: 20px auto 40px auto; color: #cccccc; }
.contact-form { max-width: 700px; margin: 0 auto; text-align: left; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 600; color: #cccccc; }
.form-group input, .form-group textarea { width: 100%; padding: 12px; border: 1px solid #444; border-radius: 2px; background-color: #2a2a2a; color: #EAEAEA; font-family: 'Open Sans', sans-serif; font-size: 1rem; transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: #C0A062; box-shadow: 0 0 0 2px rgba(192, 160, 98, 0.2); }
.form-group textarea { resize: vertical; min-height: 120px; }
.contact-form button[type="submit"] { width: 100%; font-size: 1rem; padding: 15px; }

/* --- Footer --- */
.main-footer { background-color: #1f1f1f; color: #aaa; padding: 30px 0; text-align: center; font-size: 0.9em; border-top: 1px solid #333; }

/* --- Responsive Design --- */
@media (min-width: 768px) {
    .page-buttons-grid { grid-template-columns: 1fr 1fr; }
    .page-buttons-grid .page-button:last-child:nth-child(odd) { 
        grid-column: 1 / -1; 
        justify-self: center; 
        width: calc(50% - 15px); /* Adjusted for better spacing on wider screens */
    }

    /* Enhanced for 6 members: three columns on larger screens */
    .members-grid {
        grid-template-columns: repeat(3, minmax(220px, 1fr));
        /* The `display: grid;` is already set in the base .members-grid rule,
           so it's not strictly necessary here unless you were overriding it before. */
    }
    .members-grid .member-card {
        flex: unset; /* Reset flex properties if they were set for other scenarios */
        max-width: unset; /* Reset max-width */
    }
}

@media (max-width: 767px) { 
    h2 { font-size: 2.2rem; } 
    .main-header .container { flex-direction: column; gap: 15px; } 
    .main-nav ul { padding: 0; } 
    /* Ensure all member cards stack on smaller screens */
    .members-grid {
        grid-template-columns: 1fr;
    }
}