/* Scuola Illustrata - Community Module Styles */

/* User Profile Card */
.si-user-profile-card {
    max-width: 1200px;
    margin: 40px auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Profile Header */
.si-profile-header {
    position: relative;
}

.si-profile-cover {
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.si-profile-main {
    position: relative;
    padding: 0 40px 30px;
    margin-top: -80px;
}

/* Avatar */
.si-profile-avatar-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.si-profile-avatar {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 6px solid #fff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    display: block;
}

.si-profile-level-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: 3px solid #fff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    box-sizing: border-box;
    padding: 0;
}

.si-level-number {
    font-size: 20px;
    font-weight: bold;
    color: #fff;
    line-height: 1;
    margin: 0;
    padding: 0;
}

/* Profile Info */
.si-profile-info {
    margin-bottom: 20px;
}

.si-profile-name {
    margin: 0 0 5px 0;
    font-size: 32px;
    font-weight: 700;
    color: #333;
}

.si-profile-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #667eea;
    font-weight: 500;
}

.si-profile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    color: #666;
    font-size: 14px;
}

.si-profile-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.si-profile-meta-item .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

.si-profile-public {
    color: #4CAF50;
}

.si-profile-private {
    color: #999;
}

/* Profile Actions */
.si-profile-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.si-profile-actions .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.si-profile-actions .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

/* Profile Body */
.si-profile-body {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    padding: 30px 40px;
}

/* Sidebar */
.si-profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Content */
.si-profile-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Profile Section */
.si-profile-section {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e0e0e0;
}

.si-profile-section h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    padding-bottom: 10px;
    border-bottom: 2px solid #667eea;
}

.si-profile-section h4 {
    margin: 0 0 12px 0;
    font-size: 16px;
    color: #555;
}

/* Bio */
.si-profile-bio {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

/* Social Links */
.si-profile-socials {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.si-social-link {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    border: 2px solid #e0e0e0;
    color: #666;
    transition: all 0.3s;
    text-decoration: none;
}

.si-social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.si-social-link .dashicons {
    width: 24px;
    height: 24px;
    font-size: 24px;
}

.si-social-facebook:hover {
    border-color: #1877f2;
    color: #1877f2;
    box-shadow: 0 4px 15px rgba(24, 119, 242, 0.4);
}

.si-social-twitter:hover {
    border-color: #1da1f2;
    color: #1da1f2;
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.4);
}

.si-social-instagram:hover {
    border-color: #e6683c;
    color: #e6683c;
    box-shadow: 0 4px 15px rgba(225, 48, 108, 0.4);
}

.si-social-linkedin:hover {
    border-color: #0077b5;
    color: #0077b5;
    box-shadow: 0 4px 15px rgba(0, 119, 181, 0.4);
}

/* Store Links */
.si-profile-stores {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.si-store-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 8px;
    background: #fff;
    border: 2px solid #e0e0e0;
    color: #333;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s;
}

.si-store-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.si-store-logo {
    max-width: 100%;
    max-height: 40px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.si-store-edudoro:hover {
    border-color: #FF6B35;
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.si-store-eduki:hover {
    border-color: #00B4D8;
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.4);
}

.si-store-freeed:hover {
    border-color: #2DC653;
    box-shadow: 0 4px 15px rgba(45, 198, 83, 0.4);
}

@media (max-width: 768px) {
    .si-profile-stores {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Stats */
.si-profile-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.si-profile-stat {
    text-align: center;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
}

.si-profile-stat strong {
    display: block;
    font-size: 28px;
    color: #667eea;
    margin-bottom: 5px;
}

.si-profile-stat span {
    font-size: 13px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Gamification Card */
.si-profile-gamification-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 25px;
    border-radius: 12px;
    color: #fff;
}

.si-profile-xp-info {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.si-profile-xp-circle {
    width: 100px;
    height: 100px;
    background: rgba(255,255,255,0.2);
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-sizing: border-box;
}

.si-xp-number {
    font-size: 24px;
    font-weight: bold;
    line-height: 1;
    display: block;
    position: relative;
}

.si-xp-number::after {
    content: 'XP';
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.7;
    margin-left: 3px;
    margin-top: 8px;
    vertical-align: super;
    position: absolute;
}

.si-profile-xp-text h4 {
    margin: 0 0 5px 0;
    font-size: 24px;
    color: #fff;
}

.si-profile-xp-text p {
    margin: 0;
    opacity: 0.9;
}

/* Badges */
.si-profile-badges {
    background: rgba(255,255,255,0.15);
    padding: 20px;
    border-radius: 8px;
}

.si-profile-badges h4 {
    color: #fff;
    margin-bottom: 15px;
}

.si-profile-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
}

.si-profile-badge {
    background: rgba(255,255,255,0.2);
    padding: 12px;
    border-radius: 8px;
    text-align: center;
    transition: all 0.2s;
}

.si-profile-badge:hover {
    background: rgba(255,255,255,0.3);
    transform: translateY(-2px);
}

.si-badge-icon {
    display: block;
    font-size: 36px;
    margin-bottom: 8px;
}

.si-badge-icon img.emoji {
    border-radius: 0;
}

.si-badge-name {
    display: block;
    font-size: 12px;
    font-weight: 500;
}

/* ==========================================================================
   Standalone Profile Sections (per Elementor)
   ========================================================================== */

/* Level Section (standalone) */
.si-profile-level-section {
    display: inline-flex;
    align-items: center;
}

.si-profile-level-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.si-profile-level-circle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: block;
    text-align: center;
    line-height: 60px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    box-sizing: border-box;
    flex-shrink: 0;
}

.si-profile-level-circle .si-level-number {
    font-size: 22px;
    width: 60px;
    height: 60px;
    font-weight: bold;
    color: #fff;
    line-height: inherit;
}

.si-profile-level-circle .si-level-number::before {
    content: 'Lv';
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    opacity: 0.7;
    margin-right: 2px;
    vertical-align: super;
    position: absolute;
    margin-left: -18px;
}


.si-profile-level-title {
    font-size: 16px;
    font-weight: 500;
    color: #667eea;
}

/* Member Since (standalone) */
.si-profile-member-since {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 14px;
}

.si-profile-member-since .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
    color: #999;
}

/* Visibility (standalone) */
.si-profile-visibility {
    display: inline-flex;
    align-items: center;
}

/* Edit Button (standalone) */
.si-profile-edit-button {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.si-profile-edit-button .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.si-profile-edit-button .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}

/* Shortcode alignment */
.shortcode-center {
    text-align: center;
}

/* Placeholder */
.si-profile-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-style: italic;
}

/* Private Profile */
.si-profile-private {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 12px;
    border: 2px dashed #ddd;
}

.si-profile-private p {
    font-size: 18px;
    color: #666;
    margin: 0;
}

/* Responsive */
@media (max-width: 992px) {
    .si-profile-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .si-profile-main {
        padding: 0 20px 20px;
        text-align: center;
    }
    
    .si-profile-avatar {
        width: 120px;
        height: 120px;
    }
    
    .si-profile-level-badge {
        width: 40px;
        height: 40px;
    }
    
    .si-level-number {
        font-size: 16px;
    }
    
    .si-profile-name {
        font-size: 24px;
    }
    
    .si-profile-meta {
        justify-content: center;
    }
    
    .si-profile-actions {
        justify-content: center;
    }
    
    .si-profile-body {
        padding: 20px;
    }
    
    .si-profile-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .si-profile-badges-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
    
    .si-profile-xp-info {
        flex-direction: column;
        text-align: center;
    }
}

/* Members Directory */
.si-members-directory {
    max-width: 1200px;
    margin: 0 auto;
}

.si-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.si-member-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s;
    position: relative;
}

.si-member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-color: #667eea;
}

.si-member-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin: 0 auto 15px;
    border: 3px solid #e0e0e0;
}

.si-member-name {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
}

.si-member-name a {
    color: #333;
    text-decoration: none;
}

.si-member-name a:hover {
    color: #667eea;
}

.si-member-title {
    color: #667eea;
    font-size: 14px;
    margin-bottom: 15px;
}

.si-member-stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    font-size: 13px;
    color: #666;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.si-member-stat {
    display: flex;
    flex-direction: column;
}

.si-member-stat strong {
    font-size: 18px;
    color: #333;
}

@media (max-width: 768px) {
    .si-members-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
