:root {
    /* RANG / Indigenous Health – aligned with presentation slide theme */
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --teal-800: #115e59;
    --amber: #f59e0b;
    --amber-light: rgba(245, 158, 11, 0.2);
    --white: #ffffff;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --light-gray: #f1f5f9;
    --border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light-gray);
    color: var(--text-dark);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Sticky footer */
.site-footer {
    flex-shrink: 0;
    margin-top: auto;
    background: var(--teal-800);
    color: var(--white);
    padding: 20px 24px;
    font-size: 0.9rem;
    text-align: center;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

.site-footer .footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.site-footer .footer-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.site-footer .footer-meta {
    opacity: 0.9;
    font-size: 0.85rem;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 20px;
}

/* Header with optional background image */
header {
    background: linear-gradient(145deg, var(--teal-600) 0%, var(--teal-700) 40%, var(--teal-800) 100%);
    color: var(--white);
    padding: 48px 0;
    box-shadow: 0 4px 20px rgba(13, 148, 136, 0.25);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Hero: stronger presence when using a background image */
header.hero {
    min-height: 38vh;
    padding: 56px 0;
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center center;
}

header.hero .container {
    width: 100%;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(13,148,136,0.88) 0%, rgba(15,118,110,0.9) 50%, rgba(17,94,89,0.92) 100%);
    pointer-events: none;
}

/* Hero overlay: show more of the image at top, keep text readable */
header.hero::before {
    background: linear-gradient(to bottom, rgba(13,148,136,0.72) 0%, rgba(15,118,110,0.85) 40%, rgba(17,94,89,0.92) 100%);
}

.header-content {
    position: relative;
    z-index: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 16px;
}

.logo-container img {
    max-height: 80px;
    width: auto;
    display: block;
}

header h1 {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

header .subtitle {
    text-align: center;
    font-size: 1.15rem;
    opacity: 0.95;
    font-weight: 400;
    margin-bottom: 20px;
}

.author-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    text-align: center;
    font-size: 0.95rem;
    opacity: 0.9;
    line-height: 1.5;
    margin: 0 auto;
}

.author-info p {
    margin: 2px 0;
    text-align: center;
    width: 100%;
}

/* Tabs */
.tabs {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 6px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.tab-button,
a.tab-button {
    flex: 0 1 auto;
    min-width: 0;
    padding: 6px 10px;
    background: var(--white);
    color: var(--teal-700);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    font-family: inherit;
}

a.tab-button {
    text-decoration: none;
    display: inline-block;
}

.tab-button:hover,
a.tab-button:hover {
    background: var(--teal-600);
    color: var(--white);
    border-color: var(--teal-600);
}

.tab-button.active {
    background: var(--teal-700);
    color: var(--white);
    border-color: var(--teal-700);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Navigation (legacy nav-links if used) */
.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border);
}

.nav-link {
    display: inline-block;
    padding: 10px 18px;
    background: var(--white);
    color: var(--teal-700);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid var(--border);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.nav-link:hover {
    background: var(--teal-600);
    color: var(--white);
    border-color: var(--teal-600);
}

.nav-link.active {
    background: var(--teal-700);
    color: var(--white);
    border-color: var(--teal-700);
}

/* Main content */
.prompt-builder {
    background: var(--white);
    border-radius: 16px;
    padding: 40px 44px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    border: 1px solid var(--border);
}

.prompt-builder h1 {
    color: var(--teal-800);
    font-size: 2rem;
    margin-bottom: 8px;
}

.prompt-builder h2 {
    color: var(--teal-800);
    font-size: 1.5rem;
    border-bottom: 3px solid var(--amber);
    padding-bottom: 10px;
    margin-bottom: 16px;
}

.prompt-builder h3 {
    color: var(--teal-700);
    font-size: 1.2rem;
    margin: 20px 0 10px;
}

.prompt-builder p,
.prompt-builder li {
    color: var(--text-dark);
    margin-bottom: 12px;
    line-height: 1.75;
}

.prompt-builder ul,
.prompt-builder ol {
    margin-left: 1.5rem;
    margin-bottom: 20px;
}

.prompt-builder section {
    margin-bottom: 40px;
}

/* Callout / box */
.callout-box {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.12) 0%, rgba(15, 118, 110, 0.08) 100%);
    border-left: 4px solid var(--amber);
    border-radius: 12px;
    padding: 24px 28px;
    margin: 24px 0;
}

.callout-box strong {
    display: block;
    margin-bottom: 8px;
    color: var(--teal-800);
}

/* Cards */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin: 24px 0;
}

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    border-top: 4px solid var(--teal-600);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 8px 24px rgba(13, 148, 136, 0.12);
}

.card h3 {
    margin-top: 0;
    margin-bottom: 12px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 28px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border-radius: 10px;
    transition: background 0.2s, transform 0.1s;
}

.btn-primary {
    background: var(--teal-600);
    color: var(--white);
    border: none;
}

.btn-primary:hover {
    background: var(--teal-700);
    transform: translateY(-1px);
}

/* Prompt builder form */
.prompt-form label {
    display: block;
    font-weight: 600;
    color: var(--teal-800);
    margin-bottom: 6px;
}

.prompt-form textarea,
.prompt-form select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 18px;
}

.prompt-form textarea {
    min-height: 100px;
    resize: vertical;
}

.prompt-output {
    background: var(--light-gray);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
    white-space: pre-wrap;
    font-size: 0.95rem;
    margin-top: 16px;
}

.link-list {
    list-style: none;
    margin-left: 0;
}

.link-list li {
    margin-bottom: 14px;
    padding-left: 0;
}

.link-list a {
    color: var(--teal-700);
    font-weight: 500;
    text-decoration: none;
}

.link-list a:hover {
    text-decoration: underline;
}

.link-list .link-desc {
    display: block;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 2px;
}

/* Sub-tabs (e.g. within Prompt builder) */
.sub-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border);
}

.sub-tab-btn {
    padding: 8px 16px;
    background: var(--white);
    color: var(--teal-700);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    font-family: inherit;
}

.sub-tab-btn:hover {
    background: rgba(13, 148, 136, 0.08);
    color: var(--teal-800);
    border-color: var(--teal-600);
}

.sub-tab-btn.active {
    background: var(--teal-600);
    color: var(--white);
    border-color: var(--teal-600);
}

.sub-tab-panel {
    display: none;
}

.sub-tab-panel.active {
    display: block;
}

/* Print / PDF */
@media print {
    header::before {
        background: rgba(17, 94, 89, 0.95);
    }
    .tabs,
    .nav-links,
    .no-print,
    .btn {
        display: none !important;
    }
    .tab-content { display: block !important; }
    .prompt-builder { box-shadow: none; border: 1px solid #ccc; }
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.75rem;
    }
    .prompt-builder {
        padding: 28px 24px;
    }
    .nav-links {
        gap: 8px;
    }
}
