* {
    box-sizing: border-box;
}

:root {
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #dbe3ea;
    --primary: #0f766e;
    --primary-dark: #115e59;
    --nav-bg: #0f172a;
    --nav-text: #ffffff;
    --danger-bg: #fee2e2;
    --danger-text: #991b1b;
    --success-bg: #dcfce7;
    --success-text: #166534;
    --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    --radius: 14px;
}

html {
    font-size: 16px;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
}

.container {
    width: min(1120px, 92%);
    margin: 0 auto;
}

.logo-wrap{
    display:flex;
    align-items:center;
    gap:12px;
    text-decoration:none;
}

.site-logo{
    height:38px;
    width:auto;
}

.site-title{
    color:#ffffff;
    font-weight:600;
    font-size:1.05rem;
}

/* NAVIGATION */
.site-nav {
    background: var(--nav-bg);
    color: var(--nav-text);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 16px 0;
}

.logo {
    color: var(--nav-text);
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 0;
    padding: 0;
}

.menu li {
    margin: 0;
    padding: 0;
}

.menu a {
    display: inline-block;
    color: var(--nav-text);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.menu a:hover {
    background: rgba(255, 255, 255, 0.12);
    text-decoration: none;
}

/* MAIN */
main,
main.container {
    padding-top: 0px;
    padding-bottom: 32px;
}

h1,
h2,
h3 {
    margin-top: 0;
    color: #0f172a;
    line-height: 1.25;
}

h1 {
    font-size: 2.1rem;
    margin-bottom: 20px;
}

h2 {
    font-size: 1.45rem;
    margin-bottom: 14px;
}

h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}

p {
    margin-top: 0;
}

/* HERO */
.hero {
    background: #dae0e0; 
    padding: 72px 0;
    border-bottom: 1px solid var(--border);
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.hero p {
    max-width: 720px;
    color: #334155;
    font-size: 1.05rem;
}

/* SECTIONS */
.section {
    padding: 0px 0;
    margin-top: 32px;
}

/* GRID + CARDS */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 22px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
}

.card p:last-child {
    margin-bottom: 0;
}

/* FORMS */
.form-card {
    max-width: 680px;
}

label {
    display: block;
    margin: 12px 0 6px;
    font-weight: 600;
}

input,
textarea,
select,
button {
    width: 100%;
    font: inherit;
    border-radius: 10px;
}

input,
textarea,
select {
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: var(--text);
}

input:focus,
textarea:focus,
select:focus {
    outline: 2px solid rgba(15, 118, 110, 0.18);
    border-color: var(--primary);
}

textarea {
    min-height: 140px;
    resize: vertical;
}

button {
    border: none;
    padding: 12px 16px;
    margin-top: 16px;
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

button:hover {
    background: var(--primary-dark);
}

form[style*="display:inline-block"] {
    margin-right: 6px;
}

/* ALERTS */
.alert {
    border-radius: 12px;
    padding: 14px 16px;
    margin: 16px 0 20px;
    border: 1px solid transparent;
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger-text);
    border-color: #fecaca;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border-color: #bbf7d0;
}

/* TABLES */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.96rem;
}

.table th,
.table td {
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: top;
}

.table th {
    background: #f8fafc;
    font-weight: 700;
    color: #334155;
}

.table tr:hover td {
    background: #fafafa;
}

/* FOOTER */
.site-footer {
    margin-top: 40px;
    padding: 24px 0;
    background: #111827;
    color: #ffffff;
}

.site-footer p {
    margin: 0;
}

/* HELPERS */
small {
    color: var(--muted);
}

input[readonly] {
    background: #f8fafc;
}

/* NEWS */
.news-article {
    max-width: 900px;
    margin: 0 auto;
}

.news-article-image {
    width: auto;
    max-width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    margin: 15px 0 20px 0;
}

.news-content {
    margin-top: 18px;
    line-height: 1.8;
}

.admin-news-thumb {
    width: 90px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.news-list {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.news-list-item {
    display: flex;
    gap: 22px;
    align-items: flex-start;
}

.news-list-image-wrap {
    flex: 0 0 260px;
}

.news-list-image {
    width: 260px;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.news-list-content {
    flex: 1;
    min-width: 0;
}

.news-list-content h2 {
    margin-bottom: 8px;
}

.news-badge {
    margin-bottom: 8px;
}

/* HOMEPAGE EVENTS */
.home-events-layout {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr;
    gap: 24px;
    align-items: start;
}

.home-events-calendar {
    overflow: hidden;
}

/* VIEW TOGGLE */
.view-toggle-wrap {
    display: flex;
    justify-content: flex-start;
    margin-bottom: 20px;
}

.view-toggle-btn {
    width: auto;
    min-width: 220px;
    padding: 12px 18px;
}

.view-toggle-btn.active {
    background: var(--primary-dark);
}

/* CALENDAR */
#home-calendar {
    min-height: 420px;
}

#events-calendar {
    min-height: 750px;
}

/* MEMBERS */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    align-items: start;
}

.member-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.member-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.10);
}

.member-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 6px;
}

.member-org {
    color: #475569;
    margin-bottom: 12px;
    font-weight: 500;
}

.member-contact {
    font-size: 0.95rem;
    color: #334155;
    margin-bottom: 6px;
    word-break: break-word;
}

.member-contact a {
    color: var(--primary);
    text-decoration: none;
}

.member-contact a:hover {
    text-decoration: underline;
}

/* KNOWLEDGE BANK */
.knowledge-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.knowledge-upload-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.upload-fab {
    width: 46px;
    height: 46px;
    min-width: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(15, 118, 110, 0.20);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.upload-fab:hover {
    background: var(--primary-dark);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.24);
}

.upload-fab-label {
    font-weight: 600;
    color: #334155;
}

.knowledge-filters-inline {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) minmax(180px, 0.8fr) minmax(140px, 0.6fr) auto;
    gap: 12px;
    align-items: center;
    flex: 1;
}

.knowledge-filter-field input,
.knowledge-filter-field select {
    width: 100%;
    margin: 0;
    min-height: 44px;
    padding: 10px 12px;
}

.knowledge-filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-btn {
    width: auto;
    min-width: 110px;
    margin-top: 0;
    padding: 10px 16px;
}

.compact-link {
    white-space: nowrap;
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
}

.document-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.document-meta-top {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.document-category,
.document-year {
    display: inline-block;
    background: #f1f5f9;
    border: 1px solid #dbe3ea;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
    color: #334155;
}

.document-title {
    margin-bottom: 0;
}

.document-description {
    color: #475569;
}

.document-line {
    margin-bottom: 0;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.tag-pill {
    display: inline-block;
    background: #ecfeff;
    color: #155e75;
    border: 1px solid #bae6fd;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.85rem;
}

.document-actions {
    display: flex;
    gap: 14px;
    margin-top: auto;
    padding-top: 10px;
}

.secondary-link {
    display: inline-flex;
    align-items: center;
    padding-bottom: 10px;
}

@media (max-width: 992px) {
    .knowledge-filters-inline {
        grid-template-columns: 1fr 1fr;
    }

    .knowledge-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .knowledge-toolbar {
        align-items: stretch;
    }

    .knowledge-upload-wrap {
        justify-content: flex-start;
    }

    .knowledge-filters-inline {
        grid-template-columns: 1fr;
    }

    .knowledge-filter-actions {
        grid-column: auto;
        flex-wrap: wrap;
    }

    .filter-btn {
        width: 100%;
    }
}

.upload-fab {
    width: 46px;
    height: 46px;
    min-width: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(15, 118, 110, 0.20);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.upload-fab:hover {
    background: var(--primary-dark);
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(15, 118, 110, 0.24);
}

.upload-fab-label {
    font-weight: 600;
    color: #334155;
}

.knowledge-filters-inline {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) minmax(180px, 0.8fr) minmax(140px, 0.6fr) auto;
    gap: 12px;
    align-items: center;
    flex: 1;
}

.knowledge-filter-field input,
.knowledge-filter-field select {
    width: 100%;
    margin: 0;
    min-height: 44px;
    padding: 10px 12px;
}

.knowledge-filter-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-btn {
    width: auto;
    min-width: 110px;
    margin-top: 0;
    padding: 10px 16px;
}

.compact-link {
    white-space: nowrap;
}

/* responsive */
@media (max-width: 992px) {
    .knowledge-filters-inline {
        grid-template-columns: 1fr 1fr;
    }

    .knowledge-filter-actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 640px) {
    .knowledge-toolbar {
        align-items: stretch;
    }

    .knowledge-upload-wrap {
        justify-content: flex-start;
    }

    .knowledge-filters-inline {
        grid-template-columns: 1fr;
    }

    .knowledge-filter-actions {
        grid-column: auto;
        flex-wrap: wrap;
    }

    .filter-btn {
        width: 100%;
    }
}