/* ============================================
   CALCULATOR PAGE - FINAL COMPLETE STYLES
   ============================================ */

/* ===== PAGE HERO ===== */
.calc-hero {
    position: relative;
    min-height: 420px;
    display: flex;
    align-items: center;
    background: url('../images/service-design.jpg') center center/cover no-repeat;
    padding: 140px 0 80px;
    overflow: hidden;
}

.calc-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(6, 20, 46, 0.95) 0%, rgba(6, 20, 46, 0.75) 100%);
    z-index: 1;
}

.calc-hero .container {
    position: relative;
    z-index: 2;
}

.calc-hero .page-hero-content {
    max-width: 750px;
    color: var(--white);
}

.calc-hero .breadcrumb {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.calc-hero .breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.calc-hero .breadcrumb a:hover {
    color: var(--primary);
}

.calc-hero .breadcrumb i {
    color: var(--primary);
    font-size: 0.75rem;
}

.calc-hero .breadcrumb span {
    color: var(--primary);
    font-weight: 700;
}

.calc-hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 20px;
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.calc-hero p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.9;
    max-width: 700px;
}

/* ===== CALCULATOR SECTION ===== */
.calculator-section {
    padding: 80px 0;
    background: var(--bg-light);
}

.calculator-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
    align-items: start;
}

/* --- Progress Bar --- */
.calc-progress {
    grid-column: 1 / -1;
    background: var(--white);
    padding: 30px 40px;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border);
    margin-bottom: 30px;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    flex: 1;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 45px;
    height: 45px;
    background: var(--bg-light);
    border: 3px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-muted);
    transition: all 0.4s ease;
}

.progress-step.active .step-number {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
    box-shadow: 0 5px 20px rgba(246, 199, 68, 0.4);
    transform: scale(1.1);
}

.progress-step.completed .step-number {
    background: #F6C744;
    border-color: #F6C744;
    color: var(--white);
}

.step-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s ease;
}

.progress-step.active .step-label {
    color: var(--primary);
}

.progress-step.completed .step-label {
    color: #F6C744;
}

.progress-bar {
    height: 6px;
    background: var(--bg-light);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), #94a3b8);
    border-radius: 10px;
    transition: width 0.5s ease;
    width: 0%;
}

/* --- Calculator Form --- */
.calc-form-container {
    background: var(--white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border);
}

.calc-step {
    display: none;
    animation: fadeIn 0.4s ease;
}

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

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

.step-header {
    margin-bottom: 35px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--bg-light);
}

.step-header h2 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-header h2 i {
    color: var(--primary);
}

.step-header p {
    font-size: 1.05rem;
    color: var(--text-light);
}

/* --- Option Grid --- */
.option-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.option-grid.vertical {
    grid-template-columns: 1fr;
}

.option-card {
    position: relative;
    cursor: pointer;
}

.option-card input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.option-content {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
}

.option-card:hover .option-content {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(246, 199, 68, 0.15);
}

.option-card input:checked + .option-content {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 10px 30px rgba(246, 199, 68, 0.2);
}

.option-icon {
    width: 70px;
    height: 70px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 1.8rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.option-card input:checked + .option-content .option-icon {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.1);
}

.option-content h3 {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 8px;
}

.option-content p {
    font-size: 0.92rem;
    color: var(--text-light);
}

/* Quality Cards */
.quality-card .option-content {
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: right;
    padding: 25px;
}

.quality-card .option-icon {
    margin: 0;
    min-width: 70px;
}

.quality-info {
    flex: 1;
}

.quality-info h3 {
    margin-bottom: 5px;
}

.quality-info p {
    margin-bottom: 8px;
}

.quality-badge {
    display: inline-block;
    background: var(--bg-light);
    color: var(--text-light);
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
}

.quality-badge.recommended {
    background: var(--primary);
    color: var(--white);
}

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

.form-group label {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
}

.range-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.range-value {
    background: var(--primary);
    color: var(--white);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 700;
}

.range-slider {
    position: relative;
    margin: 20px 0;
}

.range-slider input[type="range"] {
    position: relative;
    width: 100%;
    height: 8px;
    background: var(--bg-light);
    border-radius: 10px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(246, 199, 68, 0.4);
    transition: transform 0.2s ease;
}

.range-slider input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.range-slider input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 3px 10px rgba(246, 199, 68, 0.4);
}

.range-track {
    position: absolute;
    top: 50%;
    right: 0;
    left: 0;
    height: 8px;
    transform: translateY(-50%);
    pointer-events: none;
}

.range-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    transition: width 0.2s ease;
}

.range-limits {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Number Selector */
.number-selector {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 200px;
}

.number-selector input {
    flex: 1;
    text-align: center;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: var(--font);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
    outline: none;
}

.num-btn {
    width: 45px;
    height: 45px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.num-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

/* --- Services Grid --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.service-option {
    position: relative;
    cursor: pointer;
}

.service-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.service-content {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.service-option:hover .service-content {
    border-color: var(--primary);
    transform: translateY(-3px);
}

.service-option input:checked + .service-content {
    border-color: var(--primary);
    background: var(--primary-light);
}

.service-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.service-option input:checked + .service-content .service-icon {
    background: var(--primary);
    color: var(--white);
}

.service-info {
    flex: 1;
}

.service-info h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.service-info p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 6px;
}

.service-price {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--primary);
}

.service-check {
    width: 30px;
    height: 30px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    opacity: 0;
    transition: all 0.3s ease;
}

.service-option input:checked + .service-content .service-check {
    opacity: 1;
    background: var(--primary);
    color: var(--white);
}

/* --- Step Actions --- */
.step-actions {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid var(--bg-light);
}

.step-actions .btn {
    min-width: 180px;
    justify-content: center;
}

/* --- Result Container --- */
.result-container {
    background: linear-gradient(135deg, var(--bg-light), var(--white));
    padding: 40px;
    border-radius: 16px;
    border: 2px solid var(--primary);
}

.result-total {
    text-align: center;
    padding: 30px;
    background: var(--white);
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.result-label {
    display: block;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 15px;
}

.result-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

.result-amount #totalCost {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--primary);
    line-height: 1;
}

.result-currency {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark);
}

.result-note {
    font-size: 0.88rem;
    color: var(--text-muted);
    font-style: italic;
}

.result-breakdown {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.result-breakdown h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-breakdown h3 i {
    color: var(--primary);
}

.breakdown-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: var(--bg-light);
    border-radius: 8px;
    font-size: 0.95rem;
}

.breakdown-item .breakdown-label {
    color: var(--text);
    font-weight: 600;
}

.breakdown-item .breakdown-value {
    color: var(--primary);
    font-weight: 700;
}

.breakdown-item.total {
    background: var(--primary-light);
    border: 2px solid var(--primary);
    font-size: 1.1rem;
}

.result-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.result-actions .btn {
    flex: 1;
    min-width: 200px;
    justify-content: center;
}

.result-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px;
    background: #f8fafc;
    border: 1px solid #64748b;
    border-radius: 10px;
}

.result-disclaimer i {
    color: #64748b;
    font-size: 1.3rem;
    margin-top: 3px;
}

.result-disclaimer p {
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.7;
    margin: 0;
}

/* --- Sidebar --- */
.calc-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 100px;
}

.sidebar-card {
    background: var(--white);
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid var(--border);
}

.sidebar-card h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-card h3 i {
    color: var(--primary);
}

.live-preview {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bg-light);
}

.preview-item:last-of-type {
    border-bottom: none;
}

.preview-label {
    font-size: 0.92rem;
    color: var(--text-light);
}

.preview-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--dark);
}

.preview-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: var(--primary-light);
    border-radius: 10px;
    margin-top: 10px;
}

.preview-total span {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dark);
}

.preview-total strong {
    font-size: 1.1rem;
    color: var(--primary);
}

.help-card h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-card h4 i {
    color: var(--primary);
}

.help-card p {
    font-size: 0.92rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 18px;
}

.help-card .btn {
    width: 100%;
    justify-content: center;
}

/* ===== FEATURES SECTION ===== */
.calc-features {
    padding: 100px 0;
    background: var(--white);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.feature-card {
    background: var(--white);
    padding: 35px 25px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid var(--border);
    transition: all 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.feature-icon {
    width: 75px;
    height: 75px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    color: var(--primary);
    transition: all 0.5s ease;
}

.feature-card:hover .feature-icon {
    background: var(--primary);
    color: var(--white);
    transform: rotate(360deg);
}

.feature-card h3 {
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 0.92rem;
    color: var(--text-light);
    line-height: 1.7;
}

/* ===== FAQ SECTION ===== */
.calc-faq {
    padding: 100px 0;
    background: var(--bg-light);
}

.faq-centered {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-item.active {
    border-color: var(--primary);
    background: #fffdf8;
    box-shadow: 0 10px 30px rgba(246, 199, 68, 0.12);
}

.faq-question {
    width: 100%;
    padding: 22px 25px;
    background: none;
    border: none;
    font-family: var(--font);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
    text-align: right;
}

.question-text {
    flex: 1;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    text-align: right;
    transition: color 0.3s ease;
}

.faq-item.active .question-text {
    color: var(--primary);
}

.faq-question > i {
    color: var(--primary);
    font-size: 0.85rem;
    width: 32px;
    height: 32px;
    background: var(--primary-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-question > i {
    transform: rotate(180deg);
    background: var(--primary);
    color: var(--white);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.answer-content {
    padding: 0 30px 25px 30px;
    color: var(--text);
    font-size: 1rem;
    line-height: 2;
    text-align: right;
    direction: rtl;
}

.answer-content p {
    margin-bottom: 15px;
    color: var(--text);
    font-size: 1rem;
    line-height: 2;
}

.answer-content p:last-child {
    margin-bottom: 0;
}

/* ===== MODAL ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    padding: 40px;
    z-index: 2;
    animation: modalIn 0.4s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    background: var(--bg-light);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--primary);
    color: var(--white);
    transform: rotate(90deg);
}

.modal-body h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--dark);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-body h2 i {
    color: var(--primary);
}

.modal-body p {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 25px;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: var(--font);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s ease;
}

.modal-body input:focus {
    border-color: var(--primary);
}

.modal-body .btn-block {
    width: 100%;
    justify-content: center;
    padding: 14px;
}

.modal-body .form-success {
    display: none;
    background: #FFF7DF;
    border: 1px solid #F3DEA0;
    color: #73510A;
    padding: 16px 20px;
    border-radius: 10px;
    margin-top: 20px;
    align-items: center;
    gap: 12px;
}

.modal-body .form-success.show {
    display: flex;
}

.modal-body .form-success i {
    font-size: 1.5rem;
    color: #F6C744;
}

.modal-body .form-success p {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .calculator-wrapper {
        grid-template-columns: 1fr;
    }

    .calc-sidebar {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .calc-hero {
        padding: 120px 0 60px;
        min-height: 350px;
    }

    .calc-hero h1 {
        font-size: 2.2rem;
    }

    .calc-hero p {
        font-size: 1rem;
    }

    .calc-progress {
        padding: 20px;
    }

    .progress-steps {
        gap: 5px;
    }

    .step-label {
        font-size: 0.75rem;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }

    .calc-form-container {
        padding: 25px;
    }

    .step-header h2 {
        font-size: 1.4rem;
    }

    .option-grid {
        grid-template-columns: 1fr;
    }

    .quality-card .option-content {
        flex-direction: column;
        text-align: center;
    }

    .result-amount #totalCost {
        font-size: 2.5rem;
    }

    .result-actions {
        flex-direction: column;
    }

    .result-actions .btn {
        min-width: auto;
    }

    .calc-sidebar {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .calculator-section {
        padding: 40px 0;
    }

    .step-header h2 {
        font-size: 1.2rem;
    }

    .step-actions {
        flex-direction: column;
    }

    .step-actions .btn {
        width: 100%;
    }

    .result-container {
        padding: 25px;
    }
}