/* General Body Styles */
:root {
    /* --- Primary Palette from your Logo --- */
    /* Replace these with hex codes picked from your images */

    /* Background Colors */
    --color-background-darkest: #171816;  /* Example: Very dark navy/charcoal (for main background) */
    --color-background-dark: #272724;     /* Example: Slightly lighter dark blue (for sections, cards) */
    --color-background-medium: #464641;   /* Example: A mid-tone desaturated blue (for hover effects, borders) */
    --color-background-red: #6c2724;
    --color-background-cream: #D3C5A8;

    /* Text Colors */
    --color-text-light: #E0E7EF;          /* Example: Off-white with a hint of blue (for main text) */
    --color-text-medium: #A8B2C0;         /* Example: Lighter grey (for secondary text, subtitles) */
    --color-text-dark: #0A0F1F;           /* Example: For text on very light backgrounds (if any) */

    /* Accent Colors (from the ghostly figure and highlights) */
    --color-accent-primary: #68AAB9;      /* Example: Main ghostly teal/blue from your logo's figure */
    --color-accent-secondary: #79D7D7;    /* Example: Brighter cyan/teal (for links, buttons, highlights) */
    --color-accent-hover: #8BC0CE;        /* Example: A slightly lighter version of primary accent for hover */

    /* UI Elements & States */
    --color-border: #3A4D75;              /* Example: For borders on inputs, cards */
    --color-button-primary-bg: var(--color-accent-secondary);
    --color-button-primary-text: var(--color-background-darkest);
    --color-button-hover-bg: var(--color-accent-hover);
    --color-button-hover-text: var(--color-background-darkest);

    /* Semantic Colors (Optional, but good for specific uses) */
    --color-success: #68B98A;             /* Example: Greenish for success messages */
    --color-warning: #B9A568;             /* Example: Yellowish for warnings */
    --color-error: #B96868;               /* Example: Reddish for errors */

    /* --- Fonts --- */
    --font-primary: 'Arial', sans-serif; /* Replace with your chosen "spooky" or clean font */
    --font-headings: 'Jim Nightshade', serif;   /* Example: A different font for headings */

    /* --- Spacing & Sizing (Examples) --- */
    --spacing-small: 8px;
    --spacing-medium: 16px;
    --spacing-large: 24px;
    --border-radius-main: 5px;

    --color-accent-secondary-rgb: 121, 215, 215;
    --color-success-rgb: 104, 185, 138;
    --color-error-rgb: 185, 104, 104;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    color: var(--color-text-light); /* Or a specific heading color like --color-accent-primary */
}

h2 {
   color: var(--color-accent-primary); /* Making h2 stand out with primary accent */
}
body {
    font-family: var(--font-primary); /* Choose a spooky or clean font */
    margin: 0;
    padding: 0;
    background-color: var(--color-background-darkest);
    color: var(--color-text-light);
    line-height: 1.6;
    
}
html,canvas#ghost, body { cursor:none }

canvas#ghost {
    position: fixed;
    top: 0;
    left: 0;
    display: block;
    width: 100%;
    z-index: 10000;
    pointer-events: none;
}
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0;
}

a {
    color: var(--color-accent-secondary); /* Accent color for links */
    text-decoration: none;
    cursor:none;
}

a:hover {
    text-decoration: underline;
    cursor:none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Header Styles */
header {
    background-color: var(--color-background-dark); /* Slightly darker header background */
    padding: var(--spacing-medium) 0;
    border-bottom: 2px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-container {
    display: flex;
    align-items: center;
}

#logo {
    height: 100px; /* Adjust as needed */
    margin-right: 15px;
    border-radius: 20px;
}

.site-name-header {
    font-family: var(--font-headings);
    font-size: 1.8em;
    font-weight: bold;
    color: var(--color-text-light);
}
.main-nav {
    position: relative; /* For positioning the toggle button if needed */
}

.nav-toggle {
    display: none; /* Hidden by default, shown on small screens */
    background: none;
    border: none;
    color: var(--color-text-light); /* Or your preferred icon color */
    font-size: 1.5em; /* Adjust icon size */
    cursor: pointer;
    padding: var(--spacing-small);
    position: absolute; /* Position it relative to the nav container if desired */
    top: 50%;
    right: 0; /* Or var(--spacing-medium) if you want some padding */
    transform: translateY(-50%);
    z-index: 1001; /* Ensure it's above other header content if overlapping */
}

/* Styles for smaller screens */
@media (max-width: 768px) {
    .header-content {
        /* Allow more flexible alignment if logo and site name take up space */
        align-items: center; 
        /* flex-direction: row; /* Ensure it stays row for logo + toggle */
        /* justify-content: space-between; /* Keep logo left, toggle right */
    }

    .logo-container {
        /* Ensure logo container doesn't push toggle too far if site name is long */
        flex-shrink: 0; 
    }

    .main-nav {
        width: 100%; /* Allow nav to take full width if needed for positioning toggle */
        display: flex; /* Added to help align toggle if it's a direct child */
        justify-content: flex-end; /* Pushes toggle to the right */
    }
    
    .nav-toggle {
        display: block; /* Show burger icon */
        position: static; /* Remove absolute positioning for simpler flow */
        transform: none;
        margin-left: auto; /* Push to the right if nav is flex container */
    }

    .main-nav ul#main-menu {
        /* display: none; */ /* Remove this line or comment it out */
        max-height: 0; /* Initially collapsed */
        overflow: hidden; /* Hide content when collapsed */
        transition: max-height 0.3s ease-out, opacity 0.3s ease-out; /* Add transition for max-height and opacity */
        opacity: 0; /* Start with opacity 0 for a fade-in effect */
        visibility: hidden; /* Use visibility for better accessibility with transitions */

        /* Keep these existing styles: */
        flex-direction: column;
        position: absolute;
        top: 100%; /* Position below the header */
        left: 0;
        width: 100%;
        background-color: var(--color-background-dark);
        padding: 0; /* Remove padding when collapsed, will add when active */
        box-shadow: 0 4px 8px rgba(0,0,0,0.2);
        z-index: 1000;
        display: flex; /* Keep as flex for layout, visibility controls actual showing */
    }

    .main-nav ul#main-menu.nav-active {
        /* display: flex; */ /* Already flex, so no need to change display */
        max-height: 50vh; /* Or a sufficiently large height like 500px, 30em, etc. Adjust as needed. */
        opacity: 1; /* Fade in */
        visibility: visible; /* Make it visible */
        padding: var(--spacing-medium) 0; /* Restore padding when active */
    }

    .main-nav ul#main-menu li {
        margin: 0;
        width: 100%;
        text-align: center;
    }

    .main-nav ul#main-menu li a {
        display: block;
        padding: var(--spacing-medium);
        border-bottom: 1px solid var(--color-border);
        width: 100%;
        box-sizing: border-box;
        /* Add transition for link items if you want them to fade/slide in individually (more complex) */
        /* For now, the whole menu block will animate */
    }

    .main-nav ul#main-menu li:last-child a {
        border-bottom: none;
    }

    .main-nav ul li a.active, /* This .active is for current page, not menu open state */
    .main-nav ul li a:hover {
        border-bottom: 1px solid var(--color-border); /* Keep for mobile, or remove if not desired */
        background-color: var(--color-background-medium);
    }

    /* Ensure login link is styled appropriately in mobile menu */
    .main-nav ul#main-menu li a.login-link {
        background-color: var(--color-accent-secondary);
        color: var(--color-button-primary-text) !important;
    }
    .main-nav ul#main-menu li a.login-link:hover {
        background-color: var(--color-accent-hover);
    }
}
.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.main-nav ul li {
    margin-left: 25px;
}

.main-nav ul li a {
    color: var(--color-text-medium);
    font-weight: bold;
    font-size: 1.1em;
    padding: var(--spacing-small) 0;
    transition: color 0.3s ease;
}

.main-nav ul li a:hover,
.main-nav ul li a.active { /* You might add an 'active' class with JS for current page */
    color: var(--color-accent-primary);
    border-bottom: 2px solid var(--color-accent-primary);
}

.login-link {
    background-color: var(--color-accent-secondary);
    color: var(--color-button-primary-text) !important;
    padding: var(--spacing-small) var(--spacing-medium) !important;
    border-radius: var(--border-radius-main);
    border-bottom: none !important;
}
.login-link:hover {
    background-color: var(--color-accent-hover);
}


/* Main Content Area */
main {
    padding-top: 20px; /* Adjust if header is fixed and overlaps */
}

/* Hero Section */
#hero {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.2), rgba(172, 5, 5, 0.2)), 
              radial-gradient(circle, rgba(172, 6, 6, 0.3), rgba(30, 30, 30, 0.3));
  background-size: 200% 200%;
  animation: meshFlow 5s infinite ease-in-out;
    color: var(--color-text-light);
    text-align: center;
    padding: 80px 20px;
    position: relative; /* For overlay */
}
@keyframes meshFlow {
	0% {
	  background-position: 0% 0%;
	}
	50% {
	  background-position: 100% 100%;
	}
	100% {
	  background-position: 0% 0%;
	}
  }

#hero::before { /* Optional overlay for better text readability */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Dark overlay */
}

.hero-content {
    position: relative; /* To be above the overlay */
    z-index: 1;
}

#hero h1 {
    font-family: var(--font-headings);
    font-size: 3em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
}

#hero p {
    font-size: 1.5em;
    margin-bottom: 30px;
}

.cta-button {
    background-color: var(--color-button-primary-bg);
    color: var(--color-button-primary-text);
    padding: var(--spacing-medium) var(--spacing-large);
    font-size: 1.2em;
    border-radius: var(--border-radius-main);
    text-transform: uppercase;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: var(--color-button-hover-bg);
    text-decoration: none;
}

/* Home Page Sections */
.home-section {
    padding: 40px 0;
    text-align: center;
}

.home-section h2 {
    font-family: var(--font-headings);
    font-size: 2.5em;
    margin-bottom: 30px;
    color: var(--color-accent-primary);
}

.home-section.alt-bg {
    background-color: var(--color-background-red); /* Slightly different background for alternating sections */
}

/* Meet the Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    text-align: left;
}

.team-member {
    background-color: var(--color-background-dark);
    padding: var(--spacing-medium);
    border-radius: var(--border-radius-main);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.team-member img {
    width: 150px; /* Adjust as needed */
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 15px;
    display: block;
    border: 3px solid var(--color-accent-primary);
}

.team-member h3 {
    font-family: var(--font-headings);
    margin-top: 0;
    color: var(--color-accent-primary);
    text-align: center;
}
.team-member p {
    font-size: 0.95em;
    color: var(--color-text-medium);
}
.team-member p.bio {
    font-style: italic;
    font-size: 0.9em;
}


/* Contact Form */
#home-contact-form {
    max-width: 600px;
    margin: 0 auto;
    background-color: var(--color-background-dark);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--color-text-medium);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background-color: var(--color-background-darkest);
     color: var(--color-text-light);
    box-sizing: border-box;
    cursor:none;
}

.form-group textarea {
    resize: vertical;
    cursor:none;
}

.submit-button {
    background-color: var(--color-button-primary-bg);
    color: var(--color-button-primary-text);
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease;
    cursor:none;
}

.submit-button:hover {
    background-color: var(--color-button-hover-bg);
    cursor:none;
}

.form-note {
    font-size: 0.9em;
    color: var(--color-text-medium);
    margin-top: 15px;
    text-align: center;
}


/* Footer Styles */
footer {
    background-color: var(--color-background-dark);
    color: var(--color-text-medium);
    padding: 30px 0 10px;
    border-top: 2px solid var(--color-border);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    gap: 20px; /* Adds space between flex items */
    width: 90%;
    max-width: 1200px;
    margin: 0 auto 20px;
    text-align: left;
}

.footer-section {
    flex: 1; /* Allows sections to grow and fill space */
    min-width: 200px; /* Minimum width before wrapping */
    margin-bottom: 20px; /* Space below each section on smaller screens */
}

.footer-section h4 {
    color: var(--color-accent-primary);
    margin-bottom: 15px;
    font-size: 1.2em;
}

.footer-section p,
.footer-section ul {
    font-size: 0.9em;
    margin-bottom: 10px;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li a {
    color: var(--color-text-medium);
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--color-text-light);
}

.social-links a {
    margin-right: 10px;
    font-size: 1.5em; /* Make icons a bit bigger */
    /* If using font icons, you'd style them here */
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--color-background-medium);
    font-size: 0.85em;
}

/* Responsive Adjustments (Basic Example) */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: center;
    }
    .main-nav ul {
        flex-direction: column;
        align-items: center;
        margin-top: 15px;
    }
    .main-nav ul li {
        margin: 10px 0;
    }
    #hero h1 {
        font-size: 2.2em;
    }
    #hero p {
        font-size: 1.2em;
    }
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    .footer-section {
        min-width: 100%; /* Stack them fully on small screens */
    }
}
.status-badge {
    display: inline-block; /* Ensures proper padding and alignment */
    padding: 4px 10px; /* Slightly adjusted padding for a nicer look */
    font-size: 0.8em;  /* Slightly smaller for front-end cards, adjust as needed */
    font-weight: bold;
    line-height: 1.4;  /* Adjust for vertical centering if needed */
    color: white;      /* Default text color for badges */
    text-transform: capitalize;
    border-radius: var(--border-radius-main, 5px); /* Use your root variable */
    text-align: center;
    white-space: nowrap;
}

/* Community Post Statuses */
.status-badge.status-approved,
.status-badge.status-published { /* Grouping 'approved' (community) and 'published' (investigations) */
    background-color: #2ecc71; /* Green */
}
.status-badge.status-pending,       /* For community posts awaiting approval */
.status-badge.status-pending_review { /* For "Our Investigations" awaiting approval */
    background-color: #3498db; /* Blue */
}
.status-badge.status-rejected {
    background-color: #e74c3c; /* Red */
}
.status-badge.status-draft {      /* For "Our Investigations" and potentially future community post drafts */
    background-color: #f39c12; /* Orange */
}
.status-badge.status-archived {   /* For "Our Investigations" */
    background-color: #7f8c8d; /* Grey */
}
/* Add any other specific statuses you might use, e.g., 'hidden' */
.status-badge.status-hidden {
    background-color: #95a5a6; /* Another shade of grey for hidden */
}
.post-media-container { /* Ensure this container allows Swiper to fill it */
    position: relative; /* Needed if pagination/navigation is absolute */
    overflow: hidden;   /* Good practice for swiper containers */
    /* background-color: #000; /* Already there, good */
}

.post-media-swiper.swiper-container {
    width: 100%;
    /* Consider a max-height or aspect-ratio for consistency */
    max-height: 500px; /* Or adjust to your design */
    aspect-ratio: 16 / 9; /* Optional: common aspect ratio for media */
}

.post-media-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #000; /* Background for slides if media doesn't fill */
    overflow: hidden; /* Prevent content spill */
    position: relative; /* For caption positioning */
}

.post-media-swiper .swiper-slide img,
.post-media-swiper .swiper-slide video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* 'contain' shows whole image/video, 'cover' fills */
}

.post-media-swiper .swiper-slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    color: var(--color-text-light);
    padding: var(--spacing-small);
    font-size: 0.85em;
    text-align: center;
    box-sizing: border-box;
    z-index: 10; /* Ensure it's above slide content if needed */
}


/* Swiper Navigation Buttons (can re-use from investigations.php or your theme) */
.post-media-swiper .swiper-button-next,
.post-media-swiper .swiper-button-prev {
    color: var(--color-accent-primary, #68AAB9) !important; /* Use your theme's accent */
    --swiper-navigation-size: 28px; /* Adjust size */
    top: 50%;
    transform: translateY(-50%);
}
.post-media-swiper .swiper-button-next:after,
.post-media-swiper .swiper-button-prev:after {
    font-size: var(--swiper-navigation-size) !important;
}

/* Swiper Pagination Bullets */
.post-media-swiper .swiper-pagination-bullet {
    background-color: var(--color-text-medium, #A8B2C0) !important;
    opacity: 0.6;
}

.post-media-swiper .swiper-pagination-bullet-active {
    background-color: var(--color-accent-primary, #68AAB9) !important;
    opacity: 1;
}

/* Styling for user role icons next to usernames */
.post-user-info .username .user-role-icon,
.comment-header .username .user-role-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5em;  /* Relative to parent font-size */
    height: 1.5em; /* Relative to parent font-size */
    font-size: 0.8em; /* Make icon slightly smaller than username text */
    background-color: var(--color-background-red); /* Or another distinct color */
    color: var(--color-background-darkest);
    border-radius: 50%;
    margin-left: 6px;
    line-height: 1;
    vertical-align: middle; /* Align with text */
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
}
.post-user-info .username .user-role-icon i,
.comment-header .username .user-role-icon i {
    font-size: 1em; /* Adjust icon size within the bubble */
}

.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75); /* Darker, more focused overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000; /* Ensure it's above other modals like create-post */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease-out, visibility 0s linear 0.25s; /* Transition opacity, delay visibility change */
}

.custom-modal-overlay.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease-out, visibility 0s linear 0s;
}

.custom-modal-box {
    background-color: var(--color-background-dark);
    padding: var(--spacing-large);
    border-radius: var(--border-radius-main);
    border: 1px solid var(--color-border);
    box-shadow: 0 8px 25px rgba(0,0,0,0.5);
    width: 90%;
    max-width: 480px; /* Slightly wider for comfort */
    text-align: center;
    transform: translateY(-20px) scale(0.95); /* Start slightly up and scaled down */
    transition: transform 0.25s ease-out, opacity 0.25s ease-out;
    opacity: 0;
}

.custom-modal-overlay.active .custom-modal-box {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.custom-modal-title {
    font-family: var(--font-headings);
    color: var(--color-accent-primary);
    margin-top: 0;
    margin-bottom: var(--spacing-medium);
    font-size: 1.7em; /* Slightly larger title */
}

.custom-modal-message {
    color: var(--color-text-light);
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: var(--spacing-large);
    white-space: pre-wrap; /* Respect newlines in messages */
}

.custom-modal-actions {
    display: flex;
    justify-content: center; /* Default for single button */
    gap: var(--spacing-medium);
}
/* If two buttons, they will space out with gap. For explicit space-between: */
.custom-modal-actions button + button { /* If two buttons are present */
   justify-content: space-around; /* Or space-between on .custom-modal-actions */
}


.custom-modal-btn {
    padding: 10px 25px;
    border: none;
    border-radius: var(--border-radius-main);
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    min-width: 100px;
}

.custom-modal-btn:active {
    transform: scale(0.95);
}

.custom-modal-btn.modal-confirm-btn {
    background-color: var(--color-accent-secondary);
    color: var(--color-background-darkest);
}
.custom-modal-btn.modal-confirm-btn:hover {
    background-color: var(--color-accent-hover);
}

.custom-modal-btn.modal-cancel-btn {
    background-color: var(--color-background-medium);
    color: var(--color-text-light);
}
.custom-modal-btn.modal-cancel-btn:hover {
    background-color: var(--color-border); /* Or a lighter grey like #555 */
}

/* Type-specific styling for title (optional: add icons here too) */
.custom-modal-box.modal-type-error .custom-modal-title {
    color: var(--color-error, #e74c3c); /* Using your admin panel's error color */
}
.custom-modal-box.modal-type-success .custom-modal-title {
    color: var(--color-success, #2ecc71); /* Using your admin panel's success color */
}
.custom-modal-box.modal-type-warning .custom-modal-title {
    color: var(--color-warning, #f39c12); /* Example, using admin panel's draft color */
}
.custom-modal-box.modal-type-confirm .custom-modal-title {
    color: var(--color-accent-primary); /* Default or a specific confirm color */
}
.form-message {
    margin-bottom: var(--spacing-medium);
    padding: var(--spacing-medium);
    border-radius: var(--border-radius-main);
    font-size: 0.95em;
    text-align: center;
    border: 1px solid transparent;
    display: none; /* Hidden by default */
}

.form-message.success {
    background-color: rgba(var(--color-success-rgb, 104, 185, 138), 0.15);
    color: var(--color-success);
    border-color: var(--color-success);
    display: block;
}

.form-message.error {
    background-color: rgba(var(--color-error-rgb, 185, 104, 104), 0.15);
    color: var(--color-error);
    border-color: var(--color-error);
    display: block;
}

.form-message.info {
    background-color: rgba(var(--color-accent-secondary-rgb, 121, 215, 215), 0.15);
    color: var(--color-accent-secondary);
    border-color: var(--color-accent-secondary);
    display: block;
}