/* ===========================
   Calculator Page - Form Based
   =========================== */

/* Selection Styling */
::selection {
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    color: var(--white);
}

::-moz-selection {
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    color: var(--white);
}

.calculator-hero {
    padding: 80px 0 40px;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.05) 0%, rgba(129, 199, 132, 0.05) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.calculator-hero::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 167, 38, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    top: -100px;
    right: 10%;
    pointer-events: none;
    animation: pulse 6s ease-in-out infinite;
}

.calculator-hero::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(66, 165, 245, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -50px;
    left: 10%;
    pointer-events: none;
    animation: float 8s ease-in-out infinite;
}

.calculator-hero .hero-title {
    font-size: 52px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.calculator-hero .hero-subtitle {
    font-size: 20px;
    color: var(--text-light);
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

/* ===========================
   Input Form Section
   =========================== */
.input-section {
    padding: 40px 0 60px;
}

.input-card {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 48px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1),
                0 0 0 1px rgba(76, 175, 80, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.input-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-green), var(--orange), var(--blue));
}

.input-title {
    font-size: 28px;
    text-align: center;
    margin-bottom: 32px;
    color: var(--text-dark);
}

.input-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.input-field {
    display: flex;
    flex-direction: column;
}

.input-field label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.input-field input,
.input-field select {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #E0E0E0;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background: var(--white);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.input-field input:focus,
.input-field select:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
}

.input-field input::placeholder {
    color: #999;
}

.input-field input.error,
.input-field select.error {
    border-color: #e53935;
    animation: shake 0.5s ease;
}

.input-hint {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 6px;
}

/* Calculate Button */
.calculate-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    color: var(--white);
    border: none;
    padding: 20px 32px;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.35);
}

.calculate-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.calculate-btn:hover::before {
    width: 400px;
    height: 400px;
}

.calculate-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(76, 175, 80, 0.5);
}

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

.calculate-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Focus States for Accessibility */
button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(76, 175, 80, 0.5);
    outline-offset: 2px;
}

/* ===========================
   Loading Section
   =========================== */
.loading-section {
    padding: 60px 0;
}

.loading-card {
    max-width: 500px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 48px;
    border-radius: 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    text-align: center;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(76, 175, 80, 0.1);
    position: relative;
    overflow: hidden;
}

.loading-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-green), var(--orange), var(--blue));
    animation: loading-bar 2s ease-in-out infinite;
}

@keyframes loading-bar {
    0%, 100% { transform: translateX(-100%); }
    50% { transform: translateX(100%); }
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 4px solid rgba(76, 175, 80, 0.1);
    border-top-color: var(--primary-green);
    border-right-color: var(--accent-green);
    border-bottom-color: var(--orange);
    border-radius: 50%;
    margin: 0 auto 24px;
    animation: spin 1s linear infinite;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.2);
}

.loading-card h3 {
    font-size: 24px;
    margin-bottom: 32px;
    color: var(--text-dark);
}

.loading-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    text-align: left;
}

.loading-step {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: var(--background);
    border-radius: 12px;
    opacity: 0.4;
    transition: all 0.4s ease;
    border: 2px solid transparent;
}

.loading-step.active {
    opacity: 1;
    background: linear-gradient(90deg, rgba(76, 175, 80, 0.1), rgba(66, 165, 245, 0.05));
    border-color: rgba(76, 175, 80, 0.3);
    transform: translateX(5px);
}

.loading-step.complete {
    opacity: 1;
    background: rgba(76, 175, 80, 0.05);
}

.step-icon {
    font-size: 20px;
}

/* ===========================
   Results Section - Simplified
   =========================== */
.results-section {
    padding: 40px 0 80px;
}

/* Main ROI Display */
.roi-display {
    margin-bottom: 40px;
}

.roi-card {
    max-width: 600px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.03), rgba(129, 199, 132, 0.05));
    padding: 48px;
    border-radius: 28px;
    text-align: center;
    border: 3px solid var(--primary-green);
    box-shadow: 0 20px 60px rgba(76, 175, 80, 0.2);
    position: relative;
    overflow: hidden;
}

.roi-card::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green), var(--orange));
    border-radius: 31px;
    z-index: -1;
    opacity: 0.8;
}

.roi-label {
    font-size: 16px;
    font-weight: 600;
    color: #2E7D32;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
    display: block;
}

.roi-amount {
    font-size: 80px;
    font-weight: 800;
    color: #1B5E20;
    line-height: 1;
    margin: 16px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.roi-subtitle {
    font-size: 16px;
    color: #2E7D32;
    margin: 0;
}

/* Breakdown Card */
.breakdown-card {
    max-width: 700px;
    margin: 0 auto 40px;
    background: var(--white);
    padding: 36px 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(76, 175, 80, 0.1);
}

.breakdown-card h3 {
    font-size: 22px;
    margin-bottom: 24px;
    color: var(--text-dark);
    text-align: center;
}

.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.breakdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background: #F8F9FA;
    border-radius: 12px;
    border: 1px solid rgba(76, 175, 80, 0.15);
}

.breakdown-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.breakdown-label {
    font-size: 13px;
    color: var(--text-light);
    display: block;
}

.breakdown-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    display: block;
}

.calculation-note {
    background: rgba(76, 175, 80, 0.05);
    padding: 20px 24px;
    border-radius: 12px;
    border-left: 4px solid var(--primary-green);
}

.calculation-note p {
    margin: 0 0 12px 0;
    font-size: 14px;
    color: var(--text-dark);
}

.calculation-note ul {
    margin: 0;
    padding-left: 20px;
}

.calculation-note li {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 8px;
    line-height: 1.6;
}

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

/* Climate Insight Card */
.climate-insight {
    max-width: 700px;
    margin: 0 auto 40px;
    background: linear-gradient(135deg, rgba(66, 165, 245, 0.05), rgba(76, 175, 80, 0.05));
    padding: 28px 32px;
    border-radius: 20px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    border: 2px solid rgba(66, 165, 245, 0.15);
}

.climate-insight .insight-icon {
    font-size: 48px;
    flex-shrink: 0;
}

.climate-insight .insight-content h4 {
    font-size: 18px;
    color: var(--text-dark);
    margin: 0 0 8px 0;
}

.climate-insight .insight-content p {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.7;
    margin: 0;
}

/* Results CTA */
.results-cta {
    max-width: 700px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green), var(--blue));
    padding: 48px;
    border-radius: 28px;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(76, 175, 80, 0.3);
}

.results-cta::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -200px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.results-cta::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 167, 38, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -150px;
    left: -50px;
    animation: pulse 6s ease-in-out infinite;
}

.results-cta h3 {
    font-size: 32px;
    margin-bottom: 12px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.results-cta p {
    font-size: 18px;
    margin-bottom: 28px;
    opacity: 0.95;
    position: relative;
    z-index: 1;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.1);
}

.results-cta .btn-primary {
    background: var(--white);
    color: var(--primary-green);
    position: relative;
    z-index: 1;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.results-cta .btn-primary:hover {
    background: var(--background);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.3);
}

/* Try Again */
.try-again {
    text-align: center;
}

.try-again-btn {
    background: transparent;
    border: 2px solid #E0E0E0;
    color: var(--text-light);
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
}

.try-again-btn:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
    background: rgba(76, 175, 80, 0.05);
}

/* ===========================
   How Section
   =========================== */
.how-section {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.02), rgba(66, 165, 245, 0.02));
    position: relative;
    overflow: hidden;
}

.how-section::before {
    content: '';
    position: absolute;
    width: 350px;
    height: 350px;
    background: radial-gradient(circle, rgba(255, 167, 38, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    bottom: -100px;
    right: 10%;
    pointer-events: none;
    animation: float 10s ease-in-out infinite;
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px;
    margin-top: 48px;
}

.how-card {
    text-align: center;
    padding: 32px 24px;
    transition: transform 0.4s ease;
}

.how-card:hover {
    transform: translateY(-8px);
}

.how-number {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 800;
    margin: 0 auto 20px;
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
    position: relative;
    transition: all 0.4s ease;
}

.how-number::before {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green), var(--orange));
    border-radius: 50%;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.how-card:hover .how-number {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 12px 30px rgba(76, 175, 80, 0.5);
}

.how-card:hover .how-number::before {
    opacity: 1;
}

.how-card:nth-child(2) .how-number {
    background: linear-gradient(135deg, var(--blue), #64B5F6);
}

.how-card:nth-child(3) .how-number {
    background: linear-gradient(135deg, var(--orange), #FFB74D);
}

.how-card:nth-child(4) .how-number {
    background: linear-gradient(135deg, var(--purple), #CE93D8);
}

.how-card h4 {
    font-size: 20px;
    margin-bottom: 12px;
    color: var(--text-dark);
}

.how-card p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 15px;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 968px) {
    .calculator-hero .hero-title {
        font-size: 40px;
    }
    
    .roi-amount {
        font-size: 64px;
    }
    
    .breakdown-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .calculator-hero {
        padding: 60px 0 30px;
    }
    
    .calculator-hero .hero-title {
        font-size: 32px;
    }
    
    .calculator-hero .hero-subtitle {
        font-size: 17px;
    }
    
    .input-card {
        padding: 24px;
    }
    
    .input-title {
        font-size: 22px;
    }
    
    .input-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .roi-card {
        padding: 36px 24px;
    }
    
    .roi-amount {
        font-size: 52px;
    }
    
    .breakdown-card {
        padding: 28px 24px;
    }
    
    .climate-insight {
        flex-direction: column;
        text-align: center;
        padding: 24px;
    }
    
    .results-cta {
        padding: 32px 24px;
    }
    
    .results-cta h3 {
        font-size: 26px;
    }
}

@media (max-width: 480px) {
    .calculator-hero .hero-title {
        font-size: 28px;
    }
    
    .roi-amount {
        font-size: 44px;
    }
    
    .input-field input,
    .input-field select {
        padding: 14px 16px;
        font-size: 15px;
    }
    
    .calculate-btn {
        padding: 16px 24px;
        font-size: 16px;
    }
}
