﻿/* =====================
       Design Tokens
    ====================== */
:root {
    --color-primary: #1D4E89; /* updated primary — rich blue */
    --color-primary-700: #153A67; /* darker shade for hover/alt states */
    --color-accent: #D4A017; /* retaining the gold/ochre accent */
    --color-bg: #F5F5F5; /* light grey-ish background for contrast */
    --color-surface: #FFFFFF;
    --color-text: #333333;
    --color-muted: #6b6b6b;
    --radius: 12px;
    --shadow: 0 8px 24px rgba(0,0,0,.08);
    --container: 1200px;
}


/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: 'Open Sans', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(100% - 32px, var(--container));
    margin-inline: auto;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 1px, 1px);
    white-space: nowrap;
    border: 0;
}

/* =====================
       Header / Navigation
    ====================== */
header.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 2000;
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.15);
    padding: 8px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

    .brand img {
        height: 90%;
        width: auto;
        max-width: 100%;
    }

.brand-logo {
    width: 40px;
    height: 40px;
    background: var(--color-accent);
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #1b1220;
    font-weight: 700;
}

.brand-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: .3px;
}

nav.primary-nav {
    display: none;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    padding: 0;
    margin: 0;
}

    .nav-links a {
        color: #fff;
        opacity: .95;
        font-weight: 600;
    }

        .nav-links a:hover, .nav-links a:focus {
            opacity: 1;
            text-decoration: underline;
            text-underline-offset: 4px;
        }

.menu-btn {
    background: transparent;
    border: 2px solid rgba(255,255,255,.5);
    color: #fff;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-icon {
    width: 20px;
    height: 2px;
    background: #fff;
    position: relative;
    display: inline-block;
}

    .menu-icon::before, .menu-icon::after {
        content: "";
        position: absolute;
        left: 0;
        width: 20px;
        height: 2px;
        background: #fff;
    }

    .menu-icon::before {
        top: -6px;
    }

    .menu-icon::after {
        top: 6px;
    }

/* Mobile menu (drawer) */
.mobile-drawer {
    display: none;
    background: var(--color-primary-700);
}

    .mobile-drawer ul {
        list-style: none;
        padding: 8px 0 16px;
        margin: 0;
    }

    .mobile-drawer li {
        border-top: 1px solid rgba(255,255,255,.12);
    }

    .mobile-drawer a {
        display: block;
        padding: 14px 16px;
        color: #fff;
    }

/* Always visible header — shrink removed */
.shrink .header-inner {
    padding: 8px 0;
}

/* =====================
       Hero Section
    ====================== */
.hero {
    position: relative;
    background: linear-gradient(180deg, rgba(74,29,69,1) 0%, rgba(74,29,69,.92) 40%, rgba(74,29,69,.85) 100%), url('https://jhc.lk/wp-content/uploads/2025/09/432120_292606814145871_2106921908_n.jpg') center/cover no-repeat;
    color: #fff;
    padding: 140px 0 56px;
    overflow: hidden;
}

    .hero .eyebrow {
        letter-spacing: .18em;
        text-transform: uppercase;
        opacity: .85;
        font-weight: 700;
    }

    .hero h1 {
        font-family: 'Montserrat', sans-serif;
        font-weight: 700;
        line-height: 1.15;
        margin: 8px 0 10px;
        font-size: clamp(28px, 4.6vw, 48px);
    }

    .hero p {
        max-width: 60ch;
        opacity: .92;
    }

.hero-ctas {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 999px;
    border: 2px solid transparent;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}

    .btn:active {
        transform: translateY(1px);
    }

.btn-primary {
    background: var(--color-accent);
    color: #1b1220;
}

    .btn-primary:hover {
        background: #e0ad3e;
    }

.btn-secondary {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,.6);
}

    .btn-secondary:hover {
        background: rgba(255,255,255,.12);
    }

/* =====================
       Section base styles
    ====================== */
section {
    padding: 36px 0;
}

.section-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: clamp(20px, 3.6vw, 32px);
    margin: 0 0 16px;
}

.section-sub {
    color: var(--color-muted);
    margin: 6px 0 22px;
}

/* Cards & grids */
.card {
    background: var(--color-surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: clip;
    border: 1px solid rgba(0,0,0,.05);
}

    .card img {
        width: 100%;
        height: 180px;
        object-fit: cover;
    }

.card-content {
    padding: 14px 16px 18px;
}

.meta {
    display: flex;
    gap: 10px;
    align-items: center;
    color: var(--color-muted);
    font-size: .92rem;
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: #f4efe8;
    color: #7a5c0a;
    font-weight: 700;
    font-size: .78rem;
}

.grid {
    display: grid;
    gap: 16px;
}

    .grid.cols-3 {
        grid-template-columns: 1fr;
    }

/* Horizontal scroll row for events on mobile */
.h-scroll {
    display: flex;
    gap: 12px;
    overflow: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 4px;
}

    .h-scroll::-webkit-scrollbar {
        height: 8px;
    }

    .h-scroll::-webkit-scrollbar-thumb {
        background: rgba(0,0,0,.2);
        border-radius: 999px;
    }

.h-item {
    min-width: 80%;
    max-width: 360px;
    scroll-snap-align: start;
    flex: 0 0 auto;
}

/* CTA banner */
.cta {
    background: radial-gradient(80% 120% at 10% 10%, #5a2154 0%, #3c1738 40%, #2c102a 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
}

    .cta h3 {
        margin: 0 0 10px;
        font-family: 'Montserrat', sans-serif;
    }

    .cta p {
        margin: 0 0 14px;
        opacity: .95;
    }

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

    .gallery img {
        height: 120px;
        width: 100%;
        object-fit: cover;
        border-radius: 10px;
    }

/* Gallery Preview Thumbnails */
.gp-thumb {
    height: 120px;
    width: 100%;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

    .gp-thumb:hover {
        transform: scale(1.02);
        box-shadow: 0 4px 12px rgba(0,0,0,.15);
    }

/* Gallery Preview Grid Responsive */
.gallery-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

@media (max-width: 640px) {
    .gallery-preview-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
}

/* Footer */
footer.site-footer {
    background: var(--color-primary);
    color: #fff;
    padding: 28px 0;
    margin-top: 24px;
}

.footer-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}

.footer-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin: 0 0 8px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    display: grid;
    gap: 8px;
}

    .footer-links a {
        color: #fff;
        opacity: .95;
    }

        .footer-links a:hover {
            opacity: 1;
            text-decoration: underline;
            text-underline-offset: 4px;
        }

.socials {
    display: flex;
    gap: 12px;
}

    .socials a {
        display: grid;
        place-items: center;
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: rgba(255,255,255,.12);
    }

.copyright {
    margin-top: 10px;
    font-size: .9rem;
    opacity: .9;
}

/* =====================
       Responsive
    ====================== */
@media (min-width: 640px) {
    .h-item {
        min-width: 360px;
    }

    .gallery img {
        height: 160px;
    }

    .gp-thumb {
        height: 160px;
    }
}

@media (min-width: 768px) {
    nav.primary-nav {
        display: block;
    }

    .menu-btn {
        display: none;
    }

    .mobile-drawer {
        display: none !important;
    }

    .brand img {
        height: 90px;
    }

    .hero {
        padding: 150px 0 84px;
    }

    .grid.cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .gallery {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

@media (min-width: 1024px) {
    .hero h1 {
        font-size: 54px;
    }

    .hero p {
        font-size: 1.125rem;
    }
}

/* Members table responsive design */
.members-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.members-table th,
.members-table td {
    white-space: nowrap;
    min-width: 120px;
}

    .members-table th:first-child,
    .members-table td:first-child {
        min-width: 150px;
        font-weight: 600;
    }

/* Profile card responsive design */
.profile-info {
    flex-direction: column;
    text-align: center;
}

@media (min-width: 640px) {
    .profile-info {
        flex-direction: row !important;
        text-align: left !important;
    }
}

@media (max-width: 767px) {
    .members-table th,
    .members-table td {
        padding: 12px 16px !important;
        font-size: 0.9rem;
    }

    .members-table th {
        font-size: 0.85rem !important;
    }

    .profile-header {
        padding: 24px 16px 20px !important;
    }

    .profile-content {
        padding: 20px 16px !important;
    }

    .profile-avatar {
        width: 100px !important;
        height: 100px !important;
    }

    .profile-details h3 {
        font-size: 1.5rem !important;
    }

    .profile-stats {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)) !important;
        gap: 12px !important;
    }

    .stat-item {
        padding: 12px !important;
    }

    .achievement-item {
        padding: 8px !important;
        gap: 8px !important;
    }

        .achievement-item svg {
            width: 16px !important;
            height: 16px !important;
        }

    .profile-contact {
        flex-direction: column !important;
        align-items: stretch !important;
    }

        .profile-contact .btn {
            justify-content: center !important;
        }
}

/* Members search filter */
.members-search {
    margin-bottom: 20px;
}

    .members-search input {
        width: 100%;
        max-width: 400px;
        padding: 12px 16px 12px 44px;
        border: 2px solid rgba(29, 78, 137, 0.2);
        border-radius: var(--radius);
        font-size: 1rem;
        font-family: inherit;
        transition: border-color 0.2s ease, box-shadow 0.2s ease;
        background: var(--color-surface);
    }

        .members-search input:focus {
            outline: none;
            border-color: var(--color-primary);
            box-shadow: 0 0 0 3px rgba(29, 78, 137, 0.1);
        }

.members-search-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 400px;
}

.members-search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-muted);
    pointer-events: none;
}

/* Sortable table styles */
.members-table th {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s ease;
}

    .members-table th:hover {
        background: var(--color-primary-700) !important;
    }

    .members-table th::after {
        content: '⇅';
        position: absolute;
        right: 8px;
        opacity: 0.3;
        font-size: 0.9rem;
    }

    .members-table th.sort-asc::after {
        content: '↑';
        opacity: 1;
    }

    .members-table th.sort-desc::after {
        content: '↓';
        opacity: 1;
    }

.members-table tbody tr {
    transition: background-color 0.15s ease;
}

    .members-table tbody tr:hover {
        background-color: rgba(29, 78, 137, 0.05);
    }

/* Motion safety */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

/* Full-post responsive layout */
@media (min-width: 992px) {
    #full-post .container.post-layout {
        grid-template-columns: 2fr 1fr;
        align-items: start;
    }
}

/* Responsive sidebar: bottom on mobile, right on desktop */
@media (min-width: 992px) {
    .post-layout {
        grid-template-columns: 1fr 320px !important;
    }
}

@media (max-width: 991px) {
    .post-layout {
        grid-template-columns: 1fr !important;
    }

    .post-sidebar {
        order: 10 !important;
        margin-top: 20px;
    }
}



@media (max-width: 767px) {
    .timeline > div:first-child {
        left: 20px !important;
        width: 2px !important;
    }

    .milestone-item {
        display: block !important;
        padding-left: 50px !important;
        position: relative !important;
        margin-bottom: 35px !important;
    }

        .milestone-item > div {
            grid-column: unset !important;
        }

            .milestone-item > div:nth-child(2) {
                position: absolute !important;
                left: 12px !important;
                top: 5px !important;
                width: 18px !important;
                height: 18px !important;
                border-width: 3px !important;
            }

        .milestone-item h3 {
            font-size: 1.6rem !important;
            margin: 0 0 12px 0 !important;
            background: var(--color-primary) !important;
            color: white !important;
            padding: 6px 14px !important;
            border-radius: 6px !important;
            display: inline-block !important;
            text-align: left !important;
        }

        .milestone-item .card {
            margin: 0 !important;
            width: 100% !important;
        }
}