/* ============================================================
   Children of Noah — Main Stylesheet
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --blue-primary:   #1a5db5;
    --blue-nav:       #1e63c3;
    --blue-dark:      #0d3f7a;
    --blue-light:     #e6f0fb;
    --blue-hero:      #ddeeff;
    --gold:           #e8a800;
    --gold-hover:     #cf9600;
    --text-dark:      #1a2a3a;
    --text-muted:     #4a5568;
    --card-border:    #d0dff0;
    --white:          #ffffff;
    --bg-light:       #f4f7fa;
    --font:           'Segoe UI', Arial, sans-serif;
    --radius:         8px;
    --shadow:         0 2px 10px rgba(0,0,0,.08);
}

body {
    font-family: var(--font);
    color: var(--text-dark);
    background: var(--white);
    line-height: 1.6;
}

a {
    color: var(--blue-primary);
    text-decoration: none;
}

a:hover { text-decoration: underline; }

/* ── Top bar ──────────────────────────────────────────────── */
.top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 40px;
    background: var(--white);
    border-bottom: 1px solid #e2e8f0;
}

.top-bar-left {
    display: flex;
    gap: 10px;
}

.site-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--blue-primary);
    letter-spacing: -.5px;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: var(--radius);
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background .2s, color .2s, border-color .2s;
    text-decoration: none;
}

.btn-outline {
    border-color: var(--blue-primary);
    color: var(--blue-primary);
    background: transparent;
}

.btn-outline:hover {
    background: var(--blue-primary);
    color: var(--white);
    text-decoration: none;
}

.btn-primary {
    background: var(--blue-primary);
    color: var(--white);
    border-color: var(--blue-primary);
}

.btn-primary:hover {
    background: var(--blue-dark);
    border-color: var(--blue-dark);
    color: var(--white);
    text-decoration: none;
}

.btn-gold {
    background: var(--gold);
    color: var(--text-dark);
    border-color: var(--gold);
    font-size: 1.05rem;
    padding: 14px 36px;
    border-radius: 6px;
}

.btn-gold:hover {
    background: var(--gold-hover);
    border-color: var(--gold-hover);
    color: var(--text-dark);
    text-decoration: none;
}

.btn-sm {
    padding: 6px 14px;
    font-size: .82rem;
}

/* ── Navigation ───────────────────────────────────────────── */
.main-nav {
    background: var(--blue-nav);
}

.main-nav ul {
    display: flex;
    list-style: none;
    justify-content: center;
    gap: 0;
    max-width: 900px;
    margin: 0 auto;
}

.main-nav ul li a {
    display: block;
    padding: 18px 28px;
    color: var(--white);
    font-size: .97rem;
    font-weight: 500;
    transition: background .2s;
    text-decoration: none;
}

.main-nav ul li a:hover,
.main-nav ul li a.active {
    background: rgba(255,255,255,.15);
    text-decoration: none;
}

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(160deg, #ddeeff 0%, #eaf3ff 100%);
    text-align: center;
    padding: 90px 24px 100px;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--blue-dark);
    max-width: 800px;
    margin: 0 auto 22px;
    line-height: 1.2;
}

.hero p {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 620px;
    margin: 0 auto 36px;
}

/* ── Feature cards ────────────────────────────────────────── */
.features {
    background: var(--bg-light);
    padding: 70px 24px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    max-width: 1100px;
    margin: 0 auto;
}

.feature-card {
    background: var(--white);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 36px 28px;
    box-shadow: var(--shadow);
}

.feature-card h3 {
    color: var(--blue-primary);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 14px;
}

.feature-card p {
    color: var(--text-muted);
    font-size: .95rem;
    line-height: 1.7;
}

/* ── Section generic ──────────────────────────────────────── */
.section {
    padding: 60px 24px;
}

.section-title {
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--blue-dark);
    margin-bottom: 10px;
}

.section-subtitle {
    color: var(--text-muted);
    font-size: 1.05rem;
    margin-bottom: 40px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
}

/* ── Seven Laws page ──────────────────────────────────────── */
.laws-grid {
    display: grid;
    gap: 22px;
}

.law-card {
    background: var(--white);
    border: 1px solid var(--card-border);
    border-left: 5px solid var(--blue-primary);
    border-radius: var(--radius);
    padding: 28px 32px;
    box-shadow: var(--shadow);
}

.law-card .law-number {
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--blue-primary);
    margin-bottom: 6px;
}

.law-card h3 {
    color: var(--blue-dark);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.law-card p {
    color: var(--text-muted);
    line-height: 1.75;
}

/* ── Learn & Study page ───────────────────────────────────── */
.study-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}

.study-card {
    background: var(--white);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
}

.study-card h3 {
    color: var(--blue-primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.study-card p {
    color: var(--text-muted);
    font-size: .93rem;
    margin-bottom: 18px;
}

/* ── News page ────────────────────────────────────────────── */
.news-grid {
    display: grid;
    gap: 24px;
}

.news-card {
    background: var(--white);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 28px 32px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.news-date {
    min-width: 80px;
    text-align: center;
    background: var(--blue-light);
    border-radius: 6px;
    padding: 10px 12px;
}

.news-date .day {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--blue-primary);
    line-height: 1;
}

.news-date .month {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
}

.news-body h3 {
    color: var(--blue-dark);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.news-body p {
    color: var(--text-muted);
    font-size: .93rem;
    line-height: 1.7;
}

/* ── Resources page ───────────────────────────────────────── */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.resource-card {
    background: var(--white);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 26px 24px;
    box-shadow: var(--shadow);
}

.resource-card .resource-type {
    display: inline-block;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--blue-light);
    color: var(--blue-primary);
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
}

.resource-card h3 {
    color: var(--blue-dark);
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.resource-card p {
    color: var(--text-muted);
    font-size: .88rem;
    margin-bottom: 16px;
    line-height: 1.65;
}

/* ── Auth forms ───────────────────────────────────────────── */
.auth-wrap {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    padding: 40px 16px;
}

.auth-box {
    background: var(--white);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    padding: 44px 48px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow);
}

.auth-box h2 {
    color: var(--blue-dark);
    font-size: 1.6rem;
    margin-bottom: 6px;
}

.auth-box .auth-sub {
    color: var(--text-muted);
    font-size: .92rem;
    margin-bottom: 28px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #c8d8ea;
    border-radius: 6px;
    font-size: .95rem;
    font-family: var(--font);
    transition: border-color .2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--blue-primary);
}

.form-actions {
    margin-top: 24px;
}

.form-actions .btn {
    width: 100%;
    text-align: center;
    padding: 12px;
    font-size: 1rem;
}

.auth-alt {
    text-align: center;
    margin-top: 20px;
    font-size: .9rem;
    color: var(--text-muted);
}

/* ── Flash messages ───────────────────────────────────────── */
.alert {
    padding: 12px 18px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: .92rem;
}

.alert-error {
    background: #fde8e8;
    color: #c0392b;
    border: 1px solid #f5c6c6;
}

.alert-success {
    background: #e8f8ec;
    color: #1e7e34;
    border: 1px solid #b8e8c4;
}

/* ── Page hero (inner pages) ──────────────────────────────── */
.page-hero {
    background: linear-gradient(160deg, #ddeeff 0%, #eaf3ff 100%);
    padding: 54px 24px 58px;
    text-align: center;
}

.page-hero h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--blue-dark);
    margin-bottom: 12px;
}

.page-hero p {
    color: var(--text-muted);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

/* ── Footer ───────────────────────────────────────────────── */
footer {
    background: var(--blue-dark);
    color: rgba(255,255,255,.75);
    text-align: center;
    padding: 36px 24px;
    font-size: .88rem;
}

footer a {
    color: rgba(255,255,255,.8);
}

footer a:hover {
    color: var(--white);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .features-grid,
    .resources-grid { grid-template-columns: 1fr 1fr; }
    .study-grid     { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .top-bar { padding: 12px 16px; }
    .site-title { font-size: 1.4rem; }
    .hero h1 { font-size: 1.9rem; }
    .main-nav ul { gap: 0; flex-wrap: wrap; }
    .main-nav ul li a { padding: 12px 14px; font-size: .85rem; }
    .features-grid,
    .resources-grid,
    .study-grid { grid-template-columns: 1fr; }
    .news-card { flex-direction: column; gap: 14px; }
    .auth-box { padding: 28px 22px; }
}
