/*!
 * Maktab Alanal - Enhanced Profile Design
 * Version: 1.0.0
 */

/* =============================================================================
   PROFILE PAGE - ENHANCED DESIGN SYSTEM
   ============================================================================= */

:root {
    --profile-primary: #667eea;
    --profile-secondary: #764ba2;
    --profile-success: #28a745;
    --profile-warning: #ffc107;
    --profile-danger: #dc3545;
    --profile-info: #17a2b8;
    --profile-light: #f8f9fa;
    --profile-dark: #343a40;
    --profile-white: #ffffff;
    --profile-border: #e9ecef;
    --profile-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --profile-shadow-hover: 0 8px 30px rgba(102, 126, 234, 0.15);
    --profile-radius: 16px;
    --profile-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --profile-gradient: linear-gradient(135deg, var(--profile-primary) 0%, var(--profile-secondary) 100%);
    --profile-gradient-light: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

/* Base Profile Container */
.maktab-profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    padding-top: 40px;
    padding-bottom: 40px;
}

/* Profile Header */
.maktab-profile-header {
    background: var(--profile-gradient);
    color: var(--profile-white);
    border-radius: var(--profile-radius);
    padding: 40px;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--profile-shadow);
}

.maktab-profile-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.profile-header-content {
    display: flex;
    align-items: center;
    gap: 30px;
    position: relative;
    z-index: 2;
}

.profile-avatar-section {
    position: relative;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.3);
    object-fit: cover;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: var(--profile-transition);
}

.profile-avatar:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
}

.avatar-upload-btn {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    background: var(--profile-white);
    color: var(--profile-primary);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--profile-transition);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.avatar-upload-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

.profile-header-info h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.profile-header-info .user-role {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 15px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: inline-block;
}

.profile-header-stats {
    display: flex;
    gap: 30px;
    margin-top: 20px;
}

.profile-stat {
    text-align: center;
}

.profile-stat-number {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 5px;
}

.profile-stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Profile Navigation */
.maktab-profile-nav {
    background: var(--profile-white);
    border-radius: var(--profile-radius);
    box-shadow: var(--profile-shadow);
    padding: 0;
    margin-bottom: 30px;
    overflow: hidden;
}

.profile-nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-x: auto;
}

.profile-nav-item {
    flex-shrink: 0;
}

.profile-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 25px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    transition: var(--profile-transition);
    position: relative;
    white-space: nowrap;
}

.profile-nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--profile-gradient);
    transition: var(--profile-transition);
}

.profile-nav-link:hover,
.profile-nav-link.active {
    color: var(--profile-primary);
    background: var(--profile-gradient-light);
}

.profile-nav-link.active::before {
    width: 100%;
}

/* Profile Content */
.maktab-profile-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.profile-section {
    background: var(--profile-white);
    border-radius: var(--profile-radius);
    padding: 30px;
    box-shadow: var(--profile-shadow);
    transition: var(--profile-transition);
    position: relative;
    overflow: hidden;
}

.profile-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--profile-gradient);
    transform: scaleX(0);
    transition: var(--profile-transition);
    transform-origin: left;
}

.profile-section:hover::before {
    transform: scaleX(1);
}

.profile-section:hover {
    transform: translateY(-4px);
    box-shadow: var(--profile-shadow-hover);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--profile-light);
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--profile-dark);
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    color: var(--profile-primary);
    font-size: 1.2rem;
}

.section-actions {
    display: flex;
    gap: 10px;
}

/* Forms */
.maktab-profile-form {
    display: grid;
    gap: 25px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--profile-dark);
    font-size: 14px;
}

.form-label.required::after {
    content: ' *';
    color: var(--profile-danger);
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--profile-border);
    border-radius: 12px;
    font-size: 16px;
    transition: var(--profile-transition);
    background: var(--profile-white);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--profile-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-control:invalid {
    border-color: var(--profile-danger);
}

.form-control:invalid:focus {
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

.textarea-control {
    min-height: 120px;
    resize: vertical;
}

.select-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 12px;
    padding-right: 40px;
    cursor: pointer;
}

/* Buttons */
.profile-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--profile-transition);
    position: relative;
    overflow: hidden;
}

.profile-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.profile-btn:active::before {
    width: 300px;
    height: 300px;
}

.profile-btn-primary {
    background: var(--profile-gradient);
    color: var(--profile-white);
}

.profile-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    color: var(--profile-white);
}

.profile-btn-secondary {
    background: var(--profile-light);
    color: var(--profile-dark);
    border: 2px solid var(--profile-border);
}

.profile-btn-secondary:hover {
    background: var(--profile-border);
    transform: translateY(-1px);
}

.profile-btn-outline {
    background: transparent;
    color: var(--profile-primary);
    border: 2px solid var(--profile-primary);
}

.profile-btn-outline:hover {
    background: var(--profile-primary);
    color: var(--profile-white);
}

.profile-btn-danger {
    background: var(--profile-danger);
    color: var(--profile-white);
}

.profile-btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

/* Skills Section */
.skills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.skill-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--profile-gradient-light);
    color: var(--profile-primary);
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--profile-transition);
}

.skill-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.skill-remove {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    padding: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--profile-transition);
}

.skill-remove:hover {
    background: rgba(220, 53, 69, 0.1);
    color: var(--profile-danger);
}

.skill-input-group {
    display: flex;
    gap: 10px;
    align-items: flex-end;
}

.skill-input-group .form-control {
    flex: 1;
}

/* Progress Bars */
.progress-item {
    margin-bottom: 20px;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--profile-dark);
}

.progress-bar-container {
    height: 8px;
    background: var(--profile-light);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: var(--profile-gradient);
    border-radius: 4px;
    transition: width 1s ease-in-out;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Settings Toggle */
.settings-toggle {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.settings-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
    background: var(--profile-gradient);
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Notifications */
.profile-notification {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
}

.profile-notification.success {
    background: #d1f2eb;
    color: #155724;
    border-left: 4px solid var(--profile-success);
}

.profile-notification.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--profile-danger);
}

.profile-notification.info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid var(--profile-info);
}

.profile-notification.warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--profile-warning);
}

/* File Upload */
.file-upload-area {
    border: 2px dashed var(--profile-border);
    border-radius: 12px;
    padding: 40px 20px;
    text-align: center;
    transition: var(--profile-transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.file-upload-area:hover {
    border-color: var(--profile-primary);
    background: var(--profile-gradient-light);
}

.file-upload-area.drag-over {
    border-color: var(--profile-primary);
    background: var(--profile-gradient-light);
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    color: var(--profile-primary);
    margin-bottom: 15px;
}

.upload-text {
    font-size: 1.1rem;
    color: var(--profile-dark);
    margin-bottom: 5px;
}

.upload-hint {
    color: #666;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 992px) {
    .profile-header-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .profile-header-stats {
        justify-content: center;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .maktab-profile-container {
        padding: 0 15px;
        padding-top: 20px;
    }
    
    .maktab-profile-header {
        padding: 30px 20px;
    }
    
    .profile-header-info h1 {
        font-size: 2rem;
    }
    
    .profile-nav-list {
        flex-direction: column;
    }
    
    .profile-nav-link {
        padding: 15px 20px;
    }
    
    .profile-section {
        padding: 20px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .profile-header-stats {
        gap: 20px;
    }
    
    .skill-input-group {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .profile-avatar {
        width: 100px;
        height: 100px;
    }
    
    .profile-header-info h1 {
        font-size: 1.8rem;
    }
    
    .profile-header-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-control {
        padding: 12px 14px;
    }
    
    .profile-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* RTL Support */
[dir="rtl"] .profile-avatar-section .avatar-upload-btn {
    right: auto;
    left: 10px;
}

[dir="rtl"] .profile-nav-link::before {
    left: auto;
    right: 0;
}

[dir="rtl"] .select-control {
    background-position: left 12px center;
    padding-right: 16px;
    padding-left: 40px;
}

[dir="rtl"] .skill-input-group {
    direction: rtl;
}

/* Print Styles */
@media print {
    .maktab-profile-container {
        background: none;
        padding: 0;
    }
    
    .profile-section {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .section-actions,
    .profile-btn,
    .avatar-upload-btn {
        display: none;
    }
    
    .maktab-profile-nav {
        display: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --profile-white: #1a1a1a;
        --profile-light: #2d2d2d;
        --profile-border: #404040;
        --profile-dark: #ffffff;
    }
    
    .maktab-profile-container {
        background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    }
    
    .form-control {
        background: var(--profile-light);
        color: var(--profile-dark);
    }
    
    .profile-notification.success {
        background: #1f5f3f;
        color: #a3e6a3;
    }
    
    .profile-notification.error {
        background: #5f1f1f;
        color: #e6a3a3;
    }
    
    .profile-notification.info {
        background: #1f3f5f;
        color: #a3c7e6;
    }
    
    .profile-notification.warning {
        background: #5f4f1f;
        color: #e6d7a3;
    }
} 