/* Comprehensive Guide Styles - Fixed and Enhanced */

/* Base Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #3b82f6;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1.4;
}

.btn:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
    color: white;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    color: white;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Container Styles */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Breadcrumb Navigation */
.breadcrumb {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
}

.breadcrumb ul {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    font-size: 0.9rem;
}

.breadcrumb li:not(:last-child)::after {
    content: '→';
    margin-left: 0.5rem;
    color: #64748b;
}

.breadcrumb a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb a:hover {
    color: #1d4ed8;
}

.breadcrumb span {
    color: #64748b;
}

/* Guide Hero Section */
.guide-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
    color: white;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fbbf24;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
}

/* Table of Contents */
.toc-section {
    background: #f8fafc;
    padding: 3rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.toc-header {
    text-align: center;
    margin-bottom: 2rem;
}

.toc-header h2 {
    color: #1e293b;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.toc-header p {
    color: #64748b;
    font-size: 1.1rem;
}

.toc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.toc-column h3 {
    color: #1e293b;
    font-size: 1.3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3b82f6;
}

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

.toc-column li {
    margin-bottom: 0.5rem;
}

.toc-column a {
    color: #475569;
    text-decoration: none;
    padding: 0.5rem 0;
    display: block;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.toc-column a:hover {
    background: #e2e8f0;
    color: #1e293b;
    padding-left: 0.5rem;
}

/* Main Content Layout */
.guide-content {
    padding: 3rem 0;
}

.content-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.main-article {
    min-width: 0; /* Prevents grid overflow */
}

/* Content Sections */
.content-section {
    margin-bottom: 4rem;
    scroll-margin-top: 100px; /* Account for sticky header */
}

.content-section h2 {
    color: #1e293b;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #3b82f6;
}

.section-intro {
    font-size: 1.1rem;
    color: #475569;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Key Concepts Cards */
.key-concepts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.concept-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.concept-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.concept-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.concept-card h3 {
    color: #1e293b;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.concept-card p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Example Box */
.example-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border: 1px solid #bae6fd;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
}

.example-box h4 {
    color: #0c4a6e;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.calculation-example {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e0f2fe;
}

.calc-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.calc-line.total {
    border-top: 2px solid #0369a1;
    border-bottom: none;
    margin-top: 0.5rem;
    padding-top: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
}

/* Comparison Table */
.comparison-table {
    margin: 2rem 0;
}

.comparison-header {
    text-align: center;
    margin-bottom: 2rem;
}

.comparison-header h3 {
    color: #1e293b;
    font-size: 1.5rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.comparison-item {
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    border: 2px solid;
    transition: transform 0.2s ease;
}

.comparison-item:hover {
    transform: translateY(-2px);
}

.comparison-item.short-term {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border-color: #fca5a5;
}

.comparison-item.long-term {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-color: #86efac;
}

.comparison-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.comparison-item h4 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.comparison-item ul {
    text-align: left;
    margin: 0;
    padding-left: 1.5rem;
}

.comparison-item li {
    margin-bottom: 0.5rem;
    color: #374151;
}

/* Tax Rate Tables */
.tax-rate-tables {
    margin: 2rem 0;
}

.rate-table {
    margin-bottom: 2rem;
}

.rate-table h3 {
    color: #1e293b;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    text-align: center;
}

.tax-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.tax-table th,
.tax-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.tax-table th {
    background: #f8fafc;
    color: #1e293b;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.tax-table tbody tr:hover {
    background: #f8fafc;
}

.rate-cell {
    font-weight: bold;
    font-size: 1.1rem;
    text-align: center;
}

.rate-cell.zero-rate {
    color: #10b981;
}

.rate-cell.mid-rate {
    color: #f59e0b;
}

.rate-cell.high-rate {
    color: #ef4444;
}

/* Sidebar */
.guide-sidebar {
    position: relative;
}

.sidebar-sticky {
    position: sticky;
    top: 2rem;
    background: #f8fafc;
    border-radius: 12px;
    padding: 0;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.sidebar-widget {
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.sidebar-widget:last-child {
    border-bottom: none;
}

.sidebar-widget h3 {
    color: #1e293b;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    border: none;
}

/* Quick Calculator */
.quick-calc {
    background: white;
    border-radius: 8px;
    padding: 1rem;
}

.calc-input {
    margin-bottom: 1rem;
}

.calc-input label {
    display: block;
    color: #374151;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.calc-input input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.9rem;
    box-sizing: border-box;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .sidebar-sticky {
        position: static;
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .guide-hero {
        padding: 2rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .toc-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .key-concepts,
    .comparison-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .tax-table {
        font-size: 0.8rem;
    }
    
    .tax-table th,
    .tax-table td {
        padding: 0.5rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .hero-content h1 {
        font-size: 1.6rem;
    }
    
    .stat-number {
        font-size: 1.4rem;
    }
    
    .content-section h2 {
        font-size: 1.5rem;
    }
    
    .concept-card,
    .example-box,
    .comparison-item {
        padding: 1rem;
    }
}