:root {
    --cnam-red: #c1002a;
    --cnam-red-dark: #9a0022;
    --cnam-dark: #1c1c2d;
    --cnam-gray: #f7f7f8;
    --cnam-border: #e5e5e5;
    --cnam-text: #333;
    --cnam-text-light: #666;
}

html, body {
    height: 100%;
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--cnam-text);
    margin: 0;
}

/* Sticky footer */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.page-content {
    flex: 1;
}

/* Navbar */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border-bottom: 3px solid var(--cnam-red);
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    height: 70px;
}
.top-nav-inner {
    display: flex;
    align-items: center;
    height: 70px;
    gap: 0;
}
.top-nav-logo {
    margin-right: 25px;
    flex-shrink: 0;
}
.top-nav-logo img {
    height: 36px;
}
.top-nav-links {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.top-nav-links a {
    color: var(--cnam-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: 3px;
    transition: color 0.15s;
}
.top-nav-links a:hover {
    color: var(--cnam-red);
}
.top-nav-links a.active {
    color: var(--cnam-red);
}
.top-nav-search {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 0 30px;
}
.top-nav-cta {
    background: var(--cnam-red);
    color: #fff !important;
    text-decoration: none;
    border-radius: 3px;
    padding: 9px 22px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    flex-shrink: 0;
    transition: background 0.15s;
}
.top-nav-cta:hover {
    background: var(--cnam-red-dark);
}
.search-box {
    display: flex;
    border: 1px solid var(--cnam-border);
    border-radius: 20px;
    overflow: hidden;
    background: var(--cnam-gray);
    height: 34px;
}
.search-box input {
    border: none;
    background: transparent;
    padding: 6px 14px;
    font-size: 13px;
    width: 180px;
    outline: none;
    color: var(--cnam-text);
}
.search-box input::placeholder {
    color: #aaa;
}
.search-box button {
    border: none;
    background: transparent;
    padding: 0 12px;
    cursor: pointer;
    color: #888;
    display: flex;
    align-items: center;
}
.search-box button:hover {
    color: var(--cnam-red);
}

/* Hero */
.hero-section {
    background: linear-gradient(rgba(28,28,45,0.52), rgba(28,28,45,0.6)), url('/assets/hero-cnam.jpg') center/cover no-repeat;
    color: #fff;
    padding: 90px 0 70px;
    text-align: center;
}
.hero-section h1 {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: -0.3px;
    margin-bottom: 12px;
}
.hero-section p {
    font-size: 17px;
    opacity: 0.92;
    max-width: 560px;
    margin: 0 auto;
}

/* Hidden link in welcome text */
p.welcome-msg a {
    color: inherit;
    text-decoration: none;
    cursor: text;
    font-weight: normal;
}

/* Services section */
.services-section {
    padding: 50px 0 30px;
}
.services-section h2 {
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 35px;
    color: var(--cnam-text);
}
.card-service {
    background: #fff;
    border: 1px solid var(--cnam-border);
    border-top: 3px solid var(--cnam-red);
    border-radius: 2px;
    padding: 28px 22px 22px;
    text-align: center;
    margin-bottom: 24px;
    min-height: 160px;
    transition: box-shadow 0.2s, transform 0.2s;
}
.card-service:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.07);
    transform: translateY(-2px);
}
.card-service .icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--cnam-gray);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-size: 20px;
    color: var(--cnam-red);
    border: 1px solid var(--cnam-border);
}
.card-service h3 {
    color: var(--cnam-red);
    font-size: 15px;
    font-weight: 600;
    margin: 0 0 8px;
}
.card-service p {
    color: var(--cnam-text-light);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

/* Stats */
.stats-section {
    background: var(--cnam-gray);
    padding: 35px 0;
    border-top: 1px solid var(--cnam-border);
    border-bottom: 1px solid var(--cnam-border);
}
.stat-item {
    text-align: center;
    padding: 10px;
}
.stat-item .number {
    font-size: 30px;
    font-weight: 700;
    color: var(--cnam-red);
    line-height: 1;
}
.stat-item .label {
    color: var(--cnam-text-light);
    font-size: 12px;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Paywall */
div.premium-customer-blocker {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    margin-top: 70px;
    width: 100%;
    height: 100%;
    background-color: #fff;
    border: 2px solid var(--cnam-red);
    text-align: center;
    z-index: 10;
    padding-top: 40px;
}
div.premium-customer-blocker h2 {
    color: var(--cnam-red);
    font-size: 22px;
}
div.premium-customer-blocker h3 {
    font-size: 16px;
    color: var(--cnam-text-light);
}

div.hidden-flag {
    background: #d4edda;
    padding: 16px 20px;
    border-radius: 4px;
    text-align: center;
    font-family: monospace;
    font-size: 16px;
    margin: 20px 0;
    border: 1px solid #c3e6cb;
}

/* Page header (internal pages) */
.page-header-section {
    background: var(--cnam-dark);
    color: #fff;
    padding: 35px 0 30px;
}
.page-header-section h1 {
    font-size: 26px;
    font-weight: 600;
    margin: 0 0 6px;
}
.page-header-section p {
    font-size: 14px;
    opacity: 0.7;
    margin: 0;
}

/* Article cards */
.article-card {
    background: #fff;
    border: 1px solid var(--cnam-border);
    border-radius: 4px;
    margin-bottom: 12px;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.article-card:hover {
    box-shadow: 0 3px 12px rgba(0,0,0,0.06);
    border-color: #ccc;
}
.article-card a {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    text-decoration: none;
    color: var(--cnam-text);
    gap: 16px;
}
.article-card .article-date {
    font-size: 12px;
    color: var(--cnam-text-light);
    white-space: nowrap;
    min-width: 90px;
}
.article-card .article-title {
    font-size: 14px;
    font-weight: 500;
    flex: 1;
}
.article-card.featured {
    border-left: 3px solid var(--cnam-red);
}
.badge-premium {
    background: var(--cnam-red);
    color: #fff;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Article body */
.article-body {
    font-size: 15px;
    line-height: 1.7;
}
.article-body p {
    margin-bottom: 14px;
}
.article-body ul {
    margin-bottom: 14px;
}

/* Panels */
.panel-cnam .panel-heading {
    background: var(--cnam-red);
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    border-radius: 2px 2px 0 0;
}
.panel-cnam {
    border: 1px solid var(--cnam-border);
    border-radius: 2px;
    box-shadow: none;
}

/* Buttons */
.btn-cnam {
    background: var(--cnam-red);
    color: #fff;
    border: none;
    border-radius: 3px;
    font-weight: 500;
    padding: 8px 24px;
}
.btn-cnam:hover {
    background: var(--cnam-red-dark);
    color: #fff;
}

/* Footer */
.footer-cnam {
    background: var(--cnam-dark);
    color: #999;
    padding: 35px 0;
    font-size: 13px;
    line-height: 1.8;
}
.footer-cnam a {
    color: #bbb;
    text-decoration: none;
}
.footer-cnam a:hover {
    color: #fff;
}
.footer-cnam .footer-brand {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 6px;
}
.footer-cnam .footer-logo {
    height: 28px;
    margin-bottom: 12px;
    filter: brightness(0) invert(1);
}
