/* ==========================================
   Calculator Section (حاسبة التكاليف)
   ========================================== */

.calculator-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
}

/* Header */
.calculator-section__header {
    text-align: center;
    margin-bottom: 60px;
}

.calculator-section__title {
    font-size: 42px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    position: relative;
    display: inline-block;
}

.calculator-section__title::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-red);
    border-radius: 2px;
}

.calculator-section__subtitle {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 24px 0 0 0;
}

/* Main Content */
.calculator-content {
    max-width: 1400px;
    margin: 0 auto;
    gap: 32px !important;
    align-items: stretch;
}

/* ==========================================
   Left Column: Map Card
   ========================================== */

.map-card {
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow-lg);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.map-card__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 24px 0;
    text-align: center;
}

/* Map Container */
.map-container {
    flex: 1;
    background: #f3f4f6;
    border-radius: 12px;
    margin-bottom: 24px;
    position: relative;
    min-height: 350px;
    overflow: hidden;
}

.map-placeholder {
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 40% 30%, rgba(239, 68, 68, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 60% 70%, rgba(59, 130, 246, 0.2) 0%, transparent 50%),
        linear-gradient(180deg, #f3f4f6 0%, #e5e7eb 100%);
    position: relative;
}

/* Map Dots (pins) */
.map-placeholder::before,
.map-placeholder::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--primary-red);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

.map-placeholder::before {
    top: 30%;
    left: 40%;
}

.map-placeholder::after {
    top: 65%;
    left: 55%;
    animation-delay: 0.5s;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.3);
    }

    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0.1);
    }
}

/* Map Stats */
.map-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 0;
}

.map-stat {
    background: #f9fafb;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-light);
    transition: var(--transition-base);
}

.map-stat:hover {
    background: #fff;
    border-color: var(--primary-red-light);
    transform: translateY(-2px);
}

.map-stat__value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-red);
    margin: 0 0 4px 0;
    line-height: 1;
}

.map-stat__label {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

/* ==========================================
   Right Column: Calculator Form
   ========================================== */

.calculator-form-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-lg);
    height: 100%;
}

.calculator-form-card__title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 32px 0;
    text-align: center;
}

/* Form Styling */
.cost-calculator-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-field label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
}

.form-field select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Cairo', sans-serif;
    background: #fff;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition-base);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 16px center;
    padding-left: 40px;
}

.form-field select:hover {
    border-color: var(--primary-red-light);
}

.form-field select:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Calculator Result */
.calculator-result {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    padding: 32px;
    border-radius: 16px;
    text-align: center;
    margin-top: 8px;
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.result-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    font-weight: 500;
}

.result-value {
    font-size: 48px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 12px;
    line-height: 1;
}

.result-note {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* ==========================================
   Responsive
   ========================================== */

@media (max-width: 1024px) {
    .calculator-content {
        flex-direction: column;
    }

    .calculator-map-column,
    .calculator-form-column {
        flex-basis: 100% !important;
    }
}

@media (max-width: 768px) {
    .calculator-section {
        padding: 60px 20px;
    }

    .calculator-section__title {
        font-size: 32px;
    }

    .map-card,
    .calculator-form-card {
        padding: 24px;
    }

    .map-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .map-stat {
        padding: 16px;
    }

    .map-stat__value {
        font-size: 28px;
    }

    .map-stat__label {
        font-size: 12px;
    }

    .result-value {
        font-size: 40px;
    }
}

@media (max-width: 480px) {

    .map-card,
    .calculator-form-card {
        padding: 20px;
    }

    .calculator-form-card__title {
        font-size: 20px;
    }

    .map-container {
        min-height: 250px;
    }

    .result-value {
        font-size: 36px;
    }
}