/* css/community/style.css */
:root {
    --primary: #0f4c81;
    --primary-hover: #1e3a8a;
    --accent: #2563eb;
    --bg-body: #f8f9fa;
    --bg-white: #ffffff;
    --border: #e2e8f0;
    --text-main: #334155;
    --text-muted: #64748b;
    --header-h: 70px;
    --radius: 10px;
}

/* --- Reset & Base --- */
* { box-sizing: border-box; }
body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding-top: var(--header-h);
}
a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; padding: 0; margin: 0; }

/* --- HEADER --- */
.comm-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
}

.brand-logo {
    height: 40px;
}

/* Search */
.comm-search {
    position: relative;
    width: 100%;
    max-width: 380px;
}
.comm-search input {
    width: 100%;
    padding: 10px 15px 10px 40px;
    border-radius: 50px;
    border: 1px solid var(--border);
    background: #f1f5f9;
}
.search-icon-pos {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Buttons */
.btn-comm {
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 0.9rem;
}
.btn-outline {
    border: 1px solid var(--primary);
    color: var(--primary);
}
.btn-fill {
    background: var(--primary);
    color: #fff;
}

/* Account Dropdown */
.acc-dropdown { position: relative; }
.acc-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}
.acc-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
}
.acc-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 120%;
    width: 200px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
}
.acc-menu.show { display: block; }
.acc-menu a {
    display: block;
    padding: 10px 15px;
}

/* --- MOBILE HEADER CONTROLS --- */
.header-mobile {
    display: none;
    align-items: center;
    gap: 12px;
}
.icon-btn {
    background: none;
    border: none;
    font-size: 1.1rem;
    cursor: pointer;
}

/* Mobile Search */
.mobile-search {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: white;
    padding: 15px;
    border-bottom: 1px solid var(--border);
    display: none;
    z-index: 999;
}
.mobile-search input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 30px;
}

/* Mobile Menu */
.mobile-menu {
    position: fixed;
    top: var(--header-h);
    right: -100%;
    width: 100%;
    background: white;
    border-top: 1px solid var(--border);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transition: right 0.3s ease;
    z-index: 999;
}
.mobile-menu.show {
    right: 0;
}
.mobile-menu a {
    font-size: 1rem;
    font-weight: 500;
}

/* --- 2. Grid Layout --- */
.comm-container {
    display: grid;
    /* We'll use a fixed-width for the sidebars and let the feed take the rest */
    grid-template-columns: 240px 1fr 300px; /* Sidebar | Feed | Widgets */
    gap: 2rem;
    max-width: 1300px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Sidebar Left & Right - Use position: sticky for fixed-on-scroll effect */
.sidebar-left, 
.sidebar-right {
    /* Make the sidebar stick to the top of its content area */
    position: sticky;
    /* Start sticking 20px below the main header (var(--header-h) is 70px) */
    top: calc(var(--header-h) + 20px); 
    /* Set max height to prevent it from growing out of the viewport */
    max-height: calc(100vh - var(--header-h) - 40px);
    /* Allow scrolling within the sidebar if its content is too long */
    overflow-y: auto;
}

/* Hide the scrollbar for aesthetic purposes, but keep scroll functionality */
.sidebar-left::-webkit-scrollbar,
.sidebar-right::-webkit-scrollbar {
    display: none;
}

.sidebar-left {
    /* No changes needed inside .sidebar-left .side-nav */
}

/* Sidebar Right widgets are already contained, just need the sticky wrapper */
.sidebar-right {
    /* No additional changes needed for its content */
}

/* Sidebar Left */
.side-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 15px; border-radius: var(--radius);
    color: var(--text-muted); font-weight: 500; margin-bottom: 4px;
}
.side-nav a:hover, .side-nav a.active {
    background: #e0e7ff; color: var(--primary);
}
.side-nav i { width: 20px; text-align: center; }
.nav-head {
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em;
    color: #94a3b8; margin: 20px 0 10px 15px; font-weight: 700;
}

/* --- Sidebar Dropdown (Explore Topics) --- */

.side-nav .dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: var(--radius);
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
}

/* Match sidebar icon alignment */
.side-nav .dropdown-toggle > i:first-child {
    width: 20px;
    text-align: center;
}

/* Hover & active */
.side-nav .dropdown-toggle:hover,
.side-nav .dropdown-toggle.active {
    background: #e0e7ff;
    color: var(--primary);
}

/* Chevron */
.side-nav .dropdown-icon {
    margin-left: auto;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    /* FIX: START UPWARD (180deg) when closed */
    transform: rotate(180deg);
}

/* Chevron Flip */
.side-nav .dropdown-toggle.active .dropdown-icon {
    /* FIX: Flip DOWNWARD (0deg) when open/active */
    transform: rotate(0deg);
}

/* Dropdown container (animated) */
.side-nav .dropdown-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 5px;
}

.side-nav .dropdown-content.show {
    max-height: 500px;
}

/* Dropdown links */
.side-nav .dropdown-content a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 15px;   /* SAME as sidebar links */
    padding-left: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    border-radius: var(--radius);
}

/* Dropdown icons */
.side-nav .dropdown-content a i {
    width: 16px;
    text-align: center;
}

/* Hover & active */
.side-nav .dropdown-content a:hover,
.side-nav .dropdown-content a.active {
    background: #e0e7ff;
    color: var(--primary);
}

/* ===============================
   CTA WIDGET
================================= */
.widget-cta {
    position: relative;
    padding: 28px 24px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f4c81 0%, #2563eb 50%, #3b82f6 100%)!important;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.25);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Subtle hover lift */
.widget-cta:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(37, 99, 235, 0.35);
}

/* Glass highlight effect */
.widget-cta::before {
    content: "";
    position: absolute;
    top: -40%;
    left: -40%;
    width: 180%;
    height: 180%;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.25), transparent 60%)!important;
    pointer-events: none;
}

/* Title */
.widget-cta .widget-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    letter-spacing: 0.3px;
}

/* Description */
.widget-cta .widget-description {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.9;
    margin-bottom: 20px;
}

/* CTA Button */
.btn-cta {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    background: #ffffff;
    color: #0f4c81;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.25s ease;
}

/* Button hover */
.btn-cta:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0,0,0,0.2);
}

/* Button active */
.btn-cta:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}


/* Feed (Center) */
.feed-filter { display: flex; gap: 15px; margin-bottom: 20px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.filter-item { background: none; border: none; font-weight: 600; color: var(--text-muted); cursor: pointer; padding-bottom: 5px; }
.filter-item.active { color: var(--primary); border-bottom: 2px solid var(--primary); }
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
}

.tab-button {
    padding: 10px 20px;
    border: none;
    background-color: #e9ecef;
    color: #555;
    font-weight: bold;
    cursor: pointer;
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s;
    text-align: center;
}

.tab-button:hover {
    background-color: #dee2e6;
}

.tab-button.active {
    background-color: #007bff;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 123, 255, 0.3);
}
.q-card {
    background: white; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px; margin-bottom: 20px; transition: transform 0.2s;
    position: relative;
}
.q-card:hover { border-color: #cbd5e1; transform: translateY(-2px); }
.q-meta { display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 10px; }
.q-title { display: block; font-size: 1.15rem; font-weight: 700; color: #1e293b; margin-bottom: 8px; line-height: 1.4; }
.q-title:hover { color: var(--accent); }
.q-desc { font-size: 0.95rem; color: #475569; line-height: 1.6; margin-bottom: 15px; }
.q-tags { display: flex; gap: 8px; margin-bottom: 15px; }
.tag { background: #f1f5f9; padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; color: #64748b; font-weight: 500; }
.q-stats { display: flex; gap: 20px; font-size: 0.85rem; color: var(--text-muted); padding-top: 12px; border-top: 1px solid #f1f5f9; align-items: center;}
.q-stats a {
    text-decoration: none;
    font-weight: 500;
}
.btn-edit-q, .btn-stat-link {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
}
.btn-stat-link {
    color: #1e293b;
    background-color: #e2e8f0;
}
.btn-edit-q {
    color: #0f4c81;
    background-color: #c7d2fe;
}
.q-stats .btn-edit-q,
.q-stats .btn-stat-link {
    margin-left: auto; /* Push buttons to the right */
}
.question-badge {
    position: absolute;
    top: 15px;      /* Default desktop position */
    right: 15px;    /* Default desktop position */
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.85em;
    font-weight: 700;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    white-space: nowrap;
    z-index: 10;
}

.badge-unanswered {
    background-color: #dc3545; /* Red */
}
.badge-answered {
    background-color: #ffc107; /* Orange */
    color: #343a40;
}
.badge-accepted {
    background-color: #28a745; /* Green */
}
.q-category {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.q-category i { color: var(--accent); }
.q-category a {
    color: var(--text-muted);
    text-decoration: none;
}
.q-category a:hover {
    text-decoration: underline;
    color: var(--accent);
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    text-transform: uppercase;
}
.badge.answered {
    background-color: #e0f2fe; /* Light blue */
    color: #0f4c81; /* Dark blue text */
    border: 1px solid #93c5fd;
}
.badge.unanswered {
    background-color: #fee2e2; /* Light red */
    color: #b91c1c; /* Dark red text */
    border: 1px solid #fca5a5;
}
.badge.accepted {
    background-color: #d1fae5; /* Light green */
    color: #065f46; /* Dark green text */
    border: 1px solid #a7f3d0;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px solid #e2e8f0;
}
.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
}
.pagination a {
    color: #0f4c81;
    background-color: #f0f4f8;
    border: 1px solid #cbd5e1;
}
.pagination a:hover {
    background-color: #e2e8f0;
}
.pagination .current-page {
    background-color: #0f4c81;
    color: white;
    border: 1px solid #0f4c81;
}

/* Sidebar Right */
.widget-box { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
.widget-title { font-size: 1rem; font-weight: 700; margin-bottom: 15px; color: #0f172a; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-btn { 
    background: #f8fafc; border: 1px solid var(--border); padding: 6px 10px; 
    border-radius: 6px; font-size: 0.85rem; color: var(--text-muted); 
}
.tag-btn:hover { border-color: var(--accent); color: var(--accent); }

/* --- 3. Enquiry Modal Styles --- */

.modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.3s ease;
}

.modal.hidden {
    display: none;
    opacity: 0;
}

.modal-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    position: relative;
    z-index: 2001; 
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    animation: fadeInScale 0.3s ease-out;
}

.modal-close {
    position: absolute;
    top: 50px;
    right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-content h2 {
    font-size: 1.75rem;
    margin-bottom: 5px;
    color: var(--primary);
}

.modal-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* Form Grid Layout */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}
.form-grid label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.9rem;
}
.form-grid input, .form-grid textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s;
}
.form-grid input:focus, .form-grid textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 1px var(--accent);
}

.enquiry-btn-wrapper {
    text-align: right;
}

.submit-enquiry-btn {
    background: var(--primary);
    color: white;
    margin-bottom: 20px;
    padding: 12px 25px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.submit-enquiry-btn:hover {
    background: var(--primary-hover);
}

a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

/* Animation for Modal Entry */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* --- 4. Login Modal Specific Styles (Uses login-modal-content as the overlay/wrapper) --- */

.login-modal-content {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2001; /* Above enquiry overlay (z-index 2000) */
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.6); /* Acts as the overlay */
    padding: 20px;
}

.login-card {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    position: relative;
    z-index: 2002; 
    width: 90%;
    max-width: 400px; 
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    animation: fadeInScale 0.3s ease-out; 
    
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Modal Close Button (specifically for the login modal) */
.close-modal {
    position: absolute;
    top: 15px; right: 20px;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.login-card .logo {
    height: 50px; 
    margin-bottom: 20px;
}

.login-card h2 {
    font-size: 1.5rem;
    margin-bottom: 25px;
    color: var(--primary);
}

/* Form Styling */
.login-modal-content form {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.login-modal-content input[type="text"],
.login-modal-content input[type="password"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
}
.login-modal-content input:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 1px var(--accent);
}

.password-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    height: 18px;
    opacity: 0.6;
}

/* ReCAPTCHA styling */
.g-recaptcha {
    margin: 10px 0;
    align-self: center;
}

.actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}
.remember-me {
    display: flex;
    align-items: center;
    gap: 5px;
}
/* Ensure links are styled */
.actions a, .links a {
    color: var(--primary);
    font-weight: 500;
}
.actions a:hover, .links a:hover {
    text-decoration: underline;
}

/* Submit Button */
.login-modal-content button[type="submit"] {
    background: var(--primary);
    color: white;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}
.login-modal-content button[type="submit"]:hover {
    background: var(--primary-hover);
}

/* Google Button */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-weight: 500;
    color: var(--text-main);
    background: #fff;
    transition: background 0.2s;
}
.google-btn:hover {
    background: #f1f5f9;
}

/* Status Messages */
.error-message, .success-message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 6px;
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
}
.error-message {
    background-color: #fecaca; color: #b91c1c; border: 1px solid #f87171;
}
.success-message {
    background-color: #d1fae5; color: #065f46; border: 1px solid #34d399;
}

.links {
    margin-top: 15px;
    font-size: 0.9rem;
}

p a {
  color: #1a73e8;
  text-decoration: none;
  font-weight: 500;
}

p a:hover {
  text-decoration: underline;
}

.success-alert {
    padding: 15px; 
    margin-bottom: 20px; 
    border-radius: 6px; 
    color: #155724; /* Green text (Success color) */
    background-color: #d4edda; /* Light green background */
    border: 1px solid #c3e6cb; /* Border color */
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    /* Added transition for smoother hiding */
    transition: opacity 0.5s ease-in-out;
}

.empty-state {
 padding:20px;
 text-align:center;
 color:#666;
}

/* --- WYSIWYG Content Rendering --- */

/* The main container */
.editor-content-view {
    line-height: 1.6;
    word-wrap: break-word;
    color: var(--text-main);
}

/* Headings (H2, H3 from your editor) */
.editor-content-view h2 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 1.5rem 0 0.75rem;
    color: #1e293b;
}

.editor-content-view h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 1.25rem 0 0.5rem;
    color: #334155;
}

/* Paragraphs */
.editor-content-view p {
    margin-bottom: 1rem;
}

/* Overriding the global 'ul { list-style: none }' in your style.css */
.editor-content-view ul, 
.editor-content-view ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    display: block; /* Ensure they aren't flexed */
}

.editor-content-view ul {
    list-style-type: disc !important;
}

.editor-content-view ol {
    list-style-type: decimal !important;
}

.editor-content-view li {
    margin-bottom: 0.25rem;
}

/* Code Blocks (<pre> from your editor) */
.editor-content-view pre {
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    margin: 1rem 0;
    white-space: pre-wrap;
}

/* Links */
.editor-content-view a {
    color: var(--accent);
    text-decoration: underline;
}

/* Images */
.editor-content-view img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    margin: 1rem 0;
}

/* Alignment Support */
.editor-content-view [style*="text-align: center"] { text-align: center; }
.editor-content-view [style*="text-align: right"] { text-align: right; }
.editor-content-view [style*="text-align: justify"] { text-align: justify; }

/* Horizontal Rule */
.editor-content-view hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 1.5rem 0;
}

/* ===============================
   DCPS FINAL FOOTER
================================= */

footer.dcps-footer {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    font-family: 'Inter', sans-serif;
    color: #cbd5e1;
    padding: 40px 20px 20px;
    border-radius: 15px 15px 0px 0px;
    margin-top: 20px;
    position: relative;
    width: 100%;
    clear: both;
    text-align: left;
}

.dcps-footer * {
    box-sizing: border-box;
}

/* ===============================
   TOP GRID
================================= */

.dcps-footer-container {
    max-width: 1300px;
    margin: auto;
    display: grid;
    grid-template-columns: 320px 1fr 1fr 240px;
    gap: 100px;
}

.dcps-footer .dcps-footer-col h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 18px;
    color: #ffffff;
    text-align: left;
}

.dcps-footer-desc {
    font-size: 0.8rem;
    line-height: 1.6;
    margin: 15px 0;
    color: #94a3b8;
    text-align: left;
}

.dcps-footer-contact p {
    margin: 6px 0;
    font-size: 0.8rem;
    text-align: left;
}

.dcps-footer-contact a {
    font-size: 0.9rem !important;
}

.dcps-footer a {
    color: #94a3b8;
    font-size: 1rem;
    text-decoration: none;
    transition: 0.3s ease;
}

.dcps-footer a:hover {
    color: #3b82f6;
}

/* Links */
.dcps-footer-col ul {
    list-style: none;
    padding: 0;
}

.dcps-footer-col ul li {
    margin-bottom: 1px;
    text-align: left;
}

.dcps-footer-col.brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.dcps-footer-logo img {
    width: 180px !important;
    height: auto !important;
    display: block;
}


/* ===============================
   SUBSCRIPTION SECTION
================================= */

.dcps-footer .subscription {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}


.dcps-footer .subscription > p {
    font-size: 0.8rem !important;
    font-weight: 400;
    margin-bottom: 15px !important;
    text-align: left !important;
    color: #94a3b8 !important;
}

.dcps-footer .btn-subscribe {
    display: inline-block;
    align-self: flex-start;
    margin-left: 0; 
    padding: 10px 22px;
    background: #3b82f6;
    color: #ffffff !important;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.dcps-footer .btn-subscribe:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

.dcps-footer .subscription-features {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.75rem;
    color: #94a3b8;
}

/* ===============================
   FOOTER BOTTOM
================================= */
.dcps-footer > .dcps-footer-bottom {
    max-width: 1300px;
    margin: 30px auto 0;
    padding-top: 20px;
    border-top: 1px solid #334155;

    font-size: 0.75rem;
    color: #64748b;

    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

/* Social - Left */
.footer-social-bottom {
    display: flex;
    gap: 16px;
    justify-content: flex-start;
}

.footer-social-bottom img {
    width: 22px;
    height: 22px;
    opacity: 0.75;
    transition: all 0.3s ease;
}

.footer-social-bottom img:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* Copyright - Center */
.footer-copyright {
    text-align: center;
    white-space: nowrap;
}

/* Legal - Right */
.dcps-footer .legal-links {
    display: flex;
    gap: 18px;
    justify-content: flex-end;
}

.dcps-footer .legal-links a {
    color: #94a3b8;
    font-size: 0.8rem;
    text-decoration: none;
    transition: 0.3s ease;
}

.dcps-footer .legal-links a:hover {
    color: #3b82f6;
}

.cache-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #222;
  color: #fff;
  z-index: 10000;
  box-sizing: border-box;
}
.cache-banner .cache-banner-inner {
  padding: 1rem;
  text-align: center;
}
.cache-banner .cache-banner-inner .btn-accept,
.cache-banner .cache-banner-inner .btn-reject {
  margin-top: 0.75rem;
  margin-left: 1rem;
  padding: 0.5rem 1rem;
  border: none;
  color: #fff;
  cursor: pointer;
  font-weight: bold;
  border-radius: 4px;
}
.cache-banner .cache-banner-inner .btn-accept {
  background: #4CAF50;
}
.cache-banner .cache-banner-inner .btn-reject {
  background: #f44336;
}


/* --- 5. Responsive Styles --- */
@media (max-width: 1024px) {
    .comm-container {
        grid-template-columns: 200px 1fr;
    }
    /* We still want sidebars to be sticky here */
    .sidebar-left, 
    .sidebar-right {
        position: sticky;
        top: calc(var(--header-h) + 20px); 
        max-height: calc(100vh - var(--header-h) - 40px);
        overflow-y: auto;
    }
}



/* Tablet */
@media (max-width: 992px) {

    .dcps-footer-container {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 40px;
    }

    .dcps-footer {
        padding: 40px 20px 25px;
    }
}

@media (max-width: 768px) {

    .comm-container {
        /* Remove sidebar column on mobile */
        grid-template-columns: 1fr;
    }
    
    .sidebar-right {
        /* On mobile, remove the right sidebar entirely */
        display: none;
    }
    
    /* The left sidebar is already handled by fixed positioning in the mobile section */
    .sidebar-left {
        position: fixed; /* Override the sticky for the new mobile navigation bar */
        /* Other mobile styles for .sidebar-left remain */
    }
    
    /* --- NAVIGATION BAR STYLING --- */
    
    .sidebar-left {
        /* 1. Set bar position and fixed height */
        position: fixed;
        top: var(--header-h); 
        left: 0;
        width: 100%;
        height: 70px; /* Fixed height */
        border-bottom: 1px solid var(--border);
        z-index: 950; 
        background-color: var(--bg-white);
    }

    .sidebar-left .side-nav {
        /* 2. Horizontal layout for icons */
        display: flex;
        height: 100%;
        align-items: center;
        justify-content: space-around;
        padding: 5px 0;
    }

    /* 3. Increase the size of all icons */
    .sidebar-left .side-nav a i,
    .sidebar-left .dropdown-toggle i {
        font-size: 1.6rem;
    }

    /* 4. Hide all elements with the .link-text class */
    /* This hides main links text and 'Explore Topics' title */
    .sidebar-left .side-nav a span,
    .sidebar-left .dropdown-toggle span {
        display: none !important;
    }

    
    .sidebar-left .side-nav a,
    .sidebar-left .dropdown-toggle {
        flex-grow: 1; 
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 5px 0;
        text-align: center;
    }

    /* 5. Hide the dropdown arrow from the main bar */
    .sidebar-left .dropdown-toggle .dropdown-icon {
        display: none;
    }

    /* --- DROPDOWN CONTENT STYLING --- */
    
    .sidebar-left .dropdown-content {
        /* 6. Position immediately below the bar (70px height) */
        position: absolute;
        top: 70px; /* Hardcoded 70px height of the bar above */
        left: 0;
        width: 100%;
        z-index: 949;
        
        border-top: none; 
        padding-top: 0;
        
        background: var(--bg-white);
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        display: none; 
    }

    .sidebar-left .dropdown-content.show {
        display: block;
    }
    
    /* 7. Style category links for reduced size */
    .sidebar-left .dropdown-content a {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        padding: 8px 15px;
        font-size: 0.95rem;
        text-align: left;
    }
    
    .sidebar-left .dropdown-content a i {
        margin-right: 8px;
        font-size: 1.1rem;
    }

    /* --- MAIN CONTENT ADJUSTMENT --- */

    /* 8. Adjust body padding to clear both the main header and the new navigation bar */
    body {
        /* Header (70px) + Mobile Nav Bar (70px) = 140px total padding */
        padding-top: calc(var(--header-h) + 70px) !important;
    }
    
    .main-content {
        /* Ensure the main content uses the full space below the new top bar */
        margin-left: 0 !important; 
        padding-bottom: 0 !important; 
    }
    
    /* Disable other hidden mobile elements */
    .header-right {
        display: none;
    }
    
    .comm-search {
        display: none;
    }

    .header-mobile {
        display: flex;
    }

    /* Additional mobile adjustments */
    .modal-close {
        top: 20px;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .question-badge {
    /* New, compact size and shape */
    width: 12px;
    height: 12px;
    padding: 0;
    border-radius: 50%; /* Makes it a circle */
    
    /* Reposition to a safe top-right area, slightly smaller margin */
    top: 10px;
    right: 10px;
    
    /* Hide the text content to prevent text overlap */
    font-size: 0; 
    line-height: 0;
    text-indent: -9999px;
    }
    
    
    /* Main footer alignment */
    .dcps-footer {
        text-align: center;
        padding: 35px 20px 25px;
    }

    /* Grid becomes single column */
    .dcps-footer-container {
        grid-template-columns: 1fr;
        gap: 35px;
        justify-items: center;
    }

    /* Center all columns */
    .dcps-footer-col {
        text-align: center;
        align-items: center;
    }

    /* Headings */
    .dcps-footer .dcps-footer-col h4 {
        text-align: center;
    }

    /* Description */
    .dcps-footer-desc {
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
    }

    /* Contact text */
    .dcps-footer-contact p {
        text-align: center;
    }

    /* Links */
    .dcps-footer-col ul li {
        text-align: center;
        margin-bottom: 6px;
    }

    /* Brand column */
    .dcps-footer-col.brand {
        align-items: center;
    }

    /* Subscription section */
    .dcps-footer .subscription {
        align-items: center;
        text-align: center;
    }

    .dcps-footer .subscription > p {
        text-align: center !important;
    }

    .dcps-footer .btn-subscribe {
        align-self: center;
        margin: 0 auto;
        width: 100%;
        max-width: 280px;
    }

    .dcps-footer .subscription-features {
        align-items: center;
        text-align: center;
    }

    /* Bottom layout stacks */
    .dcps-footer > .dcps-footer-bottom {
        grid-template-columns: 1fr;
        gap: 12px;
        text-align: center;
    }

    .footer-social-bottom {
        justify-content: center;
    }

    .dcps-footer-bottom .legal-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .footer-copyright {
        white-space: normal;
    }
}