/* =========================================================
   AVIDITY CAPITAL — 1031 Guide Page Styles
   Additive stylesheet. Depends on style.css + case-study.css.
   Reuses existing patterns (FAQ, CTA, disclosure, modal).
   ========================================================= */


/* =========================================================
   HERO — slight variation from case-study hero
   ========================================================= */
.g31-hero {
    padding: 10rem 0 5rem;
}


/* =========================================================
   TABLE OF CONTENTS
   ========================================================= */
.g31-toc-wrap {
    background: #FFFFFF;
    border-bottom: 1px solid #EEF0F4;
    padding: 1.5rem 0;
    position: sticky;
    top: 88px;
    z-index: 50;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.94);
}

.g31-toc {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.g31-toc-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #C9A84C;
    flex-shrink: 0;
}

.g31-toc-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    padding: 0;
    margin: 0;
    counter-reset: toc;
}

.g31-toc-list li {
    counter-increment: toc;
    font-size: 0.82rem;
}

.g31-toc-list li::before {
    content: counter(toc, decimal-leading-zero);
    font-family: 'Cormorant Garamond', serif;
    font-weight: 600;
    color: #C9A84C;
    margin-right: 0.35rem;
    font-size: 0.9rem;
}

.g31-toc-list a {
    color: #4A5568;
    font-weight: 500;
    transition: color 0.2s;
    border-bottom: 1px solid transparent;
    padding-bottom: 1px;
}

.g31-toc-list a:hover {
    color: #0D3B5E;
    border-bottom-color: #C9A84C;
}


/* =========================================================
   GENERIC SECTION / NARROW CONTENT
   ========================================================= */
.g31-section {
    background: #FFFFFF;
}

.g31-narrow {
    max-width: 820px;
    margin: 0 auto;
}

.g31-callout {
    display: flex;
    gap: 1rem;
    background: #FBF7EB;
    border-left: 3px solid #C9A84C;
    padding: 1.5rem 1.75rem;
    border-radius: 0 4px 4px 0;
    margin-top: 1.5rem;
}

.g31-callout i {
    font-size: 1.15rem;
    color: #C9A84C;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.g31-callout p {
    font-size: 0.95rem;
    color: #4A5568;
    line-height: 1.75;
    margin: 0;
}

.g31-callout strong {
    color: #0D3B5E;
    font-weight: 600;
}


/* =========================================================
   FIVE RULES
   ========================================================= */
.g31-rules-section {
    background: #F8F6F1;
}

.g31-rules {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.g31-rule {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 2rem;
    background: #FFFFFF;
    border-radius: 4px;
    padding: 2.25rem 2.5rem;
    box-shadow: 0 2px 20px rgba(13, 59, 94, 0.06);
    border-left: 3px solid #C9A84C;
}

.g31-rule-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    font-weight: 300;
    color: rgba(13, 59, 94, 0.22);
    line-height: 1;
}

.g31-rule-body h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 500;
    color: #0D3B5E;
    margin-bottom: 0.85rem;
    line-height: 1.2;
}

.g31-rule-body p {
    font-size: 0.95rem;
    color: #4A5568;
    line-height: 1.75;
    margin-bottom: 1rem;
}

.g31-rule-body p:last-child {
    margin-bottom: 0;
}

.g31-rule-body strong {
    color: #0D3B5E;
    font-weight: 600;
}

.g31-example {
    background: #F8F6F1;
    border-radius: 4px;
    padding: 1.1rem 1.4rem;
    margin-top: 1rem;
    border-top: 2px solid #EEF0F4;
}

.g31-example-label {
    font-size: 0.68rem !important;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #C9A84C;
    margin-bottom: 0.4rem !important;
    line-height: 1 !important;
}

.g31-example p:not(.g31-example-label) {
    font-size: 0.9rem !important;
    color: #4A5568 !important;
    line-height: 1.7 !important;
    margin-bottom: 0 !important;
}

.g31-example em {
    color: #0D3B5E;
    font-style: italic;
}


/* =========================================================
   CALIFORNIA TRAPS — dark section
   ========================================================= */
.g31-ca-section {
    background: #071E33;
    position: relative;
    overflow: hidden;
}

.g31-ca-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(201, 168, 76, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 85% 80%, rgba(26, 82, 122, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.g31-ca-section .container {
    position: relative;
    z-index: 1;
}

.g31-ca-intro {
    color: rgba(248, 246, 241, 0.78);
}

.g31-traps {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    max-width: 880px;
    margin: 0 auto;
}

.g31-trap {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: 4px;
    padding: 2.25rem 2.5rem;
    transition: border-color 0.25s, background 0.25s;
}

.g31-trap:hover {
    border-color: rgba(201, 168, 76, 0.5);
    background: rgba(255, 255, 255, 0.06);
}

.g31-trap-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: #071E33;
    background: #C9A84C;
    padding: 0.3rem 0.75rem;
    border-radius: 2px;
    margin-bottom: 1rem;
}

.g31-trap h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 500;
    color: #FFFFFF;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.g31-trap p {
    font-size: 0.95rem;
    color: rgba(248, 246, 241, 0.82);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.g31-trap p:last-of-type {
    margin-bottom: 0;
}

.g31-trap strong {
    color: #E8C97A;
    font-weight: 600;
}

.g31-trap em {
    color: rgba(248, 246, 241, 0.95);
    font-style: italic;
}

.g31-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
}

.g31-list li {
    font-size: 0.92rem;
    color: rgba(248, 246, 241, 0.82);
    line-height: 1.7;
    padding: 0.5rem 0 0.5rem 1.5rem;
    position: relative;
    border-bottom: 1px dashed rgba(248, 246, 241, 0.12);
}

.g31-list li:last-child { border-bottom: none; }

.g31-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.95em;
    width: 8px;
    height: 2px;
    background: #C9A84C;
}

.g31-list li strong {
    color: #E8C97A;
    font-weight: 600;
    margin-right: 0.2rem;
}

.g31-trap-takeaway {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(201, 168, 76, 0.2);
    align-items: flex-start;
}

.g31-trap-takeaway i {
    font-size: 1.1rem;
    color: #C9A84C;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.g31-trap-takeaway p {
    font-size: 0.9rem !important;
    color: rgba(248, 246, 241, 0.88) !important;
    line-height: 1.7 !important;
    margin: 0 !important;
}

.g31-trap-takeaway strong {
    color: #E8C97A;
}


/* =========================================================
   COMMON MISTAKES
   ========================================================= */
.g31-mistakes-section {
    background: #F8F6F1;
}

.g31-mistakes {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.g31-mistake {
    background: #FFFFFF;
    padding: 2rem 2.25rem;
    border-radius: 4px;
    border-top: 3px solid #C9A84C;
    box-shadow: 0 2px 16px rgba(13, 59, 94, 0.05);
    transition: transform 0.25s, box-shadow 0.25s;
}

.g31-mistake:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(13, 59, 94, 0.1);
}

.g31-mistake i {
    font-size: 1.35rem;
    color: #C9A84C;
    margin-bottom: 0.85rem;
}

.g31-mistake h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #0D3B5E;
    margin-bottom: 0.6rem;
    line-height: 1.25;
}

.g31-mistake p {
    font-size: 0.9rem;
    color: #4A5568;
    line-height: 1.75;
}


/* =========================================================
   REPLACEMENT PROPERTY OPTIONS
   ========================================================= */
.g31-replacement-section {
    background: #FFFFFF;
}

.g31-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.g31-option {
    background: #F8F6F1;
    border: 1px solid #EEF0F4;
    border-radius: 4px;
    padding: 2rem 2.25rem;
    transition: border-color 0.25s, transform 0.25s;
}

.g31-option:hover {
    border-color: rgba(201, 168, 76, 0.45);
    transform: translateY(-2px);
}

.g31-option i {
    width: 46px;
    height: 46px;
    border-radius: 2px;
    background: rgba(201, 168, 76, 0.15);
    color: #C9A84C;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.g31-option h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: #0D3B5E;
    margin-bottom: 0.65rem;
    line-height: 1.25;
}

.g31-option p {
    font-size: 0.92rem;
    color: #4A5568;
    line-height: 1.75;
}

.g31-options-note {
    max-width: 780px;
    margin: 1.5rem auto 0;
    font-size: 0.92rem;
    color: #4A5568;
    line-height: 1.8;
    text-align: center;
    font-style: italic;
}

.g31-options-note a {
    color: #0D3B5E;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-weight: 500;
    font-style: normal;
}

.g31-options-note a:hover {
    color: #C9A84C;
}


/* =========================================================
   TIMING SECTION
   ========================================================= */
.g31-timing-section {
    background: #F8F6F1;
}

.g31-timing-grid {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.g31-timing-panel {
    background: #0D3B5E;
    border-radius: 4px;
    padding: 2.5rem;
    border-top: 3px solid #C9A84C;
    box-shadow: 0 8px 30px rgba(13, 59, 94, 0.2);
}

.g31-timing-panel h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-weight: 600;
    color: #E8C97A;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(201, 168, 76, 0.25);
}

.g31-timing-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.g31-timing-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    font-size: 0.9rem;
    color: rgba(248, 246, 241, 0.88);
    line-height: 1.55;
}

.g31-timing-list li i {
    color: #C9A84C;
    font-size: 0.75rem;
    margin-top: 0.35rem;
    flex-shrink: 0;
}


/* =========================================================
   CASE STUDY CALLBACK
   ========================================================= */
.g31-callback-section {
    background: #071E33;
    padding: 5rem 0;
}

.g31-callback {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 980px;
    margin: 0 auto;
}

.g31-callback-text .section-title {
    margin-bottom: 1rem;
}

.g31-callback-sub {
    font-size: 1rem;
    color: rgba(248, 246, 241, 0.8);
    line-height: 1.75;
    max-width: 540px;
}

.g31-callback-cta {
    display: flex;
    justify-content: flex-end;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1000px) {
    .g31-mistakes,
    .g31-options {
        grid-template-columns: 1fr;
    }

    .g31-timing-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .g31-callback {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .g31-callback-cta {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .g31-toc-wrap {
        position: relative;
        top: auto;
    }

    .g31-toc {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .g31-rule {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 1.75rem;
    }

    .g31-rule-num {
        font-size: 2.5rem;
    }

    .g31-trap {
        padding: 1.75rem;
    }

    .g31-mistake {
        padding: 1.5rem 1.75rem;
    }

    .g31-option {
        padding: 1.75rem;
    }

    .g31-timing-panel {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .g31-toc-list {
        gap: 0.5rem 1rem;
    }
}
