/* ============================================
   PERFIL PÚBLICO - ESTILOS CORREGIDOS
   ============================================ */

.profile-public-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
}

/* ============================================
   PORTADA
   ============================================ */
.profile-cover {
    position: relative;
    height: 110px;
    margin-bottom: 46px;
    border-radius: 0 0 26px 26px;
    background: linear-gradient(135deg, #2d3436, #1a1a2e);
    overflow: visible;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.profile-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    border-radius: 0 0 26px 26px;
    display: block;
}

/* ============================================
   EDITAR PERFIL - botón flotante sobre la portada
   (mismo tratamiento que .btn-edit-showcase del Dashboard)
   ============================================ */
.btn-edit-cover {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: rgba(26, 26, 46, 0.92);
    color: #ffffff;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--brand-radius-btn, 4px 14px 4px 14px);

    box-shadow: 0 2px 0 #0a0a1a, 0 4px 8px rgba(0,0,0,0.4);
    transition: all 0.1s ease;
    white-space: nowrap;
}

.btn-edit-cover:hover {
    background: rgba(26, 26, 46, 1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 0 #0a0a1a, 0 6px 12px rgba(0,0,0,0.5);
}

.btn-edit-cover:active {
    transform: translateY(2px);
    box-shadow: 0 1px 0 #0a0a1a, 0 2px 4px rgba(0,0,0,0.3);
}

@media (min-width: 768px) {
    .btn-edit-cover {
        top: 18px;
        right: 18px;
        padding: 7px 14px;
        font-size: 13px;
    }
}

/* ============================================
   AVATAR - se superpone al borde inferior de la
   portada (mismo tratamiento que en el Dashboard),
   así nunca se recorta dentro de una imagen baja
   ============================================ */
.profile-avatar-container {
    position: absolute;
    left: 50%;
    bottom: -34px;
    transform: translateX(-50%);
    width: 76px;
    height: 76px;
    border-radius: 50%;
    border: 3px solid var(--white, #ffffff);
    overflow: hidden;
    background: var(--gray-200, #e9ecef);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    z-index: 5;
}

.profile-avatar-container:hover {
    transform: translateX(-50%) scale(1.03);
}

.profile-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-avatar-initials {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: 700;
    color: var(--secondary, #2d3436);
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    text-transform: uppercase;
    font-family: var(--brand-font, system-ui, -apple-system, sans-serif);
}

/* ============================================
   INFORMACIÓN DE PORTADA (debajo de la foto,
   centrada — ya no se recorta dentro de la imagen)
   ============================================ */
.profile-cover-info {
    text-align: center;
    padding: 0 16px;
    margin-bottom: 14px;
}

.profile-cover-info .badge-role {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    background: var(--gray-100, #f1f2f4);
    color: var(--secondary, #2d3436);
    margin-bottom: 8px;
}

.profile-cover-info h1 {
    font-size: 17px;
    font-weight: 700;
    margin: 4px 0 6px 0;
    color: var(--secondary, #2d3436);
    letter-spacing: -0.5px;
}

.profile-cover-info .location {
    font-size: 12px;
    color: var(--text-light, #6c757d);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

/* ============================================
   ACCIONES DEL PERFIL
   ============================================ */
.profile-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 16px;
    margin-bottom: 24px;
}

@media (min-width: 768px) {
    .profile-cover {
        height: 220px;
        margin-bottom: 60px;
        border-radius: 0 0 20% 20%;
    }

    .profile-cover-img {
        border-radius: 0 0 20% 20%;
    }

    .profile-avatar-container {
        width: 120px;
        height: 120px;
        bottom: -46px;
        border-width: 4px;
    }

    .profile-avatar-initials {
        font-size: 36px;
    }

    .profile-cover-info h1 {
        font-size: 24px;
    }

    .profile-cover-info .badge-role {
        font-size: 12px;
        padding: 4px 14px;
    }

    .profile-cover-info .location {
        font-size: 14px;
    }

    .profile-actions {
        flex-direction: row;
        justify-content: center;
        padding: 0;
    }
}

@media (min-width: 992px) {
    .profile-cover {
        height: 300px;
        margin-bottom: 70px;
    }

    .profile-avatar-container {
        bottom: -50px;
    }
}

.btn-profile-action {
    padding: 10px 20px;
    border-radius: var(--brand-radius-btn, 4px 14px 4px 14px);
    border: none;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-profile-action.primary {
    background: var(--brand-accent);
    color: var(--brand-on-accent);
}

.btn-profile-action.primary:hover {
    background: var(--brand-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(20, 20, 20, 0.35);
}

.btn-profile-action.outline {
    background: var(--white, #ffffff);
    color: var(--secondary, #2d3436);
    border: 2px solid var(--gray-300, #dee2e6);
}

.btn-profile-action.outline:hover {
    background: var(--gray-100, #f1f2f4);
    border-color: var(--gray-300, #dee2e6);
    transform: translateY(-2px);
}

.btn-profile-action.outline.active {
    border-color: #f39c12;
    color: #f39c12;
}

.btn-profile-action:active {
    transform: translateY(1px) !important;
}

/* ============================================
   CUERPO DEL PERFIL
   ============================================ */
.profile-body {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    padding: 30px 0;
}

/* ============================================
   SECCIÓN PRINCIPAL
   ============================================ */
.profile-main {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.profile-section {
    background: var(--white, #ffffff);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid var(--gray-200, #e9ecef);
    box-shadow: 0 2px 0 #d1d5db, 0 4px 8px rgba(0,0,0,0.06);
    transition: all 0.2s ease;
}

.profile-section:hover {
    border-color: var(--gray-300, #dee2e6);
    box-shadow: 0 4px 0 #c5c8d0, 0 8px 16px rgba(0,0,0,0.08);
}

.profile-section h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary, #2d3436);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.profile-section h2 i {
    color: var(--brand-primary, #AA210F);
}

.profile-bio {
    color: var(--text-light, #6c757d);
    line-height: 1.8;
    font-size: 15px;
    white-space: pre-wrap;
}

/* ============================================
   ESTADÍSTICAS
   ============================================ */
.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
    gap: 10px;
}

.profile-stat {
    text-align: center;
    padding: 10px;
    background: var(--gray-100, #f8f9fa);
    border-radius: var(--brand-radius-chip, 3px 12px 3px 12px);
    border: 1px solid var(--gray-200, #e9ecef);
}

.profile-stat .number {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--secondary, #2d3436);
}

.profile-stat .label {
    font-size: 10px;
    color: var(--text-light, #6c757d);
    font-weight: 500;
}

/* ============================================
   LISTA DE SERVICIOS
   ============================================ */
.profile-service-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--gray-100, #f8f9fa);
    border-radius: 8px;
    margin-bottom: 8px;
}

.profile-service-item:last-child {
    margin-bottom: 0;
}

.profile-service-item .service-title {
    font-weight: 500;
    color: var(--secondary, #2d3436);
}

.profile-service-item .service-category {
    font-size: 12px;
    color: var(--text-lighter, #adb5bd);
}

/* ============================================
   SIDEBAR
   ============================================ */
.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.profile-info-card {
    background: var(--white, #ffffff);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--gray-200, #e9ecef);
    box-shadow: 0 2px 0 #d1d5db, 0 4px 8px rgba(0,0,0,0.06);
}

.profile-info-card h3 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-light, #6c757d);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 14px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-info-card h3 i {
    color: var(--brand-primary, #AA210F);
}

.profile-info-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid var(--gray-100, #f8f9fa);
}

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

.profile-info-item i {
    width: 20px;
    color: var(--text-lighter, #adb5bd);
    font-size: 16px;
}

.profile-info-item .value {
    font-size: 14px;
    color: var(--secondary, #2d3436);
}

.profile-info-item .value a {
    color: var(--brand-primary, #AA210F);
    text-decoration: none;
    font-weight: 500;
}

.profile-info-item .value a:hover {
    text-decoration: underline;
}

.profile-info-item .value.text-muted {
    color: var(--text-lighter, #adb5bd);
    font-size: 13px;
}

.profile-info-item .value.text-success {
    color: #28a745;
    font-weight: 600;
}

.profile-info-item .value.text-warning {
    color: #f39c12;
}

/* ============================================
   TAGS DE COBERTURA
   ============================================ */
.cobertura-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.cobertura-tag {
    padding: 4px 12px;
    background: var(--gray-100, #f8f9fa);
    border-radius: 20px;
    font-size: 12px;
    color: var(--text-light, #6c757d);
    border: 1px solid var(--gray-200, #e9ecef);
}

/* ============================================
   ESTADO DEL PERFIL
   ============================================ */
.profile-status-card {
    background: var(--gray-100, #f8f9fa);
    border-color: var(--gray-200, #e9ecef);
}

.profile-status-content {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    padding: 4px 0;
}

.profile-status-content .status-icon {
    font-size: 24px;
}

.profile-status-content .status-text {
    font-weight: 600;
    color: var(--secondary, #2d3436);
}

.profile-status-content .status-text.complete {
    color: #28a745;
}

.profile-status-content .status-text.incomplete {
    color: var(--text-light, #6c757d);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .profile-body {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .profile-public-container {
        padding: 10px;
    }
    
    .profile-body {
        padding: 20px 0;
        gap: 20px;
    }
    
    .profile-stat {
        padding: 9px;
    }

    .profile-stat .number {
        font-size: 16px;
    }

    .profile-section {
        padding: 18px;
    }
    
    .profile-section h2 {
        font-size: 16px;
    }
    
    .profile-info-card {
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .profile-body {
        padding: 12px 0;
        gap: 16px;
    }
    
    .profile-stats {
        gap: 8px;
    }

    .profile-stat {
        padding: 8px;
    }

    .profile-stat .number {
        font-size: 14px;
    }

    .profile-stat .label {
        font-size: 9px;
    }
    
    .profile-section {
        padding: 14px;
        border-radius: 8px;
    }
    
    .profile-section h2 {
        font-size: 14px;
        margin-bottom: 12px;
    }
    
    .profile-bio {
        font-size: 14px;
    }
    
    .profile-info-card {
        padding: 14px;
        border-radius: 8px;
    }
    
    .profile-info-card h3 {
        font-size: 12px;
    }
    
    .profile-info-item {
        padding: 6px 0;
    }
    
    .profile-info-item .value {
        font-size: 13px;
    }
    
    .cobertura-tag {
        font-size: 10px;
        padding: 3px 10px;
    }
    
    .profile-service-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 10px 14px;
    }
}

/* ============================================
   ANIMACIONES SUAVES
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-section {
    animation: fadeInUp 0.4s ease forwards;
}

.profile-section:nth-child(2) {
    animation-delay: 0.1s;
}

.profile-section:nth-child(3) {
    animation-delay: 0.2s;
}

.profile-info-card {
    animation: fadeInUp 0.4s ease forwards;
}

.profile-info-card:nth-child(2) {
    animation-delay: 0.1s;
}

.profile-info-card:nth-child(3) {
    animation-delay: 0.2s;
}

/* ============================================
   ACCESIBILIDAD - REDUCED MOTION
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    .profile-section,
    .profile-info-card,
    .profile-avatar-container,
    .btn-profile-action {
        animation: none !important;
        transition: none !important;
    }
}
/* ============================================
   PLAN VITRINA: trabajos realizados y video
   ============================================ */
.vitrina { display: flex; flex-direction: column; gap: 14px; }
.vitrina-cabecera { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.vitrina-cabecera h2 { margin: 0; }
.vitrina-sello {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 9px;
    background: var(--brand-accent);
    color: var(--brand-on-accent);
    border-radius: var(--brand-radius-chip, 3px 12px 3px 12px);
}
.vitrina-aviso { padding: 10px 14px; font-size: 14px; border-radius: var(--brand-radius-chip, 3px 12px 3px 12px); }
.vitrina-aviso-ok { background: var(--brand-state-aceptada-bg, #e9e8e6); color: var(--brand-secondary, #232321); }
.vitrina-aviso-error { background: var(--brand-state-rechazada-bg, #F9E3E1); color: var(--brand-state-rechazada, #B3261E); }

.vitrina-video {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #2A2A28;
    border-radius: var(--brand-radius-btn, 4px 14px 4px 14px);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.vitrina-video img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.vitrina-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vitrina-play {
    position: relative;
    width: 60px;
    height: 60px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    color: #141414;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}
.vitrina-galeria {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}
.vitrina-galeria li { position: relative; aspect-ratio: 1; background: var(--brand-gray-200, #E6E4DF); overflow: hidden; }
.vitrina-galeria li:nth-child(even) { background: var(--brand-gray-300, #D3D0C8); }
.vitrina-galeria img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vitrina-eliminar { position: absolute; top: 6px; right: 6px; margin: 0; }
.vitrina-eliminar button {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(20, 20, 20, 0.75);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.vitrina-ejemplo { display: flex; flex-direction: column; gap: 6px; opacity: 0.85; }
.vitrina-video-ejemplo { cursor: default; flex-direction: column; gap: 10px; }
.vitrina-ejemplo-etiqueta { position: relative; font-size: 13px; color: #D6D3CC; }
.vitrina-ejemplo-texto { margin: 0; font-size: 14px; color: var(--brand-text-light, #5E5C57); }
.vitrina-gestion {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding-top: 14px;
    border-top: 1px dashed var(--brand-gray-300, #D3D0C8);
}
.vitrina-form { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.vitrina-form label { font-size: 14px; font-weight: 600; color: var(--brand-secondary, #232321); }
.vitrina-form label span { font-weight: 400; color: var(--brand-text-light, #5E5C57); }
.vitrina-fila { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.vitrina-fila input[type="url"],
.vitrina-fila input[type="file"] {
    flex: 1 1 220px;
    min-width: 0;
    min-height: 44px;
    padding: 8px 12px;
    border: 1.5px solid var(--brand-gray-300, #D3D0C8);
    border-radius: var(--brand-radius-chip, 3px 12px 3px 12px);
    background: #fff;
    font: inherit;
    font-size: 14px;
    box-sizing: border-box;
}
.vitrina-nota { margin: 0; font-size: 13px; color: var(--brand-text-light, #5E5C57); }
