/* Roofing Calculator Styles - Premium Edition */

/* Design System Variables */
:root {
    /* Colors */
    --primary-color: #0F172A;
    /* Deep Navy */
    --primary-light: #334155;
    --accent-color: #F59E0B;
    /* Amber/Gold */
    --accent-hover: #D97706;
    --accent-glow: rgba(245, 158, 11, 0.4);

    --text-light: #F8FAFC;
    --text-muted: #94A3B8;
    --text-dark: #1E293B;

    --bg-body: #F1F5F9;
    --surface-glass: rgba(255, 255, 255, 0.95);
    --surface-glass-dark: rgba(15, 23, 42, 0.9);

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.8));
    --gradient-accent: linear-gradient(135deg, #F59E0B, #D97706);

    /* Shadows */
    --shadow-card: 0 20px 40px -5px rgba(0, 0, 0, 0.1), 0 10px 20px -5px rgba(0, 0, 0, 0.05);
    --shadow-float: 0 -5px 20px rgba(0, 0, 0, 0.1);
    --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.06);

    /* Spacing & Layout */
    --container-width: 1100px;
    --radius-lg: 24px;
    --radius-md: 12px;
    --radius-full: 9999px;
}

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

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-body);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
}

ul {
    list-style: none;
}

h1,
h2,
h3 {
    font-weight: 800;
    line-height: 1.1;
    color: var(--primary-color);
}

/* 3D Canvas Background */
#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
    opacity: 0.6;
}

/* Hero Section */
.hero {
    position: relative;
    height: 85vh;
    /* Taller hero */
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    overflow: hidden;
    /* Removed static background image for 3D effect, using gradient overlay */
    background: radial-gradient(circle at center, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 1) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 2rem;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #fff;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.hero-title .line {
    display: block;
}

.hero .subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 4.5rem;
    }

    .hero .subtitle {
        font-size: 1.5rem;
    }
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1rem;
    letter-spacing: 0.02em;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 4px 15px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px var(--accent-glow);
}

.btn-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(4px);
}

.btn-outline:hover {
    border-color: #fff;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.btn-sm {
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
}

.btn-outline-dark {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

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

/* Calculator Section & Glassmorphism */
.calculator-section {
    position: relative;
    margin-top: -120px;
    padding-bottom: 6rem;
    z-index: 10;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.calculator-card {
    background: var(--surface-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: 3rem;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

/* Wizard Steps */
.wizard-step {
    display: none;
    animation: fadeInStep 0.5s ease forwards;
}

.wizard-step.active {
    display: block;
}

@keyframes fadeInStep {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.step-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.step-header p {
    color: var(--text-muted);
}

/* Progress Bar */
.progress-container {
    margin-bottom: 3rem;
    position: relative;
    padding: 0 1rem;
}

.progress-bar-bg {
    background: #E2E8F0;
    height: 6px;
    border-radius: 3px;
    position: relative;
    top: 14px;
    z-index: 1;
}

.progress-bar-fill {
    background: var(--accent-color);
    height: 100%;
    border-radius: 3px;
    width: 20%;
    transition: width 0.4s ease;
}

.steps-indicator {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 2;
}

.step-dot {
    width: 34px;
    height: 34px;
    background: #E2E8F0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--text-muted);
    font-size: 0.9rem;
    border: 3px solid var(--surface-glass);
    transition: all 0.3s ease;
    /* Prevent clicking on future steps by default */
    cursor: default;
    pointer-events: none;
}

/* Allow clicking on active/completed steps */
.step-dot.active,
.step-dot.completed {
    cursor: pointer;
    pointer-events: auto;
}

.step-dot.active {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

/* Style for steps we've already passed (optional but good for UX) */
.step-dot.completed {
    background: var(--primary-light);
    color: white;
}

.step-dot.active {
    background: var(--accent-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.2);
}

/* Form Inputs */
.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--primary-color);
}

.centered-input {
    text-align: center;
}

.centered-input input {
    max-width: 300px;
    margin: 0 auto;
    text-align: center;
    letter-spacing: 2px;
    font-size: 1.5rem;
}



/* Shape Grid (SVG) */
.shape-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

@media(min-width: 600px) {
    .shape-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.shape-option {
    background: #fff;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-md);
    padding: 1.5rem 0.5rem;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.shape-option:hover {
    border-color: var(--accent-color);
    transform: translateY(-3px);
}

.shape-option.selected {
    border-color: var(--accent-color);
    background: rgba(245, 158, 11, 0.05);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.roof-icon {
    width: auto;
    height: 48px;
    margin-bottom: 0.75rem;
    color: var(--text-muted);
    transition: color 0.2s;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.shape-option.selected .roof-icon {
    color: var(--accent-color);
}

.shape-option:hover .roof-icon {
    color: var(--primary-color);
}

/* Select & Inputs */
select,
input[type="text"] {
    width: 100%;
    padding: 1rem 1.25rem;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius-md);
    font-size: 1.1rem;
    background-color: #fff;
    transition: border-color 0.2s;
}

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

.form-grid-2 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

@media(min-width: 768px) {
    .form-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

/* Extras Toggles */
.extras-grid {
    display: grid;
    gap: 1rem;
}

@media(min-width: 600px) {
    .extras-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.extra-item {
    background: #fff;
    border: 1px solid #E2E8F0;
    padding: 1.25rem;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.extra-info {
    display: flex;
    flex-direction: column;
}

.extra-title {
    font-weight: 700;
    color: var(--primary-color);
}

.extra-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Switch Toggle */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #CBD5E1;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--accent-color);
}

input:checked+.slider:before {
    transform: translateX(22px);
}

/* Navigation Buttons */
.step-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 3rem;
    align-items: center;
    gap: 1rem;
}

@media (max-width: 600px) {
    .step-nav .btn {
        padding: 0.75rem 0.5rem;
        /* Reduced padding */
        font-size: 0.85rem;
        /* Slightly smaller text */
        flex: 1;
        /* Force equal width */
        width: 100%;
        justify-content: center;
    }
}

.btn-text {
    color: var(--text-muted);
    font-weight: 600;
    text-decoration: underline;
    font-size: 0.9rem;
}

.btn-text:hover {
    color: var(--primary-color);
}

/* Results */
.results-container {
    text-align: center;
}

.price-display {
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: var(--radius-md);
}

.price-range {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -1px;
    margin: 0.5rem 0;
}

.label {
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
}

/* Premium Slider Styling */
.slider-container {
    width: 100%;
    padding: 1rem 0;
    text-align: center;
}

.slider-val-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 5px;
    background: #E2E8F0;
    outline: none;
    margin: 1.5rem 0;
    transition: background 0.2s;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--accent-color);
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, background 0.2s;
    border: 3px solid white;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    background: var(--accent-hover);
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: -0.5rem;
}

.full-width {
    width: 100%;
    justify-content: center;
}

.btn-whatsapp {
    background-color: #25D366;
    color: white;
    border: none;
}

.btn-whatsapp:hover {
    background-color: #1FAF54;
}

.btn-email {
    background-color: #EA4335;
    color: white;
    border: none;
}

/* Gmail Red/Google Red or standard email color */
.btn-email:hover {
    background-color: #D93025;
}

.btn-sms {
    background-color: #3B82F6;
    color: white;
}

.btn-sms:hover {
    background-color: #2563EB;
}

.btn-call {
    background-color: var(--primary-color);
    color: white;
}

/* Blue Previous Button */
.prev-btn.btn-outline {
    border-color: #3B82F6;
    color: #3B82F6;
    background: transparent;
}

.prev-btn.btn-outline:hover {
    background: #3B82F6;
    color: white;
}

.mb-8 {
    margin-bottom: 2rem;
}

.text-muted {
    color: var(--text-muted);
}

.icon {
    margin-right: 8px;
    font-size: 1.2rem;
}

/* Floating CTA Bar */
.floating-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--surface-glass);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem 1.5rem;
    z-index: 100;
    box-shadow: var(--shadow-float);
    transform: translateY(100%);
    /* Hidden by default */
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-cta.visible {
    transform: translateY(0);
}

.cta-content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cta-text {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1rem;
}

.cta-buttons {
    display: flex;
    gap: 0.75rem;
}

@media (max-width: 600px) {
    .cta-text {
        display: none;
    }

    .cta-buttons {
        width: 100%;
        justify-content: space-between;
    }

    .cta-buttons .btn {
        flex: 1;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .calculator-card {
        padding: 1.5rem;
    }
}