/* ==========================================
   COMUNIDAD.CSS - Estilos completos
   ========================================== */

/* --- CONTAINER PRINCIPAL --- */
.comunidad-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* --- HEADER --- */
.comunidad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid var(--brand-gray-200, #e4e1da);
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.comunidad-headline h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--brand-secondary, #41403C);
    margin: 0;
}

.comunidad-headline p {
    font-size: 14px;
    color: var(--brand-text-light, #6b6862);
    margin: 4px 0 0 0;
}

.comunidad-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--brand-text-light, #6b6862);
}

.comunidad-meta strong {
    color: var(--brand-primary, #AA210F);
    font-size: 18px;
}

.badge-mis-anuncios {
    background: var(--brand-primary, #AA210F);
    color: white;
    padding: 2px 10px;
    border-radius: 20%;
    font-size: 12px;
}

.badge-fav {
    background: var(--brand-state-pendiente, #D08856);
    color: #000;
    padding: 1px 6px;
    border-radius: 50%;
    font-size: 10px;
    margin-left: 4px;
}

/* --- FLASH PRESETS --- */
.flash-presets-section {
    margin-bottom: 20px;
    padding: 10px 16px;
    background: var(--brand-state-pendiente-bg, #f7e9dd);
    border-radius: 10px;
    border: 1px solid var(--brand-state-pendiente, #D08856);
}

.flash-presets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--brand-state-pendiente, #D08856);
    font-size: 13px;
}

.flash-presets-grid {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.flash-preset-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px 6px 14px;
    background: var(--brand-white, #ffffff);
    border-radius: 6px;
    border: 1px solid var(--brand-state-pendiente, #D08856);
    flex: 1;
    min-width: 160px;
    max-width: 320px;
    transition: all 0.2s ease;
}

.flash-preset-card:hover {
    border-color: var(--brand-state-pendiente, #D08856);
    box-shadow: 0 2px 8px rgba(242, 183, 5, 0.15);
}

.flash-preset-info {
    flex: 1;
    min-width: 0;
}

.flash-preset-info strong {
    display: block;
    font-size: 12px;
    color: var(--brand-secondary, #41403C);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flash-preset-preview {
    font-size: 11px;
    color: var(--brand-text-light, #6b6862);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.flash-preset-actions {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}

.flash-preset-usos {
    font-size: 10px;
    color: var(--brand-text-light, #6b6862);
    background: var(--brand-gray-100, #f7f6f4);
    padding: 1px 8px;
    border-radius: 10px;
    display: inline-block;
    margin-top: 2px;
}

.btn-flash-publicar {
    padding: 4px 12px;
    background: var(--ui-success, #27ae60);
    color: var(--brand-white, #ffffff);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-flash-publicar:hover {
    background: #1e8449;
    transform: scale(1.02);
}

.btn-flash-publicar:disabled,
.btn-flash-publicar.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    pointer-events: none;
}

.btn-flash-eliminar {
    padding: 4px 8px;
    background: transparent;
    color: var(--brand-text-lighter, #948f86);
    border: none;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    border-radius: 4px;
    line-height: 1;
}

.btn-flash-eliminar:hover {
    color: var(--brand-state-rechazada, #AA210F);
    background: rgba(20, 20, 20, 0.08);
}

/* --- TABS --- */
.comunidad-tabs-nav {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--brand-gray-100, #f7f6f4);
    border-radius: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    border: 1px solid var(--brand-gray-200, #e4e1da);
}

.tab-btn {
    padding: 10px 20px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-text-light, #6b6862);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab-btn:hover {
    color: var(--brand-secondary, #41403C);
    background: rgba(0,0,0,0.03);
}

.tab-btn.active {
    background: var(--brand-white, #ffffff);
    color: var(--brand-secondary, #41403C);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.tab-btn.btn-publicar {
    background: var(--brand-accent);
    color: var(--brand-on-accent);
    margin-left: auto;
}

.tab-btn.btn-publicar:hover {
    background: var(--brand-accent-hover);
    transform: scale(1.02);
}

/* --- TAB CONTENT --- */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

/* --- FILTROS --- */
.muro-filtros {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filtro-btn {
    padding: 6px 16px;
    border: 1px solid var(--brand-gray-200, #e4e1da);
    background: var(--brand-white, #ffffff);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--brand-text-light, #6b6862);
    cursor: pointer;
    transition: all 0.2s;
}

.filtro-btn:hover {
    border-color: var(--brand-primary, #AA210F);
    color: var(--brand-primary, #AA210F);
}

.filtro-btn.active {
    background: var(--brand-primary, #AA210F);
    color: var(--brand-white, #ffffff);
    border-color: var(--brand-primary, #AA210F);
}

/* ==========================================
   FEED - GRID DE 2 COLUMNAS
   ========================================== */
.muro-feed {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

@media (max-width: 700px) {
    .muro-feed {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   NUEVAS TARJETAS FEED (Estilo Product Card)
   ========================================== */
.feed-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 12px 12px 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    border: 1px solid transparent;
}

.feed-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.feed-card.card-expirado {
    opacity: 0.75;
    border-color: #fca5a5;
}
.feed-card.card-expirado .feed-media {
    filter: grayscale(0.8);
}

.feed-card.favorito-expirado {
    opacity: 0.6;
    filter: grayscale(1);
    border: 1px dashed #ef4444;
}

.feed-card.my-own-post {
    border-color: var(--brand-gray-300, #D3D0C8);
}

.feed-media {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 12px;
    background: linear-gradient(45deg, #f3f4f6, #e5e7eb);
    flex-shrink: 0;
}

.feed-media img.main-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.feed-media:hover img.main-image {
    transform: scale(1.05);
}

.feed-view-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 15, 20, 0.6);
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    z-index: 5;
    opacity: 0;
}
.feed-media:hover .feed-view-btn {
    opacity: 1;
}
.feed-view-btn:hover {
    background: rgba(15, 15, 20, 0.9);
    transform: scale(1.1);
}

.feed-category {
    position: absolute;
    top: 0;
    left: 0;
    background: #ffffff;
    padding: 8px 18px 8px 14px;
    font-size: 11px;
    font-weight: 800;
    border-radius: 10px 0 20px 0;
    z-index: 2;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.feed-category::before {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 10px;
    height: 10px;
    background: radial-gradient(circle at bottom right, transparent 10px, rgb(255, 255, 255) 0);
}

.feed-category::after {
    content: '';
    position: absolute;
    top: 0;
    right: -20px;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at bottom right, transparent 20px, #ffffff 0);
    z-index: 0;
}

.feed-avatar-overlay {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    background: #fff;
    z-index: 5;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    object-fit: cover;
}

.feed-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 8px;
    margin-bottom: 6px;
}

.feed-title {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    line-height: 1.3;
}

.feed-text {
    font-size: 13px;
    line-height: 1.5;
    color: #6b7280;
    padding: 0 8px;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-badges {
    display: flex;
    gap: 6px;
    padding: 0 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.feed-tag {
    background: #f3f4f6;
    color: #4b5563;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
}

.feed-tag.critica { background: #F9E3E1; color: #B3261E; }
.feed-tag.moderada { background: #FDF3D3; color: #8A6100; }
.feed-tag.regular { background: #E6E4DF; color: #232321; }
.feed-tag.tiempo-normal { background: #E2F0E7; color: #2E7D4F; }
.feed-tag.tiempo-corto { background: #FDF3D3; color: #8A6100; }
.feed-tag.expirado { background: #F9E3E1; color: #B3261E; }

/* --- BOTÓN DETALLES --- */
.btn-detalles {
    --btn-color: #6c5ce7;
}

/* --- FEED ACTIONS --- */
.feed-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: auto 8px 0 8px;
}

.btn-feed-main {
    border: 2px solid var(--btn-color, #6c5ce7);
    border-radius: 40px;
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--btn-color, #6c5ce7);
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-sizing: border-box;
}

.btn-feed-main:hover {
    background: var(--btn-color, #6c5ce7);
    color: #fff;
    transform: translateY(-1px);
}

.btn-feed-main:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

.btn-contactar { --btn-color: #6c5ce7; }
.btn-favorito { --btn-color: #9ca3af; }
.btn-favorito.activo { --btn-color: #d97706; background: #fef3c7; border-color: #fef3c7;}
.btn-favorito.activo:hover { background: #d97706; color: #fff; }
.btn-renovar { --btn-color: #10b981; }
.btn-eliminar { --btn-color: #ef4444; }
.btn-fav-expirado { --btn-color: #9ca3af; }

.feed-card.card-necesito .btn-contactar,
.feed-card.card-necesito .btn-detalles {
    --btn-color: #c1502e;
}
.feed-card.card-necesito .feed-category {
    color: #c1502e;
}

.feed-card.card-ofrezco .btn-contactar,
.feed-card.card-ofrezco .btn-detalles {
    --btn-color: #3f7285;
}
.feed-card.card-ofrezco .feed-category {
    color: #3f7285;
}

/* --- LOADING --- */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: var(--brand-text-light, #6b6862);
}

.loading-spinner::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid var(--brand-gray-200, #e4e1da);
    border-top-color: var(--brand-primary, #AA210F);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- BANNERS --- */
.banners-section {
    margin-top: 32px;
    padding: 16px;
    background: var(--brand-gray-100, #f7f6f4);
    border-radius: 12px;
    border: 1px solid var(--brand-gray-200, #e4e1da);
}

.banner-link {
    position: relative;
    display: block;
    width: 100%;
}

.banners-section { display: flex; flex-direction: column; gap: 14px; }

.banner-etiqueta {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-text-light, #5E5C57);
}
.banner-link .banner-etiqueta {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--brand-radius-chip, 3px 12px 3px 12px);
}

.banner-propio {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px;
    background: var(--brand-primary, #141414);
    border-radius: var(--brand-radius-btn, 4px 14px 4px 14px);
}
.banner-propio-texto { display: flex; flex-direction: column; gap: 4px; flex: 1 1 320px; min-width: 0; }
.banner-propio-texto .banner-etiqueta { color: #A9A69F; }
.banner-propio-texto strong { font-size: 20px; color: #fff; }
.banner-propio-texto span:last-child { font-size: 14px; color: #D6D3CC; line-height: 1.5; }
.banner-propio-cta {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 20px;
    background: var(--brand-accent, #F2B705);
    color: var(--brand-on-accent, #141414);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    border-radius: var(--brand-radius-btn, 4px 14px 4px 14px);
}
.banner-propio-cta:hover { background: var(--brand-accent-hover, #DCA500); color: var(--brand-on-accent, #141414); }

.banner-img {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 8px;
}

/* --- MODALES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.6);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: var(--brand-white, #ffffff);
    padding: 32px;
    border-radius: 16px;
    width: 100%;
    max-width: 550px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-overlay.active .modal-box {
    transform: scale(1) translateY(0);
}

.modal-lg .modal-box {
    max-width: 700px;
}

.modal-xl .modal-box {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--brand-gray-100, #f7f6f4);
    padding-bottom: 16px;
}

.modal-header h3 {
    margin: 0;
    color: var(--brand-secondary, #41403C);
    font-weight: 700;
    font-size: 20px;
}

.modal-close {
    cursor: pointer;
    font-size: 28px;
    color: var(--brand-text-lighter, #948f86);
    line-height: 1;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--brand-state-rechazada, #AA210F);
}

/* --- MODAL: Imagen completa (lightbox) --- */
.modal-imagen-box {
    padding: 0;
    background: transparent;
    box-shadow: none;
    max-width: 90vw;
    max-height: 90vh;
}

.modal-imagen-box .modal-close {
    position: absolute;
    top: 16px;
    right: 24px;
    color: var(--brand-white, #ffffff);
    font-size: 36px;
}

.modal-imagen-box img {
    width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}

/* --- MODAL DETALLE --- */
#modalDetalleAnuncio .modal-box {
    max-width: 650px;
}

.detalle-anuncio {
    padding: 4px 0;
}

.detalle-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--brand-gray-100, #f7f6f4);
}

.detalle-tipo {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detalle-tipo.necesito {
    background: #dbeafe;
    color: #1d4ed8;
}

.detalle-tipo.ofrezco {
    background: var(--brand-state-aceptada-bg, #e9e8e6);
    color: var(--brand-state-aceptada, #41403C);
}

.detalle-expirado {
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-state-rechazada, #AA210F);
}

.detalle-urgencia {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 12px;
    border-radius: 20px;
}

.detalle-urgencia.critica {
    background: var(--brand-state-rechazada-bg, #f8e2df);
    color: var(--brand-state-rechazada, #AA210F);
}

.detalle-urgencia.moderada {
    background: var(--brand-state-pendiente-bg, #f7e9dd);
    color: var(--brand-state-pendiente, #D08856);
}

.detalle-urgencia.regular {
    background: #e0e7ff;
    color: #4f46e5;
}

.detalle-fecha {
    font-size: 12px;
    color: var(--brand-text-light, #6b6862);
    margin-left: auto;
}

.detalle-autor {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.detalle-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--brand-gray-200, #e4e1da);
}

.detalle-autor-nombre {
    font-weight: 600;
    font-size: 15px;
    color: var(--brand-secondary, #41403C);
}

.detalle-autor-nombre .my-post-pill {
    font-size: 10px;
    background: var(--brand-primary, #AA210F);
    color: var(--brand-white, #ffffff);
    padding: 1px 8px;
    border-radius: 10px;
    margin-left: 6px;
}

.detalle-imagen {
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
}

.detalle-imagen img {
    width: 100%;
    max-height: 350px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.detalle-imagen img:hover {
    transform: scale(1.02);
}

.detalle-contenido {
    font-size: 15px;
    line-height: 1.7;
    color: var(--brand-secondary, #41403C);
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--brand-gray-100, #f7f6f4);
    border-radius: 10px;
}

.detalle-contenido b,
.detalle-contenido strong {
    color: #000;
}

.detalle-contenido i,
.detalle-contenido em {
    font-style: italic;
}

.detalle-contenido ul,
.detalle-contenido ol {
    padding-left: 24px;
    margin: 8px 0;
}

.detalle-contenido li {
    margin-bottom: 4px;
}

.detalle-contenido a {
    color: var(--brand-primary, #AA210F);
    text-decoration: underline;
}

.detalle-contenido a:hover {
    text-decoration: none;
}

.detalle-tiempo {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--brand-gray-100, #f7f6f4);
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    color: var(--brand-secondary, #41403C);
}

.detalle-tiempo-label {
    font-weight: 600;
}

.detalle-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.detalle-actions .btn-feed-main {
    flex: 1;
    min-width: 140px;
}

/* --- FORMULARIOS --- */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--brand-secondary, #41403C);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--brand-gray-200, #e4e1da);
    background: var(--brand-gray-100, #f7f6f4);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: var(--brand-secondary, #41403C);
    outline: none;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--brand-primary, #AA210F);
    background: var(--brand-white, #ffffff);
    box-shadow: 0 0 0 3px rgba(20, 20, 20, 0.1);
}

.form-help {
    font-size: 11px;
    color: var(--brand-text-light, #6b6862);
    display: block;
    margin-top: 4px;
}

.btn-submit {
    background: var(--brand-accent);
    color: var(--brand-on-accent);
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 15px;
    width: 100%;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-submit:hover {
    background: var(--brand-accent-hover);
    box-shadow: 0 4px 12px rgba(20, 20, 20, 0.2);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- TOAST --- */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    max-width: 90%;
    pointer-events: none;
}

.toast-notification {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--brand-white, #ffffff);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    border-left: 4px solid var(--brand-primary, #AA210F);
    animation: slideUp 0.3s ease;
    pointer-events: auto;
    min-width: 280px;
    max-width: 500px;
}

.toast-notification.toast-success { border-left-color: var(--ui-success, #27ae60); }
.toast-notification.toast-success .toast-icon { color: var(--ui-success, #27ae60); }
.toast-notification.toast-warning { border-left-color: var(--ui-warning, #e67e22); }
.toast-notification.toast-warning .toast-icon { color: var(--ui-warning, #e67e22); }
.toast-notification.toast-danger { border-left-color: var(--ui-danger, #e74c3c); }
.toast-notification.toast-danger .toast-icon { color: var(--ui-danger, #e74c3c); }
.toast-notification.toast-info { border-left-color: #3b82f6; }
.toast-notification.toast-info .toast-icon { color: #3b82f6; }
.toast-notification.toast-favorito { border-left-color: var(--ui-warning, #e67e22); }
.toast-notification.toast-favorito .toast-icon { color: var(--ui-warning, #e67e22); }

.toast-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    color: var(--brand-primary, #AA210F);
}
.toast-icon svg { display: block; }
.toast-content { flex: 1; font-size: 14px; color: var(--brand-secondary, #41403C); }
.toast-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--brand-text-lighter, #948f86);
    cursor: pointer;
    padding: 0 4px;
}
.toast-close:hover { color: var(--brand-secondary, #41403C); }
.toast-exit { animation: slideDown 0.3s ease forwards; }

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

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

/* --- EMPTY STATE --- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--brand-text-light, #6b6862);
}

.empty-state .btn-primary {
    margin-top: 12px;
    padding: 10px 24px;
    background: var(--brand-accent);
    color: var(--brand-on-accent);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .comunidad-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .comunidad-tabs-nav {
        gap: 2px;
        padding: 2px;
    }
    
    .tab-btn {
        font-size: 12px;
        padding: 8px 12px;
    }
    
    .tab-btn span:first-child {
        font-size: 14px;
    }
    
    .muro-filtros {
        gap: 4px;
    }
    
    .filtro-btn {
        font-size: 11px;
        padding: 4px 12px;
    }
    
    .toast-notification {
        min-width: auto;
        max-width: 90%;
        padding: 10px 16px;
    }
    
    .modal-box {
        margin: 16px;
        padding: 20px;
    }
    
    .flash-presets-grid {
        flex-direction: column;
    }
    
    .flash-preset-card {
        min-width: auto;
    }
    
    .feed-view-btn {
        width: 30px;
        height: 30px;
        font-size: 13px;
        top: 10px;
        right: 10px;
    }
    
    .detalle-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .detalle-fecha {
        margin-left: 0;
    }
    
    .detalle-actions {
        flex-direction: column;
    }
    
    .detalle-actions .btn-feed-main {
        flex: none;
        width: 100%;
    }
    
    #modalDetalleAnuncio .modal-box {
        padding: 20px;
        margin: 12px;
        max-width: 100%;
    }
    
    .detalle-contenido {
        font-size: 14px;
        padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    .comunidad-container {
        padding: 12px;
    }
    
    .tab-btn {
        font-size: 11px;
        padding: 6px 10px;
    }
    
    .tab-btn.btn-publicar {
        font-size: 12px;
        padding: 6px 14px;
    }

    .feed-card {
        padding: 14px;
    }

    .feed-title {
        font-size: 15px;
    }
}

/* ==========================================
   TARJETAS DEL MURO: AJUSTES DE MARCA (carbón, oro, esquinas cruzadas)
   ========================================== */
.feed-title { color: #141414; }
.feed-text { color: #5E5C57; }
.feed-tag { border-radius: 3px 10px 3px 10px; background: #F1EFEA; color: #232321; }
.feed-card.card-necesito .feed-category { color: #141414; }
.feed-card.card-ofrezco .feed-category { color: #8A6100; }
.feed-category { text-transform: none; font-size: 12px; letter-spacing: 0; }

/* Sin foto: franja carbón con las tres barras de la marca, para que todas
   las tarjetas tengan la misma cabecera (categoría y avatar) */
.feed-media.sin-imagen { height: 76px; background: #141414; }
.feed-media-vacia { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -38%); display: flex; flex-direction: column; gap: 4px; width: 30px; opacity: .75; }
.feed-media-vacia i { display: block; height: 5px; background: #F2B705; }
.feed-media-vacia i:nth-child(2) { width: 70%; }

/* Anuncio propio: etiqueta en la esquina, sin bordes de color */
.feed-propio {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 700;
    color: #F2B705;
    background: #141414;
    border-radius: 3px 12px 3px 12px;
    box-shadow: 0 0 0 1.5px rgba(255, 255, 255, .85);
}
.feed-media:hover .feed-propio { opacity: 0; }

/* Botones: una acción principal en oro, el resto en carbón */
.feed-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.btn-feed-main {
    --btn-color: #141414;
    border-width: 1.5px;
    border-radius: 4px 14px 4px 14px;
    padding: 9px 8px;
    gap: 6px;
}
.btn-feed-main:hover { transform: none; }
.feed-card .btn-contactar,
.feed-card.card-necesito .btn-contactar,
.feed-card.card-ofrezco .btn-contactar {
    grid-column: 1 / -1;
    order: -1;
    background: #F2B705;
    border-color: #F2B705;
    color: #141414;
}
.feed-card .btn-contactar:hover { background: #DCA500; border-color: #DCA500; color: #141414; }
.feed-card .btn-detalles,
.feed-card.card-necesito .btn-detalles,
.feed-card.card-ofrezco .btn-detalles { --btn-color: #141414; }
.btn-favorito { --btn-color: #5E5C57; border-color: #D3D0C8; }
.btn-favorito:hover { background: #141414; border-color: #141414; color: #fff; }
.btn-favorito.activo { --btn-color: #8A6100; background: #FDF3D3; border-color: #F2B705; }
.btn-favorito.activo:hover { background: #F2B705; border-color: #F2B705; color: #141414; }
.btn-renovar { --btn-color: #141414; grid-column: 1 / -1; order: -1; }
.btn-eliminar { --btn-color: #5E5C57; border-color: #D3D0C8; }
.btn-eliminar:hover { background: #F9E3E1; border-color: #F2C9C4; color: #B3261E; }
/* En lo propio, la etiqueta reemplaza al avatar (es la foto de uno mismo) */

/* Círculo de quien publica: foto o iniciales, enlazado a su perfil */
.feed-avatar-overlay { display: flex; overflow: hidden; padding: 0; }
.feed-avatar-overlay img, .detalle-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-iniciales {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    background: #141414; color: #F2B705;
    font-size: 14px; font-weight: 700; letter-spacing: .02em;
}
.avatar-iniciales[hidden] { display: none; }
a.feed-avatar-overlay:hover { box-shadow: 0 0 0 2px #F2B705, 0 2px 5px rgba(0,0,0,.2); }
.feed-propio ~ .feed-avatar-overlay { display: none; }

/* ==========================================
   DETALLE DEL ANUNCIO (mismo estilo que las tarjetas)
   ========================================== */
#modalDetalleAnuncio .modal-box { max-width: 620px; padding: 24px; border-radius: 4px 18px 4px 18px; }
#modalDetalleAnuncio .modal-header { margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid #E6E4DF; }
#modalDetalleAnuncio .modal-header h3 { color: #141414; font-size: 22px; line-height: 1.25; }
.detalle-anuncio { display: flex; flex-direction: column; gap: 16px; }
.detalle-imagen {
    display: block; width: 100%; padding: 0; border: 0; cursor: zoom-in;
    border-radius: 4px 16px 4px 16px; overflow: hidden; background: #141414;
}
.detalle-imagen img { width: 100%; max-height: 380px; object-fit: cover; display: block; border-radius: 0; }
.detalle-imagen:hover img { transform: none; opacity: .92; }
.detalle-etiquetas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.detalle-etiquetas .feed-tag { font-size: 12px; padding: 5px 10px; gap: 5px; }
.detalle-tipo {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; font-size: 13px; font-weight: 700; text-transform: none; letter-spacing: 0;
    border-radius: 3px 12px 3px 12px; background: #F1EFEA; color: #141414; border: 0;
}
.detalle-tipo.ofrezco { background: #FDF3D3; color: #8A6100; }
.detalle-tipo.necesito { background: #141414; color: #fff; }
.detalle-propio { padding: 5px 10px; font-size: 12px; font-weight: 700; color: #F2B705; background: #141414; border-radius: 3px 12px 3px 12px; }
.detalle-contenido { margin: 0; padding: 0; background: none; border-radius: 0; color: #232321; font-size: 16px; line-height: 1.65; }
.detalle-contenido p { margin: 0 0 10px; }
.detalle-contenido p:last-child { margin-bottom: 0; }
.detalle-contenido a { color: #141414; }
.detalle-autor {
    display: flex; align-items: center; gap: 12px; margin: 0;
    padding: 12px 14px; border: 2px dashed #D3D0C8; border-radius: 4px 14px 4px 14px; background: none;
}
.detalle-avatar {
    flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; overflow: hidden;
    display: flex; border: 2px solid #fff; box-shadow: 0 0 0 1px #D3D0C8;
}
.detalle-autor-texto { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.detalle-autor-texto strong { color: #141414; font-size: 15px; }
.detalle-autor-texto span { color: #5E5C57; font-size: 13px; }
.detalle-ver-perfil { font-size: 14px; font-weight: 700; color: #141414; white-space: nowrap; }
.detalle-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.detalle-actions .btn-feed-main { padding: 12px 10px; font-size: 14px; }
.detalle-actions .btn-eliminar, .detalle-actions .btn-renovar { grid-column: 1 / -1; }
.detalle-actions:empty { display: none; }
@media (max-width: 520px) {
    #modalDetalleAnuncio .modal-box { padding: 18px; max-height: 92vh; }
    .detalle-imagen img { max-height: 260px; }
}
.detalle-actions .btn-contactar { background: #F2B705; border-color: #F2B705; color: #141414; }
.detalle-actions .btn-contactar:hover { background: #DCA500; border-color: #DCA500; color: #141414; }
a.feed-avatar-overlay, a.detalle-avatar, .avatar-iniciales { text-decoration: none; }

/* Vista rápida del perfil (se abre desde la foto de quien publica) */
.modal-perfil-rapido { max-width: 380px; }
.perfil-rapido { text-align: center; padding: 4px 4px 8px; }
.perfil-rapido-avatar {
    width: 88px; height: 88px; margin: 0 auto 12px; border-radius: 50%; overflow: hidden;
    background: #141414; display: flex; align-items: center; justify-content: center;
    box-shadow: 0 0 0 3px #fff, 0 0 0 5px #F2B705;
}
.perfil-rapido-avatar img { width: 100%; height: 100%; object-fit: cover; }
.perfil-rapido-avatar .avatar-iniciales { color: #F2B705; font-weight: 800; font-size: 28px; }
.perfil-rapido-nombre { margin: 0 0 8px; font-size: 21px; line-height: 1.2; color: #141414; }
.perfil-rapido-chips { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.perfil-rapido-tipo, .perfil-rapido-fundador { font-size: 12.5px; font-weight: 600; padding: 4px 11px; border-radius: 3px 12px 3px 12px; }
.perfil-rapido-tipo { background: #F1EFEA; color: #232321; }
.perfil-rapido-fundador { background: #141414; color: #F2B705; }
.perfil-rapido-lugar { margin: 0 0 4px; font-size: 13.5px; color: #5E5C57; }
.perfil-rapido-bio { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: #232321; text-align: left; }
.perfil-rapido-abrir { margin-top: 16px; width: 100%; justify-content: center; text-decoration: none; background: #F2B705; color: #141414; }
.perfil-rapido-nota { font-weight: 400; font-size: 12.5px; }
.perfil-rapido-cargando { text-align: center; color: #5E5C57; padding: 24px 0; margin: 0; }

/* Muro vacío: ocupa todo el ancho y explica qué hacer */
.muro-feed .muro-vacio {
    grid-column: 1 / -1; text-align: center; padding: 48px 20px;
    border: 2px dashed #D3D0C8; border-radius: 4px 14px 4px 14px; background: #fff;
}
.muro-vacio-titulo { margin: 0 0 6px; font-size: 18px; font-weight: 700; color: #141414; }
.muro-vacio-texto { margin: 0 auto 18px; max-width: 36em; font-size: 14.5px; color: #5E5C57; }
.muro-vacio .btn-primary { border-radius: 4px 14px 4px 14px; }

/* Avisos (toasts) con la gráfica de la marca */
.toast-notification {
    background: #141414; border: 0; border-left: 4px solid #F2B705;
    border-radius: 4px 14px 4px 14px; box-shadow: 0 10px 30px rgba(20, 20, 20, .28);
    padding: 13px 16px 13px 18px;
}
.toast-content { color: #FAFAF8; font-weight: 500; }
.toast-close { color: #9C998F; }
.toast-close:hover { color: #fff; }
.toast-notification .toast-icon { color: #F2B705; }
.toast-notification.toast-success { border-left-color: #F2B705; }
.toast-notification.toast-success .toast-icon { color: #F2B705; }
.toast-notification.toast-warning, .toast-notification.toast-favorito { border-left-color: #F2B705; }
.toast-notification.toast-warning .toast-icon, .toast-notification.toast-favorito .toast-icon { color: #F2B705; }
.toast-notification.toast-danger { border-left-color: #E5534B; }
.toast-notification.toast-danger .toast-icon { color: #E5534B; }
.toast-notification.toast-info, .toast-notification.toast-mensaje { border-left-color: #D3D0C8; }
.toast-notification.toast-info .toast-icon, .toast-notification.toast-mensaje .toast-icon { color: #D3D0C8; }

/* --- Anuncio: fecha, horario, pago e incluye --- */
.anuncio-fecha, .anuncio-incluye { border: 0; padding: 0; min-width: 0; }
.anuncio-fecha legend, .anuncio-incluye legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--brand-secondary, #41403C); }
.anuncio-opciones { display: flex; flex-wrap: wrap; gap: 8px; }
.anuncio-opciones label {
    display: inline-flex; align-items: center; gap: 8px; margin: 0;
    padding: 8px 12px; font-size: 14px; font-weight: 600; cursor: pointer;
    background: var(--brand-gray-100, #f7f6f4); border: 2px solid var(--brand-gray-200, #e4e1da);
    border-radius: 3px 12px 3px 12px; color: #232321;
}
.anuncio-opciones label:has(input:checked) { border-color: #141414; background: #fff; }
.anuncio-opciones input { width: 16px; height: 16px; margin: 0; accent-color: #141414; }
.anuncio-fechas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.anuncio-fechas[hidden] { display: none; }
.anuncio-fechas > div { flex: 1; min-width: 150px; }
.anuncio-fechas label { font-weight: 600; }
.anuncio-opcional { font-weight: 400; color: var(--brand-text-light, #6b6862); }
.detalle-datos {
    display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px;
    margin: 14px 0 16px; padding: 12px 16px;
    border: 1.5px solid var(--brand-gray-200, #e4e1da); border-radius: 3px 12px 3px 12px;
}
.detalle-datos dt { font-size: 13px; font-weight: 700; color: #5E5C57; }
.detalle-datos dd { margin: 0; font-size: 14px; color: #232321; }
