/* --- Global Resets & Base Styles --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for fixed header */
}

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7;
    background-color: #0A192F; /* Primary Deep Rich Blue */
    color: #CCD6F6; /* Light Slate Text */
    overflow-x: hidden;
}

.container {
    max-width: 1100px;
    margin: auto;
    padding: 0 2rem;
}

/* --- Typography --- */
h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
    color: #E6F1FF; /* Lightest Blue/White */
}

h1 {
    font-size: clamp(2.5rem, 5vw, 3.5rem); /* Responsive font size */
}

h2.section-heading {
    font-size: clamp(2rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 1rem;
}

h2.section-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #A8D8F8; /* Pastel Blue */
}

p {
    margin-bottom: 1.25rem;
    max-width: 70ch; /* Improve readability */
}

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

.text-center p,
p.text-center {
    margin-left: auto;
    margin-right: auto;
}

.italic {
    font-family: 'Lora', serif;
    font-style: italic;
    color: #A8D8F8;
}

.pastel-blue {
    color: #A8D8F8;
}

.pastel-blue-link {
    color: #A8D8F8;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}
.pastel-blue-link:hover {
    color: #FF6B6B; /* Orange-Red on hover */
    text-decoration: underline;
}

.coming-soon-text {
    font-size: 1.5rem;
    font-weight: bold;
    color: #FF6B6B;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    letter-spacing: 1px;
}

.small-text {
    font-size: 0.8rem;
    opacity: 0.7;
}

/* --- Header & Navigation --- */
#main-header {
    background-color: rgba(10, 25, 47, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 10px 30px -10px rgba(2,12,27,0.7);
}

#navbar {
    display: flex;
    justify-content: center;
    align-items: center;
}

#navbar ul {
    list-style: none;
    display: flex;
    gap: 1rem;
}

#navbar ul li a {
    color: #CCD6F6;
    text-decoration: none;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif;
    padding: 10px 15px;
    border-radius: 4px;
    transition: color 0.3s, background-color 0.3s;
}

#navbar ul li a:hover,
#navbar ul li a.active {
    color: #0A192F;
    background-color: #A8D8F8;
}

/* --- Sections --- */
.content-section {
    padding: 100px 0;
}
.content-section.alt-bg {
    background-color: #112240; /* Slightly Lighter Navy */
}
.full-height-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Hero Section --- */
.hero-layout {
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 2rem;
}
@media (min-width: 768px) {
    .hero-layout {
        grid-template-columns: 2fr 3fr;
        gap: 4rem;
    }
}
.hero-image-container {
    text-align: center;
}
.hero-image-container img {
    max-width: 350px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 20px 30px -15px rgba(2,12,27,0.7);
    transition: transform 0.3s ease;
}
.hero-image-container img:hover {
    transform: translateY(-5px);
}
#heroTagline {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
}
#heroIntro {
    font-size: 1.1rem;
}

/* --- Is This Book For You? (Quiz) Section --- */
#quizSubheading {
    margin-bottom: 3rem;
}

.quiz-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem 3rem;
    margin-bottom: 3rem;
}
@media (min-width: 768px) {
    .quiz-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.quiz-questions h3 {
    color: #A8D8F8;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #172A45;
    padding-bottom: 0.75rem;
}

.quiz-questions ul {
    list-style: none;
    padding-left: 0;
}

.quiz-questions li {
    padding-left: 2rem;
    position: relative;
    margin-bottom: 1.25rem;
}

.quiz-questions li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: #FF6B6B;
    font-weight: bold;
    font-size: 1.5rem;
    line-height: 1;
}

.quiz-conclusion {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: #A8D8F8;
    max-width: 70ch;
    margin: 3rem auto 0;
    padding: 1.5rem;
    border: 2px solid #A8D8F8;
    border-radius: 8px;
    background-color: rgba(10, 25, 47, 0.5);
}

/* --- CTA Button --- */
.cta-button {
    display: inline-block;
    background-color: #FF6B6B;
    color: #FFFFFF;
    padding: 14px 30px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    border: 2px solid #FF6B6B;
    cursor: pointer;
}
.cta-button:hover {
    background-color: transparent;
    color: #FF6B6B;
    transform: translateY(-3px);
}

/* --- About Book Section --- */
#aboutBookDescription {
    margin-left: auto;
    margin-right: auto;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    text-align-last: center;
}

.pull-quote-container {
    border-left: 4px solid #A8D8F8;
    padding-left: 25px;
    margin: 3rem auto;
    max-width: 80%;
}
#aboutBookPullQuote {
    font-size: 1.3rem;
    line-height: 1.6;
    color: #CCD6F6;
}

/* --- Free Chapter / Audio Section --- */
.audio-player-container {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #172A45; /* Changed from #112240 to be consistent with other borders */
}
.audio-description {
    font-size: 1.1rem;
    color: #A8D8F8;
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
}
audio {
    width: 100%;
    max-width: 500px;
    display: block;
    margin: auto;
}

/* --- Discover Section --- */
.discover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}
.discover-item {
    background-color: #0A192F;
    padding: 2rem;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #172A45;
}
.discover-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px -10px rgba(2,12,27,0.7);
}
.discover-item h3 {
    color: #A8D8F8;
    margin-bottom: 0.75rem;
}

/* --- Chapters Section --- */
#chaptersList {
    list-style-type: none;
    counter-reset: chapter-counter;
    padding-left: 0;
    columns: 2;
    -webkit-columns: 2;
    -moz-columns: 2;
    gap: 2.5rem;
    margin: 2rem 0;
}
#chaptersList li {
    margin-bottom: 0.8rem;
    line-height: 1.5;
    break-inside: avoid-column;
    padding-left: 2.5rem;
    position: relative;
}
#chaptersList li::before {
    counter-increment: chapter-counter;
    content: counter(chapter-counter);
    position: absolute;
    left: 0;
    color: #FF6B6B;
    font-weight: bold;
    font-family: 'Montserrat', sans-serif;
    font-size: 1rem;
    background-color: #112240;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 30px;
}
#chaptersList li:first-child::before {
    content: "P"; /* For "Preface" */
}
#chaptersList li:last-child::before {
    content: "T"; /* For "Toolkit" */
}
.appendices-note {
    margin-top: 3rem;
    padding: 2rem;
    border: 1px solid #112240;
    background-color: #112240;
    border-radius: 8px;
}
.appendices-note h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
}
.appendix-desc {
    font-size: 0.9rem;
    color: #a8b2d1;
    font-style: italic;
}

/* --- Author Section --- */
.author-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    text-align: center;
}
@media (min-width: 768px) {
    .author-layout {
        flex-direction: row;
        text-align: left;
        gap: 3rem;
    }
}
.author-image-container {
    flex-shrink: 0;
}
.author-image-container img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #A8D8F8;
    box-shadow: 0 10px 20px -10px rgba(2,12,27,0.7);
}
.author-text-container h2 {
    text-align: inherit;
}
.author-text-container h2::after {
    left: 0;
    transform: none;
}
@media (max-width: 767px) {
    .author-text-container h2::after {
        left: 50%;
        transform: translateX(-50%);
    }
}

/* --- Connect Section --- */
#connectSubheading {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    max-width: 60ch;
    margin-left: auto;
    margin-right: auto;
}
.blog-link-container {
    margin-top: 2.5rem;
}

/* --- Footer --- */
#main-footer {
    background-color: #0A192F;
    color: #8892b0;
    padding: 2.5rem 0;
    border-top: 1px solid #112240;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    #navbar {
        justify-content: center;
    }
    #navbar ul {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        padding-top: 1rem;
    }
    .full-height-section {
        padding-top: 150px; /* More space for stacked nav */
    }
}

@media (max-width: 600px) {
    #chaptersList {
        columns: 1;
        -webkit-columns: 1;
        -moz-columns: 1;
    }
    .container {
        padding: 0 1.5rem;
    }
}