/* ========================================
   TRAMPERAS - ESTILOS PARA VISUALIZACIÓN DE PERFIL
   ======================================== */

/* ========================================
   CONTENEDOR PRINCIPAL
   ======================================== */
.perfil-visualizacion-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* ========================================
   LOADER DE VISUALIZACIÓN
   ======================================== */
.loader-visualizacion {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
    gap: 1rem;
    color: var(--color-text-secondary);
}

.loader-visualizacion i {
    font-size: 2.5rem;
    color: var(--trans-pink);
}

.loader-visualizacion p {
    font-size: 1.125rem;
    font-weight: 500;
}

/* ========================================
   CONTENIDO DEL PERFIL
   ======================================== */
.perfil-contenido {
    animation: fadeInUp 0.6s ease;
}

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

/* ========================================
   SECCIONES DEL PERFIL
   ======================================== */
.perfil-seccion {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px -1px var(--color-card-shadow);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.perfil-principal {
    background: linear-gradient(135deg, var(--trans-blue) 0%, var(--trans-pink) 100%);
    color: white;
    padding: 3rem 2rem;
}

/* ========================================
   INFORMACIÓN PRINCIPAL
   ======================================== */
.perfil-header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 2rem;
    align-items: start;
}

.perfil-foto-container {
    position: relative;
    text-align: center;
}

.perfil-foto {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.perfil-puntuacion {
    margin-top: 1rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    display: inline-block;
}

.perfil-puntuacion i {
    color: #ff4757;
    margin-right: 0.5rem;
}

.perfil-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.perfil-nombre {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.perfil-ubicacion {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    opacity: 0.9;
}

.perfil-presentacion {
    font-size: 1.125rem;
    line-height: 1.6;
    margin-top: 1rem;
}

/* ========================================
   TÍTULOS DE SECCIÓN
   ======================================== */
.seccion-titulo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--color-text-primary);
}

.seccion-titulo i {
    color: var(--trans-pink);
    font-size: 1.25rem;
}

/* ========================================
   INFORMACIÓN DE CONTACTO
   ======================================== */
.contacto-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.contacto-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--color-background);
    border-radius: 0.5rem;
    border-left: 4px solid var(--trans-blue);
    transition: transform 0.2s ease;
}

.contacto-item:hover {
    transform: translateY(-2px);
}

.contacto-item i {
    font-size: 1.25rem;
    color: var(--trans-pink);
    width: 1.5rem;
    text-align: center;
}

.contacto-item span {
    font-weight: 500;
    color: var(--color-text-secondary);
}

.contacto-item.vacío {
    opacity: 0.5;
    font-style: italic;
}

/* ========================================
   SERVICIOS
   ======================================== */
.servicios-contenido {
    background: var(--color-background);
    padding: 1.5rem;
    border-radius: 0.5rem;
    line-height: 1.6;
    font-size: 1.125rem;
}

/* ========================================
   GALERÍAS
   ======================================== */
.galeria-grid {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.galeria-fotos {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.galeria-videos {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.galeria-item {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    aspect-ratio: 1;
}

.galeria-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.galeria-item img,
.galeria-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.galeria-item video {
    object-fit: cover;
}

.galeria-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.galeria-item:hover .galeria-overlay {
    opacity: 1;
}

.galeria-overlay i {
    color: white;
    font-size: 2rem;
}

/* Ocultar secciones vacías */
.perfil-seccion.vacío {
    display: none;
}

/* ========================================
   MAPA
   ======================================== */
.mapa-container-perfil {
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px var(--color-card-shadow);
}

.mapa-perfil {
    width: 100%;
    height: 400px;
    background: var(--color-background);
}

/* ========================================
   MENSAJE DE ERROR
   ======================================== */
.error-mensaje {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-secondary);
}

.error-mensaje i {
    font-size: 3rem;
    color: var(--color-danger);
    margin-bottom: 1rem;
}

.error-mensaje p {
    font-size: 1.125rem;
    font-weight: 500;
}

/* ========================================
   MODAL SOCIAL ESTILO INSTAGRAM
   ======================================== */
.modal-social {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-social-content {
    position: relative;
    max-width: 95vw;
    max-height: 95vh;
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.modal-social-cerrar {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease;
}

.modal-social-cerrar:hover {
    background: rgba(0, 0, 0, 0.9);
}

.modal-social-navegacion {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 5;
}

.modal-social-btn {
    background: rgba(255, 255, 255, 0.9);
    color: #333;
    border: none;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.modal-social-btn:hover {
    background: white;
    transform: scale(1.1);
}

.modal-social-main {
    display: flex;
    height: 100%;
    max-height: 90vh;
}

/* Lado izquierdo - Media */
.modal-social-media {
    flex: 1;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 50%;
}

.modal-social-media-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-social-media-container img,
.modal-social-media-container video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Lado derecho - Información social */
.modal-social-info {
    flex: 1;
    max-width: 400px;
    min-width: 350px;
    display: flex;
    flex-direction: column;
    background: white;
    border-left: 1px solid #dbdbdb;
}

/* Header del modal */
.modal-social-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #dbdbdb;
}

.modal-social-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-social-user-photo {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    object-fit: cover;
}

.modal-social-user-info {
    display: flex;
    flex-direction: column;
}

.modal-social-user-name {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0;
    color: #262626;
}

.modal-social-user-location {
    font-size: 0.75rem;
    color: #8e8e8e;
}

.modal-social-menu-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    color: #262626;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.modal-social-menu-btn:hover {
    background: #fafafa;
}

/* Contenido principal */
.modal-social-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

/* Interacciones */
.modal-social-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.modal-social-actions-left {
    display: flex;
    gap: 0.75rem;
}

.modal-social-action-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
    color: #262626;
}

.modal-social-action-btn:hover {
    background: #fafafa;
    transform: scale(1.1);
}

.modal-social-action-btn.active {
    color: #ed4956;
}

.modal-social-action-btn.active[data-action="dislike"] {
    color: #0095f6;
}

.modal-social-action-btn.active[data-action="love"] {
    color: #fdb022;
}

/* Contadores de interacciones */
.modal-social-stats {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.modal-social-likes,
.modal-social-dislikes,
.modal-social-loves {
    font-weight: 600;
    color: #262626;
}

/* Descripción de la foto */
.modal-social-caption {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #dbdbdb;
}

.modal-social-caption strong {
    font-weight: 600;
    margin-right: 0.5rem;
    color: #262626;
}

.modal-social-caption span {
    font-size: 0.875rem;
    color: #262626;
}

/* Comentarios */
.modal-social-comments {
    flex: 1;
    margin-bottom: 1rem;
    overflow-y: auto;
}

.modal-social-comments-title {
    font-size: 0.875rem;
    font-weight: 600;
    margin: 0 0 0.75rem 0;
    color: #8e8e8e;
}

.modal-social-comments-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.modal-social-comment {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.modal-social-comment-photo {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.modal-social-comment-content {
    flex: 1;
    background: #fafafa;
    padding: 0.5rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
}

.modal-social-comment-user {
    font-weight: 600;
    color: #262626;
    margin-right: 0.5rem;
}

.modal-social-comment-text {
    color: #262626;
}

.modal-social-comment-time {
    font-size: 0.75rem;
    color: #8e8e8e;
    margin-top: 0.25rem;
}

/* Formulario de comentario */
.modal-social-comment-form {
    border-top: 1px solid #dbdbdb;
    padding-top: 1rem;
}

.modal-social-comment-input-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.modal-social-comment-input {
    flex: 1;
    border: 1px solid #dbdbdb;
    border-radius: 1rem;
    padding: 0.75rem;
    font-size: 0.875rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.modal-social-comment-input:focus {
    border-color: #0095f6;
}

.modal-social-comment-submit {
    background: #0095f6;
    color: white;
    border: none;
    border-radius: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.modal-social-comment-submit:hover:not(:disabled) {
    background: #0081d6;
}

.modal-social-comment-submit:disabled {
    background: #b2dffc;
    cursor: not-allowed;
}

.modal-social-comment-counter {
    text-align: right;
    font-size: 0.75rem;
    color: #8e8e8e;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .perfil-visualizacion-container {
        padding: 1rem;
    }

    .perfil-header {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }

    .perfil-foto {
        width: 150px;
        height: 150px;
    }

    .perfil-nombre {
        font-size: 2rem;
    }

    .perfil-seccion {
        padding: 1.5rem;
    }

    .contacto-grid {
        grid-template-columns: 1fr;
    }

    .galeria-fotos {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .galeria-videos {
        grid-template-columns: 1fr;
    }

    .modal-contenido {
        max-width: 95vw;
        max-height: 95vh;
    }

    .modal-navegacion {
        padding: 0 0.5rem;
    }
}

@media (max-width: 480px) {
    .perfil-principal {
        padding: 2rem 1rem;
    }

    .perfil-foto {
        width: 120px;
        height: 120px;
    }

    .perfil-nombre {
        font-size: 2rem;
    }

    .seccion-titulo {
        font-size: 1.25rem;
    }

    .galeria-fotos {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   ANIMACIONES ADICIONALES
   ======================================== */
.perfil-seccion {
    animation: slideInUp 0.6s ease;
}

.perfil-seccion:nth-child(1) { animation-delay: 0.1s; }
.perfil-seccion:nth-child(2) { animation-delay: 0.2s; }
.perfil-seccion:nth-child(3) { animation-delay: 0.3s; }
.perfil-seccion:nth-child(4) { animation-delay: 0.4s; }
.perfil-seccion:nth-child(5) { animation-delay: 0.5s; }
.perfil-seccion:nth-child(6) { animation-delay: 0.6s; }

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

/* ========================================
   ESTADOS DE CARGA
   ======================================== */
.perfil-contenido.cargando {
    opacity: 0.7;
    pointer-events: none;
}

/* ========================================
   ACCESIBILIDAD
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .perfil-seccion,
    .galeria-item,
    .contacto-item,
    .perfil-contenido {
        animation: none;
        transition: none;
    }
}
