/* التصميم الرئيسي */
.svc-calculator-container {
    max-width: 900px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 25px;
    padding: 40px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(15px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    direction: rtl;
    font-family: 'Segoe UI', 'Cairo', 'Tahoma', sans-serif;
    line-height: 1.6;
}

.svc-header h1 {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 800;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.svc-header p {
    color: #666;
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-align: center;
}

.svc-flags-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.svc-flag-item {
    font-size: 1.5rem;
    padding: 5px;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.svc-flag-item:hover {
    transform: scale(1.2);
}

.svc-country-selector {
    margin-bottom: 35px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 25px;
    border-radius: 20px;
    color: white;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.svc-country-selector h2 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.4rem;
    font-weight: 600;
}

.svc-country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.svc-country-option {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.svc-country-option:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.svc-country-option.selected {
    background: rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
}

.svc-country-flag {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
}

.svc-country-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.svc-country-currency {
    font-size: 0.9rem;
    opacity: 0.9;
}

.svc-exchange-display {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(78, 205, 196, 0.3);
}

.svc-rate-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.svc-rate-display {
    font-size: 1.3rem;
    font-weight: bold;
}

.svc-rate-input-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.svc-rate-input {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 12px 15px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: bold;
    width: 120px;
}

.svc-rate-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.6);
}

.svc-exchange-controls {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.svc-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: svc-spin 1s ease-in-out infinite;
}

@keyframes svc-spin {
    to { transform: rotate(360deg); }
}

.svc-fees-info {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 3px solid #dee2e6;
    border-radius: 18px;
    padding: 25px;
    margin-bottom: 30px;
    position: relative;
}

.svc-fees-info h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3rem;
    text-align: center;
}

.svc-fee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.svc-fee-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.svc-fee-card:hover {
    transform: translateY(-5px);
}

.svc-fee-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.svc-fee-category {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.svc-fee-amount {
    color: #e74c3c;
    font-weight: bold;
    font-size: 1.2rem;
}

/* خيار رسوم الخدمة */
.svc-service-fees-option {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 25px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    gap: 15px;
}

.svc-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.svc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.svc-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.svc-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .svc-slider {
    background-color: #4ecdc4;
}

input:checked + .svc-slider:before {
    transform: translateX(26px);
}

.svc-switch-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

/* معلومات رسوم الخدمة */
.svc-service-fees-info {
    background: linear-gradient(135deg, #e8f4fd, #d1ecf1);
    border: 2px solid #bee5eb;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.svc-info-box h4 {
    color: #0c5460;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.svc-info-box p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.svc-note {
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
}

/* مساحات الإعلانات */
.svc-ad-space {
    min-height: 90px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 35px 0;
    border-radius: 15px;
    color: #6c757d;
    font-size: 1rem;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.svc-ad-space ins {
    background: transparent !important;
    border: none !important;
    display: block !important;
}

.svc-ad-space iframe {
    max-width: 100%;
    border: none;
}

.svc-ad-space .adsbygoogle {
    display: block;
    width: 100%;
    height: auto;
    min-height: 50px;
}

.svc-ad-space-1 {
    min-height: 90px;
}

.svc-ad-space-2 {
    min-height: 280px;
}

.svc-ad-space-3 {
    min-height: 90px;
}

.svc-applicants-section {
    margin-bottom: 35px;
}

.svc-section-title {
    color: #2c3e50;
    font-size: 1.4rem;
    margin-bottom: 25px;
    font-weight: 700;
    text-align: center;
    position: relative;
}

.svc-section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #ff6b6b, #4ecdc4);
    border-radius: 2px;
}

.svc-applicants-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.svc-applicant-card {
    background: linear-gradient(135deg, #fff, #f8f9fa);
    border: 3px solid #e9ecef;
    border-radius: 20px;
    padding: 25px;
    text-align: center;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.svc-applicant-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s ease;
}

.svc-applicant-card:hover::before {
    left: 100%;
}

.svc-applicant-card:hover {
    border-color: #667eea;
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.2);
}

.svc-card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

.svc-card-title {
    color: #2c3e50;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.svc-card-subtitle {
    color: #7f8c8d;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.svc-card-input {
    width: 100%;
    padding: 15px;
    border: 3px solid #e9ecef;
    border-radius: 12px;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    background: white;
}

.svc-card-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: scale(1.05);
}

.svc-calculate-button {
    width: 100%;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 20px;
    border-radius: 15px;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 8px 25px rgba(238, 90, 36, 0.3);
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

.svc-calculate-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transition: all 0.4s ease;
    transform: translate(-50%, -50%);
}

.svc-calculate-button:hover::before {
    width: 300px;
    height: 300px;
}

.svc-calculate-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(238, 90, 36, 0.4);
}

.svc-results-section {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border: 4px solid #4ecdc4;
    border-radius: 20px;
    padding: 35px;
    display: none;
    position: relative;
    margin-bottom: 40px;
}

.svc-results-section::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 8px 15px;
    border-radius: 50%;
    font-size: 1.5rem;
    border: 4px solid #4ecdc4;
}

.svc-results-section.show {
    display: block;
    animation: svc-slideInUp 0.8s ease-out;
}

@keyframes svc-slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.svc-results-title {
    text-align: center;
    color: #2c3e50;
    font-size: 1.6rem;
    margin-bottom: 30px;
    font-weight: 700;
}

.svc-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    margin-bottom: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.svc-result-row:hover {
    transform: translateX(10px);
}

.svc-result-row:last-child {
    background: linear-gradient(135deg, #4ecdc4, #44a08d);
    color: white;
    font-weight: bold;
    font-size: 1.3rem;
    margin-top: 25px;
}

.svc-result-label {
    font-weight: 600;
}

.svc-result-value {
    font-weight: bold;
    color: #e74c3c;
}

.svc-result-row:last-child .svc-result-value {
    color: white;
    font-size: 1.4rem;
}

.svc-currency-display {
    text-align: left;
}

.svc-eur-amount {
    font-size: 0.9rem;
    opacity: 0.8;
}

.svc-local-amount {
    font-size: 1.2rem;
    font-weight: bold;
}

.svc-tips-section {
    background: linear-gradient(135deg, #ffeaa7, #fdcb6e);
    padding: 25px;
    border-radius: 18px;
    border: 3px solid #fdcb6e;
}

.svc-tips-section h3 {
    color: #2d3436;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.3rem;
}

.svc-tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.svc-tip-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.svc-tip-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.svc-tip-card h4 {
    color: #2d3436;
    margin-bottom: 10px;
    font-weight: 600;
}

.svc-tip-card p {
    color: #636e72;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* تصميم متجاوب */
@media (max-width: 768px) {
    .svc-calculator-container {
        padding: 25px;
        margin: 10px;
    }
    
    .svc-header h1 {
        font-size: 2rem;
    }
    
    .svc-country-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .svc-applicants-grid {
        grid-template-columns: 1fr;
    }
    
    .svc-rate-info {
        flex-direction: column;
        text-align: center;
    }
    
    .svc-result-row {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .svc-ad-space {
        margin: 20px 0;
        min-height: 250px;
    }
    
    .svc-ad-space-1,
    .svc-ad-space-3 {
        min-height: 250px;
    }
    
    .svc-service-fees-option {
        flex-direction: column;
        gap: 10px;
    }
}

/* إخفاء الإعلانات عند الطباعة */
@media print {
    .svc-ad-space {
        display: none !important;
    }
}

/* تحسينات الأداء - إخفاء الإعلانات الفارغة */
.svc-ad-space:empty {
    display: none;
}

/* رسالة مساعدة عند عدم وجود إعلانات */
.svc-ad-space > div:not(:empty) {
    padding: 20px;
    font-style: italic;
    opacity: 0.7;
}