/* ==========================================================================
   USERS.CSS · fully blended with REHABACE design system
   Layout unchanged · Colors, animations & interactions from home.css
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CSS VARIABLES (inherits from home.css)
   -------------------------------------------------------------------------- */
:root {
    /* Using home.css variables with fallbacks */
    --primary: var(--primary-color, #009688);
    --primary-dark: var(--primary-dark, #00796b);
    --accent: #e74c3c;
    --dark: var(--text-main, #333333);
    --light: var(--secondary-color, #f4f6f8);
    --text: var(--text-body, #2c3e50);
    --border: var(--border-color, #e0e0e0);
    --shadow: var(--shadow-sm, 0 12px 28px rgba(0,0,0,0.05));
    --card-bg: var(#ffffff);
    --radius: var(--radius-card, 20px);
    --radius-btn: var(--radius-btn, 40px);
    --transition: var(--transition, all 0.25s ease);
    --transition-bounce: var(--transition-bounce, cubic-bezier(0.68, -0.55, 0.27, 1.55));
}

[data-theme="dark"] {
    --primary: var(--primary-color, #26a69a);
    --primary-dark: var(--primary-dark, #00897b);
    --light: var(--secondary-color, #1e1e1e);
    --dark: var(--text-main, #e0e0e0);
    --text: var(--text-body, #d1d1d1);
    --border: var(--border-color, #333333);
    --card-bg: var(#1e1e1e);
    --shadow: var(--shadow-sm, 0 12px 28px rgba(0,0,0,0.5));
}

/* --------------------------------------------------------------------------
   2. RESET & BASE STYLES
   -------------------------------------------------------------------------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--light);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    padding-top: 70px; /* match home.css fixed header height */
    transition: background 0.3s, color 0.3s;
    word-wrap: break-word;
    overflow-wrap: break-word;
}


body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}


/* --------------------------------------------------------------------------
   3. MAIN CONTAINER
   -------------------------------------------------------------------------- */
.user-profile-container {
    max-width: 1280px;
    margin: 3rem auto;
    padding: 2rem;
    display: grid;
    gap: 3rem;
    width: 100%;
    overflow-x: hidden;
    /* Add this to ensure no horizontal overflow */
    box-sizing: border-box;
}

/* Add this to ensure all child elements respect container width */
.user-profile-container > * {
    max-width: 100%;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   4. PROFILE HEADER CARD
   -------------------------------------------------------------------------- */
.profile-header {
    text-align: center;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    position: relative;
    border: 1px solid var(--border);
    transition: var(--transition);
    overflow: hidden;
}

.profile-header:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md, 0 20px 40px rgba(0,150,136,0.15));
}

/* Decorative hover effect (matching home.css section::after) */
.profile-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    transform: scaleX(0);
    transition: transform 0.6s var(--transition-bounce);
    pointer-events: none;
}

.profile-header:hover::after {
    transform: scaleX(1);
}

.profile-image-container {
    width: 250px;
    height: 250px;
    margin: 0 auto 1.5rem;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s var(--transition-bounce);
}

.profile-image-container:hover {
    transform: scale(1.02);
}

.profile-image {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--light);
    box-shadow: var(--shadow);
    transition: var(--transition);
    filter: brightness(1);
}

.profile-image:hover {
    opacity: 0.9;
    filter: brightness(1.05);
}

.online-status {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 20px;
    height: 20px;
    background: #2ecc71;
    border: 3px solid var(--card-bg);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(46, 204, 113, 0); }
    100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.user-name {
    font-size: 2rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.user-title {
    color: var(--text-muted, #666666);
    margin-bottom: 1.5rem;
    font-weight: 300;
}

/* --------------------------------------------------------------------------
   5. CONTACT ICONS
   -------------------------------------------------------------------------- */
.contact-icons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.contact-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border: 2px solid transparent;
    font-size: 1.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

/* Ripple effect (matching home.css .btn-primary) */
.contact-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}

.contact-icon:hover::after {
    width: 100px;
    height: 100px;
}

.contact-icon:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.whatsapp { 
    background: #25d366; 
    color: white; 
}
.whatsapp:hover { 
    background: #25d366; 
    color: white; 
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
}

.email { 
    background: var(--primary); 
    color: white; 
}
.email:hover { 
    background: var(--primary-dark); 
    color: white; 
}

.phone { 
    background: #e74c3c; 
    color: white; 
}
.phone:hover { 
    background: #c0392b; 
    color: white; 
    box-shadow: 0 10px 20px rgba(231, 76, 60, 0.3);
}

/* --------------------------------------------------------------------------
   6. PROFILE DETAILS CARDS
   -------------------------------------------------------------------------- */
.profile-details {
    display: grid;
    gap: 2rem;
}

.detail-card {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.detail-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

/* Card decoration (matching home.css section::after) */
.detail-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    transform: scaleX(0);
    transition: transform 0.6s var(--transition-bounce);
    pointer-events: none;
}

.detail-card:hover::after {
    transform: scaleX(1);
}

.section-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 60px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

/* --------------------------------------------------------------------------
   7. INFO ITEMS
   -------------------------------------------------------------------------- */
.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.info-item:last-child {
    border-bottom: none;
}

.info-item:hover {
    background: rgba(0,150,136,0.02);
    padding-left: 0.5rem;
    border-radius: 8px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary);
    min-width: 40px;
    transition: var(--transition);
}

.info-item:hover i {
    transform: scale(1.1);
}

.info-label {
    color: var(--text-muted, #666666);
    font-size: 0.9rem;
}

.info-value {
    font-weight: 500;
    margin-top: 0.25rem;
    color: var(--text);
    overflow-wrap: break-word;
    word-break: break-word;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

/* --------------------------------------------------------------------------
   8. BIO SECTION
   -------------------------------------------------------------------------- */
.bio-section {
    background: var(--light);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-top: 2rem;
    border: 1px solid var(--border);
}

.bio-section h3 {
    color: var(--dark);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.bio-text {
    line-height: 1.8;
    color: var(--text);
    overflow-wrap: break-word;
    word-break: break-word;
}

/* --------------------------------------------------------------------------
   9. CV SECTION
   -------------------------------------------------------------------------- */
.cv-section {
    background: linear-gradient(135deg, var(--light), var(--card-bg));
    border-left: 5px solid var(--primary);
}

.cv-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 2px dashed var(--border);
    transition: var(--transition);
}

.cv-info:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.cv-info i {
    font-size: 3.5rem;
    color: #e74c3c;
    transition: var(--transition);
}

.cv-info:hover i {
    transform: scale(1.1);
}

.cv-details h3 {
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 1.3rem;
}

.cv-meta {
    color: var(--text-muted, #666666);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Download button (matching home.css .btn-primary) */
.cv-download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-btn);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,150,136,0.25);
}

.cv-download-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(0,150,136,0.35);
}

.cv-download-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}

.cv-download-btn:hover::after {
    width: 300px;
    height: 300px;
}



/* --------------------------------------------------------------------------
   11. RATING SECTION
   -------------------------------------------------------------------------- */
.rating-section {
    max-width: 1280px;
    margin: 0 auto 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: var(--transition);
}

.rating-section:hover {
    box-shadow: var(--shadow-md);
}

.stars {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    justify-content: center;
}

.bx-star {
    font-size: 2rem;
    color: var(--border);
    cursor: pointer;
    transition: var(--transition);
}

.bx-star:hover {
    transform: scale(1.2);
    color: #f1c40f;
}

.bx-star.active {
    color: #f1c40f;
    animation: starPulse 0.3s ease;
}

@keyframes starPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

#rating-comment {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius-btn);
    margin-bottom: 1rem;
    resize: vertical;
    background: var(--card-bg);
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    transition: var(--transition);
}

#rating-comment:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,150,136,0.1);
    transform: scale(1.01);
}

#submit-rating {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-btn);
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 16px rgba(0,150,136,0.25);
}

#submit-rating:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 15px 25px rgba(0,150,136,0.35);
}

#submit-rating::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}

#submit-rating:hover::after {
    width: 300px;
    height: 300px;
}

/* --------------------------------------------------------------------------
   12. SETTINGS BUTTON
   -------------------------------------------------------------------------- */
.settings-section {
    max-width: 1280px;
    margin: 0 auto 2rem;
    padding: 1rem;
    display: none;
}

.settings-btn {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: center;
    gap: 0.75rem;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}

.settings-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(0,150,136,0.35);
}

.settings-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}

.settings-btn:hover::after {
    width: 400px;
    height: 400px;
}

/* --------------------------------------------------------------------------
   13. PROFILE FOOTER
   -------------------------------------------------------------------------- */
.profile-footer {
    max-width: 1280px;
    margin: 0 auto 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.profile-views {
    display: flex;
    align-items: center;
    color: var(--text-muted, #666666);
    font-size: 1rem;
    gap: 0.5rem;
}

.profile-views i {
    font-size: 1.5rem;
    color: var(--primary);
    animation: pulse 2s infinite;
}

#view-count {
    font-weight: bold;
    color: var(--primary);
}

.logout-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: var(--radius-btn);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.logout-btn:hover {
    background: #c0392b;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(231, 76, 60, 0.3);
}

.logout-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}

.logout-btn:hover::after {
    width: 300px;
    height: 300px;
}

/* --------------------------------------------------------------------------
   14. MODAL STYLES (matching home.css modal)
   -------------------------------------------------------------------------- */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--card-bg);
    margin: 5% auto;
    padding: 30px;
    border-radius: var(--radius);
    width: 90%;
    max-width: 700px;
    position: relative;
    box-shadow: var(--shadow-lg, 0 25px 50px -12px rgba(0,0,0,0.25));
    border: 1px solid var(--border);
    animation: slideUp 0.4s var(--transition-bounce);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: var(--text-muted, #666666);
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close:hover {
    color: #e74c3c;
    transform: rotate(90deg);
    background: rgba(231, 76, 60, 0.1);
}

/* Image Preview */
.image-preview-container {
    text-align: center;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--light);
    border-radius: var(--radius);
    border: 2px dashed var(--border);
    transition: var(--transition);
}

.image-preview-container:hover {
    border-color: var(--primary);
}

.image-preview {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--card-bg);
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.image-preview:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.image-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.image-action-btn {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-btn);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
    font-weight: 600;
    border: 2px solid transparent;
}

.image-action-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: var(--radius-btn);
    font-size: 16px;
    font-family: 'Poppins', sans-serif;
    background: var(--card-bg);
    color: var(--text);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,150,136,0.1);
    transform: scale(1.01);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
    border-radius: 20px;
}

/* CV Upload Section */
.cv-upload-section {
    background: var(--light);
    padding: 1.5rem;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    border: 2px dashed var(--border);
    transition: var(--transition);
}

.cv-upload-section:hover {
    border-color: var(--primary);
}

.cv-upload-section h4 {
    color: var(--dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cv-preview-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: 12px;
    margin: 1rem 0;
    border: 1px solid var(--border);
}

.cv-preview-info i {
    font-size: 3rem;
    color: #e74c3c;
}

.cv-view-btn,
.cv-remove-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-btn);
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.cv-view-btn {
    background: var(--primary);
    color: white;
    text-decoration: none;
    display: inline-block;
    margin-right: 0.5rem;
}

.cv-view-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.cv-remove-btn {
    background: #e74c3c;
    color: white;
}

.cv-remove-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* Save Profile Button */
#save-profile-btn {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-btn);
    padding: 14px 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    margin-top: 15px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.3);
    box-shadow: 0 8px 16px rgba(0,150,136,0.25);
}

#save-profile-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 25px rgba(0,150,136,0.35);
}

#save-profile-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    pointer-events: none;
}

#save-profile-btn:hover::after {
    width: 400px;
    height: 400px;
}

/* Messages */
.error-message {
    color: #e74c3c;
    margin-top: 10px;
    font-size: 14px;
    padding: 10px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
    text-align: center;
}

.success-message {
    color: #2ecc71;
    margin-top: 10px;
    font-size: 16px;
    text-align: center;
    padding: 10px;
    background: rgba(46, 204, 113, 0.1);
    border-radius: 8px;
}

/* Upload Progress */
.upload-progress {
    margin-top: 10px;
    background-color: var(--border);
    border-radius: 8px;
    padding: 10px;
}

.progress-bar {
    height: 8px;
    background-color: var(--primary);
    width: 0%;
    border-radius: 4px;
    margin-bottom: 5px;
    transition: width 0.3s;
}

.progress-text {
    font-size: 14px;
    color: var(--text-muted, #666666);
}

/* --------------------------------------------------------------------------
   15. ANIMATION CLASSES (from home.css)
   -------------------------------------------------------------------------- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* --------------------------------------------------------------------------
   16. MEDIA QUERIES (matching home.css breakpoints)
   -------------------------------------------------------------------------- */

/* Small tablets and up */
@media (min-width: 480px) {
    .user-profile-container {
        padding: 2rem;
    }
    
    .profile-image-container {
        width: 200px;
        height: 200px;
    }
}

/* Tablets (768px and up) */
@media (min-width: 768px) {
    .user-profile-container {
        padding: 2rem;
    }
    
    .profile-header {
        padding: 2.5rem;
    }
    
    .user-name {
        font-size: 2.2rem;
    }
    
    .user-title {
        font-size: 1.1rem;
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .bio-text {
        font-size: 1.1rem;
    }
}

/* Large tablets & small desktops (992px) */
@media (min-width: 992px) {
    .user-profile-container {
        padding: 2.5rem;
    }
    
    .profile-header {
        padding: 3rem;
    }
    
    .user-name {
        font-size: 2.5rem;
    }
}

/* Desktops (1024px and up) */
@media (min-width: 1024px) {
    .user-profile-container {
        grid-template-columns: 350px 1fr;
        align-items: start;
        padding: 3rem;
    }
    
    .profile-header {
        position: sticky;
        top: 90px;
    }
    
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile-specific overrides (767px and down) */
@media (max-width: 767px) {
    body {
        padding-top: 70px;
    }
    
    .user-profile-container {
        padding: 1rem;
        margin: 1rem;
        margin-top: 0;
        gap: 1.5rem;
    }
    
    .profile-header {
        padding: 1.5rem;
    }
    
    .profile-image-container {
        width: 150px;
        height: 150px;
    }
    
    .online-status {
        bottom: 10px;
        right: 10px;
        width: 16px;
        height: 16px;
    }
    
    .user-name {
        font-size: 1.5rem;
    }
    
    .contact-icons {
        gap: 0.8rem;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .edit-profile-icon {
        top: 1rem;
        right: 1rem;
        padding: 0.5rem;
    }
    
    .rating-section {
        margin: 1rem;
        padding: 1rem;
    }
    
    .stars {
        gap: 0.3rem;
    }
    
    .bx-star {
        font-size: 1.5rem;
    }
    
    .profile-footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        margin: 1rem;
    }
    
    .logout-btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .image-preview {
        width: 150px;
        height: 150px;
    }
    
    .cv-info {
        flex-direction: column;
        text-align: center;
    }
    
    .info-item {
        flex-wrap: wrap;
    }
    
    .info-item i {
        min-width: 30px;
        font-size: 1.2rem;
    }
}

/* Small mobile devices (480px and down) */
@media (max-width: 480px) {
    .user-profile-container {
        padding: 0.75rem;
        margin: 0.5rem;
        gap: 1rem;
    }
    
    .profile-header,
    .detail-card {
        padding: 1.25rem;
        border-radius: 16px;
    }
    
    .profile-image-container {
        width: 130px;
        height: 130px;
    }
    
    .user-name {
        font-size: 1.3rem;
    }
    
    .user-title {
        font-size: 0.9rem;
    }
    
    .contact-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.2rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
    
    .info-item {
        padding: 0.75rem 0;
    }
    
    .info-item i {
        font-size: 1.1rem;
    }
    
    .info-label {
        font-size: 0.8rem;
    }
    
    .info-value {
        font-size: 0.9rem;
    }
    
    .bio-section {
        padding: 1rem;
    }
    
    .cv-info {
        padding: 1rem;
        gap: 1rem;
    }
    
    .cv-info i {
        font-size: 2.5rem;
    }
    
    .cv-details h3 {
        font-size: 1.1rem;
    }
    
    .cv-download-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .settings-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .modal-content {
        padding: 15px;
    }
    
    .image-preview {
        width: 120px;
        height: 120px;
    }
    
    .image-action-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    #save-profile-btn {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* Center profile style */
body.center-profile .profile-image-container .profile-image {
    border-radius: 20px;
}

body.center-profile .profile-image-container .online-status {
    bottom: 10px;
    right: 10px;
}

@media (min-width: 1200px) {
    body.center-profile .profile-image-container .profile-image {
        border-radius: 25px;
    }
}

/* Remove sticky on mobile */
@media (max-width: 1023px) {
    .profile-header {
        position: static !important;
    }
}

/* Smooth scrolling for anchor links */
html {
    scroll-padding-top: 80px;
    scroll-behavior: smooth;
}


/* Ensure the container doesn't exceed viewport width */
.container, 
.user-profile-container,
.profile-header,
.detail-card {
    max-width: 100%;
    box-sizing: border-box;
}

/* Fix for potential padding causing overflow */
@media (max-width: 768px) {
    .user-profile-container {
        padding: 1rem;
        margin: 1rem;
        width: calc(100% - 2rem); /* Account for margin */
    }
}


/* Edit Profile Icon */
.edit-icon {
    
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    transition: all 0.3s var(--transition-bounce, cubic-bezier(0.68, -0.55, 0.27, 1.55));
    box-shadow: var(--shadow-sm, 0 12px 28px rgba(0,0,0,0.05));
    border: 2px solid rgba(255,255,255,0.3);
    z-index: 10;
}

.edit-icon i {
    font-size: 1.2rem;
}

.edit-icon:hover {
    background: var(--primary-dark, #00796b);
    transform: rotate(10deg) scale(1.1);
    box-shadow: var(--shadow-md, 0 20px 40px rgba(0,150,136,0.15));
}

/* Dark mode support */
[data-theme="dark"] .edit-profile-icon {
    background: var(--primary-color, #26a69a);
    border-color: rgba(255,255,255,0.1);
}

[data-theme="dark"] .edit-profile-icon:hover {
    background: var(--primary-dark, #00897b);
}