/* Interactive Blog Features CSS */

.interactive-tool {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2.5rem;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}

.calculator-input {
    margin: 1.5rem 0;
}

.calculator-input label {
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.calculator-input input, .calculator-input select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.calculator-input input:focus, .calculator-input select:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.calculate-btn {
    background: var(--secondary-color);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
    transition: all 0.3s;
    width: 100%;
}

.calculate-btn:hover {
    background: #b8941f;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.result-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
    border-left: 4px solid var(--secondary-color);
    display: none;
}

.result-box.show {
    display: block;
    animation: slideIn 0.5s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    overflow: hidden;
    border-radius: 12px;
}

.comparison-table th {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem;
    text-align: left;
    font-size: 1.1rem;
}

.comparison-table td {
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
    background: white;
}

.comparison-table tr:hover td {
    background: var(--bg-light);
}

.check-icon {
    color: var(--success);
    font-size: 1.5rem;
}

.cross-icon {
    color: #e74c3c;
    font-size: 1.5rem;
}

.quick-nav {
    position: sticky;
    top: 100px;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.quick-nav h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.quick-nav a {
    display: block;
    padding: 0.75rem 0;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
    padding-left: 1rem;
}

.quick-nav a:hover, .quick-nav a.active {
    color: var(--secondary-color);
    border-left-color: var(--secondary-color);
    padding-left: 1.5rem;
}

.expandable-section {
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    margin: 1.5rem 0;
    overflow: hidden;
    transition: all 0.3s;
}

.expandable-section:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.expandable-header {
    padding: 1.5rem;
    background: var(--bg-light);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.expandable-header:hover {
    background: #e2e6ea;
}

.expandable-header h4 {
    color: var(--primary-color);
    margin: 0;
    font-size: 1.2rem;
}

.expandable-header i {
    transition: transform 0.3s;
}

.expandable-content {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

.expandable-content.open {
    padding: 1.5rem;
    max-height: 2000px;
}

.checklist {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.checklist h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.checklist-item {
    padding: 1rem;
    margin: 0.75rem 0;
    background: var(--bg-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.checklist-item:hover {
    background: #e2e6ea;
    transform: translateX(5px);
}

.checklist-item input[type="checkbox"] {
    width: 24px;
    height: 24px;
    cursor: pointer;
    accent-color: var(--secondary-color);
}

.checklist-item label {
    cursor: pointer;
    flex: 1;
    margin: 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    margin: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color) 0%, #f1c232 100%);
    transition: width 0.3s ease;
}

.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--secondary-color) 0%, #f1c232 100%);
    z-index: 1000;
    transition: width 0.2s ease;
}

.tooltip {
    position: relative;
    display: inline-block;
    border-bottom: 2px dotted var(--secondary-color);
    cursor: help;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 300px;
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 1rem;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -150px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.9rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

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

.stat-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.stat-box:hover {
    transform: translateY(-10px);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-dark);
    font-size: 1.1rem;
}

.info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 2rem;
    border-radius: 12px;
    border-left: 5px solid #2196f3;
    margin: 2rem 0;
}

.warning-box {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    padding: 2rem;
    border-radius: 12px;
    border-left: 5px solid #ff9800;
    margin: 2rem 0;
}

.success-box {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    padding: 2rem;
    border-radius: 12px;
    border-left: 5px solid #4caf50;
    margin: 2rem 0;
}

.danger-box {
    background: linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%);
    padding: 2rem;
    border-radius: 12px;
    border-left: 5px solid #f44336;
    margin: 2rem 0;
}

.tabs-container {
    margin: 2rem 0;
}

.tabs-header {
    display: flex;
    gap: 0.5rem;
    border-bottom: 2px solid #dee2e6;
    flex-wrap: wrap;
}

.tab-button {
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.3s;
}

.tab-button:hover {
    color: var(--secondary-color);
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
}

.tab-content {
    display: none;
    padding: 2rem;
    background: white;
    border-radius: 0 0 12px 12px;
    animation: fadeIn 0.5s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline-item {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    position: relative;
    padding-left: 4rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 2rem;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--secondary-color);
    border: 3px solid white;
    box-shadow: 0 0 0 3px var(--secondary-color);
}

.timeline-item h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.accordion {
    background: white;
    margin: 1rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.accordion-header {
    padding: 1.5rem;
    background: var(--bg-light);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
}

.accordion-header:hover {
    background: #e2e6ea;
}

.accordion-content {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

.accordion-content.open {
    padding: 1.5rem;
    max-height: 1500px;
}

.cost-breakdown {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.cost-item {
    display: flex;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.cost-item:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--primary-color);
}

.interactive-quiz {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    margin: 2rem 0;
}

.quiz-question {
    margin: 2rem 0;
}

.quiz-options {
    display: grid;
    gap: 1rem;
    margin: 1rem 0;
}

.quiz-option {
    padding: 1rem;
    background: var(--bg-light);
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.quiz-option:hover {
    background: #e2e6ea;
    border-color: var(--secondary-color);
}

.quiz-option.selected {
    background: var(--secondary-color);
    color: white;
    border-color: var(--secondary-color);
}

.slider-container {
    margin: 2rem 0;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
}

.slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: #dee2e6;
    outline: none;
    -webkit-appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
    transition: all 0.3s;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 0 0 8px rgba(212, 175, 55, 0.2);
}

.slider::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--secondary-color);
    cursor: pointer;
    border: none;
}

@media (max-width: 768px) {
    .quick-nav {
        position: static;
        margin-bottom: 2rem;
    }
    
    .comparison-table {
        font-size: 0.9rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .tab-button {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
}

.highlight-box {
    background: linear-gradient(135deg, #fff9e6 0%, #fff3cd 100%);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
    margin: 1.5rem 0;
}

.highlight-box strong {
    color: var(--primary-color);
}

.interactive-diagram {
    position: relative;
    margin: 2rem 0;
}

.diagram-hotspot {
    position: absolute;
    width: 30px;
    height: 30px;
    background: var(--secondary-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    transition: all 0.3s;
    animation: pulse 2s infinite;
}

.diagram-hotspot:hover {
    transform: scale(1.2);
    animation: none;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7);
    }
    50% {
        box-shadow: 0 0 0 15px rgba(212, 175, 55, 0);
    }
}

.progress-tracker {
    display: flex;
    justify-content: space-between;
    margin: 2rem 0;
    position: relative;
}

.progress-tracker::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 4px;
    background: #dee2e6;
    z-index: 0;
}

.progress-step {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
}

.progress-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #dee2e6;
    margin: 0 auto 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: all 0.3s;
}

.progress-step.completed .progress-step-circle {
    background: var(--success);
    color: white;
}

.progress-step.active .progress-step-circle {
    background: var(--secondary-color);
    color: white;
    transform: scale(1.2);
}
