/* ==========================================================================
   MR. MACGUILLICUTTY'S DETECTIVE AGENCY — UNIFIED STYLESHEET
   All page styles consolidated here. No inline <style> blocks in the HTML.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. RESETS & BASE
   -------------------------------------------------------------------------- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #faf6ee;
    font-family: 'Lora', Georgia, serif;
    color: #312217;
    display: flex;
    justify-content: center;
}

/* Master Framework Wrapper */
.site-wrapper {
    width: 100%;
    max-width: 1100px;
    background-color: #f7f2e4;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 10px 0;
}

/* --------------------------------------------------------------------------
   2. HEADER — ILLUSTRATED RIBBON BANNER (unified across all pages)
   -------------------------------------------------------------------------- */
.main-header {
    display: flex;
    justify-content: center;
    padding: 15px 0 5px 0;
    background: none;
}

.banner-ribbon {
    position: relative;
    background: #f1ebd9;
    color: #312217;
    padding: 10px 40px;
    margin: 0 auto;
    text-align: center;
    border-top: 3px solid #3d2b1f;
    border-bottom: 3px solid #3d2b1f;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.banner-ribbon h1 {
    font-family: 'Lora', serif;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0;
}

.banner-ribbon a {
    text-decoration: none;
    color: inherit;
}

.banner-ribbon::before,
.banner-ribbon::after {
    content: "";
    position: absolute;
    top: 10px;
    border: 22px solid #dfd6be;
    z-index: -1;
}

.banner-ribbon::before {
    left: -32px;
    border-left-color: transparent;
    border-top-width: 18px;
    border-bottom-width: 18px;
    border-top-color: #3d2b1f;
}

.banner-ribbon::after {
    right: -32px;
    border-right-color: transparent;
    border-top-width: 18px;
    border-bottom-width: 18px;
    border-top-color: #3d2b1f;
}

/* --------------------------------------------------------------------------
   3. NAVIGATION HUB (two-row card layout, unified)
   -------------------------------------------------------------------------- */
.card-navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 900px;
    margin: 0 auto 15px auto;
}

.nav-row-top,
.nav-row-bottom {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
}

.nav-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #3d2b1f;
    padding: 12px;
    width: 200px;
    border: 2px solid #3d2b1f;
    border-radius: 45px;
    box-shadow: 4px 4px 0px #3d2b1f;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
}

/* Home-page only: breathing room between the headline banner and nav cards */
.card-navigation.nav-spaced {
    margin-top: 20px;
}

.nav-card:hover {
    transform: translate(-2px, -2px) rotate(0deg) !important;
    box-shadow: 6px 6px 0px #3d2b1f;
}

.nav-card:active {
    transform: translate(2px, 2px) !important;
    box-shadow: 2px 2px 0px #3d2b1f;
}

/* Active-page accent frame (optional per page) */
.active-page {
    box-shadow: 0 0 0 3px #3d2b1f, 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Card image frame */
.card-img-holder {
    width: 150px;
    height: 95px;
    border: 2px solid #3d2b1f;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.12);
}

.card-img-holder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Detective-corner special: show full art rather than cropped */
.nav-card.reveal-full-art .card-img-holder {
    background-color: #f2ebd9;
}

.nav-card.reveal-full-art .card-img-holder img {
    object-fit: contain;
}

.nav-card span {
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 0.85rem;
    margin-top: 8px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Card color palette */
.green-bg { background-color: #9cb296; }
.orange-bg { background-color: #dfb282; }
.blue-bg { background-color: #72aecd; }
.blue-alt-bg { background-color: #62a3c7; }

/* Whimsical tilts */
.tilt-left { transform: rotate(-4deg); }
.tilt-right { transform: rotate(4deg); }

/* --------------------------------------------------------------------------
   4. SUB-PAGE INDICATOR RIBBON
   -------------------------------------------------------------------------- */
.page-indicator-container {
    display: flex;
    justify-content: center;
    margin: 18px 0 22px 0;
}

/* Stamped case-label plate */
.sub-banner-ribbon {
    position: relative;
    background: #f1ebd9;
    color: #312217;
    padding: 10px 42px 12px 42px;
    text-align: center;
    border: 2px solid #3d2b1f;
    border-radius: 4px;
    box-shadow: 0 3px 0 #3d2b1f, 0 5px 10px rgba(0, 0, 0, 0.12);
}

/* Inner hairline frame for a "stamped label" feel */
.sub-banner-ribbon::after {
    content: "";
    position: absolute;
    top: 4px;
    left: 4px;
    right: 4px;
    bottom: 4px;
    border: 1px solid rgba(61, 43, 31, 0.35);
    border-radius: 2px;
    pointer-events: none;
}

.case-file-kicker {
    display: block;
    font-family: Arial, sans-serif;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #8c7662;
    margin-bottom: 2px;
}

.sub-banner-ribbon h2 {
    font-family: Arial, sans-serif;
    font-size: 1.3rem;
    font-weight: bold;
    margin: 0;
    letter-spacing: 1px;
}

/* --------------------------------------------------------------------------
   5. GLOBAL CONTENT & PROSE LAYOUTS
   -------------------------------------------------------------------------- */
.content-container {
    padding: 20px 50px;
    flex-grow: 1;
}

.content-main {
    max-width: 850px;
    margin: 0 auto;
    padding: 0 20px;
    flex-grow: 1;
}

.split-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 50px;
    margin-bottom: 70px;
}

.split-section.reverse {
    flex-direction: row-reverse;
}

.text-block {
    flex: 1.1;
}

.image-block {
    flex: 0.9;
    display: flex;
    justify-content: center;
}

/* Typography */
h2 {
    font-family: Arial, sans-serif;
    font-size: 2.6rem;
    color: #3a2312;
    margin-bottom: 25px;
    line-height: 1.15;
    font-weight: 800;
}

.story-text {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #554133;
}

.story-text.centered {
    text-align: center;
}

.page-intro-block {
    text-align: center;
    margin-bottom: 50px;
}

/* Core imagery */
.main-illustration {
    width: 100%;
    max-width: 480px;
    height: auto;
    border-radius: 6px;
    box-shadow: 1px 2px 12px rgba(0, 0, 0, 0.08);
}

.book-cover {
    width: 100%;
    max-width: 350px;
    height: auto;
    box-shadow: 4px 4px 18px rgba(0, 0, 0, 0.18);
}

.centered-section {
    text-align: center;
    margin: 80px 0 40px 0;
    padding-top: 50px;
    border-top: 2px solid rgba(61, 43, 31, 0.08);
}

/* Home-page pill "Buy the Book" button */
.buy-pill-button {
    display: inline-flex;
    align-items: center;
    background-color: #9cb296;
    border: 2px solid #3d2b1f;
    border-radius: 40px;
    padding: 8px 24px 8px 12px;
    text-decoration: none;
    color: #3d2b1f;
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    font-weight: bold;
    box-shadow: 3px 3px 0px #3d2b1f;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.buy-pill-button:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0px #3d2b1f;
}

.buy-pill-button .pill-thumb {
    width: 55px;
    height: 55px;
    object-fit: cover;
    border-radius: 12px;
    margin-right: 15px;
    border: 2px solid #3d2b1f;
    transform: rotate(-4deg);
}

/* --------------------------------------------------------------------------
   6. KIDS' DETECTIVE CORNER
   -------------------------------------------------------------------------- */
.banner-welcome-text {
    max-width: 750px;
    margin: 0 auto 20px auto;
    line-height: 1.4;
    font-size: 1.15rem;
    color: #4a3c31;
    text-align: center;
    font-family: 'Lora', serif;
}

.mystery-launcher-container {
    text-align: center;
    margin: 0 auto 20px auto;
    max-width: 850px;
    padding: 5px 0;
}

.mystery-launcher-btn {
    display: inline-block;
    background-color: #e28743;
    color: #ffffff;
    padding: 16px 40px;
    border-radius: 35px;
    border: 3px solid #3d2b1f;
    font-weight: bold;
    cursor: pointer;
    font-size: 1.3rem;
    box-shadow: 4px 4px 0px #3d2b1f;
    text-decoration: none;
    font-family: Arial, sans-serif;
    transition: transform 0.05s ease, box-shadow 0.05s ease;
}

.mystery-launcher-btn:active {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #3d2b1f;
}

.case-file-box {
    background-color: #f2ebd9;
    border: 2px solid #dcd1b4;
    border-radius: 12px;
    padding: 25px 30px;
    max-width: 850px;
    margin: 0 auto 25px auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    text-align: left;
}

.case-file-box h3 {
    font-family: Arial, sans-serif;
    font-size: 2.2rem;
    font-weight: bold;
    color: #3a2212;
    margin: 0 0 5px 0;
}

.case-subtitle {
    font-family: Arial, sans-serif;
    font-size: 1.2rem;
    font-weight: bold;
    color: #3a2212;
    margin: 0 0 15px 0;
}

.case-description {
    font-family: Georgia, serif;
    font-size: 1.15rem;
    color: #4a3c31;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.section-label {
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 1.3rem;
    color: #3a2212;
    margin: 15px 0 10px 0;
}

/* Suspect answer pills */
.pill-group {
    display: flex;
    gap: 12px;
    margin: 10px 0 15px 0;
    flex-wrap: wrap;
}

.answer-choice {
    background-color: #d8ceb4;
    color: #312217;
    padding: 10px 22px;
    border-radius: 20px;
    font-size: 1.1rem;
    font-weight: bold;
    font-family: Arial, sans-serif;
    border: 2px solid #b8ab8d;
    cursor: pointer;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
    transition: all 0.1s ease;
}

.answer-choice:hover { background-color: #cdbf9f; }
.answer-choice.wrong-guess { background-color: #e5b3a3; border-color: #c98571; color: #5c2719; }
.answer-choice.correct-guess { background-color: #cbd9c2; border-color: #8fa385; color: #2e4a25; }

.suspect-feedback-area {
    font-family: Georgia, serif;
    font-size: 1.15rem;
    font-weight: bold;
    margin-bottom: 20px;
    min-height: 20px;
}

.reveal-btn {
    background-color: #466071;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 6px;
    border: none;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    font-family: Arial, sans-serif;
    transition: background 0.2s;
}

.reveal-btn:hover { background-color: #384e5c; }

.hidden-answer-content {
    display: none;
    margin-top: 20px;
    padding-top: 25px;
    border-top: 1px dashed #c0b399;
    font-family: Georgia, serif;
    font-size: 1.15rem;
    color: #4a3b32;
    line-height: 1.5;
}

/* Embedded clue grid */
.clue-game-embed {
    margin: 20px 0;
    background-color: #ebdcb9;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.clue-game-embed h4 {
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 1.8rem;
    color: #3a2212;
    margin: 0 0 5px 0;
}

.clue-game-embed .subtext {
    font-family: Georgia, serif;
    font-size: 0.95rem;
    color: #6a5749;
    margin: 0 0 15px 0;
}

.clue-buttons-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 750px;
    margin: 0 auto;
}

.clue-interactive-block {
    background: #f6f0e5;
    border: 3px solid #1a1715;
    padding: 12px 5px;
    cursor: pointer;
    box-shadow: 4px 4px 0px #1a1715;
    transition: transform 0.05s ease, box-shadow 0.05s ease;
    text-align: center;
}

.clue-interactive-block h5 {
    font-size: 1.25rem;
    color: #1a1715;
    margin: 0;
    font-family: Georgia, serif;
    font-weight: bold;
}

.clue-interactive-block:active,
.clue-interactive-block.selected-clue {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0px #1a1715;
}

.clue-interactive-block.correct-clue { background: #cbd9c2; }

.feedback-display-area {
    font-family: Georgia, serif;
    font-size: 1.25rem;
    color: #1a1715;
    font-weight: bold;
    margin-top: 15px;
    min-height: 25px;
}

/* Printables grid */
.printables-section {
    text-align: center;
    margin: 25px 0 10px 0;
}

.printables-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 900px;
    margin: 15px auto 0 auto;
    padding: 0 20px;
}

.printable-card {
    background: #ffffff;
    border: 1px solid #e3dac9;
    border-radius: 8px;
    padding: 15px;
    text-align: left;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.printable-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 12px;
}

.printable-card h4 {
    font-size: 1.2rem;
    color: #3d2b1f;
    margin: 0 0 6px 0;
}

.printable-card p {
    font-size: 0.9rem;
    color: #6e5d53;
    margin: 0 0 10px 0;
    line-height: 1.3;
}

.age-tag {
    font-size: 0.75rem;
    color: #9e8e83;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 12px;
    display: block;
}

.download-pdf-btn {
    display: block;
    text-align: center;
    background-color: #f7eed7;
    border: 2px solid #3d2b1f;
    border-radius: 6px;
    padding: 6px 0;
    color: #3d2b1f;
    text-decoration: none;
    font-weight: bold;
    box-shadow: 2px 2px 0px #3d2b1f;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.download-pdf-btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0px #3d2b1f;
}

/* Barnaby modal inner components */
.clue-list {
    padding-left: 20px;
    margin: 12px 0;
    font-family: Georgia, serif;
    font-size: 1.1rem;
    color: #4a3b32;
    line-height: 1.5;
}

.clue-list li { margin-bottom: 8px; }

.location-pill-group {
    display: flex;
    gap: 10px;
    margin: 15px 0;
    flex-wrap: wrap;
    justify-content: center;
}

/* --------------------------------------------------------------------------
   7. PARENTS' CORNER
   -------------------------------------------------------------------------- */
.parents-intro {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #4a3c31;
    margin-bottom: 50px;
}

.parents-intro p { margin-bottom: 20px; }

.contact-section {
    background-color: #fff;
    border: 1px solid #ebdcb9;
    border-radius: 8px;
    padding: 40px 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.02);
}

.contact-section h3 {
    font-family: Arial, sans-serif;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 0 10px 0;
    color: #1a1715;
    text-align: center;
}

.contact-section p {
    font-size: 1rem;
    color: #6a5749;
    text-align: center;
    margin: 0 0 30px 0;
    line-height: 1.5;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-family: Arial, sans-serif;
    font-size: 0.9rem;
    font-weight: bold;
    color: #312217;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #dcd1b4;
    border-radius: 4px;
    font-family: 'Lora', serif;
    font-size: 1rem;
    background-color: #faf6ee;
    color: #312217;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: #466071;
    outline: none;
    background-color: #fff;
}

.form-submit-row {
    text-align: center;
    margin-top: 30px;
}

.submit-btn {
    background-color: #466071;
    color: #fff;
    border: none;
    padding: 12px 35px;
    border-radius: 20px;
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

.submit-btn:hover { background-color: #384e5c; }

/* --------------------------------------------------------------------------
   8. ABOUT THE BOOK
   -------------------------------------------------------------------------- */
.intro-module {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 50px;
}

.intro-cover {
    flex: 0 0 260px;
    border: 1px solid #3d2b1f;
    box-shadow: 4px 4px 0px #3d2b1f;
}

.intro-cover img {
    width: 100%;
    display: block;
}

.intro-text {
    flex: 1;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #4a3c31;
}

.author-bio-section {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    font-family: Arial, sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #8c7662;
    margin-bottom: 5px;
    display: block;
}

.author-bio-section h3 {
    font-family: Arial, sans-serif;
    font-size: 2.2rem;
    font-weight: bold;
    margin: 0 0 20px 0;
    color: #1a1715;
}

.bio-body-text {
    text-align: left;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #4a3c31;
    max-width: 780px;
    margin: 0 auto;
}

.bio-body-text p { margin-bottom: 20px; }

.bookshelf-section {
    text-align: center;
    margin-bottom: 60px;
}

.bookshelf-section h3 {
    font-family: Arial, sans-serif;
    font-size: 1.6rem;
    font-weight: bold;
    color: #1a1715;
    margin: 0 auto 25px auto;
    max-width: 500px;
    line-height: 1.3;
}

.bookshelf-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.book-spine-card {
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.3;
}

.book-spine-card img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border: 1px solid #dcd1b4;
    margin-bottom: 8px;
    background-color: #fff;
}

.book-spine-card strong {
    display: block;
    font-family: Arial, sans-serif;
    color: #1a1715;
    margin-bottom: 3px;
    font-size: 0.8rem;
}

.book-spine-card a {
    color: #8c7662;
    text-decoration: underline;
    font-size: 0.75rem;
}

.affiliate-disclaimer {
    font-size: 0.75rem;
    color: #9e8e83;
    font-style: italic;
}

.london-block {
    background-color: #f4f0e6;
    border: 1px solid #e3dac9;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 60px;
    text-align: center;
}

.london-block .tagline {
    font-style: italic;
    font-size: 1.1rem;
    color: #8c7662;
    margin-bottom: 10px;
    display: block;
}

.london-block h3 {
    font-family: Arial, sans-serif;
    font-size: 1.6rem;
    font-weight: bold;
    max-width: 550px;
    margin: 0 auto 25px auto;
    color: #1a1715;
    line-height: 1.3;
}

.london-card-row {
    display: flex;
    background: #fff;
    border: 1px solid #ebdcb9;
    border-radius: 6px;
    padding: 20px;
    text-align: left;
    gap: 20px;
    max-width: 650px;
    margin: 0 auto;
    align-items: center;
}

.london-img {
    flex: 0 0 110px;
    height: 110px;
    object-fit: cover;
    border-radius: 4px;
}

.london-info h4 {
    font-family: Arial, sans-serif;
    font-size: 1.15rem;
    margin: 0 0 5px 0;
    color: #1a1715;
}

.london-info p {
    font-size: 0.95rem;
    line-height: 1.4;
    color: #5c4d40;
    margin: 0 0 15px 0;
}

.london-btn {
    display: inline-block;
    background-color: #466071;
    color: #fff;
    text-decoration: none;
    padding: 10px 22px;
    border-radius: 4px;
    font-weight: bold;
    font-family: Arial, sans-serif;
    font-size: 0.95rem;
}

.london-btn:hover { background-color: #384e5c; }

.gallery-section {
    text-align: center;
    margin-bottom: 50px;
}

.gallery-section h3 {
    font-family: Arial, sans-serif;
    font-size: 2rem;
    font-weight: bold;
    color: #1a1715;
    margin: 0 0 25px 0;
}

.gallery-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 15px;
}

.gallery-frame {
    flex: 1;
    max-width: 380px;
}

.gallery-frame img {
    width: 100%;
    border: 1px solid #3d2b1f;
    display: block;
    margin-bottom: 8px;
}

.gallery-frame span {
    font-size: 0.8rem;
    color: #8c7662;
    font-style: italic;
}

.gallery-caption {
    font-style: italic;
    font-size: 1.1rem;
    color: #4a3c31;
    margin-top: 20px;
    display: block;
}

.cta-purchase-block {
    background-color: #ebdcb9;
    padding: 35px 20px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid #dcd1b4;
}

.cta-purchase-block h2 {
    font-family: Arial, sans-serif;
    font-size: 2.2rem;
    font-weight: bold;
    margin: 0 0 5px 0;
    color: #1a1715;
}

.cta-purchase-block p {
    font-size: 1.1rem;
    color: #4a3c31;
    margin: 0 0 20px 0;
}

.pill-group-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.purchase-pill-btn {
    background-color: #466071;
    color: #fff;
    padding: 10px 24px;
    border-radius: 20px;
    font-family: Arial, sans-serif;
    font-weight: bold;
    text-decoration: none;
    font-size: 1rem;
}

.purchase-pill-btn:hover { background-color: #384e5c; }

.age-notice {
    font-size: 0.8rem;
    color: #6a5749;
    display: block;
    margin-top: 10px;
}

/* --------------------------------------------------------------------------
   9. POP-UP MODALS (Buy + Barnaby)
   -------------------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal-visible {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background-color: #ffde6a;
    border: 3px solid #3a2312;
    padding: 40px 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 550px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-visible .modal-content {
    transform: translateY(0);
}

.modal-close-x {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #3a2312;
    cursor: pointer;
    font-weight: bold;
}

.modal-content h3 {
    font-family: Arial, sans-serif;
    font-size: 2.2rem;
    font-weight: 900;
    color: #3a2312;
    margin-bottom: 10px;
}

.modal-content p {
    font-size: 1.15rem;
    margin-bottom: 30px;
    color: #554133;
}

.modal-links-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.modal-purchase-link {
    background-color: #556e80;
    color: white;
    text-decoration: none;
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 14px;
    border-radius: 12px;
    border: 2px solid #3a2312;
    box-shadow: 3px 3px 0px #3a2312;
    transition: all 0.1s ease;
}

.modal-purchase-link:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0px #3a2312;
}

.modal-purchase-link:active {
    transform: translate(3px, 3px);
    box-shadow: 0px 0px 0px #3a2312;
}

.modal-age-tag {
    display: block;
    font-size: 0.85rem;
    color: #66554a;
    font-style: italic;
}

/* Barnaby modal uses a lighter content panel */
.modal-content.barnaby-panel {
    background-color: #fffdf9;
    text-align: left;
}

.modal-content.barnaby-panel h3 {
    font-size: 1.8rem;
    color: #3d2b1f;
    text-align: left;
}

.barnaby-intro {
    font-family: 'Lora', serif;
    font-size: 1.15rem;
    line-height: 1.6;
    color: #4a3b32;
    margin-bottom: 15px;
}

.barnaby-evidence {
    background-color: #fbf9f3;
    padding: 18px;
    border-radius: 6px;
    border-left: 4px solid #e28743;
    margin-bottom: 15px;
}

.barnaby-evidence strong {
    font-family: Arial, sans-serif;
    color: #3d2b1f;
    font-size: 1.1rem;
}

.barnaby-prompt {
    font-family: Arial, sans-serif;
    font-weight: bold;
    color: #3d2b1f;
    display: block;
    margin-bottom: 8px;
    text-align: center;
}

.barnaby-question-block {
    text-align: center;
    margin-bottom: 10px;
}

.barnaby-feedback {
    font-family: Georgia, serif;
    font-size: 1.15rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    min-height: 22px;
}

.barnaby-solution {
    display: none;
    background-color: #f0f5ec;
    border: 1px dashed #8fa385;
    border-radius: 6px;
    padding: 15px;
    font-family: Georgia, serif;
    font-size: 1.1rem;
    color: #2e4a25;
    line-height: 1.4;
}

/* --------------------------------------------------------------------------
   10. GLOBAL FOOTER
   -------------------------------------------------------------------------- */
.main-footer {
    background-color: #312217;
    color: #f7f3eb;
    padding: 35px 20px;
    text-align: center;
    margin-top: auto;
}

.footer-tagline {
    font-style: italic;
    margin-bottom: 15px;
    color: #d0c4b2;
    font-size: 1.35rem;
}

.footer-nav {
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 1rem;
    letter-spacing: 0.5px;
}

.footer-nav a {
    color: #f7f3eb;
    text-decoration: none;
    margin: 0 10px;
    opacity: 0.85;
}

.footer-nav a:hover {
    text-decoration: underline;
    opacity: 1;
}

.copyright {
    font-size: 0.8rem;
    color: #9e8e83;
    margin-top: 20px;
    font-family: Arial, sans-serif;
}

/* --------------------------------------------------------------------------
   11. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 820px) {
    .split-section,
    .split-section.reverse {
        flex-direction: column;
        text-align: center;
        gap: 30px;
        margin-bottom: 50px;
    }
    .content-container { padding: 20px 25px; }
    .card-navigation { gap: 12px; }
    .nav-card { width: 140px; padding: 10px; border-radius: 32px; }
    .card-img-holder { width: 120px; height: 78px; }
    h2 { font-size: 2rem; }
    .banner-ribbon h1 { font-size: 1.4rem; }
    .intro-module { flex-direction: column; align-items: center; }
    .intro-cover { flex: 0 0 auto; max-width: 260px; }
    .bookshelf-grid { grid-template-columns: repeat(4, 1fr); }
    .london-card-row { flex-direction: column; text-align: center; }
    .gallery-grid { flex-direction: column; align-items: center; }
    .clue-buttons-container { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 700px) {
    .nav-row-top,
    .nav-row-bottom { flex-wrap: wrap; }
    .bookshelf-grid { grid-template-columns: repeat(3, 1fr); }
    .pill-group { flex-direction: column; }
    .location-pill-group { flex-direction: column; }
}

/* --------------------------------------------------------------------------
   7B. PARENTS' CORNER — REBUILT PAGE SECTIONS
   -------------------------------------------------------------------------- */

/* Hero intro */
.parents-hero {
    display: flex;
    align-items: center;
    gap: 40px;
    margin: 10px 0 60px 0;
}

.parents-hero-text {
    flex: 1.1;
}

.parents-hero-title {
    font-family: Arial, sans-serif;
    font-size: 2.1rem;
    font-weight: 800;
    color: #3a2312;
    line-height: 1.2;
    margin-bottom: 20px;
}

.parents-hero-text p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #4a3c31;
}

.parents-hero-image {
    flex: 0.9;
}

.parents-hero-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 4px 4px 18px rgba(0, 0, 0, 0.15);
}

/* Case Notes promo */
.case-notes-promo {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 40px;
    margin-bottom: 60px;
}

.case-notes-text {
    flex: 1.1;
}

.case-notes-text h3 {
    font-family: Arial, sans-serif;
    font-size: 1.9rem;
    font-weight: 800;
    color: #3a2312;
    line-height: 1.2;
    margin-bottom: 15px;
}

.case-notes-text p {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #4a3c31;
    margin-bottom: 25px;
}

.case-notes-image {
    flex: 0.9;
    display: flex;
    justify-content: center;
}

.case-notes-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 4px 4px 18px rgba(0, 0, 0, 0.12);
}

/* Placeholder box (swap for real notebook image later) */
.image-placeholder {
    width: 100%;
    min-height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: #ece3cd;
    border: 2px dashed #b8ab8d;
    border-radius: 10px;
    color: #8c7662;
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 1rem;
    line-height: 1.5;
}

/* Shared Case Notes button (blue-grey pill, matches site's .submit-btn family) */
.case-notes-btn {
    display: inline-block;
    background-color: #466071;
    color: #fff;
    text-decoration: none;
    padding: 14px 30px;
    border-radius: 30px;
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 1.05rem;
    transition: background-color 0.2s;
}

.case-notes-btn:hover {
    background-color: #384e5c;
}

/* How to Use — 5 steps */
.how-to-use {
    margin-bottom: 60px;
}

.section-heading-centered {
    font-family: Arial, sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #3a2312;
    text-align: center;
    margin-bottom: 35px;
}

.steps-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.step-card {
    text-align: left;
}

.step-number {
    font-family: Arial, sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: #9cb296;
    display: block;
    margin-bottom: 10px;
}

.step-card h4 {
    font-family: Arial, sans-serif;
    font-size: 1.05rem;
    font-weight: bold;
    color: #3a2312;
    line-height: 1.25;
    margin-bottom: 10px;
}

.step-card p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #5c4d40;
}

/* Why This Works — green band */
.why-this-works {
    background-color: #9cb296;
    border-radius: 12px;
    padding: 45px 40px;
    margin-bottom: 60px;
}

.why-columns {
    display: flex;
    gap: 40px;
}

.why-col {
    flex: 1;
}

.why-col h3 {
    font-family: Arial, sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #2e3a29;
    margin-bottom: 15px;
    line-height: 1.2;
}

.why-col p {
    font-size: 1rem;
    line-height: 1.6;
    color: #33402e;
}

/* Closing CTA */
.first-case-cta {
    text-align: center;
    margin-bottom: 40px;
}

.first-case-cta h3 {
    font-family: Arial, sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: #3a2312;
    margin-bottom: 25px;
}

/* Responsive — parents' rebuilt sections */
@media (max-width: 820px) {
    .parents-hero,
    .case-notes-promo {
        flex-direction: column;
        text-align: center;
        gap: 25px;
    }
    .parents-hero-title { font-size: 1.8rem; }
    .steps-row { grid-template-columns: repeat(2, 1fr); gap: 25px; }
    .why-columns { flex-direction: column; gap: 30px; }
}

@media (max-width: 500px) {
    .steps-row { grid-template-columns: 1fr; }
}
