/* Custom Tooltip */
.tooltip-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
    border-bottom: 1px dotted var(--text-color);
    text-decoration: none;
}

.tooltip-text {
    visibility: hidden;
    width: 220px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 10px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -110px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Basic Resets & Global Styles */
:root {
    --primary-color: #003366; /* Darker blue for primary elements */
    --light-blue: #64b5f6;   /* Lighter shade of blue for AI emphasis */
    --secondary-color: #6c757d; /* A muted grey */
    --accent-color: #28a745; /* A green for success/action */
    --text-color: #333; /* Dark text for general readability */
    --light-bg: #f8f9fa; /* Very light grey background */
    --white: #fff;
    --border-color: #dee2e6;
    --font-family: Arial, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, h2, h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
}

/* Buttons */
.button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: bold;
    margin-right: 10px; /* Space between buttons */
    margin-bottom: 10px; /* For mobile stacking */
}

.button.primary {
    background-color: var(--primary-color);
    color: var(--white);
    border: 1px solid var(--primary-color);
}

.button.primary:hover {
    background-color: #002244; /* Even darker hover state */
    border-color: #002244;
    text-decoration: none;
}

.button.secondary {
    background-color: var(--secondary-color);
    color: var(--white);
    border: 1px solid var(--secondary-color);
}

.button.secondary:hover {
    background-color: #5a6268;
    border-color: #5a6268;
    text-decoration: none;
}

.button.secondary-small {
    padding: 0.5rem 1rem;
    font-size: 0.9em;
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}

.button.secondary-small:hover {
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
}

/* Header */
header {
    background-color: var(--white);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on small screens */
}

/* Header specific inner container adjustments */
header .header-inner-container {
    background-color: transparent; /* Ensure no background from other .container rules */
    box-shadow: none; /* Ensure no box-shadow from other .container rules */
    border-radius: 0; /* Ensure no border-radius from other .container rules */
    padding: 0 1rem; /* Adjust padding if needed, assuming the outer header already has padding */
    margin: 0 auto; /* Ensure centering within the header */
}

/* Also, let's make sure the outer header itself doesn't have an unwanted box-shadow */
header {
    background-color: var(--white);
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: none; /* Explicitly remove any potential box-shadow */
    border-radius: 0; /* Explicitly remove any potential border-radius */
}

.logo a {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

/* Specific style for "AI" in the logo */
.logo .ai-emphasis {
    color: var(--light-blue);
}

nav .hamburger {
    display: none; /* Hide hamburger by default (desktop) */
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--primary-color);
    padding: 5px;
}

nav .nav-links {
    list-style: none;
    display: flex; /* Always display nav links on larger screens (desktop first) */
    flex-direction: row; /* Horizontal on desktop */
    width: auto;
    margin-top: 0;
}

/* Mobile-specific navigation */
@media (max-width: 767px) { /* Adjust breakpoint if needed */
    nav .hamburger {
        display: block; /* Show hamburger on mobile */
    }

    nav .nav-links {
        display: none; /* Hide nav links by default on mobile */
        flex-direction: column; /* Stack vertically on mobile */
        width: 100%;
        margin-top: 1rem;
        background-color: var(--white); /* Background for the mobile menu */
        border-top: 1px solid var(--border-color);
        padding-bottom: 10px;
    }

    nav .nav-links.active {
        display: flex; /* Show when active (hamburger clicked) */
    }

    nav .nav-links li {
        margin: 0.5rem 0;
        text-align: center;
    }

    nav .nav-links a {
        display: block;
        padding: 0.5rem;
        color: var(--text-color);
        font-weight: bold;
    }
}


nav .nav-links a:hover {
    background-color: var(--light-bg);
    border-radius: 5px;
    text-decoration: none;
}

/* Hero Section (for index.php) */
.hero-section {
    background-color: var(--light-bg); /* Using the very light grey for background */
    color: var(--text-color); /* Set text to dark for readability */
    padding: 3rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section .container {
    display: flex;
    flex-direction: column; /* Stack on mobile */
    align-items: center;
    justify-content: center;
}

.hero-content {
    max-width: 600px;
    margin-bottom: 2rem; /* Space between content and visual on mobile */
}

.hero-content h1,
.hero-content p {
    color: var(--text-color); /* Ensure H1 and P within hero-content are dark */
}

.hero-content h1 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.hero-visual {
    height: 0; /* Collapse the space if no content */
    display: none; /* Ensure it doesn't take up space */
}

/* General Section Styling */
section {
    padding: 2rem 0;
    margin-bottom: 1rem;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

section:nth-of-type(odd) {
    background-color: var(--light-bg);
}

section h2 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

/* Emojis within headings */
h2 .emoji, h3 .emoji {
    font-size: 0.8em; /* Slightly smaller than parent heading */
    vertical-align: middle;
    margin-left: 0.5rem;
}

/* Why Accredited Grid */
.advantages-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 1.5rem;
}

.advantage-item {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
}

.advantage-item h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

/* Roles Section */
.role-cards-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 1.5rem;
}

.role-card {
    background-color: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Push button to bottom */
    align-items: center;
}

.role-card h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.role-card p {
    flex-grow: 1; /* Allow paragraph to take up space */
    margin-bottom: 1rem;
}

/* Testimonials */
.testimonials {
    text-align: center;
}

.testimonial-carousel {
    display: flex;
    overflow-x: auto; /* Enable horizontal scrolling for testimonials */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    padding-bottom: 1rem; /* Space for scrollbar */
}

.testimonial-item {
    flex: 0 0 90%; /* Take 90% of container width on mobile */
    scroll-snap-align: start;
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin: 0 10px; /* Space between testimonials */
}

.testimonial-item p {
    font-style: italic;
    font-size: 1.1em;
    margin-bottom: 0.5rem;
}

.testimonial-item .author {
    font-weight: bold;
    color: var(--secondary-color);
    font-size: 0.9em;
}

.logos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr)); /* Responsive grid for logos */
    gap: 1rem;
    margin-top: 2rem;
    padding: 0 1rem; /* Padding for small screens */
}

.emoji-logo {
    font-size: 3em; /* Size for emoji logos */
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px; /* Keep height consistent */
    filter: grayscale(100%); /* Mute logos */
    opacity: 0.6;
    transition: opacity 0.3s ease, filter 0.3s ease;
}

.emoji-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
}

.cta-bottom {
    margin-top: 2rem;
    text-align: center;
}

/* --- Styles for Top-Level Pages (page-hero correction) --- */

/* Page Hero Section (used on all top-level pages) */
.page-hero {
    background-color: var(--light-bg); /* Setting background to light grey */
    color: var(--text-color); /* Set text to dark for readability */
    padding: 3rem 1rem;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: 8px; /* Consistent with other sections */
}

.page-hero h1 {
    color: var(--text-color); /* Explicitly ensuring H1 is dark */
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.page-hero p {
    color: var(--text-color); /* Explicitly ensuring P is dark */
    font-size: 1.1rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Specific styles for About page sections */
.about-section {
    padding: 2rem 0;
    margin-bottom: 1rem;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.about-section.light-bg {
    background-color: var(--light-bg);
}

.about-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.about-section ul {
    list-style: none; /* Remove default bullets */
    padding-left: 0;
    margin-bottom: 1.5rem;
}

.about-section ul li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.8rem;
}

.about-section ul li::before {
    content: '✅'; /* Custom bullet point */
    position: absolute;
    left: 0;
    color: var(--accent-color); /* Green tick */
}

.about-section .highlight-text {
    font-style: italic;
    text-align: center;
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
    background-color: rgba(0, 51, 102, 0.05); /* Light primary color background */
    border-left: 5px solid var(--primary-color);
    border-radius: 5px;
}

.roles-about-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 1.5rem;
    margin-top: 2rem;
}

.role-about-item {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
}

.role-about-item h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

/* Directory Page Styles */
.directory-filters {
    padding: 2rem 0;
    margin-bottom: 1rem;
    background-color: var(--light-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filter-form {
    display: flex;
    flex-direction: column; /* Stack vertically on mobile */
    gap: 1rem;
    align-items: center;
}

.form-group {
    width: 100%; /* Full width on mobile */
    margin-bottom: 0.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
}

.featured-carousel {
    display: flex;
    overflow-x: auto; /* Enable horizontal scrolling for testimonials */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    padding-bottom: 1rem; /* Space for scrollbar */
    justify-content: flex-start; /* Align items to start on scroll */
}

.featured-item {
    flex: 0 0 90%; /* Take 90% width on mobile, enabling scroll */
    scroll-snap-align: start;
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    margin: 0 10px;
    text-align: center;
}

.featured-item p {
    font-style: italic;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.featured-item .author {
    font-weight: bold;
    color: var(--secondary-color);
    font-size: 0.9em;
}

.listings-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column on mobile */
    gap: 1.5rem;
    margin-top: 2rem;
}

.member-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
}

.member-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.member-card p {
    margin-bottom: 0.5rem;
    font-size: 0.95em;
}

.member-card .maturity-badge {
    display: inline-block;
    padding: 0.3em 0.7em;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: bold;
    color: var(--white);
    margin-top: 0.5rem;
}

.maturity-badge.emerging { background-color: #ffc107; color: #333; } /* Yellow */
.maturity-badge.progressing { background-color: #007bff; } /* Blue */
.maturity-badge.leading { background-color: #28a745; } /* Green */
.maturity-badge.innovator { background-color: #dc3545; } /* Red/bold */

.external-link {
    display: inline-flex;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.9em;
}
.external-link .emoji {
    font-size: 1.1em;
    margin-left: 5px;
}

.directory-cta {
    margin-top: 3rem;
    padding: 2rem;
    background-color: var(--light-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center;
}

.directory-cta h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
}


/* Login Page Styles */
.login-section {
    padding: 2rem 0;
    margin-bottom: 1rem;
    background-color: var(--light-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-card {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    max-width: 400px;
    width: 100%;
    margin-bottom: 2rem;
}

.login-card h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.login-form .form-group {
    margin-bottom: 1rem;
}

/* FIX: Added input[type="password"] to this selector */
.login-form .form-group input[type="text"],
.login-form .form-group input[type="password"] {
    display: block;
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
}

.forgot-password {
    text-align: right;
    font-size: 0.9em;
    margin-bottom: 1.5rem;
}

.forgot-password a {
    color: var(--primary-color);
}

.login-form .button {
    width: 100%;
    margin-right: 0; /* Override default button margin */
}

.new-member-cta {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.new-member-cta h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--primary-color);
}

.portal-features {
    padding: 2rem;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    max-width: 800px;
    width: 100%;
}

.portal-features h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.portal-features ul {
    list-style: none;
    padding-left: 0;
}

.portal-features ul li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.7rem;
}

.portal-features ul li::before {
    content: '⭐'; /* Custom bullet for features */
    position: absolute;
    left: 0;
    color: gold;
}

.security-statement {
    margin-top: 2rem;
    font-size: 0.9em;
    color: var(--secondary-color);
    text-align: center;
}

/* Contact Page Styles */
.contact-section {
    padding: 2rem 0;
    margin-bottom: 1rem;
    background-color: var(--light-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr; /* Stack on mobile */
    gap: 2rem;
}

.contact-form-area,
.direct-contact-info {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.contact-form-area h2,
.direct-contact-info h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.contact-form .form-group {
    margin-bottom: 1rem;
}

.contact-form .form-group input,
.contact-form .form-group select,
.contact-form .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
}

.contact-form textarea {
    resize: vertical; /* Allow vertical resizing */
}

.social-media, .office-location {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.social-media h3, .office-location h3 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2em; /* Adjust emoji size for social icons */
    margin: 0 10px;
    width: 40px;
    height: 40px;
    border: 1px solid var(--primary-color);
    border-radius: 50%;
    color: var(--primary-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.social-icon:hover {
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
}

.faqs-section {
    margin-top: 2rem;
    padding: 2rem;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.faqs-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.faq-item {
    margin-bottom: 1rem;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    overflow: hidden; /* Contains inner elements */
}

.faq-question {
    padding: 1rem;
    background-color: var(--light-bg);
    color: var(--primary-color);
    font-weight: bold;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid var(--border-color); /* Separator */
}

.faq-item:last-child .faq-question {
    border-bottom: none; /* No border for the last one */
}

.faq-question:hover {
    background-color: #e9ecef; /* Slightly darker hover */
}

.faq-question .toggle-icon {
    font-size: 1.5em;
    line-height: 1;
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 1rem;
    display: none; /* Hidden by default */
    border-top: none; /* No border above answer */
    color: var(--text-color);
    font-size: 0.95em;
    line-height: 1.5;
}

/* Admin Page Styles (Already present but adding media queries for context) */
.form-section {
    padding: 2rem 0;
    margin-bottom: 1rem;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.admin-form {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.admin-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.admin-form .form-group {
    margin-bottom: 1rem;
}

.admin-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: var(--text-color);
}

.admin-form input[type="text"],
.admin-form input[type="url"],
.admin-form input[type="email"],
.admin-form select,
.admin-form textarea,
.admin-form input[type="password"],
.admin-form input[type="number"] { /* ADDED input[type="number"] for display_order */
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}

.admin-form textarea {
    resize: vertical; /* Allow vertical resizing only */
}

.admin-form .required {
    color: red;
    font-weight: normal;
    margin-left: 5px;
}

.admin-form .button {
    margin-top: 1.5rem;
    display: inline-block; /* Keep buttons inline */
}

/* Specific adjustment for button spacing in admin form */
.admin-form .button.primary {
    margin-right: 10px;
}

.admin-form .button.secondary {
    margin-left: 0; /* Override default if any */
}

/* Ensure messages for admin forms use the existing styles */
.message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.message.success {
    background-color: #d4edda; /* Light green */
    color: #155724; /* Dark green text */
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da; /* Light red */
    color: #721c24; /* Dark red text */
    border: 1px solid #f5c6cb;
}


/* Admin Dashboard Specific Styles */
.admin-dashboard-section {
    padding: 2rem 0;
    margin-bottom: 1rem;
    background-color: var(--light-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    text-align: center; /* Center dashboard elements initially */
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr; /* Stack vertically on mobile */
    gap: 2rem;
    margin-top: 2rem;
    padding: 1rem; /* Padding inside for mobile */
}

.dashboard-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Push button to bottom */
    align-items: center;
}

.dashboard-card h3 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.dashboard-card p {
    flex-grow: 1; /* Allows paragraph to take available space */
    margin-bottom: 1.5rem;
}

.dashboard-card .emoji {
    font-size: 2em; /* Larger emoji for dashboard cards */
    display: block;
    margin-bottom: 0.5rem;
}


/* Admin Page Layout (manage_companies, manage_testimonials, manage_faqs) */
.admin-content-section {
    padding: 2rem 0;
    margin-bottom: 1rem;
    background-color: var(--light-bg); /* Use light-bg for the section background */
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.admin-grid {
    display: grid;
    grid-template-columns: 1fr; /* Stack vertically on mobile */
    gap: 2rem;
}

.admin-form-area,
.admin-list-area {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.admin-list-area h2, .admin-form-area h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

/* Table Styles */
.member-table-wrapper {
    overflow-x: auto; /* Allows horizontal scrolling on small screens */
    margin-top: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.member-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    min-width: 600px; /* Ensure table doesn't shrink too much on mobile */
}

.member-list-table th,
.member-list-table td {
    padding: 0.8rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.member-list-table th {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.9em;
}

.member-list-table tbody tr:nth-child(odd) {
    background-color: var(--light-bg);
}

.member-list-table tbody tr:hover {
    background-color: #e2e6ea;
}

.member-list-table td .button.secondary-small {
    margin-right: 5px; /* Adjust button spacing in table */
    margin-bottom: 0;
    padding: 0.3em 0.6em;
    font-size: 0.8em;
}

/* Specific button styles for edit/delete */
.edit-button {
    background-color: #007bff; /* Blue */
    color: var(--white);
    border: 1px solid #007bff;
}
.edit-button:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

.delete-button {
    background-color: #dc3545; /* Red */
    color: var(--white);
    border: 1px solid #dc3545;
}
.delete-button:hover {
    background-color: #c82333;
    border-color: #c82333;
}

.admin-actions {
    margin-top: 2rem;
    text-align: center;
}
.admin-actions .button {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* Media Queries for Larger Screens */
@media (min-width: 768px) {
    /* Header Navigation - Specific Desktop Styles */
    nav .hamburger {
        display: none; /* Hide hamburger on larger screens */
    }

    nav .nav-links {
        display: flex !important; /* Force display on desktop */
        flex-direction: row;
        width: auto;
        margin-top: 0;
        background-color: transparent; /* Remove background for desktop nav */
        border-top: none; /* Remove border for desktop nav */
        padding-bottom: 0;
    }

    nav .nav-links li {
        margin: 0 1rem; /* Adjust spacing for desktop nav items */
    }

    /* General Role Card Grids (for index.php, about.php, etc.) */
    .role-cards-grid {
        grid-template-columns: repeat(2, 1fr); /* Two columns on tablets */
    }

    /* About Page Grids */
    .roles-about-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Directory Page Grids and Forms */
    .filter-form {
        flex-direction: row; /* Horizontal on desktop */
        flex-wrap: wrap; /* Allow wrapping */
        justify-content: center;
        gap: 1.5rem;
    }
    .form-group {
        width: auto; /* Auto width */
        flex: 1 1 45%; /* Two per row, flex for spacing */
        max-width: 300px; /* Max width for input fields */
    }
    .filter-form .button {
        flex: 1 1 auto; /* Allow button to size naturally */
        margin-top: 1.5rem; /* Space from inputs */
    }
    .featured-carousel {
        justify-content: center;
        overflow-x: hidden;
    }
    .featured-item {
        flex: 0 0 45%; /* Two items per row */
    }
    .listings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .directory-cta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
        text-align: left;
    }
    .directory-cta h3 {
        text-align: left;
    }

    /* Login Page Layout */
    .login-section {
        flex-direction: row; /* Side-by-side */
        justify-content: center;
        align-items: flex-start; /* Align to top */
        gap: 3rem;
    }
    .login-card {
        margin-bottom: 0; /* Remove bottom margin */
    }
    .portal-features {
        margin-top: 3rem; /* Added space for desktop when stacked */
    }

    /* Contact Page Layout */
    .contact-grid {
        grid-template-columns: 1fr 1fr; /* Two columns on desktop */
    }

    /* Admin Page Layout (manage_companies, manage_testimonials, manage_faqs) */
    .admin-form {
        padding: 3rem;
    }
    .admin-grid {
        grid-template-columns: 1fr 2fr; /* Form on left, list on right */
        align-items: start; /* Align items to the top */
    }
    .admin-form-area .admin-form { /* Ensure form doesn't take full grid width if smaller */
        max-width: none; /* Override previous max-width if it's there */
    }

    /* Admin Dashboard Grid */
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr); /* Two columns on larger screens */
    }
}

@media (min-width: 1024px) {
    /* Role Cards Grid (Index Page) */
    .role-cards-grid {
        grid-template-columns: repeat(3, 1fr); /* Three columns on large desktops */
    }

    .featured-item {
        flex: 0 0 30%; /* Three items per row */
    }
    .listings-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    /* Specific adjustment for Employers page - 4 columns where appropriate */
    #employers-advantages .advantage-grid-audience { /* Ensure this ID matches if you apply it */
        grid-template-columns: repeat(4, 1fr);
    }

    /* Admin Dashboard Grid */
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr); /* Three columns on larger desktops */
    }
}

@media (min-width: 1200px) {
    /* Adjust Role Cards grid to show all 6 in one row on very wide screens if desired */
    .role-cards-grid {
        grid-template-columns: repeat(6, 1fr); /* All 6 roles in one row if screen is very wide */
    }
}