/* ── MAIN PAGE STYLING ────────────────────────── */
:root {
    --dark:          #1e2035;
    --primary:       #2A2F5B;
    --primary-light: #3a4180;
    --accent:        #ffda00;
    --accent-hover:  #ffe333;
    --text:          #1a1d2e;
    --text-muted:    #6b7280;
    --bg:            #f5f6fa;
    --surface:       #ffffff;
    --border:        #e5e7ef;
    --radius:        16px;
    --shadow:        0 4px 20px rgba(42,47,91,0.08);
    --shadow-hover:  0 12px 36px rgba(42,47,91,0.16);
    --green-wa:      #25D366;
    --green-wa-hover:#20bd5a;
}

/* ── HERO BANNER ────────────────────────── */
.main-hero {
    background: linear-gradient(135deg, var(--primary) 0%, #1a1f45 60%, #0d1030 100%);
    padding: 3.5rem 1.5rem 3.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.main-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255,218,0,0.12);
    border: 1px solid rgba(255,218,0,0.3);
    border-radius: 50px;
    padding: 5px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1.2rem;
}
.main-hero h1 {
    font-size: clamp(1.6rem, 4vw, 2.7rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.8rem;
    line-height: 1.25;
}
.main-hero-subtitle {
    color: rgba(255,255,255,0.75);
    font-size: 15px;
    max-width: 650px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ── MAIN CONTAINER ────────────────────────── */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.5rem 1.2rem 4rem;
}

/* ── CALCULATOR SECTION GRID ────────────────────────── */
.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
    gap: 1.8rem;
    margin-bottom: 2.5rem;
}

.calc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents flex/grid overflow */
}

.calc-card:hover {
    box-shadow: var(--shadow-hover);
}

.calc-card.gold-card {
    border-top: 4px solid var(--accent);
}

.calc-card.tech-card {
    border-top: 4px solid var(--primary);
}

.calc-card-header {
    background: linear-gradient(135deg, #f8f9fe 0%, #edf1fd 100%);
    padding: 1.2rem 1.4rem;
    border-bottom: 1px solid var(--border);
}

.calc-card-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 0.8rem 0;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
}

/* Prices Top Bar inside Calculators - Scrollable / Flexible Row */
.calc-prices-row {
    display: flex;
    gap: 0.5rem;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    padding-bottom: 2px;
}
.calc-prices-row::-webkit-scrollbar {
    display: none; /* Chrome, Safari */
}

.price-item-box {
    flex: 1 1 0;
    min-width: 90px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.5rem 0.4rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    .loader {
        margin: 0.5rem auto 0;
        width: 1rem;
        height: 1rem;
    }
}

.price-item-label {
    font-size: 11.5px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.price-item-label img {
    height: 16px;
    width: auto;
}

.price-item-val {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Form Controls Inside Cards */
.calc-card-body {
    padding: 1.4rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.calc-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    gap: 0.9rem;
    margin-bottom: 1.2rem;
}

.calc-field-group {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.calc-field-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.4rem;
}

.calc-select, .calc-input {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.65rem 0.8rem;
    font-size: 16px !important; /* Prevents auto-zoom on iOS */
    font-weight: 600;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s, background-color 0.2s;
    width: 100%;
    box-sizing: border-box;
    height: 46px;
}

.calc-select {
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

.calc-select:focus, .calc-input:focus {
    border-color: var(--primary);
    background: #fff;
}

/* Range input styling */
.range-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.range-input {
    position: relative;
    width: 100%;
    height: 32px;
    display: flex;
    align-items: center;
}

.range-input input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 4px;
    background: linear-gradient(
        to right,
        #ffda01 0%,
        #ffda01 var(--fill-percent, 0%),
        #dee2e6 var(--fill-percent, 0%),
        #dee2e6 100%
    );
    appearance: none;
    -webkit-appearance: none;
    outline: none;
    cursor: pointer;
}

/* Thumb for Webkit */
.range-input input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    background: #ffda00;
    border: 2px solid #2A2F5B;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    transition: transform 0.1s ease;
}
.range-input input[type="range"]::-webkit-slider-thumb:active {
    transform: scale(1.18);
}

/* Thumb for Firefox */
.range-input input[type="range"]::-moz-range-thumb {
    width: 22px;
    height: 22px;
    background: #ffda00;
    border: 2px solid #2A2F5B;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* RESULT BOX INSIDE CARDS */
.calc-result-box {
    background: linear-gradient(135deg, #f8f9fe 0%, #f0f3ff 100%);
    border: 1px solid #dde2f5;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.6rem;
    margin-top: auto;
}

.calc-res-item {
    text-align: center;
    flex: 1;
    min-width: 0;
}

.calc-res-divider {
    width: 1px;
    height: 36px;
    background: #dde2f5;
    flex-shrink: 0;
}

.calc-res-label {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 2px;
    white-space: nowrap;
}

.calc-res-val {
    font-size: clamp(16px, 4.2vw, 20px);
    font-weight: 800;
    color: var(--primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calc-res-val.highlight {
    color: #10b981;
}

/* Loader */
.loader {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(42,47,91,0.2);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── COMMON CTA BOX ────────────────────────── */
.main-cta-card {
    background: linear-gradient(135deg, var(--primary) 0%, #1c224a 100%);
    border-radius: var(--radius);
    padding: 2.2rem 1.8rem;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(42,47,91,0.25);
    margin-bottom: 3.5rem;
    text-align: center;
}

.main-cta-title {
    font-size: clamp(18px, 4vw, 22px);
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.main-cta-sub {
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    max-width: 580px;
    margin: 0 auto 1.6rem;
    line-height: 1.5;
}

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

.btn-cta-wa {
    background: var(--green-wa);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 15px;
    padding: 0.8rem 1.6rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none !important;
    transition: all 0.25s ease;
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
    min-height: 48px;
}

.btn-cta-wa:hover {
    background: var(--green-wa-hover);
    transform: translateY(-2px);
}

.btn-cta-phone {
    background: var(--accent);
    color: var(--dark) !important;
    font-weight: 700;
    font-size: 15px;
    padding: 0.8rem 1.6rem;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none !important;
    transition: all 0.25s ease;
    box-shadow: 0 6px 20px rgba(255, 218, 0, 0.35);
    min-height: 48px;
}

.btn-cta-phone:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

/* ── HOW IT WORKS STEPS ────────────────────────── */
.main-section-title {
    font-size: clamp(19px, 4vw, 22px);
    font-weight: 700;
    color: var(--text);
    text-align: center;
    margin-bottom: 0.4rem;
}

.main-section-sub {
    font-size: 14px;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 1.2rem;
    margin-bottom: 3.5rem;
}

.step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.4rem;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    transition: transform 0.3s ease;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.step-num {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 12px;
    font-weight: 800;
    color: var(--text-muted);
    opacity: 0.4;
}

.step-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.9rem;
}

.step-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.4rem;
}

.step-desc {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── RESPONSIVE RULES ────────────────────────── */
@media (max-width: 768px) {
    .calc-grid {
        grid-template-columns: 1fr;
        gap: 1.4rem;
    }
    .main-hero {
        padding: 1.8rem 1rem 1.8rem;
    }
    .main-hero-badge {
        margin-bottom: 0.75rem;
        font-size: 11px;
        padding: 4px 12px;
    }
    .main-hero h1 {
        font-size: clamp(1.4rem, 5vw, 1.85rem);
        margin-bottom: 0.5rem;
    }
    .main-hero-subtitle {
        font-size: 13.5px;
        line-height: 1.45;
    }
    .main-container {
        padding: 1.5rem 0.9rem 2.5rem;
    }
    .main-cta-card {
        padding: 1.8rem 1.2rem;
        margin-bottom: 2.5rem;
    }
    .btn-cta-wa, .btn-cta-phone {
        width: 100%;
    }
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 2.5rem;
    }
    .calc-card-header {
        padding: 1rem 1.1rem;
    }
    .calc-card-body {
        padding: 1.1rem;
    }
}

@media (max-width: 420px) {
    .price-item-box {
        min-width: 82px;
        padding: 0.4rem 0.25rem;
    }
    .price-item-label {
        font-size: 10.5px;
    }
    .price-item-val {
        font-size: 11.5px;
    }
}

