/* Cyber Smart 101: one shared stylesheet for all seven pages. */

/* 1. Base styles and reusable colors */
:root {
    --navy: #0b203c;
    --navy-light: #122d50;
    --blue: #1460d2;
    --blue-dark: #0848aa;
    --pale-blue: #eaf2ff;
    --light-gray: #f3f6fa;
    --border: #d5dfeb;
    --text: #182d47;
    --muted: #516178;
    --white: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--white);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    line-height: 1.65;
}
h1, h2, h3 { line-height: 1.2; }
h1 { margin: 0 0 1.25rem; font-size: 3.2rem; letter-spacing: -0.035em; }
h2 { margin: 0 0 1rem; font-size: 2.1rem; letter-spacing: -0.025em; }
h3 { margin: 0 0 0.8rem; font-size: 1.25rem; }
p { margin: 0 0 1rem; }
a { color: var(--blue-dark); text-underline-offset: 0.2em; }
a:hover { color: var(--blue); }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
figcaption { padding: 0.9rem 0; color: var(--muted); font-size: 0.9rem; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, summary { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #df8900; outline-offset: 4px; }
section[id], aside[id] { scroll-margin-top: 1.5rem; }
.container { width: 90%; max-width: 1140px; margin: 0 auto; }
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 10;
    padding: 0.8rem 1rem;
    background: var(--white);
}
.skip-link:focus { top: 1rem; }

/* 2. Shared header and navigation */
.site-header { color: var(--white); background: var(--navy); }
.brand-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.4rem 0; }
.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: var(--white); font-size: 1.45rem; font-weight: bold; text-decoration: none; }
.brand:hover { color: var(--white); }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 2.75rem; height: 2.75rem; background: var(--blue); border-radius: 0.6rem; font-size: 1rem; }
.brand-number { color: #8dbbff; }
.brand-note { color: #c2d0e2; font-size: 0.9rem; }
.main-nav { background: var(--navy-light); border-top: 1px solid #29425f; }
.main-nav ul { display: flex; flex-wrap: wrap; gap: 0.3rem; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; padding: 0.85rem 1rem; color: #e4edfa; text-decoration: none; font-size: 0.95rem; border-bottom: 3px solid transparent; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: #203c62; color: var(--white); border-bottom-color: #76acff; }

/* 3. Hero and page introductions */
.hero { padding: 4rem 0 3.5rem; background: var(--light-gray); border-bottom: 1px solid var(--border); }
.hero-layout { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 3rem; }
.hero h1 { font-size: 3.6rem; }
.hero p:not(.eyebrow) { font-size: 1.12rem; max-width: 35rem; color: var(--muted); }
.eyebrow { margin-bottom: 0.8rem; color: var(--blue-dark); font-size: 0.8rem; font-weight: bold; letter-spacing: 0.12em; text-transform: uppercase; }
.hero-image img { border-radius: 1rem; width: 100%; }
.hero-image figcaption { padding-bottom: 0; }
.page-intro { background: var(--light-gray); padding: 3.5rem 0 0; border-bottom: 1px solid var(--border); }
.intro-copy { color: var(--muted); max-width: 43rem; font-size: 1.15rem; }
.jump-links { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem 1.5rem; padding: 1.2rem 0; margin-top: 1.8rem; border-top: 1px solid var(--border); font-size: 0.9rem; }
.jump-links span { color: var(--muted); font-weight: bold; }
.home-jumps { margin-top: 0; border-top: 0; border-bottom: 1px solid var(--border); }
.button-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.5rem; }
.button { display: inline-block; border: 2px solid var(--blue); border-radius: 0.4rem; padding: 0.7rem 1.2rem; background: var(--blue); color: var(--white); font-size: 0.95rem; font-weight: bold; text-align: center; text-decoration: none; }
.button:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: var(--white); }
.button-light, .button-outline { background: var(--white); color: var(--blue-dark); border-color: #b7ccec; }
.button-light:hover, .button-outline:hover { background: var(--pale-blue); color: var(--blue-dark); }

/* 4. Lesson sections, cards, and lists */
.section { padding-top: 3.5rem; padding-bottom: 3.5rem; }
.section + .section { border-top: 1px solid var(--border); }
.section-heading { max-width: 44rem; margin-bottom: 1.7rem; }
.section-heading p:not(.eyebrow) { color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-top: 1.8rem; }
.card { padding: 1.6rem; border: 1px solid var(--border); border-radius: 0.7rem; background: var(--white); }
.card p { color: var(--muted); }
.card a:not(.button) { font-weight: bold; }
.card-number { display: block; color: var(--blue-dark); font-size: 0.78rem; font-weight: bold; letter-spacing: 0.09em; margin-bottom: 1.2rem; }
.split-section { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 3rem; }
.align-start { align-items: start; }
.rounded-image { width: 100%; border-radius: 0.8rem; }
.spaced-list { padding-left: 1.3rem; margin: 1rem 0; }
.spaced-list li { margin-bottom: 0.65rem; padding-left: 0.25rem; }
.quick-panel { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; background: var(--navy); color: var(--white); padding: 2.5rem; border-radius: 0.8rem; margin: 1rem 0 4rem; }
.quick-panel .eyebrow { color: #9bc2ff; }
.quick-panel p:not(.eyebrow) { color: #c2d0e2; }
.quick-links { list-style: none; margin: 0; padding: 0; }
.quick-links li { border-bottom: 1px solid #405472; }
.quick-links a { display: block; padding: 0.65rem 0; color: var(--white); }
.light-links { max-width: 44rem; }
.light-links li { border-color: var(--border); }
.light-links a { color: var(--blue-dark); }
.definition-list { margin: 1.5rem 0; }
.definition-list dt { font-size: 1.2rem; color: var(--blue-dark); font-weight: bold; margin-top: 1.5rem; }
.definition-list dd { margin: 0.45rem 0 1rem; }
.reading-panel { max-width: 850px; }
.wide-copy { max-width: 850px; }
.note { padding: 1.3rem; background: var(--pale-blue); border-left: 4px solid var(--blue); border-radius: 0.2rem; margin-top: 1.6rem; }
.note p:last-child { margin-bottom: 0; }
.source-note { color: var(--muted); font-size: 0.9rem; margin-top: 1.5rem; }
.sample-message { padding: 1.8rem; background: var(--light-gray); border: 1px solid var(--border); border-radius: 0.7rem; margin: 1.5rem 0; overflow-wrap: anywhere; }
.small-label { color: var(--muted); font-size: 0.75rem; font-weight: bold; letter-spacing: 0.05em; }
blockquote { margin: 1rem 0 0; padding-left: 1rem; border-left: 3px solid #a8b7ca; }
.answer-panel { margin-top: 1.5rem; padding: 1.6rem; border: 1px solid #b4ccec; background: var(--pale-blue); border-radius: 0.5rem; }

/* 5. Resource gallery and local video */
.resource-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; margin-top: 1.5rem; }
.video-section video { display: block; width: 100%; max-width: 950px; height: auto; background: var(--navy); border-radius: 0.7rem; }
.transcript { max-width: 950px; padding: 1.2rem 0; border-bottom: 1px solid var(--border); }
summary { color: var(--blue-dark); font-weight: bold; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; margin-top: 1.7rem; }
.gallery-item { border: 1px solid var(--border); border-radius: 0.6rem; overflow: hidden; }
.gallery-item img { width: 100%; }
.gallery-item a { display: block; }
.gallery-item figcaption { padding: 1rem; }
.gallery-item strong { display: block; color: var(--text); margin-bottom: 0.2rem; }

/* 6. Contact and survey form */
.contact-layout { display: grid; grid-template-columns: 2fr 1fr; align-items: start; gap: 3rem; }
.contact-card { background: var(--light-gray); }
.contact-card h2 { font-size: 1.7rem; }
form { margin-top: 1.7rem; }
fieldset { min-width: 0; margin: 0; padding: 1.5rem; border: 1px solid var(--border); border-radius: 0.6rem; }
legend { padding: 0 0.4rem; font-weight: bold; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-field { margin-bottom: 1.5rem; }
.form-field label { display: block; margin-bottom: 0.45rem; font-weight: bold; }
.form-field input, .form-field select, .form-field textarea { display: block; width: 100%; max-width: 100%; color: var(--text); background: var(--white); border: 1px solid #8e9fb6; border-radius: 0.3rem; padding: 0.65rem; }
.form-field textarea { resize: vertical; }
small { display: block; font-size: 0.85rem; color: var(--muted); margin-top: 0.4rem; }
.choice-group { margin: 0 0 1.5rem; padding: 0.8rem 1rem; }
.choice-group label { display: flex; gap: 0.65rem; align-items: baseline; padding: 0.45rem 0; }
.choice-group input { flex-shrink: 0; width: 1.1rem; height: 1.1rem; accent-color: var(--blue); }
.form-message:empty { display: none; }
.form-message { margin-top: 1.2rem; padding: 1.2rem; border-left: 4px solid var(--blue); background: var(--pale-blue); font-weight: bold; }
.site-map-list { margin: 1.2rem 0 0; padding-left: 1.4rem; }
.site-map-list li { padding: 0.6rem 0; }
.site-map-list a { font-weight: bold; font-size: 1.1rem; }
.site-map-list p { color: var(--muted); margin: 0.2rem 0 0; }

/* 7. Shared footer */
.site-footer { margin-top: 1rem; padding: 2.5rem 0; background: var(--navy); color: #c2d0e2; }
.footer-layout { display: flex; align-items: start; justify-content: space-between; gap: 2rem; }
.footer-brand { color: var(--white); font-size: 1.2rem; font-weight: bold; }
.site-footer p { margin-bottom: 0.6rem; }
.copyright { font-size: 0.85rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.site-footer a { color: #d8e6fb; font-size: 0.9rem; }

/* 8. Tablet layout: reduce columns and give text more room. */
@media screen and (max-width: 1000px) {
    .hero h1 { font-size: 2.8rem; }
    .hero-layout, .split-section { gap: 2rem; }
    .brand-note { display: none; }
    .main-nav a { padding: 0.8rem 0.7rem; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .contact-layout { grid-template-columns: 1.6fr 1fr; gap: 1.5rem; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
}

/* 9. Mobile layout: stack content and keep every navigation link visible. */
@media screen and (max-width: 700px) {
    .container { width: 90%; }
    .brand-row { padding: 1rem 0; }
    .brand { font-size: 1.3rem; }
    .main-nav ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
    .main-nav a { padding: 0.65rem 0.5rem; font-size: 0.9rem; }
    h1, .hero h1 { font-size: 2.4rem; }
    h2 { font-size: 1.8rem; }
    .hero { padding: 2.5rem 0 2rem; }
    .hero-layout, .split-section, .card-grid, .resource-grid, .quick-panel, .contact-layout { grid-template-columns: 1fr; }
    .hero-layout { gap: 2rem; }
    .hero-image { max-width: 32rem; }
    .page-intro { padding-top: 2.4rem; }
    .jump-links { gap: 0.6rem 1rem; }
    .section { padding-top: 2.5rem; padding-bottom: 2.5rem; }
    .quick-panel { padding: 1.7rem; gap: 1rem; margin-bottom: 2.5rem; }
    .contact-layout { gap: 0; }
    .contact-layout aside { padding-top: 0; }
    .footer-layout { flex-direction: column; }
    fieldset { padding: 1rem; }
}
@media screen and (max-width: 420px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .button-row { flex-direction: column; align-items: stretch; }
    .brand { font-size: 1.2rem; }
    .sample-message { padding: 1.2rem; }
}
/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}

/* 10. Learning challenges: reuse the navy/blue theme and native controls. */
.challenge-panel {
    margin-top: 1.5rem;
    padding: 1.8rem;
    border: 1px solid #b7ccec;
    border-top: 5px solid var(--blue);
    border-radius: 0.8rem;
    background: var(--light-gray);
}
.challenge-progress {
    color: var(--blue-dark);
    font-size: 0.9rem;
    font-weight: bold;
}
.challenge-panel .sample-message { background: var(--white); }
.challenge-panel h3 { font-size: 1.55rem; }
.challenge-panel .answer-panel { background: var(--white); }
.challenge-panel #scam-next { margin-top: 0.5rem; }
.achievement-label {
    display: inline-block;
    margin-bottom: 1rem;
    padding: 0.35rem 0.8rem;
    border-radius: 1rem;
    background: var(--navy);
    color: var(--white);
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 0.04em;
}
.button:disabled {
    opacity: 0.65;
    cursor: default;
    transform: none;
    box-shadow: none;
}
.quiz-controls { border: 0; padding: 0; }
.quiz-controls > legend { margin-bottom: 1rem; padding: 0; }
.quiz-question { margin-bottom: 1.5rem; padding: 1rem 1.3rem; }
.quiz-question legend { max-width: 100%; }
.quiz-question label {
    display: flex;
    align-items: baseline;
    gap: 0.7rem;
    padding: 0.7rem;
    margin-top: 0.35rem;
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    cursor: pointer;
}
.quiz-question label:hover, .quiz-question label:focus-within { background: var(--pale-blue); }
.quiz-question input { flex-shrink: 0; accent-color: var(--blue); }
.quiz-feedback { margin: 1rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border); }
.answer-correct { border-color: var(--blue); background: #f4f8ff; }
.answer-review { border-color: #956000; background: #fff9ee; }
.quiz-result { padding: 1.5rem; margin-top: 1.5rem; background: var(--pale-blue); border-radius: 0.7rem; }
.quiz-result p { margin-bottom: 0; font-weight: bold; }

/* Gentle movement only for devices that support hover. */
.card, .gallery-item, .button {
    transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
@media (hover: hover) {
    .card:hover, .gallery-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(11, 32, 60, 0.10);
    }
    .button:hover:not(:disabled) { transform: translateY(-2px); }
}
@media screen and (max-width: 700px) {
    .challenge-panel { padding: 1.2rem; }
    .quiz-question { padding: 0.8rem; }
    .quiz-question label { padding: 0.7rem 0.4rem; }
}
/* This comes last so the new effects also respect reduced-motion settings. */
@media (prefers-reduced-motion: reduce) {
    .card, .gallery-item, .button { transition: none; }
    .card:hover, .gallery-item:hover, .button:hover:not(:disabled) { transform: none; }
}
