/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    color: white;
    margin-bottom: 40px;
    padding: 40px 20px;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

header p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Main Container */
main {
    max-width: 800px;
    margin: 0 auto;
}

.calculator-container {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* Form Sections */
.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section h2 {
    font-size: 1.5rem;
    color: #667eea;
    margin-bottom: 20px;
}

/* Form Groups */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 0.9rem;
}

/* Toggle Buttons */
.toggle-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.toggle-btn {
    flex: 1;
    padding: 12px 20px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
}

.toggle-btn:hover {
    background: #ebebeb;
}

.toggle-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Value Display */
.value-display {
    background: #f8f9ff;
    border: 2px solid #667eea;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.value-display span {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.value-display small {
    color: #666;
}

/* Calculate Button */
.calculate-btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Results Container */
.results-container {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 3px solid #667eea;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    margin-top: 40px;
    padding: 20px;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    .calculator-container {
        padding: 25px;
    }
    
    .toggle-buttons {
        flex-direction: column;
    }
}

/* ========================================
   RESULTS SECTION STYLES
   ======================================== */

.results-container h2 {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 30px;
    text-align: center;
}

/* Recommendation Banner */
.recommendation {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.recommendation h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.recommendation p {
    font-size: 1.2rem;
    margin: 0;
}

.recommendation strong {
    font-size: 1.4rem;
    text-decoration: underline;
}

/* Comparison Cards Container */
.comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Individual Option Cards */
.option {
    background: #f8f9ff;
    border: 3px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.option:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.option h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #444;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* Cost Breakdown */
.cost-breakdown p {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 1rem;
}

.cost-breakdown p:last-child {
    border-bottom: none;
}

.cost-breakdown p.total {
    font-size: 1.3rem;
    font-weight: 700;
    color: #667eea;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 3px solid #667eea;
}

.cost-breakdown strong {
    color: #333;
}

/* Highlight recommended option */
.recommendation.repair + .comparison .repair-option,
.recommendation.replace + .comparison .replace-option {
    border-color: #667eea;
    border-width: 4px;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8ebff 100%);
}

/* Disclaimer */
.disclaimer {
    background: #fff9e6;
    border-left: 4px solid #ffc107;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
}

.disclaimer p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

/* Responsive Design for Results */
@media (max-width: 768px) {
    .comparison {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .recommendation h3 {
        font-size: 1.4rem;
    }
    
    .recommendation p {
        font-size: 1rem;
    }
    
    .option h3 {
        font-size: 1.3rem;
    }
}

/* ========================================
   BLOG SECTION STYLES
   ======================================== */

.blog-links {
    max-width: 800px;
    margin: 40px auto 0 auto;
}

.blog-links h2 {
    color: white;
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 25px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

/* Responsive Blog Grid */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.blog-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    color: #333;
    transition: transform 0.3s, box-shadow 0.3s;
    display: block;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.blog-card h3 {
    font-size: 1.1rem;
    color: #667eea;
    margin-bottom: 10px;
    line-height: 1.4;
}

.blog-card p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.5;
}

.blog-card span {
    font-size: 0.9rem;
    color: #667eea;
    font-weight: 600;
}

/* Responsive Blog Grid */
@media (max-width: 768px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

/* Warning box styles */
.warning-box {
    background: #fff9e6;
    border-left: 4px solid #ff9800;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
    color: #333;
    line-height: 1.6;
}

.warning-box strong {
    color: #ff9800;
    display: block;
    margin-bottom: 5px;
}
/* ========================================
   INTRO CONTENT
   ======================================== */

.intro-content {
    max-width: 1000px;
    margin: 40px auto;
    padding: 0 20px;
}

.intro-container {
    background: white;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    margin-bottom: 40px;
}

.intro-container h2 {
    color: #667eea;
    font-size: 2rem;
    margin-bottom: 20px;
}

.intro-container h3 {
    color: #333;
    font-size: 1.5rem;
    margin: 30px 0 15px 0;
}

.intro-container p {
    color: #555;
    line-height: 1.8;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.how-it-works {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin: 25px 0;
}

.step {
    background: #f8f9ff;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
}

.step-number {
    display: inline-block;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    line-height: 50px;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 15px;
}

.step h4 {
    color: #667eea;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.step p {
    font-size: 0.95rem;
    color: #666;
}

.cta-box {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8ebff 100%);
    border: 2px solid #667eea;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-top: 30px;
}

.cta-box p {
    margin: 0;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .how-it-works {
        grid-template-columns: 1fr;
    }
    
    .intro-container {
        padding: 25px;
    }
}