﻿
:root {
    --primary-color: #2E7D32;
    --primary-light: #4CAF50;
    --primary-dark: #1B5E20;
    --secondary-color: #C8E6C9;
    --light-color: #E8F5E9;
    --dark-color: #1B5E20;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: linear-gradient(135deg, #E8F5E9 0%, #C8E6C9 100%);
    color: var(--dark-color);
    line-height: 1.6;
}

.container_my {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.calculator-card {
    background-color: white;
    border-radius: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transform: translateY(0);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.1);
}

.calculator-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.calculator-header::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    transform: rotate(30deg);
}

.calculator-title {
    font-size: 2rem;
    margin-bottom: 10px;
    position: relative;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    color: #fff;
}

.calculator-subtitle {
    opacity: 0.9;
    font-weight: 300;
    position: relative;
    color: #fff;
    text-align: center !important
}

.calculator-body {
    padding: 35px;
}

.form-group {
    margin-bottom: 30px;
    position: relative;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 1.05rem;
}

input, select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
    background-color: #fafafa;
}

input:focus, select:focus {
    border-color: var(--primary-light);
    outline: none;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.2);
    background-color: white;
}

.btn {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    padding: 16px 28px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-top: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

.btn::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    opacity: 0;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(46, 125, 50, 0.4);
}


.btn span {
    position: relative;
    z-index: 1;
}

.result-container {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f5f5f5 0%, var(--secondary-color) 100%);
    border-radius: 12px;
    display: none;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
}

.result-title {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--dark-color);
    font-weight: 700;
    display: flex;
    align-items: center;
}

.result-title svg {
    margin-left: 10px;
}

.result-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-dark);
    text-align: center;
    margin: 20px 0;
    padding: 15px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.price-range {
    font-size: 0.95rem;
    color: #666;
    margin-top: 10px;
    padding: 10px;
    background-color: rgba(255,255,255,0.7);
    border-radius: 8px;
    text-align: center;
}

.result-footer {
    font-size: 0.9rem;
    text-align: center;
    opacity: 0.8;
    margin-top: 15px;
}

.service-options {
    margin-top: 15px;
}

.service-option {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.service-option:hover {
    border-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.2);
}

.service-option.selected {
    border-color: var(--primary-color);
    background-color: rgba(46, 125, 50, 0.05);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.2);
    position: relative;
}

.service-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-left: 15px;
    accent-color: var(--primary-color);
    cursor: pointer;
    visibility: visible !important;
    display: inline-block !important;
    opacity: 1 !important;
}

.service-option span {
    flex: 1;
    font-weight: 500;
}

.service-option small {
    font-size: 0.85rem;
    color: #666;
    display: block;
    margin-top: 5px;
}

/* Notification Style */
.notification {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background-color: #fff;
    padding: 18px 25px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-right: 5px solid var(--primary-color);
}

.notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.notification.hide {
    opacity: 0;
    transform: translateX(-50%) translateY(-100px);
}

.notification-icon {
    margin-left: 15px;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 700;
    margin-bottom: 5px;
}

.notification-message {
    font-size: 0.9rem;
    opacity: 0.8;
}

.progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background-color: rgba(46, 125, 50, 0.2);
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

.progress {
    height: 100%;
    width: 100%;
    background-color: var(--primary-color);
    animation: progress 3s linear forwards;
    transform-origin: left;
}

@keyframes progress {
    0% {
        transform: scaleX(1);
    }
    100% {
        transform: scaleX(0);
    }
}

/* Loading Spinner */
.spinner {
    display: none;
    width: 40px;
    height: 40px;
    margin: 20px auto;
    position: relative;
}

.spinner.show {
    display: block;
}

.spinner div {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: spinner 1.2s linear infinite;
}

.spinner div:nth-child(1) {
    animation-delay: 0s;
    top: 20px;
    left: 0;
}

.spinner div:nth-child(2) {
    animation-delay: -0.1s;
    top: 14px;
    left: 14px;
}

.spinner div:nth-child(3) {
    animation-delay: -0.2s;
    top: 0;
    left: 20px;
}

.spinner div:nth-child(4) {
    animation-delay: -0.3s;
    top: -14px;
    left: 14px;
}

.spinner div:nth-child(5) {
    animation-delay: -0.4s;
    top: -20px;
    left: 0;
}

.spinner div:nth-child(6) {
    animation-delay: -0.5s;
    top: -14px;
    left: -14px;
}

.spinner div:nth-child(7) {
    animation-delay: -0.6s;
    top: 0;
    left: -20px;
}

.spinner div:nth-child(8) {
    animation-delay: -0.7s;
    top: 14px;
    left: -14px;
}

@keyframes spinner {
    0%, 20%, 80%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.5);
    }
}

/* استایل کلی مودال */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    direction: rtl;
    backdrop-filter: blur(5px);
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.modal_my {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 500px;
    overflow: hidden;
}

/* هدر مودال */
.modal-header {
    padding: 20px;
    background-color: #2c7d59;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .modal-header h3 {
        margin: 0;
        font-size: 1.3rem;
        font-weight: 600;
    }

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    line-height: 1;
    padding: 0 10px;
}

/* بدنه مودال */
.modal-body {
    padding: 20px;
    color: #333;
}

    .modal-body p {
        margin-bottom: 20px;
        line-height: 1.6;
    }

.form-group {
    margin-bottom: 20px;
}

    .form-group input {
        width: 100%;
        padding: 12px 15px;
        border: 1px solid #ddd;
        border-radius: 6px;
        font-size: 1rem;
        transition: border-color 0.3s;
    }

        .form-group input:focus {
            outline: none;
            border-color: #2c7d59;
        }

/* فوتر مودال */
.modal-footer {
    padding: 15px 20px;
    background-color: #f9f9f9;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
}

.btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

    .btn.secondary {
        background-color: #e0e0e0;
        color: #333;
    }

        .btn.secondary:hover {
            background-color: #d0d0d0;
        }

.btn {
    background-color: #2c7d59;
    color: white;
}

    .btn:hover {
        background-color: #236749;
    }

/* انیمیشن */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate__animated {
    animation-duration: 0.4s;
}

.animate__fadeInUp {
    animation-name: fadeInUp;
}

/* رسپانسیو */
@media (max-width: 576px) {
    .modal_my {
        width: 95%;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
} 

.btn.secondary {
    background: #e0e0e0;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .calculator-body {
        padding: 25px;
    }

    .result-value {
        font-size: 1.5rem;
    }

    .service-option {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .container_my {
        padding: 0 10px;
        margin: 20px auto;
    }

    .calculator-header {
        padding: 20px 15px;
    }

    .calculator-title {
        font-size: 1.6rem;
    }
}