/* ===================================================
   HOME BUYING BASICS - TABLE OF CONTENTS DESIGN
   Homes Overstock
   =================================================== */

/* Brand Colors */
:root {
    --primary-red: #0d9488;
    --primary-dark: #c9171d;
    --navy: #171b2a;
    --navy-light: #252d42;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-600: #6c757d;
    --white: #ffffff;
    --success: #28a745;
}

/* ===== HERO SECTION ===== */
.guide-hero {
    position: relative;
    padding: 140px 0 100px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    overflow: hidden;
}

.guide-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(235, 32, 39, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(235, 32, 39, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Decorative Books */
.hero-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.deco-icon {
    position: absolute;
    font-size: 80px;
    color: rgba(235, 32, 39, 0.08);
    animation: floatIcon 6s ease-in-out infinite;
}

.deco-icon:nth-child(1) { top: 15%; left: 8%; animation-delay: 0s; }
.deco-icon:nth-child(2) { top: 60%; left: 5%; animation-delay: 1s; font-size: 60px; }
.deco-icon:nth-child(3) { top: 20%; right: 10%; animation-delay: 2s; }
.deco-icon:nth-child(4) { top: 70%; right: 8%; animation-delay: 3s; font-size: 70px; }

@keyframes floatIcon {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.hero-content-centered {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
}

.hero-breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.hero-breadcrumb a:hover {
    color: var(--white);
}

.hero-breadcrumb i {
    color: rgba(255, 255, 255, 0.4);
    font-size: 10px;
}

.hero-breadcrumb span {
    color: var(--primary-red);
    font-size: 14px;
    font-weight: 600;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(235, 32, 39, 0.15);
    border: 1px solid rgba(235, 32, 39, 0.3);
    padding: 10px 24px;
    border-radius: 50px;
    margin-bottom: 25px;
}

.hero-badge i {
    color: var(--primary-red);
    font-size: 16px;
}

.hero-badge span {
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 52px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-title span {
    color: var(--primary-red);
}

.hero-subtitle {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.75);
    max-width: 700px;
    margin: 0 auto 30px;
    line-height: 1.7;
}

.hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.meta-item i {
    color: var(--primary-red);
}

/* ===== MAIN CONTENT SECTION ===== */
.guide-content-section {
    padding: 80px 0 100px;
    background: var(--white);
}

.guide-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 50px;
    align-items: start;
}

/* ===== SIDEBAR - TABLE OF CONTENTS ===== */
.guide-sidebar {
    position: relative;
}

.guide-sidebar-col {
    position: relative;
}

.toc-wrapper {
    position: relative;
    top: 0;
}

.toc-box {
    background: var(--gray-100);
    border-radius: 20px;
    padding: 30px;
    border: 1px solid var(--gray-200);
}

.toc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--gray-200);
}

.toc-header i {
    color: var(--primary-red);
    font-size: 20px;
}

.toc-header h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
}

.toc-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc-nav li {
    margin-bottom: 5px;
}

.toc-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.toc-nav a:hover {
    color: var(--navy);
    background: var(--white);
}

.toc-nav a.active {
    color: var(--primary-red);
    background: var(--white);
    border-left-color: var(--primary-red);
    font-weight: 600;
}

.toc-nav a .toc-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    background: var(--gray-200);
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    color: var(--navy);
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.toc-nav a:hover .toc-number,
.toc-nav a.active .toc-number {
    background: var(--primary-red);
    color: var(--white);
}

/* Progress Indicator */
.toc-progress {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--gray-200);
}

.progress-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 10px;
}

.progress-bar-wrap {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-dark));
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

/* CTA Box in Sidebar */
.toc-cta {
    margin-top: 25px;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    border-radius: 16px;
    padding: 25px;
    text-align: center;
}

.toc-cta h5 {
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 10px;
}

.toc-cta p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
}

.toc-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
    color: var(--white);
    background: var(--primary-red);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.toc-cta-btn:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-2px);
}

/* ===== MAIN CONTENT ===== */
.guide-main-content {
    min-width: 0;
}

.content-section {
    margin-bottom: 60px;
    scroll-margin-top: 100px;
}

.content-section:last-child {
    margin-bottom: 0;
}

.section-header {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gray-200);
    justify-content:flex-start;
    align-items: center !important;
}

.section-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-dark) 100%);
    border-radius: 14px;
    font-size: 20px;
    font-weight: 800;
    color: var(--white);
    flex-shrink: 0;
    margin-right: 15px;
}

.section-title-wrap h2 {
    font-size: 28px;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 5px;
}

.section-title-wrap p {
    font-size: 15px;
    font-weight: 400;
    color: var(--gray-600);
    margin: 0;
}

.content-body {
    font-size: 16px;
    line-height: 1.8;
    color: #444;
}

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

.content-body h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--navy);
    margin: 35px 0 15px;
}

.content-body h4 {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    margin: 25px 0 12px;
}

.content-body ul,
.content-body ol {
    margin: 20px 0;
    padding-left: 25px;
}

.content-body li {
    margin-bottom: 12px;
    position: relative;
}

.content-body ul li::marker {
    color: var(--primary-red);
}

.content-body ol li::marker {
    color: var(--primary-red);
    font-weight: 700;
}

/* Info Box */
.info-box {
    background: var(--gray-100);
    border-radius: 16px;
    padding: 25px 30px;
    margin: 30px 0;
    border-left: 4px solid var(--primary-red);
}

.info-box.tip {
    background: rgba(40, 167, 69, 0.08);
    border-left-color: var(--success);
}

.info-box.warning {
    background: rgba(255, 193, 7, 0.1);
    border-left-color: #ffc107;
}

.info-box-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.info-box-header i {
    font-size: 20px;
    color: var(--primary-red);
}

.info-box.tip .info-box-header i {
    color: var(--success);
}

.info-box.warning .info-box-header i {
    color: #ffc107;
}

.info-box-header h5 {
    font-size: 16px;
    font-weight: 700;
    color: var(--navy);
    margin: 0;
}

.info-box p {
    margin: 0;
    font-size: 15px;
}

/* Checklist */
.checklist {
    list-style: none;
    padding: 0;
    margin: 25px 0;
}

.checklist li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px 20px;
    background: var(--gray-100);
    border-radius: 12px;
    margin-bottom: 10px;
}

.checklist li:last-child {
    margin-bottom: 0;
}

.checklist-icon {
    width: 24px;
    height: 24px;
    background: var(--primary-red);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.checklist-icon i {
    color: var(--white);
    font-size: 12px;
}

.checklist-content h5 {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 5px;
}

.checklist-content p {
    font-size: 14px;
    color: var(--gray-600);
    margin: 0;
}

/* Steps List */
.steps-list {
    counter-reset: step;
    list-style: none;
    padding: 0;
    margin: 25px 0;
}

.steps-list li {
    counter-increment: step;
    position: relative;
    padding-left: 70px;
    padding-bottom: 30px;
    border-left: 2px solid var(--gray-200);
    margin-left: 25px;
}

.steps-list li:last-child {
    padding-bottom: 0;
    border-left: none;
}

.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: -16px;
    top: 0;
    width: 30px;
    height: 30px;
    background: var(--primary-red);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.steps-list li h5 {
    font-size: 17px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.steps-list li p {
    font-size: 15px;
    color: var(--gray-600);
    margin: 0;
}

/* Quote Box */
.quote-box {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    border-radius: 16px;
    padding: 30px 35px;
    margin: 35px 0;
    position: relative;
}

.quote-box::before {
    content: '"';
    position: absolute;
    top: 15px;
    left: 25px;
    font-size: 60px;
    font-family: serif;
    color: var(--primary-red);
    line-height: 1;
    opacity: 0.5;
}

.quote-box p {
    font-size: 18px;
    font-style: italic;
    color: var(--white);
    margin: 0;
    padding-left: 30px;
}

.quote-box .quote-author {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    font-style: normal;
    margin-top: 15px;
    padding-left: 30px;
}

/* Navigation at Bottom */
.content-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid var(--gray-200);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    font-size: 15px;
    font-weight: 600;
    color: var(--navy);
    background: var(--gray-100);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.nav-btn:hover {
    background: var(--gray-200);
    color: var(--navy);
}

.nav-btn.next {
    background: var(--primary-red);
    color: var(--white);
}

.nav-btn.next:hover {
    background: var(--primary-dark);
    color: var(--white);
}

.nav-btn i {
    font-size: 14px;
}

/* ===== CTA SECTION ===== */
.guide-cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
    position: relative;
    overflow: hidden;
}

.guide-cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(235, 32, 39, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.cta-content h2 {
    font-size: 36px;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 15px;
}

.cta-content h2 span {
    color: var(--primary-red);
}

.cta-content p {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.75);
    max-width: 600px;
    margin: 0 auto 30px;
}

.cta-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-dark) 100%);
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.4s ease;
}

.btn-cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(235, 32, 39, 0.4);
    color: var(--white);
}

.btn-cta-outline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    color: var(--white);
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-cta-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--white);
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1199px) {
    .hero-title {
        font-size: 44px;
    }
    
    .guide-layout {
        grid-template-columns: 260px 1fr;
        gap: 40px;
    }
}

@media (max-width: 991px) {
    .guide-hero {
        padding: 120px 0 80px;
    }
    
    .hero-title {
        font-size: 38px;
    }
    
    .guide-layout {
        grid-template-columns: 1fr;
    }
    
    .guide-sidebar {
        order: -1;
    }
    
    /* Disable sticky sidebar on mobile */
    .toc-wrapper {
        position: relative !important;
        top: 0 !important;
        width: auto !important;
    }
    
    .toc-wrapper.is-sticky {
        position: relative !important;
        top: 0 !important;
        width: auto !important;
    }
    
    .toc-nav {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .toc-nav li {
        margin-bottom: 0;
    }
    
    .toc-nav a {
        padding: 10px 15px;
        border-left: none;
        border-radius: 50px;
        background: var(--white);
        border: 1px solid var(--gray-200);
    }
    
    .toc-nav a.active {
        background: var(--primary-red);
        color: var(--white);
        border-color: var(--primary-red);
    }
    
    .toc-nav a.active .toc-number {
        background: rgba(255, 255, 255, 0.2);
        color: var(--white);
    }
    
    .toc-progress,
    .toc-cta {
        display: none;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 767px) {
    .guide-hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-meta {
        flex-direction: column;
        gap: 15px;
    }
    
    .guide-content-section {
        padding: 50px 0 60px;
    }
    
    .toc-box {
        padding: 20px;
    }
    
    .toc-nav {
        max-height: 200px;
        overflow-y: auto;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
    }
    
    .toc-nav a {
        white-space: nowrap;
    }
    
    .section-title-wrap h2 {
        font-size: 24px;
    }
    
    .content-body h3 {
        font-size: 20px;
    }
    
    .content-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .nav-btn {
        width: 100%;
        justify-content: center;
    }
    
    .cta-content h2 {
        font-size: 28px;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .btn-cta-primary,
    .btn-cta-outline {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .hero-badge {
        padding: 8px 18px;
    }
    
    .section-number {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .info-box {
        padding: 20px;
    }
    
    .quote-box {
        padding: 25px 20px;
    }
    
    .quote-box::before {
        font-size: 40px;
        left: 15px;
    }
    
    .quote-box p {
        padding-left: 20px;
        font-size: 16px;
    }
}
.main-footer:before {
    left: 0px;
    top: 0px;
    right: 0px;
    bottom: 0px;
    border-radius: 0px;
}
