:root {
    --bg-color: #050505;
    --surface-color: #111111;
    --surface-light: #1a1a1a;
    --primary-color: #c8102e; /* Deep MC Red */
    --primary-hover: #e01635;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --border-color: #333333;
    --glow-spread: 0 0 15px rgba(200, 16, 46, 0.4);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--bg-color);
    background-image: linear-gradient(rgba(5, 5, 5, 0.6), rgba(5, 5, 5, 0.85)), url('images/Background.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    color: var(--text-primary);
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Gritty background effect */
.bg-grit {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: -1;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.05"/%3E%3C/svg%3E');
    opacity: 0.4;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Typography */
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; color: var(--primary-color); text-shadow: var(--glow-spread); margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }

/* Header & Nav */
.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background-image: linear-gradient(rgba(17, 17, 17, 0.8), rgba(17, 17, 17, 0.9)), url('images/Banner.png');
    background-size: cover;
    background-position: center;
    border-bottom: 2px solid var(--primary-color);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-container img {
    height: 70px;
    width: auto;
    border-radius: 5px;
    border: 2px solid var(--primary-color);
    box-shadow: var(--glow-spread);
    transition: transform 0.3s ease;
}

.logo-container img:hover {
    transform: scale(1.05);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-family: 'Oswald', sans-serif;
    font-size: 1.2rem;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
    box-shadow: var(--glow-spread);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

/* Main Content Area */
#content-area {
    padding: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    min-height: calc(100vh - 200px);
}

/* View Sections (SPA functionality) */
.view-section {
    display: none;
    animation: fadeIn 0.5s ease-out forwards;
}

.view-section.active-view {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-top: -1rem;
    margin-bottom: 2rem;
    font-style: italic;
}

/* News Cards */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.news-card {
    background-color: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: var(--primary-color);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    border-color: var(--primary-hover);
}

.news-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    border-bottom: 2px solid var(--primary-color);
}

.news-content {
    padding: 1.5rem;
}

.date {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}

/* Join Us / Advice */
.content-box {
    background-color: rgba(17, 17, 17, 0.85);
    backdrop-filter: blur(5px);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: inset 0 0 20px rgba(0,0,0,0.5);
}

.lead-text {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    border-left: 4px solid var(--primary-color);
    padding-left: 1rem;
}

.advice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.advice-card {
    background-color: var(--surface-light);
    padding: 1.5rem;
    border-radius: 5px;
    border-top: 3px solid var(--border-color);
    transition: border-color 0.3s ease;
}

.advice-card:hover {
    border-top-color: var(--primary-color);
}

.advice-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Hierarchy Tree */
.hierarchy-tree {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.rank-tier {
    display: flex;
    justify-content: center;
    gap: 2rem;
    width: 100%;
}

.rank-tier.three-col {
    flex-wrap: wrap;
}

.rank-tier.multi-col {
    flex-wrap: wrap;
    max-width: 800px;
}

.member-card {
    background-color: var(--surface-color);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    min-width: 250px;
    max-width: 300px;
    border: 1px solid var(--border-color);
    position: relative;
    transition: all 0.3s ease;
    cursor: pointer;
}

.member-card::after {
    content: "Click to read bio";
    position: absolute;
    bottom: 10px;
    left: 0;
    width: 100%;
    font-size: 0.75rem;
    color: var(--primary-color);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.member-card:hover::after {
    opacity: 1;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.8);
    border-color: var(--primary-color);
}

.rank-badge {
    background-color: var(--primary-color);
    color: white;
    font-family: 'Oswald', sans-serif;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 1rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    box-shadow: var(--glow-spread);
}

.elite-card { border-color: #ffd700; } /* Special border for Founders? Or stick to red/black */
.elite-card .rank-badge { background-color: #ffd700; color: #000; text-shadow: none; box-shadow: 0 0 10px rgba(255, 215, 0, 0.4); }

.leadership-card { border-color: var(--primary-hover); }
.member-name {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}
.member-bio {
    display: none;
}

.member-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem auto;
    border: 2px solid var(--border-color);
    display: block;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
    background-color: #1a1a1a;
}
.elite-card .member-photo { border-color: #ffd700; }
.leadership-card .member-photo { border-color: var(--primary-color); }


/* Bylaws */
.bylaws-box {
    max-width: 800px;
    margin: 0 auto;
}

.bylaws-list {
    list-style-type: decimal;
    padding-left: 2rem;
}

.bylaws-list li {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    padding-left: 0.5rem;
}

.bylaws-list li strong {
    color: var(--text-primary);
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
}

.bylaws-list li::marker {
    color: var(--primary-color);
    font-weight: bold;
    font-family: 'Oswald', sans-serif;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--surface-color);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    .main-header {
        flex-direction: column;
        padding: 1rem;
    }
    
    .logo-container h1 {
        font-size: 2rem;
    }

    .main-nav ul {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .rank-tier {
        flex-direction: column;
        align-items: center;
    }
}

/* Modals & Forms */
.hidden {
    display: none !important;
}

.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--surface-color);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.8);
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 20px;
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-modal:hover {
    color: var(--primary-color);
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

input, textarea {
    background-color: var(--surface-light);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 10px 15px;
    border-radius: 4px;
    font-family: 'Roboto', sans-serif;
    outline: none;
    transition: border-color 0.3s;
}

input:focus, textarea:focus {
    border-color: var(--primary-color);
}

.primary-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    border-radius: 4px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.3s, transform 0.2s;
    box-shadow: var(--glow-spread);
}

.primary-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.error-msg {
    color: var(--primary-color);
    font-size: 0.85rem;
    text-align: center;
    margin: 0;
}

.section-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.section-header-flex .section-title {
    margin-bottom: 0;
}
