/**
 * Profile - Perfil Público de Usuario
 * @package Ubika
 */

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.profile-page {
    min-height: 100vh;
    background-color: var(--gray-50);
    padding-bottom: 3rem;
}

/* ==========================================================================
   HEADER
   ========================================================================== */

.profile-header {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.profile-header-bg {
    height: 100px;
    background-color: var(--primary-500);
}

@media (min-width: 768px) {
    .profile-header-bg {
        height: 120px;
    }
}

.profile-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-top: -50px;
    padding-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .profile-header-inner {
        flex-direction: row;
        align-items: flex-end;
        text-align: left;
        gap: 1.5rem;
        margin-top: -40px;
        padding-bottom: 1.5rem;
    }
}

/* Avatar */
.profile-avatar-wrapper {
    position: relative;
    flex-shrink: 0;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--primary-600);
    border: 4px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-level-badge {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 28px;
    height: 28px;
    background: var(--primary-500);
    border: 3px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}

.profile-level-badge--gold { background: var(--amber-500); }
.profile-level-badge--blue { background: var(--blue-500); }
.profile-level-badge--green { background: var(--green-500); }
.profile-level-badge--amber { background: var(--amber-500); }
.profile-level-badge--orange { background: var(--orange-500); }
.profile-level-badge--red { background: var(--red-500); }
.profile-level-badge--secondary { background: var(--secondary-500); color: var(--gray-800); }
.profile-level-badge--primary { background: var(--primary-500); }
.profile-level-badge--gray { background: var(--gray-500); }

/* Info */
.profile-info {
    flex: 1;
    min-width: 0;
    margin-top: 0.75rem;
}

@media (min-width: 768px) {
    .profile-info {
        margin-top: 0;
        padding-bottom: 0.25rem;
    }
}

.profile-name-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

@media (min-width: 768px) {
    .profile-name-row {
        justify-content: flex-start;
    }
}

.profile-name {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.profile-verified {
    color: var(--blue-500);
    font-size: 1.25rem;
}

.profile-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.375rem 0.75rem;
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

@media (min-width: 768px) {
    .profile-meta {
        justify-content: flex-start;
    }
}

.profile-level-title {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.1875rem 0.5rem;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.profile-level-title--gold { background: var(--amber-100); color: var(--amber-700); }
.profile-level-title--blue { background: var(--blue-100); color: var(--blue-700); }
.profile-level-title--green { background: var(--green-100); color: var(--green-700); }
.profile-level-title--amber { background: var(--amber-100); color: var(--amber-700); }
.profile-level-title--orange { background: var(--orange-100); color: var(--orange-700); }
.profile-level-title--red { background: var(--red-100); color: var(--red-700); }
.profile-level-title--secondary { background: var(--secondary-100); color: var(--secondary-700); }
.profile-level-title--primary { background: var(--primary-100); color: var(--primary-700); }
.profile-level-title--gray { background: var(--gray-100); color: var(--gray-600); }

.profile-level-title i {
    font-size: 0.75rem;
}

.profile-location,
.profile-member-since {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.profile-location i,
.profile-member-since i {
    font-size: 0.875rem;
    color: var(--gray-400);
}

.profile-bio {
    margin: 0.625rem 0 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--gray-600);
    max-width: 450px;
}

@media (max-width: 767px) {
    .profile-bio {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Stats */
.profile-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

@media (min-width: 768px) {
    .profile-stats {
        margin-top: 0;
        margin-left: auto;
    }
}

.profile-stat {
    text-align: center;
}

.profile-stat > i {
    display: none;
}

.profile-stat-content {
    display: flex;
    flex-direction: column;
}

.profile-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

.profile-stat-label {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--gray-500);
    margin-top: 0.125rem;
}

/* ==========================================================================
   BADGES / EXPERTISE
   ========================================================================== */

.profile-badges {
    background: white;
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1rem;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.profile-badges-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.profile-badges .profile-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin: 0 0 0.875rem;
}

.profile-badges .profile-section-title i {
    color: var(--primary-500);
}

.badges-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.expertise-badge {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.875rem;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
}

.expertise-badge-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.expertise-badge--orange .expertise-badge-icon { background: var(--orange-100); color: var(--orange-600); }
.expertise-badge--amber .expertise-badge-icon { background: var(--amber-100); color: var(--amber-600); }
.expertise-badge--red .expertise-badge-icon { background: var(--red-100); color: var(--red-600); }
.expertise-badge--blue .expertise-badge-icon { background: var(--blue-100); color: var(--blue-600); }
.expertise-badge--green .expertise-badge-icon { background: var(--green-100); color: var(--green-600); }
.expertise-badge--primary .expertise-badge-icon { background: var(--primary-100); color: var(--primary-600); }
.expertise-badge--secondary .expertise-badge-icon { background: var(--secondary-100); color: var(--secondary-700); }

.expertise-badge-info {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.expertise-badge-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-800);
    line-height: 1.3;
}

.expertise-badge-desc {
    font-size: 0.6875rem;
    color: var(--gray-500);
}

/* ==========================================================================
   CONTENT LAYOUT
   ========================================================================== */

.profile-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 900px) {
    .profile-content {
        grid-template-columns: 1fr 320px;
        gap: 2rem;
    }
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */

.profile-section {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.profile-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
}

.profile-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
}

.profile-section-title i {
    color: var(--primary-500);
    font-size: 1.125rem;
}

.profile-section-count {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.profile-section-footer {
    padding: 0.875rem 1.25rem;
    border-top: 1px solid var(--gray-100);
    text-align: center;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--primary-600);
    background: var(--primary-50);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background 0.2s ease;
}

.btn-load-more:hover {
    background: var(--primary-100);
}

/* ==========================================================================
   REVIEW CARDS
   ========================================================================== */

.profile-reviews {
    display: flex;
    flex-direction: column;
}

.profile-review-card {
    padding: 1rem 1.25rem;
}

.profile-review-card + .profile-review-card {
    border-top: 1px solid var(--gray-100);
}

/* Header */
.review-card-header {
    margin-bottom: 0.625rem;
}

.review-place-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
}

.review-place-link:hover .review-place-name {
    color: var(--primary-600);
}

.review-place-image {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--gray-100);
}

.review-place-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-place-info {
    min-width: 0;
}

.review-place-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0;
    transition: color 0.15s ease;
}

.review-place-type {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Rating row */
.review-rating-row {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.5rem;
}

.review-stars {
    display: flex;
    gap: 0.0625rem;
    color: var(--amber-500);
    font-size: 0.875rem;
}

.review-stars .ri-star-line {
    color: var(--gray-300);
}

.review-date {
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* Text */
.review-text {
    font-size: 0.875rem;
    line-height: 1.6;
    color: var(--gray-700);
    margin: 0;
}

/* Photos */
.review-photos {
    display: flex;
    gap: 0.375rem;
    margin-top: 0.75rem;
}

.review-photo {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
}

.review-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.review-photo--more {
    cursor: pointer;
}

.review-photo-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
}

/* Footer */
.review-card-footer {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.btn-review-action {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-500);
    background: transparent;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-review-action:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--gray-700);
}

.btn-review-action.has-votes {
    background: var(--primary-50);
    border-color: var(--primary-200);
    color: var(--primary-600);
}

.btn-review-action.has-votes:hover {
    background: var(--primary-100);
}

.btn-review-action i {
    font-size: 0.875rem;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-sidebar-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1rem;
    border: 1px solid var(--gray-200);
}

.sidebar-section-title {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0 0 0.75rem;
}

.sidebar-section-title i {
    color: var(--primary-500);
    font-size: 1rem;
}

.sidebar-section-count {
    margin-left: auto;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--gray-400);
}

/* Photos Grid */
.profile-photos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.25rem;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.profile-photo-thumb {
    aspect-ratio: 1;
    overflow: hidden;
}

.profile-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s ease;
}

.profile-photo-thumb:hover img {
    transform: scale(1.05);
}

.sidebar-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-600);
    text-decoration: none;
}

.sidebar-view-all:hover {
    color: var(--primary-700);
}

/* Category Breakdown */
.category-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.category-bar-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.category-bar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-bar-name {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    color: var(--gray-600);
}

.category-bar-name i {
    color: var(--gray-400);
    font-size: 0.875rem;
}

.category-bar-count {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-800);
}

.category-bar-track {
    height: 4px;
    background: var(--gray-100);
    border-radius: 2px;
    overflow: hidden;
}

.category-bar-fill {
    height: 100%;
    background: var(--primary-500);
    border-radius: 2px;
}

/* Contribution */
.contribution-info {
    text-align: center;
}

.contribution-text {
    font-size: 0.8125rem;
    line-height: 1.5;
    color: var(--gray-600);
    margin: 0 0 0.75rem;
}

.contribution-text strong {
    color: var(--gray-800);
}

.contribution-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: var(--amber-100);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--amber-700);
}

.contribution-badge i {
    color: var(--red-500);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 639px) {
    .profile-content {
        padding: 1rem;
    }
    
    .profile-section-header {
        padding: 0.875rem 1rem;
    }
    
    .profile-review-card {
        padding: 0.875rem 1rem;
    }
    
    .badges-grid {
        flex-direction: column;
    }
    
    .expertise-badge {
        width: 100%;
    }
    
    .review-photo {
        width: 56px;
        height: 56px;
    }
}
