/* Base Styles and Reset */
:root {
    --primary-green: #007A33;
    --primary-gold: #C6A664;
    --text-dark: #111111;
    --text-light: #555555;
    --white: #FFFFFF;
    --background-accent: #F9F9F9;
    --border-color: #E0E0E0;
    --font-main: 'Inter', sans-serif;
}

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

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    padding: 0;
    margin: 0;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-dark);
    margin-bottom: 1rem;
    font-weight: 700;
}

h1,
h2 {
    color: var(--primary-green);
}

h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

h2 {
    border-bottom: 2px solid var(--primary-gold);
    padding-bottom: 0.5rem;
    margin-top: 3rem;
    font-size: 2rem;
}

h3 {
    margin-top: 2rem;
    font-size: 1.5rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

/* Global Link Styling */
a {
    color: var(--primary-green);
    text-decoration: none;
    border-bottom: 1px solid rgba(0, 122, 51, 0.3);
    transition: all 0.2s ease-in-out;
    font-weight: 500;
}

a:hover {
    color: #004d20;
    /* Darker green */
    border-bottom-color: var(--primary-gold);
    border-bottom-width: 2px;
    background-color: rgba(0, 122, 51, 0.05);
    /* Subtle highlight */
}

/* Layout */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 40px;
}

/* Header & Nav */
.site-header {
    background: #ffffff;
    position: relative;
    z-index: 1000;
}

.scroll-progress-container {
    width: 100%;
    height: 4px;
    background: rgba(198, 166, 100, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 2000;
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(to right, var(--primary-gold), #e0c58e);
    width: 0%;
    transition: width 0.1s ease;
    box-shadow: 0 1px 3px rgba(198, 166, 100, 0.3);
}

.header-logo-container {
    padding: 1rem 0;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    background: #ffffff;
    /* Ensure logo sits on white */
}

.logo {
    max-width: 220px;
    height: auto;
    display: inline-block;
    /* Remove generic img styles specifically for the logo */
    box-shadow: none !important;
    border-radius: 0 !important;
    margin: 0 !important;
}

/* Navigation */
.main-nav {
    background: var(--white);
    border-bottom: 3px solid var(--primary-gold);
}

.nav-wrapper {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    position: relative;
    padding: 0 5px;
}

.nav-scroll-container {
    flex-grow: 1;
    overflow-x: auto;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll on iOS */
    padding: 0.8rem 0;
    /* Adjusted padding since wrapper has some */

    /* Hide scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */

    /* Gradient fade for clipped items */
    mask-image: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 40px, black calc(100% - 40px), transparent);
}

.nav-scroll-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.nav-arrow {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    cursor: pointer;
    z-index: 10;
    color: var(--primary-green);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.2s;
    margin: 0 0.5rem;
}

.nav-arrow:hover {
    background: var(--primary-gold);
    color: var(--white);
    border-color: var(--primary-gold);
    transform: scale(1.05);
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0 0.5rem;
    display: inline-flex;
    gap: 0.8rem;
}

.nav-list li {
    margin: 0;
    padding: 0;
}

.nav-list li::before {
    content: none !important;
    /* Reset any global bullet styles */
}

.nav-list a {
    display: block;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    background-color: var(--background-accent);
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid transparent;
    transition: all 0.2s ease;

    /* Reset global link border */
    border-bottom: 1px solid transparent;
}

.nav-list a:hover {
    background-color: var(--primary-green);
    color: var(--white);
    border-color: var(--primary-green);
    border-bottom: 1px solid transparent;
    /* Override global link hover border */
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 122, 51, 0.2);
}

/* Responsive Nav Arrows */
@media (max-width: 768px) {
    .nav-arrow {
        display: none;
    }

    .nav-wrapper {
        padding: 0;
    }

    .nav-list {
        padding: 0 1rem;
        /* Restore side padding on mobile */
    }

    .nav-scroll-container {
        padding: 0.8rem 0;
    }
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 1rem 0;
    display: block;
}

/* Lists */
ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 2rem;
}

li {
    position: relative;
    padding-left: 1.8rem;
    margin-bottom: 1rem;
    line-height: 1.7;
}

/* Custom Gold Bullet for standard lists */
li::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0.6em;
    /* Vertically centered relative to first line */
    width: 6px;
    height: 6px;
    background-color: var(--primary-gold);
    border-radius: 50%;
}

/* Pros and Cons Styling */
/* Pros and Cons Styling */
.pros-list,
.cons-list {
    /* Custom spacing/padding overrides */
    padding: 1.5rem !important;
    margin-bottom: 2rem;
}

.pros-list {
    background-color: rgba(0, 122, 51, 0.05);
    /* Light green bg */
    border-left: 4px solid var(--primary-green);
}

.cons-list {
    background-color: rgba(200, 50, 50, 0.05);
    /* Light red bg */
    border-left: 4px solid #C83232;
}

.pros-list li,
.cons-list li {
    padding-left: 2rem;
    position: relative;
}

.pros-list li::before {
    content: '✔';
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: bold;
    /* Reset generic bullet styles */
    width: auto;
    height: auto;
    background-color: transparent;
    border-radius: 0;
    top: 0;
    /* Align top relative to line, or default baseline if needed */
}

.cons-list li::before {
    content: '✘';
    position: absolute;
    left: 0;
    color: #C83232;
    font-weight: bold;
    /* Reset generic bullet styles */
    width: auto;
    height: auto;
    background-color: transparent;
    border-radius: 0;
    top: 0;
}

/* Strong tags usually denote the headers for these lists in the source text */
strong {
    font-weight: 700;
    color: var(--text-dark);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.95rem;
}

table td,
table th {
    border: 1px solid var(--border-color);
    padding: 12px;
    text-align: left;
}

table tr:nth-child(even) {
    background-color: var(--background-accent);
}

table td strong {
    color: var(--primary-green);
}

/* FAQ Accordion */
details {
    background-color: var(--background-accent);
    margin-bottom: 1rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--primary-gold);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.2s ease;
}

details:hover {
    box-shadow: 0 6px 12px rgba(198, 166, 100, 0.1);
}

summary {
    cursor: pointer;
    font-weight: 600;
    padding: 1.25rem 1.5rem;
    background-color: var(--background-accent);
    position: relative;
    list-style: none;
    /* Hide default triangle */
    font-size: 1.05rem;
    color: var(--primary-green);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    font-weight: 400;
    color: var(--text-light);
    font-size: 1.5rem;
    line-height: 1;
    margin-left: 1rem;
    transition: transform 0.2s;
}

details[open] summary {
    border-bottom: 1px solid var(--border-color);
    background-color: var(--background-accent);
}

details[open] summary::after {
    content: '+';
    transform: rotate(45deg);
    /* Animate the plus to an X */
    color: var(--primary-green);
}

.faq-content {
    padding: 1.5rem 2rem;
    color: var(--text-light);
    line-height: 1.8;
    background-color: var(--background-accent);
    font-size: 0.95rem;
}

/* details>*:not(summary) rule removed as we use specific class now */

/* ToC Block */
.toc-block {
    background-color: var(--background-accent);
    border: 1px solid var(--primary-gold);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 2rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: relative;
    /* Wrapper handles content flow */
}

/* Collapsible Content Wrapper */
.toc-content {
    max-height: 280px;
    /* Limits approx 6-7 items */
    overflow: hidden;
    position: relative;
    transition: max-height 0.4s ease-out;
}

.toc-content.expanded {
    max-height: 3000px;
    /* Arbitrary large number to allow full expansion */
    padding-bottom: 0;
    /* Clear padding if needed */
}

/* Gradient Overlay - Only visible when NOT expanded */
.toc-content::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--background-accent));
    pointer-events: none;
    transition: opacity 0.3s;
}

.toc-content.expanded::after {
    opacity: 0;
    pointer-events: none;
}

/* Toggle Button */
.toc-toggle {
    display: block;
    margin: 1.5rem auto 0;
    background: transparent;
    border: 2px solid var(--primary-gold);
    border-radius: 25px;
    padding: 0.6rem 2rem;
    font-family: var(--font-main);
    font-weight: 600;
    color: var(--primary-green);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.95rem;
}

.toc-toggle:hover {
    background-color: var(--primary-gold);
    color: var(--white);
    transform: translateY(-2px);
}

.toc-block h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    color: var(--primary-green);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    display: inline-block;
}

.toc-block ul {
    list-style: none;
    margin-bottom: 0;
    padding-left: 0;
}

.toc-block li {
    margin-bottom: 0.5rem;
    padding-left: 0;
}

.toc-block li::before {
    content: none;
}

/* Base style for ToC items */
.toc-block li a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: all 0.2s;
    display: inline-block;

    /* Distinct style for ToC links: Dotted underline */
    border-bottom: 1px dotted var(--primary-green);
}

.toc-block li a:hover {
    color: var(--primary-green);
    border-bottom: 1px solid var(--primary-green);
    background-color: transparent;
    /* Reset global link highlight */
}

/* Hierarchy: H2 (level 2) */
.toc-block li.toc-2 {
    font-weight: 600;
    margin-top: 0.75rem;
}

.toc-block li.toc-2 a {
    color: var(--primary-green);
    font-size: 1.05rem;
}

/* Hierarchy: H3 (level 3) */
.toc-block li.toc-3 {
    margin-left: 2rem;
    /* Indentation to show nesting */
    font-size: 0.95rem;
    position: relative;
}

.toc-block li.toc-3::before {
    content: "↳";
    position: absolute;
    left: -1.2rem;
    color: var(--primary-gold);
    font-size: 0.8rem;
    top: 2px;
    /* Reset generic bullet styles */
    width: auto;
    height: auto;
    background-color: transparent;
    border-radius: 0;
}

/* Footer (if needed, but text doesn't explicitly have one) */
.footer-note {
    text-align: center;
    font-size: 0.9rem;
    color: #999;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 600px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .container {
        padding: 0 15px 30px;
    }
}

/* Author Block */
.author-block {
    background-color: var(--background-accent);
    border: 1px solid var(--primary-gold);
    border-radius: 12px;
    padding: 2rem;
    margin: 3rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.author-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 0 !important;
}

.author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    margin: 0 !important;
    border-radius: 50% !important;
    box-shadow: none !important;
}

.author-info {
    flex-grow: 1;
}

.author-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 1px;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.author-name {
    font-size: 1.8rem;
    color: #1a1a4b;
    margin: 0;
    line-height: 1.1;
    font-style: italic;
    font-weight: 800;
}

.author-job {
    font-size: 1.1rem;
    color: var(--text-light);
    text-transform: uppercase;
    margin-top: 0.2rem;
    font-style: italic;
}

.author-socials {
    display: flex;
    gap: 0.8rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #eee;
    border-radius: 50%;
    color: #888;
    transition: all 0.2s ease;
    border-bottom: none !important;
    background: transparent !important;
}

.social-link:hover {
    color: var(--primary-green);
    border-color: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    background: transparent !important;
}

.social-link svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.author-description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-light);
    margin: 0;
}

@media (max-width: 600px) {
    .author-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
        gap: 1rem;
    }

    .author-socials {
        margin-top: 0.5rem;
    }

    .author-block {
        padding: 1.5rem;
    }

    .author-name {
        font-size: 1.5rem;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--white);
    border: 2px solid var(--primary-gold);
    color: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    outline: none;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-gold);
    color: var(--white);
    transform: translateY(-5px);
    box-shadow: 0 6px 16px rgba(198, 166, 100, 0.3);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}