/* FONT IMPORT */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@700&family=Montserrat:wght@400;500;600&display=swap');

/* BASIC RESET & THEME */
:root {
    --primary-green: #556b2f;
    --dark-green: #2e4034;
    --background-dark: #1a2a26;
    --text-light: #f2f2f2;
    --text-muted: #a0a0a0;
    --border-color: rgba(255, 255, 255, 0.15);
    --module-bg: rgba(255, 255, 255, 0.05);
    --module-bg-hover: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--background-dark);
    color: var(--text-light);
    margin: 0;
    padding-top: 80px; /* Space for fixed header */
}

/* BACKGROUND CYCLER & OVERLAY */
#background-cycler {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    background-size: cover;
    background-position: center;
    transition: background-image 1.5s ease-in-out;
}
.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(26, 42, 38, 0.9), rgba(26, 42, 38, 0.7));
    z-index: -1;
}

/* GLOBAL UI SHELL (Header - Copied for consistency) */
.main-header { position: fixed; top: 0; left: 0; width: 100%; background-color: rgba(46, 64, 52, 0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 2px 5px rgba(0,0,0,0.2); z-index: 1000; padding: 10px 20px; }
.header-content { max-width: 95%; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.logo-link img { height: 60px; vertical-align: middle; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a.nav-button, .main-nav .dropbtn { color: var(--text-light); text-decoration: none; padding: 8px 10px; border-radius: 5px; transition: background-color 0.3s; font-size: 0.85rem; white-space: nowrap; }
.main-nav a.nav-button:hover, .main-nav .dropdown:hover .dropbtn, .main-nav a.nav-button.active { background-color: #333; }
.dropbtn { background-color: inherit; border: none; font-family: inherit; cursor: pointer; }
.dropdown { position: relative; display: inline-block; }
.dropdown-content { display: none; position: absolute; background-color: #333; min-width: 160px; box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); z-index: 1; border-radius: 5px; }
.dropdown-content a { color: var(--text-light); padding: 12px 16px; text-decoration: none; display: block; font-size: 0.9rem; }
.dropdown-content a:hover {background-color: #444;}
.dropdown:hover .dropdown-content { display: block; }

/* NEW: MAIN LAYOUT */
.community-container {
    max-width: 1400px; /* Increased max-width for the new layout */
    margin: 2rem auto;
    padding: 0 20px;
}

/* NEW: SUGGESTIONS SECTION */
.suggestions-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}
.suggestion-module {
    background-color: var(--module-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
}
.suggestion-module h3 {
    margin-top: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}
.loading-text {
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
}

/* NEW: MAIN 3-COLUMN GRID */
.main-content-grid {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr; /* Clan Feed | Main Feed | Messenger */
    gap: 2rem;
    align-items: start;
}

/* NEW: FEED COLUMN STYLES */
.feed-column h2 {
    font-family: 'Merriweather', serif;
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* NEW: MESSENGER COLUMN */
.messenger-column {
    background-color: var(--module-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    position: sticky;
    top: 100px; /* Position relative to the viewport top */
}
.messenger-column h2 {
    font-family: 'Merriweather', serif;
    font-size: 1.5rem;
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--text-light);
}

/* POST CREATION & FEED STYLES (Largely unchanged) */
.create-post-box, .feed-post { background-color: var(--module-bg); border: 1px solid var(--border-color); border-radius: 8px; padding: 1.5rem; margin-bottom: 1.5rem; }
.create-post-box textarea { width: 100%; background: transparent; border: none; color: var(--text-light); font-size: 1.2rem; resize: none; min-height: 60px; }
.create-post-actions { border-top: 1px solid var(--border-color); margin-top: 1rem; padding-top: 1rem; display: flex; justify-content: flex-end; gap: 1rem; }
.create-post-actions button { background-color: var(--primary-green); color: white; border: none; padding: 8px 15px; border-radius: 5px; font-weight: bold; cursor: pointer; transition: background-color 0.2s; }
.create-post-actions button:disabled { background-color: #555; cursor: not-allowed; }

.post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 1rem; position: relative; }
.post-header img { width: 45px; height: 45px; border-radius: 50%; object-fit: cover; }
.post-author-info { display: flex; flex-direction: column; }
.post-header .username { font-weight: bold; }
.post-header .timestamp { font-size: 0.8rem; color: var(--text-muted); }
.post-body p { margin: 0 0 1rem 0; line-height: 1.6; white-space: pre-wrap; }
.post-body img { max-width: 100%; border-radius: 8px; margin-top: 1rem; }

/* Post Interactions */
.post-interactions { border-top: 1px solid var(--border-color); margin-top: 1rem; padding-top: 0.5rem; display: flex; justify-content: space-around; }
.interaction-btn { background: none; border: none; color: var(--text-muted); font-weight: bold; cursor: pointer; padding: 10px; flex-grow: 1; border-radius: 5px; transition: background-color 0.2s, color 0.2s; }
.interaction-btn.liked { color: var(--primary-green); font-weight: 700; }
.interaction-btn:hover { background-color: var(--module-bg-hover); }

/* Three-dots Menu */
.post-menu { position: absolute; top: 0; right: 0; }
.dots-btn { background: none; border: none; color: var(--text-muted); font-size: 1.5rem; cursor: pointer; padding: 5px; border-radius: 50%; }
.dropdown-menu { display: none; position: absolute; right: 0; top: 100%; background-color: #3a3b3c; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.5); overflow: hidden; z-index: 10; }
.dropdown-menu a { display: block; padding: 10px 15px; color: var(--text-light); text-decoration: none; font-size: 0.9rem; white-space: nowrap; }
.dropdown-menu a:hover { background-color: var(--module-bg-hover); }

/* Comments Section */
.comments-section {
    display: none; /* Hidden by default */
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}
.comment-form { display: flex; gap: 10px; align-items: flex-start; }
.comment-form textarea { flex-grow: 1; background-color: #444; color: #fff; border: 1px solid #666; border-radius: 4px; padding: 8px; resize: vertical; min-height: 40px; }
.comment-form button { background-color: var(--primary-green); color: white; border: none; padding: 8px 12px; border-radius: 5px; cursor: pointer; }

/* UPLOAD & MODAL (Unchanged) */
.upload-sighting-btn { position: fixed; bottom: 20px; left: 20px; z-index: 1000; background-color: var(--primary-green); color: white; border: none; border-radius: 50%; width: 60px; height: 60px; font-size: 1.8rem; box-shadow: 0 4px 12px rgba(0,0,0,0.2); cursor: pointer; text-decoration: none; display: flex; align-items: center; justify-content: center; }
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0,0,0,0.7); display: none; justify-content: center; align-items: center; z-index: 2000; }
.modal-content { background-color: #2c2c2c; padding: 2rem; border-radius: 8px; width: 90%; max-width: 500px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border-color); padding-bottom: 1rem; margin-bottom: 1rem;}
.modal-header h2 { margin: 0; }
.modal-header .close-btn { font-size: 1.5rem; cursor: pointer; background: none; border: none; color: var(--text-light); }
.modal-content label { display: block; margin: 1rem 0 0.5rem 0; }
.modal-content select, .modal-content textarea { width: 100%; padding: 10px; box-sizing: border-box; background-color: #444; color: #fff; border: 1px solid #666; border-radius: 4px; }
.modal-content textarea { height: 80px; }
.modal-content .submit-report-btn { display: block; width: 100%; margin-top: 1.5rem; padding: 12px; border: none; border-radius: 5px; background-color: #c0392b; color: white; font-weight: bold; cursor: pointer; }
