/* Professional Enhancements for Modern Clinic */

/* ===============================
   CALCULATOR TOOLS STYLES
   =============================== */

/* Calculator Form Cards */
.calculator-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(45, 170, 225, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-radius: 20px;
    padding: 50px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.calculator-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2DAAE1, #FFA726, #2DAAE1);
    background-size: 200% 100%;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.calculator-form {
    position: relative;
    z-index: 2;
}

/* Enhanced Form Controls */
.calculator-form .form-control {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 500;
    background-color: #ffffff;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #2c3e50;
}

.calculator-form .form-control:focus {
    border-color: #2DAAE1;
    box-shadow: 0 0 0 0.2rem rgba(45, 170, 225, 0.15);
    background-color: #f8f9ff;
    color: #2c3e50;
}

.calculator-form .form-control:hover {
    border-color: #2DAAE1;
    background-color: #f8f9ff;
}

/* Enhanced Select Controls */
.calculator-form .form-control[type="select"],
.calculator-form select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.calculator-form .form-control[type="select"]:focus,
.calculator-form select.form-control:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%232DAAE1' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
}

/* Form Labels */
.calculator-form .form-label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calculator-form .form-label i {
    color: #2DAAE1;
    font-size: 16px;
}

/* Enhanced Buttons */
.btn-modern-primary {
    background: linear-gradient(135deg, #2DAAE1, #1E6FA8);
    border: none;
    border-radius: 25px;
    padding: 18px 40px;
    font-weight: 600;
    font-size: 16px;
    color: white;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(45, 170, 225, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-modern-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45, 170, 225, 0.4);
    background: linear-gradient(135deg, #1E6FA8, #2DAAE1);
    color: white;
}

.btn-modern-primary:hover::before {
    left: 100%;
}

.btn-modern-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(45, 170, 225, 0.3);
}

/* Result Cards */
.result-card {
    background: linear-gradient(135deg, rgba(45, 170, 225, 0.1), rgba(255, 167, 38, 0.1));
    border: 1px solid rgba(45, 170, 225, 0.2);
    border-radius: 20px;
    padding: 40px;
    margin-top: 30px;
    position: relative;
    overflow: hidden;
}

.result-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2DAAE1, #FFA726);
}

.result-item {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid rgba(45, 170, 225, 0.1);
}

.result-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-color: rgba(45, 170, 225, 0.3);
}

/* BMI Categories */
.bmi-categories .bmi-range {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.bmi-categories .bmi-range:hover {
    background: white;
    border-color: #2DAAE1;
    transform: translateX(5px);
}

/* Info Sections */
.info-section {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(45, 170, 225, 0.1);
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    margin-top: 40px;
}

.info-item {
    padding: 25px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border-left: 4px solid #2DAAE1;
    transition: all 0.3s ease;
}

.info-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-left-color: #FFA726;
}

/* Responsive Improvements */
@media (max-width: 768px) {
    .calculator-card {
        padding: 30px 20px;
        margin: 10px;
    }

    .calculator-form .form-control {
        padding: 12px 15px;
        font-size: 14px;
    }

    .btn-modern-primary {
        padding: 15px 30px;
        font-size: 14px;
        width: 100%;
    }

    .result-card {
        padding: 25px 15px;
    }

    .result-item {
        padding: 20px 15px;
        margin-bottom: 15px;
    }

    .info-section {
        padding: 30px 20px;
    }

    .info-item {
        padding: 20px 15px;
        margin-bottom: 20px;
    }
}

/* Placeholder Improvements */
.calculator-form .form-control::placeholder {
    color: #6c757d;
    opacity: 0.8;
    font-weight: 400;
}

.calculator-form .form-control:focus::placeholder {
    color: #adb5bd;
    opacity: 0.6;
}

/* ===============================
   ADVANCED VISUAL EFFECTS
   =============================== */

/* Glass Morphism Effects */
.glass-card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.37);
}

/* Gradient Overlays */
.gradient-overlay {
    position: relative;
    overflow: hidden;
}

.gradient-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.gradient-overlay:hover::before {
    left: 100%;
}

/* Enhanced Buttons */
.btn-enhanced {
    position: relative;
    padding: 15px 30px;
    background: linear-gradient(135deg, #2DAAE1, #FFA726);
    border: none;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.btn-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.3s;
}

.btn-enhanced:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(45, 170, 225, 0.3);
    color: white;
    text-decoration: none;
}

.btn-enhanced:hover::before {
    left: 100%;
}

/* Enhanced Cards */
.enhanced-card {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.enhanced-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2DAAE1, #FFA726, #4CAF50);
    opacity: 0;
    transition: opacity 0.3s;
}

.enhanced-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

.enhanced-card:hover::before {
    opacity: 1;
}

/* Micro Interactions */
.icon-bounce {
    transition: transform 0.3s ease;
}

.icon-bounce:hover {
    transform: scale(1.2) rotate(10deg);
}

/* Text Gradient Effects */
.text-gradient {
    background: linear-gradient(135deg, #2DAAE1, #FFA726);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #2DAAE1, #FFA726);
    border-radius: 10px;
    transition: background 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #FFA726, #4CAF50);
}

/* ===============================
   LOADING ANIMATIONS
   =============================== */

.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ===============================
   PROGRESSIVE ENHANCEMENT
   =============================== */

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .enhanced-card {
        background: #1a1a1a;
        color: white;
    }
    
    .glass-card {
        background: rgba(0, 0, 0, 0.25);
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .btn-enhanced {
        background: #000;
        color: #fff;
        border: 2px solid #fff;
    }
    
    .enhanced-card {
        border: 2px solid #000;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===============================
   ENHANCED HERO SECTION
   =============================== */

.hero-enhanced {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(45, 170, 225, 0.1), rgba(255, 105, 180, 0.1));
    overflow: hidden;
}

.hero-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" patternUnits="userSpaceOnUse" width="100" height="100"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="1" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)" opacity="0.03"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.hero-floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float-random 6s ease-in-out infinite;
}

.floating-element:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.floating-element:nth-child(2) { top: 40%; right: 15%; animation-delay: 1s; }
.floating-element:nth-child(3) { bottom: 30%; left: 20%; animation-delay: 2s; }
.floating-element:nth-child(4) { bottom: 20%; right: 25%; animation-delay: 3s; }

@keyframes float-random {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-20px) rotate(90deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
    75% { transform: translateY(-30px) rotate(270deg); }
}

/* ===============================
   ENHANCED TYPOGRAPHY
   =============================== */

.enhanced-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;    
    background: linear-gradient(135deg, #2DAAE1, #43ACD9, #5B9BD5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
}

.enhanced-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    font-weight: 400;
    line-height: 1.6;
    color: rgba(0, 0, 0, 0.7);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* ===============================
   RESPONSIVE ENHANCEMENTS
   =============================== */

@media (max-width: 768px) {
    .enhanced-card {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .btn-enhanced {
        padding: 12px 24px;
        font-size: 14px;
    }
    
    .floating-element {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .enhanced-card {
        padding: 15px;
        border-radius: 15px;
    }
    
    .hero-enhanced {
        min-height: 80vh;
    }
}

/* ===============================
   ACCESSIBILITY ENHANCEMENTS
   =============================== */

.focus-visible {
    outline: 3px solid #2DAAE1;
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High Contrast Focus States */
@media (prefers-contrast: high) {
    .btn-enhanced:focus {
        outline: 3px solid yellow;
        outline-offset: 2px;
    }
}

/* ===============================
   PRINT STYLES
   =============================== */

@media print {
    .enhanced-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .btn-enhanced {
        background: #000 !important;
        color: #fff !important;
    }
    
    .floating-element {
        display: none;
    }

    /* غیرفعال کردن آیکون dropdown */
    .dropdown-toggle::after {
        display: none !important;
    }
}

