/* =============================================
   ACTIVITY VIEW - Feed Social
   ============================================= */

/* ==================== CONTAINER ==================== */
.activity-page {
    padding: 20px;
    padding-top: 0 !important;
    padding-bottom: calc(var(--nav-height) + 50px);
    max-width: 600px;
    margin: 0 auto;
    overflow-y: auto;
    height: 100%;
}

/* ==================== HEADER ==================== */
.activity-header {
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.activity-header-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.activity-subtitle {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.btn-filters {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-filters:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary-green);
}

.btn-filters i {
    font-size: 1.1rem;
}

/* ==================== DRAWER DE FILTROS ==================== */
.filters-drawer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    display: none;
    pointer-events: none;
}

.filters-drawer.open {
    display: block;
    pointer-events: all;
}

.filters-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filters-drawer.open .filters-overlay {
    opacity: 1;
}

.filters-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 320px;
    max-width: 85%;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.98));
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.filters-drawer.open .filters-panel {
    transform: translateX(0);
}

.filters-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.filters-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.btn-close-filters {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-close-filters:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.filters-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

.filter-section {
    margin-bottom: 24px;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.filter-label i {
    color: var(--primary-green);
    font-size: 0.9rem;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-radio:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.filter-radio input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-green);
}

.filter-radio span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.filter-input {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s ease;
}

.filter-input:focus {
    border-color: var(--primary-green);
    background: rgba(255, 255, 255, 0.05);
}

.filter-date-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-date-range input {
    flex: 1;
}

.filter-date-range span {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.filter-rainfall {
    display: flex;
    align-items: center;
    gap: 12px;
}

.filter-rainfall input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    appearance: none;
}

.filter-rainfall input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-green);
    cursor: pointer;
}

.filter-rainfall input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-green);
    cursor: pointer;
    border: none;
}

.filter-rainfall span {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-green);
    min-width: 50px;
    text-align: right;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-checkbox:hover {
    background: rgba(255, 255, 255, 0.05);
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-green);
}

.filter-checkbox i {
    color: var(--text-muted);
}

.filter-checkbox span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.filters-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-clear-filters,
.btn-apply-filters {
    padding: 12px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-clear-filters {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.btn-clear-filters:hover {
    background: rgba(255, 255, 255, 0.08);
}

.btn-apply-filters {
    background: var(--primary-green);
    border: 1px solid var(--primary-green);
    color: white;
}

.btn-apply-filters:hover {
    background: rgba(52, 211, 153, 0.9);
}

/* ==================== FEED DE POSTS ==================== */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.empty-feed {
    padding: 60px 20px;
    text-align: center;
}

.empty-feed i {
    font-size: 3rem;
    color: var(--text-muted);
    opacity: 0.3;
    margin-bottom: 16px;
}

.empty-feed p {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.empty-feed span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ==================== POST CARD ==================== */
.post-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.post-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.post-header {
    padding: 14px;
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 12px;
}

.post-user-info {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.post-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-blue));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.post-meta {
    flex: 1;
    min-width: 0;
}

.post-owner {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.post-location {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.post-location i {
    font-size: 0.7rem;
    color: var(--primary-green);
}

.post-thumbnail {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Datos del Post */
.post-data {
    padding: 0 14px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-rainfall {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.post-rainfall i {
    font-size: 1.3rem;
    color: var(--primary-blue);
}

.rainfall-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-blue);
    line-height: 1;
}

.rainfall-unit {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.post-weather {
    display: flex;
    flex-direction: column;
    gap: 4px;
    text-align: right;
}

.post-weather span {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
}

.post-weather i {
    font-size: 0.8rem;
}

/* Acciones */
.post-actions {
    padding: 12px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-around;
    gap: 8px;
}

.post-action {
    background: transparent;
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.85rem;
}

.post-action:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.post-action.active {
    color: var(--primary-green);
}

.post-action i {
    font-size: 1rem;
}

/* ==================== SECCIÓN EXPANDIBLE ==================== */
.post-expanded {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.post-expanded.open {
    max-height: 2000px;
}

.post-photo-full {
    padding: 14px;
    padding-top: 0;
}

.post-photo-full img {
    width: 100%;
    border-radius: 12px;
    display: block;
}

/* Comentarios */
.post-comments {
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.comments-header {
    margin-bottom: 12px;
}

.comments-header strong {
    font-size: 0.85rem;
    color: var(--text-primary);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.comment-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 12px;
    border-radius: 10px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.comment-header strong {
    font-size: 0.8rem;
    color: var(--text-primary);
}

.comment-header span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.comment-item p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.comment-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.comment-input {
    flex: 1;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    transition: all 0.2s ease;
}

.comment-input:focus {
    border-color: var(--primary-green);
    background: rgba(255, 255, 255, 0.05);
}

.btn-send-comment {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-green);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-send-comment:hover {
    background: rgba(52, 211, 153, 0.9);
    transform: scale(1.05);
}

.btn-send-comment:active {
    transform: scale(0.95);
}

.post-report {
    padding: 12px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: transparent;
    border: none;
    border-bottom: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    width: 100%;
}

.post-report:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.post-report i {
    font-size: 0.85rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 480px) {
    .activity-page {
        padding: 15px;
    }
    
    .filters-panel {
        width: 100%;
        max-width: 100%;
    }
    
    .post-avatar {
        width: 38px;
        height: 38px;
        font-size: 0.75rem;
    }
    
    .rainfall-value {
        font-size: 1.5rem;
    }
    
    .post-actions {
        gap: 4px;
    }
    
    .post-action {
        padding: 6px 8px;
        font-size: 0.8rem;
    }
}

/* ==========================================
   LIGHT MODE ADJUSTMENTS - ACTIVITY
   Copiar AL FINAL de activity.css
   ========================================== */

/* ==================== HEADER ==================== */
body.light-mode .activity-title {
    color: var(--text-primary);
}

body.light-mode .activity-subtitle {
    color: var(--text-muted);
}

body.light-mode .btn-filters {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

body.light-mode .btn-filters:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: var(--primary-green);
}

/* ==================== FILTERS DRAWER ==================== */
body.light-mode .filters-overlay {
    background: rgba(0, 0, 0, 0.5);
}

body.light-mode .filters-panel {
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.98), rgba(241, 245, 249, 0.98));
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
}

body.light-mode .filters-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .filters-header h3 {
    color: var(--text-primary);
}

body.light-mode .btn-close-filters {
    color: var(--text-secondary);
}

body.light-mode .btn-close-filters:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

body.light-mode .filter-label {
    color: var(--text-primary);
}

body.light-mode .filter-label i {
    color: var(--primary-green);
}

body.light-mode .filter-radio {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .filter-radio:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.12);
}

body.light-mode .filter-radio span {
    color: var(--text-secondary);
}

body.light-mode .filter-input {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--text-primary);
}

body.light-mode .filter-input:focus {
    border-color: var(--primary-green);
    background: rgba(0, 0, 0, 0.06);
}

body.light-mode .filter-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

body.light-mode .filter-date-range span {
    color: var(--text-muted);
}

body.light-mode .filter-rainfall input[type="range"] {
    background: rgba(0, 0, 0, 0.15);
}

body.light-mode .filter-rainfall span {
    color: var(--primary-green);
}

body.light-mode .filter-checkbox {
    background: rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .filter-checkbox:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .filter-checkbox i {
    color: var(--text-muted);
}

body.light-mode .filter-checkbox span {
    color: var(--text-secondary);
}

body.light-mode .filters-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .btn-clear-filters {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--text-secondary);
}

body.light-mode .btn-clear-filters:hover {
    background: rgba(0, 0, 0, 0.08);
}

body.light-mode .btn-apply-filters {
    /* El verde se mantiene igual */
}

/* ==================== FEED POSTS ==================== */
body.light-mode .empty-feed i {
    color: var(--text-muted);
}

body.light-mode .empty-feed p {
    color: var(--text-secondary);
}

body.light-mode .empty-feed span {
    color: var(--text-muted);
}

/* ==================== POST CARD ==================== */
body.light-mode .post-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

body.light-mode .post-card:hover {
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

body.light-mode .post-avatar {
    /* Los gradientes se mantienen iguales */
}

body.light-mode .post-owner {
    color: var(--text-primary);
}

body.light-mode .post-location {
    color: var(--text-muted);
}

body.light-mode .post-location i {
    color: var(--primary-green);
}

body.light-mode .rainfall-value {
    /* El azul se mantiene igual */
}

body.light-mode .rainfall-unit {
    color: var(--text-muted);
}

body.light-mode .post-weather span {
    color: var(--text-muted);
}

/* ==================== ACTIONS ==================== */
body.light-mode .post-actions {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .post-action {
    color: var(--text-secondary);
}

body.light-mode .post-action:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

body.light-mode .post-action.active {
    color: var(--primary-green);
}

/* ==================== EXPANDED SECTION ==================== */
body.light-mode .post-comments {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .comments-header strong {
    color: var(--text-primary);
}

body.light-mode .comment-item {
    background: rgba(0, 0, 0, 0.03);
}

body.light-mode .comment-header strong {
    color: var(--text-primary);
}

body.light-mode .comment-header span {
    color: var(--text-muted);
}

body.light-mode .comment-item p {
    color: var(--text-secondary);
}

body.light-mode .comment-input {
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--text-primary);
}

body.light-mode .comment-input:focus {
    border-color: var(--primary-green);
    background: rgba(0, 0, 0, 0.06);
}

body.light-mode .comment-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

body.light-mode .btn-send-comment {
    /* El verde se mantiene igual */
}

body.light-mode .post-report {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-muted);
}

body.light-mode .post-report:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}