/*
Theme Name: CT Light
Version: 1.0.3
*/

/* ==========================
   GLOBAL ROOT + RESET
========================== */
:root {
    --ct-max-width: 980px;
    --ct-font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --ct-font-size-base: 17px;
    --ct-line-height: 1.7;
    --ct-bg: #ffffff;
    --ct-hf: #1520a6;
    --ct-text: #111827;
    --ct-muted: #6b7280;
    --ct-border: #e5e7eb;
    --ct-accent: #2563eb;
    --ct-accent-soft: #eff6ff;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--ct-font-body);
    font-size: var(--ct-font-size-base);
    line-height: var(--ct-line-height);
    background: var(--ct-bg);
    color: var(--ct-text);
}

/* ==========================
   SITE WRAPPER
========================== */
.ct-site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.ct-main { flex: 1; }

.ct-container {
    max-width: var(--ct-max-width);
    margin: 0 auto;
    padding: 1.5rem 1rem 2.5rem;
}

h2 {
    background: var(--ct-hf);
	color: #ffffff;
	border-radius: 5px;
    padding: 8px;
	margin: 10px 0;
}

/* ==========================
   HEADER
========================== */
.ct-header.ct-main-header {
    border-bottom: 1px solid var(--ct-border);
    background: #fff;
    position: sticky;
    top: 0;
    z-index: 9999;
    overflow: hidden;
    width: 100%;
}

.ct-brand-left .ct-logo {
    max-height: 45px;
    display: block;
}

.ct-header-inner,
.ct-main-header-nav {
    transition: transform .42s cubic-bezier(0.22,1,0.36,1),
                height .42s cubic-bezier(0.22,1,0.36,1),
                opacity .42s cubic-bezier(0.22,1,0.36,1),
                border-color .42s ease;
}

.ct-header-inner.ct-header-row {
    background: #1520a6;
}

.ct-header-brand-search {
    max-width: var(--ct-max-width);
    padding: .5rem .75rem;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* -- Scrolled Collapse -- */
body.ct-header-scrolled { padding-top: 45px; }

body.ct-header-scrolled .ct-header-inner {
    transform: translateY(-100%);
    opacity: 0;
    height: 0;
    margin: 0;
    padding: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ==========================
   NAV + SCROLL ARROWS WRAPPER
========================== */
.ct-nav-wrapper {
    background: #fff;
    border-bottom: 1px solid var(--ct-border);
}

.ct-nav-inner {
    max-width: var(--ct-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 1rem;
}

/* menu area */
.ct-main-header-nav {
    flex: 1;
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
}
.ct-main-header-nav::-webkit-scrollbar { display: none; }

/* sticky takeover */
body.ct-header-scrolled .ct-nav-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,.08);
    z-index: 9999;
}

/* ==========================
   MENU ITEMS
========================== */
.ct-menu-items {
    display: inline-flex;
    gap: 1.25rem;
    padding: .75rem 0;
    margin: 0;
    max-width: var(--ct-max-width);
    width: 100%;
}

.ct-menu-items li {
    list-style: none;
    flex: 0 0 auto;
    scroll-snap-align: start;
}

.ct-menu-items a {
    text-decoration: none;
    color: var(--ct-muted);
    font-weight: 500;
    white-space: nowrap;
}

.ct-menu-items a:hover {
    color: var(--ct-accent);
    border-bottom: 2px solid var(--ct-accent);
}

/* ==========================
   NAV ARROWS
========================== */
.ct-nav-arrow {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 1px solid var(--ct-border);
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    cursor: pointer;
}

@media (max-width: 768px) {
    .ct-nav-arrow { display: none !important; }
    .ct-nav-inner { padding: 0 1rem !important; }
}

/* ==========================
   SEARCH
========================== */
@media (max-width: 768px) {
    .ct-header-search .search-form {
        display: flex;
        gap: 6px;
        align-items: center;
    }
    .ct-header-search .search-field {
        width: 120px;
        font-size: 14px;
        padding: 6px 8px;
    }
    .ct-header-search .search-submit {
        font-size: 14px;
        padding: 6px 10px;
    }
}
@media (max-width: 480px) {
    .ct-header-search .search-field { width: 95px; font-size: 13px; }
    .ct-header-search .search-submit { font-size: 13px; }
}

/* ==========================
   LOGO MOBILE SIZE
========================== */
@media (max-width: 768px) { .ct-brand-left .ct-logo { max-height: 38px; } }
@media (max-width: 480px) { .ct-brand-left .ct-logo { max-height: 32px; } }

/* ==========================
   POSTS / IMAGES
========================== */
.ct-entry-content img,
.ct-featured img,
.wp-block-image img,
.wp-caption img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ==========================
   TABLE RESPONSIVE
========================== */
.wp-block-table {
    width: 100%;
    overflow-x: auto;
    display: block;
    margin: 1.5rem 0;
    scrollbar-width: thin;
}

/* ==========================
   FOOTER
========================== */
.ct-footer {
	background: var(--ct-bg);
    border-top: 1px solid var(--ct-border);
    margin-top: 1rem;
}

.ct-footer-inner {
    max-width: var(--ct-max-width);
    margin: 0 auto;
    padding: 1rem;
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    text-align: center;
    justify-items: center;
}

/* brand */
.ct-footer-brand .brand-name {
    font-size: 1.4rem;
    font-weight: 700;
}
.ct-footer-brand .brand-text {
    font-size: .95rem;
    color: var(--ct-muted);
}

/* social */
.footer-social a {
    font-size: 1.25rem;
    margin: 0 10px;
    color: var(--ct-text);
}
.footer-social a:hover { color: var(--ct-accent); }

/* lists */
.ct-footer-section h3 {
    font-size: 1.05rem;
    margin-bottom: .75rem;
}
.ct-footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ct-footer-section ul li a {
    color: var(--ct-muted);
    font-size: .95rem;
    line-height: 1.9;
}
.ct-footer-section ul li a:hover { color: var(--ct-accent); }

/* copyright */
.ct-footer-bottom {
    background: #1520a6;
    text-align: center;
    margin-top: 2rem;
	padding: 1rem;
    border: 1px solid var(--ct-border);
    font-size: .9rem;
    color: var(--ct-accent-soft);
}
.ct-footer-bottom a {
    text-decoration: none;
    font-weight: 600;
    color: var(--ct-text);
}
.ct-footer-bottom a:hover {
    color: var(--ct-accent);
}