﻿/* ===== PALETA DE COLORES COORDINADA ===== */
.ig-publicaciones {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    max-width: 1000px;
    margin: 0 auto;
    background-color: var(--bg-light);
    min-height: calc(100vh - 100px);
}

/* LISTA DE PUBLICACIONES */
.ig-publicaciones-lista {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* CARD DE PUBLICACIÓN - Colores coordinados */
.ig-post-card {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border);
    max-height: 75vh;
}

    .ig-post-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 18px rgba(37, 99, 235, 0.2);
        border-color: rgba(37, 99, 235, 0.3);
    }

/* HEADER PUBLICACIÓN - Colores coordinados */
.ig-post-header {
    display: flex;
    align-items: center;
    padding: 0.7rem 1rem;
    border-bottom: 1px solid var(--border);
    background: rgba(37, 99, 235, 0.05);
}

.ig-profile-pic {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 0.7rem;
    border: 2px solid var(--primary);
    box-shadow: 0 1px 4px rgba(37, 99, 235, 0.3);
}

    .ig-profile-pic img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.ig-user-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ig-username {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}

.ig-location {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

/* OPCIONES (tres puntos) - Colores coordinados */
.ig-options i {
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.2s ease;
    font-size: 1rem;
}

    .ig-options i:hover {
        color: var(--primary);
        background-color: rgba(37, 99, 235, 0.1);
    }

/* CONTENEDOR MULTIMEDIA - Colores coordinados */
.ig-media-container {
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, var(--primary-light) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    height: auto;
    min-height: 200px;
    max-height: 50vh;
    border-bottom: 1px solid var(--border);
}

    .ig-media-container img {
        width: 100%;
        height: auto;
        max-height: 50vh;
        object-fit: contain;
        transition: transform 0.3s ease;
    }

    .ig-media-container:hover img {
        transform: scale(1.02);
    }

    .ig-media-container video,
    .ig-media-container iframe {
        width: 100%;
        height: auto;
        max-height: 50vh;
        object-fit: contain;
    }

.ig-no-media {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 1rem;
    color: var(--text-light);
    text-align: center;
}

    .ig-no-media i {
        font-size: 1.8rem;
        margin-bottom: 0.6rem;
        color: var(--primary);
        opacity: 0.7;
    }

    .ig-no-media p {
        font-style: italic;
        font-size: 0.85rem;
    }

/* DETALLES DE LA PUBLICACIÓN - Colores coordinados */
.ig-post-details {
    padding: 0.6rem 1rem 0.6rem;
    background: white;
}

.ig-description {
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 0.5rem;
    font-size: 0.87rem;
    max-height: 6vh;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ig-post-date {
    font-size: 0.7rem;
    color: var(--text-light);
    display: block;
    text-align: right;
    font-weight: 500;
}

/* BOTONES DE INTERACCIÓN - Colores coordinados */
.ig-actions {
    display: flex;
    padding: 0.5rem 1rem 0.6rem;
    gap: 1rem;
    border-top: 1px solid var(--border);
    background: white;
}

.ig-action-btn {
    display: flex;
    align-items: center;
    color: var(--text-light);
    cursor: pointer;
    transition: color 0.2s ease;
    font-size: 0.82rem;
    font-weight: 500;
}

    .ig-action-btn i {
        margin-right: 0.3rem;
        font-size: 0.95rem;
    }

    .ig-action-btn:hover {
        color: var(--primary);
    }

/* MENSAJE DE NO PUBLICACIONES - Colores coordinados */
.ig-no-posts {
    text-align: center;
    color: var(--text-light);
    padding: 2.5rem 1rem;
    background-color: white;
    border-radius: 12px;
    margin: 1rem 0;
    border: 1px solid var(--border);
}

    .ig-no-posts i {
        font-size: 2.5rem;
        margin-bottom: 1rem;
        color: var(--primary);
        opacity: 0.7;
    }

.ig-no-posts-sub {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .ig-publicaciones {
        padding: 0.8rem;
        gap: 0.8rem;
        background-color: var(--bg-light);
    }

    .ig-post-card {
        max-height: 70vh;
        border-radius: 10px;
    }

    .ig-post-header {
        padding: 0.6rem 0.8rem;
    }

    .ig-profile-pic {
        width: 34px;
        height: 34px;
    }

    .ig-media-container {
        min-height: 180px;
        max-height: 45vh;
    }

        .ig-media-container img,
        .ig-media-container video,
        .ig-media-container iframe {
            max-height: 45vh;
        }

    .ig-post-details {
        padding: 0.5rem 0.8rem 0.5rem;
    }

    .ig-actions {
        padding: 0.4rem 0.8rem 0.5rem;
    }

    .ig-no-media {
        padding: 1.2rem 0.8rem;
    }

    .ig-username {
        font-size: 0.85rem;
    }

    .ig-location {
        font-size: 0.7rem;
    }

    .ig-description {
        font-size: 0.82rem;
        max-height: 8vh;
    }

    .ig-action-btn {
        font-size: 0.8rem;
    }

        .ig-action-btn i {
            font-size: 0.9rem;
        }
}

@media (max-width: 480px) {
    .ig-media-container {
        min-height: 150px;
        max-height: 40vh;
    }

        .ig-media-container img,
        .ig-media-container video,
        .ig-media-container iframe {
            max-height: 40vh;
        }

    .ig-description {
        max-height: 10vh;
    }
}
/* ===== MEJORAS ESPECÍFICAS PARA MÓVILES ===== */
@media (max-width: 768px) {
    .ig-publicaciones {
        padding: 0.5rem;
        gap: 0.8rem;
        background-color: var(--bg-light);
        min-height: calc(100vh - 60px); /* Reducido para móviles */
    }

    .ig-post-card {
        max-height: none; /* Eliminar límite fijo para flexibilidad */
        border-radius: 8px; /* Bordes más suaves para móviles */
        margin-bottom: 0.5rem;
    }

    .ig-post-header {
        padding: 0.8rem; /* Más padding para mejor táctil */
        min-height: 60px; /* Altura mínima para toques */
    }

    .ig-profile-pic {
        width: 44px; /* Ligeramente más grande para móviles */
        height: 44px;
        margin-right: 0.8rem;
    }

    /* Mejorar área táctil de los botones */
    .ig-options i {
        padding: 8px; /* Más área para tocar */
        font-size: 1.1rem;
        min-width: 44px; /* Tamaño mínimo accesible */
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .ig-media-container {
        min-height: 200px;
        max-height: 50vh; /* Más flexible */
        touch-action: pan-y; /* Mejorar desplazamiento táctil */
    }

        .ig-media-container img,
        .ig-media-container video,
        .ig-media-container iframe {
            max-height: 50vh;
            -webkit-touch-callout: none; /* Prevenir menú contextual en iOS */
            -webkit-tap-highlight-color: transparent; /* Quitar highlight azul en iOS */
        }

    .ig-post-details {
        padding: 0.8rem;
    }

    .ig-description {
        font-size: 0.9rem; /* Texto ligeramente más grande */
        line-height: 1.5;
        max-height: none; /* Eliminar límite para mostrar todo el texto */
        overflow: visible;
        margin-bottom: 0.8rem;
    }

    .ig-actions {
        padding: 0.8rem;
        gap: 1.5rem; /* Más espacio entre botones */
        min-height: 60px; /* Altura mínima para botones */
    }

    .ig-action-btn {
        font-size: 0.9rem;
        padding: 8px 4px; /* Más área táctil */
        min-height: 44px; /* Altura mínima accesible */
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 1; /* Botones igualmente espaciados */
    }

        .ig-action-btn i {
            font-size: 1.1rem;
            margin-right: 0.5rem;
        }

    /* Mejorar contraste para lectura en exterior */
    .ig-username {
        font-size: 0.95rem;
        font-weight: 600;
        color: #1a1a1a; /* Negro más puro para mejor contraste */
    }

    .ig-post-date {
        font-size: 0.75rem;
        color: #666; /* Mejor contraste */
    }

    .ig-no-posts {
        padding: 2rem 1rem;
        margin: 1rem 0.5rem;
    }

        .ig-no-posts i {
            font-size: 2.8rem; /* Ícono más grande */
        }
}

@media (max-width: 480px) {
    .ig-publicaciones {
        padding: 0.3rem;
        gap: 0.5rem;
    }

    .ig-post-card {
        border-radius: 6px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1); /* Sombra más suave */
    }

    .ig-post-header {
        padding: 0.7rem;
    }

    .ig-profile-pic {
        width: 40px;
        height: 40px;
    }

    .ig-media-container {
        min-height: 180px;
        max-height: 45vh;
    }

        .ig-media-container img,
        .ig-media-container video,
        .ig-media-container iframe {
            max-height: 45vh;
        }

    .ig-actions {
        padding: 0.7rem;
        gap: 1rem;
    }

    .ig-action-btn {
        font-size: 0.85rem;
        flex-direction: column; /* Icono arriba, texto abajo */
        gap: 0.3rem;
        text-align: center;
    }

        .ig-action-btn i {
            margin-right: 0;
            font-size: 1.2rem; /* Íconos más grandes */
        }

    /* Prevenir zoom en inputs cuando el teclado se abre */
    @media (max-width: 360px) {
        .ig-publicaciones {
            font-size: 16px; /* Prevenir zoom en iOS */
        }
    }

    /* Asegurar que el contenido sea visible cuando el teclado está abierto */
    .social-professional-section {
        min-height: 100vh;
        position: relative;
    }
}

/* Estilos específicos para cuando el teclado está visible */
@media (max-height: 500px) and (max-width: 768px) {
    .ig-publicaciones {
        padding: 0.3rem;
        min-height: auto;
    }

    .ig-post-card {
        margin-bottom: 0.3rem;
    }

    .ig-media-container {
        max-height: 35vh; /* Reducir altura cuando el teclado está visible */
    }

        .ig-media-container img,
        .ig-media-container video,
        .ig-media-container iframe {
            max-height: 35vh;
        }
}

/* Mejoras de accesibilidad táctil */
.ig-action-btn,
.ig-options i {
    cursor: pointer;
    -webkit-user-select: none; /* Prevenir selección de texto */
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

    /* Estados activos para feedback táctil */
    .ig-action-btn:active,
    .ig-options i:active {
        transform: scale(0.95);
        opacity: 0.8;
        transition: transform 0.1s ease, opacity 0.1s ease;
    }

/* Scroll suave para móviles */
.ig-publicaciones-lista {
    -webkit-overflow-scrolling: touch; /* Scroll suave en iOS */
}