/* ==========================================
   COMUNIDAD - ESTILOS CSS
   Sistema de comunidades, eventos y adoración
   ========================================== */

/* ==========================================
   PANTALLA PRINCIPAL
   ========================================== */

#community-screen {
    position: fixed;
    inset: 0;
    background-color: var(--color-background, #F9F2E6);
    z-index: 50;
    overflow-y: auto;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#community-screen.active {
    opacity: 1;
    pointer-events: auto;
}

.community-container {
    max-width: 440px;
    margin: 0 auto;
    padding: 0;
    min-height: 100vh;
    position: relative;
    padding-bottom: calc(80px + env(safe-area-inset-bottom, 0));
}

/* ==========================================
   HEADER
   ========================================== */

.community-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    padding-top: calc(16px + env(safe-area-inset-top, 0));
    background: linear-gradient(135deg, #0B2E44 0%, #154A6F 100%);
    box-shadow: 0 2px 12px rgba(11, 46, 68, 0.15);
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Botón back en header principal (fondo oscuro) */
.community-header .community-back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15) !important;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.community-header .community-back-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.25) !important;
}

.community-header .community-back-btn svg {
    width: 24px;
    height: 24px;
    stroke: white !important;
    color: white !important;
}

.community-header-title {
    flex: 1;
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin: 0;
    font-family: 'Lora', serif;
}

.community-header-actions {
    display: flex;
    gap: 8px;
}

.community-header-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.community-header-btn:active {
    transform: scale(0.95);
    background: rgba(255, 255, 255, 0.25);
}

.community-header-btn svg {
    width: 22px;
    height: 22px;
    stroke: white;
}

/* ==========================================
   CONTENIDO
   ========================================== */

#community-content {
    position: relative;
    min-height: 100%;
}

#community-content:has(.explore-panel) {
    padding: 0 !important;
    height: 100%;
    overflow: hidden;
}

.community-content {
    padding: 16px 20px;
}

/* ==========================================
   LOADING
   ========================================== */

.community-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
}

.community-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(11, 46, 68, 0.1);
    border-top-color: #0B2E44;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.community-loading p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

/* ==========================================
   BUSCADOR
   ========================================== */

.community-search-container {
    margin-bottom: 20px;
}

.community-search-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border: 1px solid rgba(11, 46, 68, 0.1);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.community-search-box:focus-within {
    border-color: #0B2E44;
    box-shadow: 0 2px 12px rgba(11, 46, 68, 0.1);
}

.community-search-icon {
    width: 20px;
    height: 20px;
    stroke: #999;
    flex-shrink: 0;
}

.community-search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #333;
    background: transparent;
    font-family: inherit;
}

.community-search-box input::placeholder {
    color: #999;
}

/* ==========================================
   SECCIONES
   ========================================== */

.community-section {
    margin-bottom: 24px;
}

.community-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.community-section-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #0B2E44;
    margin: 0;
    font-family: 'Lora', serif;
}

.community-add-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0B2E44;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.community-add-btn:active {
    transform: scale(0.95);
}

.community-add-btn svg {
    width: 18px;
    height: 18px;
    stroke: white;
}

.community-see-all-btn {
    font-size: 13px;
    color: #0B2E44;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.community-see-all-btn:hover {
    background: rgba(11, 46, 68, 0.05);
}

.community-clear-search {
    font-size: 13px;
    color: #D4B06A;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
}

/* ==========================================
   TARJETAS DE COMUNIDAD
   ========================================== */

.community-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.community-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: white;
    border-radius: 14px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.community-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.community-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    overflow: hidden;
}

.community-card-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.community-card-info {
    flex: 1;
    min-width: 0;
}

.community-card-header {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.community-card-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: #0B2E44;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.community-verified-badge {
    color: #22c55e;
    font-size: 14px;
}

.community-admin-badge {
    font-size: 10px;
    background: #D4B06A;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

.community-card-type {
    font-size: 12px;
    color: #888;
    margin: 2px 0 0 0;
}

.community-card-stats {
    font-size: 12px;
    color: #666;
    margin: 4px 0 0 0;
}

.community-card-arrow {
    width: 20px;
    height: 20px;
    stroke: #ccc;
    flex-shrink: 0;
}

/* ==========================================
   TARJETAS DE COMUNIDAD V2 - DISEÑO MODERNO
   ========================================== */

.community-card-v2 {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    flex-direction: column;
}

.community-card-v2:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Header con gradiente */
.cc-v2-header {
    height: 70px;
    position: relative;
    display: flex;
    align-items: flex-end;
    padding: 10px 12px;
}

.cc-v2-verified {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #22c55e;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cc-v2-role-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(212, 176, 106, 0.95);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.cc-v2-type-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
}

.cc-v2-type-icon {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.cc-v2-verified img {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

.cc-v2-friends-badge img {
    width: 14px;
    height: 14px;
    object-fit: contain;
}

/* Body de la tarjeta */
.cc-v2-body {
    padding: 12px 40px 14px 72px; /* top, right (flecha), bottom, left (icono) */
    min-height: 70px;
    position: relative;
    display: flex;
    align-items: center;
}

.cc-v2-icon-wrapper {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: white;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cc-v2-icon-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cc-v2-icon-default {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* Contenedor del contenido textual */
.cc-v2-content {
    flex: 1;
    min-width: 0; /* Permite que text-overflow funcione */
}

.cc-v2-name {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 700;
    color: #0B2E44;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cc-v2-location {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 6px 0;
    font-size: 11px;
    color: #888;
}

.cc-v2-location svg {
    stroke: #aaa;
    flex-shrink: 0;
    width: 12px;
    height: 12px;
}

.cc-v2-stats {
    display: flex;
    gap: 10px;
    margin-top: 4px;
}

.cc-v2-stat {
    display: flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    color: #999;
    font-weight: 500;
}

.cc-v2-stat svg {
    stroke: #bbb;
    width: 12px;
    height: 12px;
}

.cc-v2-stat-active {
    color: #666;
}

.cc-v2-stat-active svg {
    stroke: #888;
}

/* Amigos en la comunidad */
.cc-v2-friends-badge {
    position: absolute;
    top: 8px;
    right: 40px;
    width: 24px;
    height: 24px;
    background: rgba(34, 197, 94, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cc-v2-friends {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 4px 0 6px 0;
}

.cc-v2-friends-avatars {
    display: flex;
}

.cc-v2-friend-avatar,
.cc-v2-friend-avatar-placeholder {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -6px;
    object-fit: cover;
}

.cc-v2-friend-avatar:first-child,
.cc-v2-friend-avatar-placeholder:first-child {
    margin-left: 0;
}

.cc-v2-friend-avatar-placeholder {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
}

.cc-v2-friends-text {
    font-size: 11px;
    color: #22c55e;
    font-weight: 500;
}

/* Destacar tarjetas con amigos */
.community-card-v2.has-friends {
    border: 2px solid rgba(34, 197, 94, 0.3);
}

/* Flecha de navegación */
.cc-v2-arrow {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    opacity: 0.3;
    transition: opacity 0.2s ease;
}

.community-card-v2:active .cc-v2-arrow {
    opacity: 0.6;
}

.cc-v2-arrow svg {
    stroke: #0B2E44;
    width: 18px;
    height: 18px;
}

/* Botón Unirme en tarjetas */
.cc-v2-join-btn {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #D4B06A 0%, #c9a55f 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(212, 176, 106, 0.3);
}

.cc-v2-join-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 4px 12px rgba(212, 176, 106, 0.4);
}

.cc-v2-join-btn:active {
    transform: translateY(-50%) scale(0.98);
}

/* Badge Miembro en tarjetas */
.cc-v2-member-badge {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 11px;
    font-weight: 600;
}

.cc-v2-member-badge svg {
    stroke: #22c55e;
}

/* Grid para lista de comunidades v2 */
.community-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

/* En pantallas más grandes, 2 columnas */
@media (min-width: 400px) {
    .community-list.grid-view {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Grid para explorar comunidades */
.community-list.explore-grid {
    padding: 0 4px;
}

.community-list.explore-grid .community-card-v2 {
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
}

.community-list.explore-grid .community-card-v2:nth-child(1) { animation-delay: 0ms; }
.community-list.explore-grid .community-card-v2:nth-child(2) { animation-delay: 50ms; }
.community-list.explore-grid .community-card-v2:nth-child(3) { animation-delay: 100ms; }
.community-list.explore-grid .community-card-v2:nth-child(4) { animation-delay: 150ms; }
.community-list.explore-grid .community-card-v2:nth-child(5) { animation-delay: 200ms; }
.community-list.explore-grid .community-card-v2:nth-child(6) { animation-delay: 250ms; }

/* ==========================================
   TARJETAS DE EVENTO
   ========================================== */

.community-events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ==========================================
   NUEVO DISEÑO DE TARJETAS DE EVENTOS
   ========================================== */

.event-card-new {
    display: flex;
    align-items: stretch;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.event-card-new::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--event-color, #6B7280);
}

.event-card-new:active {
    transform: scale(0.98);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

/* Columna izquierda - Fecha */
.event-card-left {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-right: 1px solid #e2e8f0;
}

.event-date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
}

.event-special-label {
    font-size: 9px;
    font-weight: 800;
    color: white;
    background: var(--event-color, #EF4444);
    padding: 2px 8px;
    border-radius: 10px;
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.event-day-num {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.event-month-short {
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

/* Columna central - Contenido */
.event-card-center {
    flex: 1;
    padding: 12px 14px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.event-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.event-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    color: var(--event-color, #6B7280);
    background: color-mix(in srgb, var(--event-color, #6B7280) 12%, white);
    padding: 4px 10px;
    border-radius: 20px;
}

.event-time-display {
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    background: #fef3c7;
    padding: 4px 10px;
    border-radius: 8px;
}

.event-title-new {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.event-title-new .recurring-icon {
    font-size: 12px;
    opacity: 0.7;
}

.event-community-line {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.event-location-line {
    font-size: 12px;
    color: #94a3b8;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-attendees-count {
    font-size: 11px;
    color: #64748b;
    background: #f1f5f9;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-block;
    margin-top: 2px;
}

.event-attendees-count.full {
    color: #dc2626;
    background: #fee2e2;
    font-weight: 600;
}

.event-attendees-count.limited {
    color: #d97706;
    background: #fef3c7;
    font-weight: 600;
}

/* Columna derecha - Acciones */
.event-card-right {
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #f1f5f9;
}

.rsvp-join-btn {
    background: linear-gradient(135deg, #0B2E44 0%, #1a4a6e 100%);
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.rsvp-join-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(11, 46, 68, 0.3);
}

.rsvp-join-btn:active {
    transform: scale(0.98);
}

.rsvp-status {
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.rsvp-status.going {
    background: #dcfce7;
    color: #16a34a;
}

.rsvp-status.maybe {
    background: #fef3c7;
    color: #d97706;
}

.rsvp-status:active {
    transform: scale(0.95);
}

/* Versión antigua (mantener por compatibilidad) */
.event-card {
    display: none; /* Ocultar diseño antiguo */
}

/* ==========================================
   BOTONES RSVP
   ========================================== */

.rsvp-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rsvp-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rsvp-btn:active {
    transform: scale(0.95);
}

.rsvp-btn.active {
    border-color: #0B2E44;
    background: #0B2E44;
    box-shadow: 0 2px 8px rgba(11, 46, 68, 0.2);
}

/* ==========================================
   TABS DE VISTA DE EVENTOS
   ========================================== */

.events-view-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: #f5f0e8;
    padding: 6px;
    border-radius: 12px;
}

.events-view-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #78350F;
    cursor: pointer;
    transition: all 0.2s ease;
}

.events-view-tab svg {
    width: 16px;
    height: 16px;
    stroke: #78350F;
}

.events-view-tab.active {
    background: white;
    color: #92400E;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.events-view-tab.active svg {
    stroke: #92400E;
}

.events-view-tab:active {
    transform: scale(0.98);
}

.events-see-more-btn {
    width: 100%;
    margin-top: 12px;
    padding: 12px;
    background: transparent;
    border: 1px dashed #D4B896;
    border-radius: 10px;
    color: #92400E;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.events-see-more-btn:hover {
    background: rgba(146, 64, 14, 0.05);
    border-color: #92400E;
}

/* ==========================================
   VISTA SEMANAL
   ========================================== */

.events-week-view {
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.week-header {
    text-align: center;
    margin-bottom: 16px;
}

.week-title {
    font-size: 15px;
    font-weight: 600;
    color: #78350F;
}

.week-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    margin-bottom: 20px;
}

.week-day {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 4px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.week-day:hover {
    background: #fef3e2;
}

.week-day.today {
    background: #fef3e2;
}

.week-day.selected {
    background: #92400E;
}

.week-day.selected .week-day-name,
.week-day.selected .week-day-num {
    color: white;
}

.week-day-name {
    font-size: 11px;
    font-weight: 500;
    color: #92400E;
    margin-bottom: 4px;
}

.week-day-num {
    font-size: 18px;
    font-weight: 600;
    color: #78350F;
}

.week-day.today .week-day-num {
    color: #92400E;
}

.week-day-dot {
    position: absolute;
    bottom: 4px;
    width: 6px;
    height: 6px;
    background: #f59e0b;
    border-radius: 50%;
}

.week-day.selected .week-day-dot {
    background: white;
}

.week-events-list {
    border-top: 1px solid #f0e6d8;
    padding-top: 16px;
}

.week-events-title {
    font-size: 14px;
    font-weight: 600;
    color: #78350F;
    margin-bottom: 12px;
}

.week-no-events {
    text-align: center;
    padding: 20px;
    color: #92400E;
    font-size: 14px;
}

/* ==========================================
   VISTA MENSUAL
   ========================================== */

.events-month-view {
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.month-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.month-title {
    font-size: 17px;
    font-weight: 600;
    color: #78350F;
}

.month-nav-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #fef3e2;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.month-nav-btn:hover {
    background: #fde68a;
}

.month-nav-btn:active {
    transform: scale(0.95);
}

.month-nav-btn svg {
    stroke: #92400E;
}

.month-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 8px;
    text-align: center;
}

.month-weekdays span {
    font-size: 12px;
    font-weight: 600;
    color: #92400E;
    padding: 8px 0;
}

.month-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.month-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-size: 14px;
    font-weight: 500;
    color: #78350F;
}

.month-day:hover {
    background: #fef3e2;
}

.month-day.other-month {
    color: #ccc;
}

.month-day.today {
    background: #fef3e2;
    font-weight: 700;
}

.month-day.today span:first-child {
    color: #92400E;
}

.month-day.selected {
    background: #92400E;
    color: white;
}

.month-day.selected span:first-child {
    color: white;
}

.month-day-dot {
    position: absolute;
    bottom: 3px;
    width: 5px;
    height: 5px;
    background: #f59e0b;
    border-radius: 50%;
}

.month-day.selected .month-day-dot {
    background: white;
}

.month-day.has-events {
    font-weight: 600;
}

.month-events-list {
    border-top: 1px solid #f0e6d8;
    margin-top: 16px;
    padding-top: 16px;
}

.month-events-title {
    font-size: 14px;
    font-weight: 600;
    color: #78350F;
    margin-bottom: 12px;
    text-transform: capitalize;
}

.month-no-events {
    text-align: center;
    padding: 16px;
    color: #92400E;
    font-size: 14px;
}

/* ==========================================
   ESTADOS VACÍOS - DISEÑO MEJORADO
   ========================================== */

.community-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    background: linear-gradient(180deg, rgba(212, 176, 106, 0.08) 0%, transparent 100%);
    border-radius: 20px;
    margin: 8px 0;
}

.community-empty-state.small {
    padding: 24px 20px;
    background: transparent;
}

.community-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f5f0e6 0%, #ebe5d9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(212, 176, 106, 0.2);
}

.community-empty-icon img {
    width: 40px;
    height: 40px;
}

.community-empty-state h4 {
    font-size: 18px;
    font-weight: 700;
    color: #0B2E44;
    margin: 0 0 8px 0;
}

.community-empty-state p {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px 0;
    line-height: 1.5;
    max-width: 260px;
}

.community-explore-btn {
    background: linear-gradient(135deg, #0B2E44 0%, #1a4a6b 100%);
    color: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(11, 46, 68, 0.3);
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.community-explore-btn:active {
    transform: scale(0.98);
}

/* ==========================================
   LOGIN PROMPT
   ========================================== */

.community-login-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.community-login-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.community-login-prompt h3 {
    font-size: 20px;
    font-weight: 600;
    color: #0B2E44;
    margin: 0 0 12px 0;
    font-family: 'Lora', serif;
}

.community-login-prompt p {
    font-size: 14px;
    color: #666;
    margin: 0 0 24px 0;
    max-width: 280px;
    line-height: 1.5;
}

.community-login-btn {
    background: linear-gradient(135deg, #0B2E44 0%, #154A6F 100%);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(11, 46, 68, 0.2);
}

.community-login-btn:active {
    transform: scale(0.98);
}

/* ==========================================
   ERROR
   ========================================== */

.community-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.community-error p {
    font-size: 14px;
    color: #dc2626;
    margin: 0 0 16px 0;
}

.community-error button {
    background: #0B2E44;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* ==========================================
   MODAL
   ========================================== */

.community-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.community-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.community-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.community-modal-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 24px;
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.community-modal.active .community-modal-content {
    transform: translateY(0);
}

.community-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.community-modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #0B2E44;
    margin: 0;
    font-family: 'Lora', serif;
}

.community-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.community-modal-close svg {
    width: 20px;
    height: 20px;
    stroke: #666;
}

/* ==========================================
   FORMULARIO
   ========================================== */

.community-form-group {
    margin-bottom: 20px;
}

.community-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #0B2E44;
    margin-bottom: 8px;
}

.community-form-group input,
.community-form-group select,
.community-form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    font-size: 15px;
    color: #333;
    background: #fafafa;
    font-family: inherit;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.community-form-group input:focus,
.community-form-group select:focus,
.community-form-group textarea:focus {
    outline: none;
    border-color: #0B2E44;
    background: white;
}

.community-form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.community-form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
}

.community-form-info {
    display: flex;
    gap: 12px;
    padding: 14px;
    background: rgba(212, 176, 106, 0.12);
    border-radius: 12px;
    margin-bottom: 20px;
}

.community-form-info svg {
    width: 20px;
    height: 20px;
    stroke: #0B2E44;
    flex-shrink: 0;
    margin-top: 2px;
}

.community-form-info p {
    font-size: 13px;
    color: #0B2E44;
    margin: 0;
    line-height: 1.5;
}

.community-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.community-btn-secondary {
    flex: 1;
    padding: 14px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: white;
    color: #666;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.community-btn-secondary:active {
    background: #f5f5f5;
}

.community-btn-primary {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #0B2E44 0%, #154A6F 100%);
    color: white;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(11, 46, 68, 0.2);
}

.community-btn-primary:active {
    transform: scale(0.98);
}

.community-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================
   TOAST SIMPLE (FALLBACK)
   ========================================== */

.simple-toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    z-index: 9999;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

@keyframes toastOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 380px) {
    .community-header {
        padding: 12px 16px;
        padding-top: calc(12px + env(safe-area-inset-top, 0));
    }

    .community-content {
        padding: 12px 16px;
    }

    .community-card {
        padding: 12px;
    }

    .event-card {
        padding: 12px;
    }
}

/* ==========================================
   DETALLE DE COMUNIDAD
   ========================================== */

.community-detail {
    padding-bottom: 32px;
}

.community-detail-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    gap: 16px;
}

.community-detail-loading .loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e5e5;
    border-top-color: #0B2E44;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.community-detail-loading p {
    color: #666;
    font-size: 14px;
}

.community-detail-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 10;
}

.community-back-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.community-back-btn:active {
    transform: scale(0.95);
    background: #eee;
}

.community-back-btn svg {
    color: #333;
}

.community-detail-header h2 {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
    color: #0B2E44;
    margin: 0;
    font-family: 'Lora', serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.community-settings-btn {
    width: 40px;
    height: 40px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.community-settings-btn:active {
    transform: scale(0.95);
    background: #eee;
}

.community-settings-btn svg {
    color: #666;
}

.community-detail-hero {
    position: relative;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.community-detail-image {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.community-detail-image-placeholder {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0B2E44 0%, #154A6F 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(11, 46, 68, 0.2);
}

.community-detail-image-placeholder span {
    font-size: 48px;
    font-weight: 600;
    color: white;
    font-family: 'Lora', serif;
}

.community-detail-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.community-type-badge {
    background: rgba(212, 176, 106, 0.15);
    color: #0B2E44;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.community-verified-badge {
    background: #dcfce7;
    color: #166534;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.community-detail-stats {
    display: flex;
    justify-content: center;
    gap: 32px;
    padding: 16px 20px;
    background: #fafafa;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.stat-number {
    font-size: 24px;
    font-weight: 700;
    color: #0B2E44;
}

.stat-icon {
    font-size: 20px;
}

.stat-label {
    font-size: 12px;
    color: #666;
}

.community-detail-section {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.community-detail-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #0B2E44;
    margin: 0 0 12px 0;
    font-family: 'Lora', serif;
}

.community-detail-section p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* Sección de miembros */
.community-members-section {
    padding: 16px 20px;
}

.section-header-clickable {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    margin-bottom: 14px;
    padding: 4px 0;
}

.section-header-clickable:active {
    opacity: 0.7;
}

.section-header-clickable h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: #0B2E44;
}

.section-header-clickable h3 svg {
    stroke: #0B2E44;
}

.see-all-link {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #D4B06A;
    font-weight: 500;
}

.see-all-link svg {
    stroke: #D4B06A;
}

/* Preview de miembros (avatares en fila) */
.members-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.member-avatar-item {
    position: relative;
    width: 44px;
    height: 44px;
}

.member-avatar,
.member-avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.member-avatar-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
}

.member-creator-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 18px;
    height: 18px;
    background: #D4B06A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: white;
    border: 2px solid white;
}

.member-avatar-more {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

/* Lista completa de miembros */
.members-full-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #eee;
}

.member-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    cursor: pointer;
}

.member-list-item:active {
    background: #f5f5f5;
}

.member-list-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.member-list-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
}

.member-list-info {
    flex: 1;
    min-width: 0;
}

.member-list-name {
    font-size: 15px;
    font-weight: 600;
    color: #0B2E44;
    margin: 0 0 2px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.member-role-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
}

.member-role-badge.creator {
    background: rgba(212, 176, 106, 0.15);
    color: #D4B06A;
}

.member-role-badge.admin {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
}

.member-list-joined {
    font-size: 12px;
    color: #888;
    margin: 0;
}

.member-list-friend-badge {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.member-list-pending-badge {
    background: rgba(251, 191, 36, 0.15);
    color: #d97706;
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.member-add-friend-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0B2E44;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.member-add-friend-btn:hover {
    background: #1a4666;
    transform: scale(1.05);
}

.member-add-friend-btn:active {
    transform: scale(0.95);
}

.member-add-friend-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.member-add-friend-btn .spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* Pantalla completa de miembros */
.community-members-full {
    background: white;
    min-height: 100%;
}

.members-count-header {
    padding: 12px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

/* Sección de Contacto */
.community-contact-section {
    background: rgba(212, 176, 106, 0.05);
    border: 1px solid rgba(212, 176, 106, 0.2);
    border-radius: 12px;
    padding: 16px;
    margin-top: 16px;
}

.community-contact-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px 0;
    font-size: 15px;
    color: #0B2E44;
}

.community-contact-section h3 svg {
    stroke: #D4B06A;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-creator {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-creator-avatar {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.contact-creator-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(212, 176, 106, 0.3);
}

.contact-creator-avatar .avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #D4B06A 0%, #B8956A 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
}

.contact-creator-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-creator-name {
    font-size: 15px;
    font-weight: 600;
    color: #0B2E44;
}

.contact-creator-role {
    font-size: 12px;
    color: #888;
}

.contact-email-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #0B2E44;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s;
}

.contact-email-btn:hover,
.contact-email-btn:active {
    background: #164163;
}

.contact-email-btn svg {
    stroke: white;
    flex-shrink: 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-header h3 {
    margin: 0;
}

.btn-add-event {
    background: #0B2E44;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-add-event:active {
    transform: scale(0.95);
}

/* Horarios de misa */
.mass-schedule {
    background: #FFF9F0;
    border-radius: 12px;
    padding: 16px;
}

.mass-day {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 14px;
    color: #555;
}

.mass-day:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mass-day strong {
    color: #0B2E44;
}

/* Adoración */
.adoration-section {
    background: linear-gradient(135deg, #FFF9F0 0%, rgba(212, 176, 106, 0.2) 100%);
    border-radius: 16px;
    margin: 20px;
    padding: 20px;
    border: none;
}

.btn-adoration {
    background: #D4B06A;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 12px;
    transition: all 0.2s ease;
}

.btn-adoration:active {
    transform: scale(0.95);
}

/* Anuncios */
.announcements-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.announcement-item {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
    border-left: 4px solid #0B2E44;
}

.announcement-item.urgent {
    background: #fef2f2;
    border-left-color: #dc2626;
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.announcement-title {
    font-size: 14px;
    font-weight: 600;
    color: #0B2E44;
}

.announcement-date {
    font-size: 11px;
    color: #888;
}

.announcement-item p {
    font-size: 13px;
    color: #555;
    line-height: 1.5;
    margin: 0;
}

/* Eventos en detalle */
.events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.empty-events {
    text-align: center;
    padding: 24px;
    background: #f9fafb;
    border-radius: 12px;
}

.empty-events p {
    color: #888;
    font-size: 14px;
    margin: 0;
}

/* Acciones del detalle */
.community-detail-actions {
    display: flex;
    gap: 12px;
    padding: 20px;
    flex-wrap: wrap;
}

.btn-action {
    flex: 1;
    min-width: 140px;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-action.primary {
    background: #0B2E44;
    color: white;
    border: none;
}

.btn-action.secondary {
    background: white;
    color: #0B2E44;
    border: 2px solid #0B2E44;
}

.btn-action:active {
    transform: scale(0.98);
}

/* ==========================================
   EXPLORAR COMUNIDADES
   ========================================== */

/* ==========================================
   NUEVO DISEÑO EXPLORAR COMUNIDADES
   ========================================== */

.explore-communities-new {
    padding-bottom: 32px;
    background: #f8fafc;
    min-height: 100%;
}

.explore-search-new {
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid #e2e8f0;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-wrapper .search-icon {
    position: absolute;
    left: 14px;
    color: #94a3b8;
    pointer-events: none;
}

.explore-search-new input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    background: #f8fafc;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.explore-search-new input:focus {
    outline: none;
    border-color: #0B2E44;
    background: white;
    box-shadow: 0 0 0 3px rgba(11, 46, 68, 0.1);
}

.explore-search-new input::placeholder {
    color: #94a3b8;
}

.explore-results-count {
    padding: 12px 20px;
    font-size: 13px;
    color: #64748b;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.explore-list-new {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.explore-card-new {
    background: white;
    border-radius: 16px;
    padding: 18px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
    position: relative;
}

.explore-card-new::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    bottom: 16px;
    width: 4px;
    background: var(--community-color, #6B7280);
    border-radius: 0 4px 4px 0;
}

.explore-card-new:active {
    transform: scale(0.98);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.explore-card-top-section {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.explore-card-avatar {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--community-color, #0B2E44) 0%, color-mix(in srgb, var(--community-color, #0B2E44) 70%, black) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.explore-card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.explore-card-avatar .avatar-letter {
    font-size: 24px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.explore-card-main {
    flex: 1;
    min-width: 0;
}

.explore-card-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 10px;
    margin-bottom: 4px;
}

.explore-card-title {
    font-size: 17px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 4px 0;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.explore-card-location {
    font-size: 12px;
    color: #64748b;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.explore-verified-badge {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, #10B981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.4);
}

.explore-card-description {
    font-size: 13px;
    color: #64748b;
    margin: 12px 0 0 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.explore-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.explore-card-meta {
    display: flex;
    gap: 16px;
}

.explore-card-meta .meta-item {
    font-size: 12px;
    color: #64748b;
}

.explore-card-meta .meta-item strong {
    color: #1e293b;
    font-weight: 600;
}

.explore-card-join-btn {
    background: linear-gradient(135deg, #0B2E44 0%, #1a4a6e 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(11, 46, 68, 0.25);
}

.explore-card-join-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(11, 46, 68, 0.35);
}

.explore-card-join-btn:active {
    transform: scale(0.96);
}

/* Badge de miembro en explorar */
.explore-card-member-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
}

/* Amigos en tarjeta de explorar */
.explore-card-friends {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 10px;
    background: rgba(34, 197, 94, 0.08);
    border-radius: 8px;
}

.explore-friends-avatars {
    display: flex;
}

.friend-mini-avatar,
.friend-mini-avatar-placeholder {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    margin-left: -8px;
    object-fit: cover;
}

.friend-mini-avatar:first-child,
.friend-mini-avatar-placeholder:first-child {
    margin-left: 0;
}

.friend-mini-avatar-placeholder {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 600;
}

.explore-friends-text {
    font-size: 12px;
    color: #22c55e;
    font-weight: 500;
}

/* Destacar tarjetas con amigos */
.explore-card-new.has-friends {
    border: 2px solid rgba(34, 197, 94, 0.25);
    background: linear-gradient(180deg, rgba(34, 197, 94, 0.02) 0%, white 100%);
}

/* Diseño antiguo - ocultar */
.explore-communities {
    display: none;
}

.explore-card {
    display: none;
}

.explore-join-btn:active {
    transform: scale(0.95);
}

/* ==========================================
   DETALLE DE EVENTO
   ========================================== */

.event-detail {
    padding-bottom: 32px;
}

.event-detail-hero {
    padding: 24px 20px;
    text-align: center;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.event-type-label {
    display: inline-block;
    background: #0B2E44;
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
}

.event-detail-hero h1 {
    font-size: 24px;
    font-weight: 700;
    color: #0B2E44;
    margin: 0 0 12px 0;
    font-family: 'Lora', serif;
}

.event-community-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.event-community-info:active {
    transform: scale(0.98);
}

.event-community-info img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

.community-mini-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0B2E44;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.event-community-info span {
    font-size: 13px;
    color: #555;
}

.event-detail-info {
    padding: 20px;
    background: white;
    border-bottom: 1px solid #eee;
}

.event-info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f5;
}

.event-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.event-info-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.event-info-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.event-info-content strong {
    font-size: 14px;
    color: #0B2E44;
}

.event-info-content span {
    font-size: 13px;
    color: #666;
}

.event-detail-section {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.event-detail-section h3 {
    font-size: 16px;
    font-weight: 600;
    color: #0B2E44;
    margin: 0 0 16px 0;
    font-family: 'Lora', serif;
}

.event-detail-section p {
    font-size: 14px;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.event-rsvp-buttons {
    display: flex;
    gap: 12px;
}

.rsvp-btn-large {
    flex: 1;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    color: #0B2E44;
    border: 2px solid #e5e5e5;
}

.rsvp-btn-large:active {
    transform: scale(0.95);
}

.rsvp-btn-large.active {
    background: #0B2E44;
    color: white;
    border-color: #0B2E44;
}

.rsvp-btn-large.maybe.active {
    background: #D4B06A;
    border-color: #D4B06A;
}

.rsvp-btn-large.not.active {
    background: #dc2626;
    border-color: #dc2626;
}

.attendees-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attendee-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 10px;
}

.attendee-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #0B2E44;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.attendee-item span {
    flex: 1;
    font-size: 14px;
    color: #333;
}

.attendee-status {
    font-size: 14px;
}

.attendee-status.going {
    color: #16a34a;
}

.attendees-more {
    font-size: 13px;
    color: #888;
    text-align: center;
    margin: 8px 0 0 0;
}

.no-attendees {
    font-size: 13px;
    color: #888;
    text-align: center;
    padding: 16px;
    background: #f9fafb;
    border-radius: 10px;
    margin: 0;
}

.event-detail-actions {
    padding: 20px;
}

/* ==========================================
   LISTA DE EVENTOS COMPLETA
   ========================================== */

.all-events {
    padding-bottom: 32px;
}

.events-list-full {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.event-card-full {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.2s ease;
}

.event-card-full:active {
    transform: scale(0.98);
}

.event-card-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    background: rgba(212, 176, 106, 0.15);
    border-radius: 10px;
    flex-shrink: 0;
}

.event-card-date .day {
    font-size: 22px;
    font-weight: 700;
    color: #0B2E44;
    line-height: 1;
}

.event-card-date .month {
    font-size: 11px;
    color: #D4B06A;
    text-transform: uppercase;
    font-weight: 600;
}

.event-card-date .year {
    font-size: 10px;
    color: #888;
}

.event-card-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.event-card-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.event-card-details {
    flex: 1;
    min-width: 0;
}

.event-card-details h4 {
    font-size: 15px;
    font-weight: 600;
    color: #0B2E44;
    margin: 0 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-card-details .event-community {
    font-size: 12px;
    color: #0369a1;
    margin: 0 0 2px 0;
}

.event-card-details .event-meta {
    font-size: 12px;
    color: #666;
    margin: 0;
}

.event-my-status {
    flex-shrink: 0;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
}

.event-my-status.going {
    background: #dcfce7;
    color: #166534;
}

.event-my-status.maybe {
    background: rgba(212, 176, 106, 0.15);
    color: #0B2E44;
}

.event-my-status.not_going {
    background: #fee2e2;
    color: #991b1b;
}

/* ==========================================
   FORMULARIOS ADICIONALES
   ========================================== */

.community-form-row {
    display: flex;
    gap: 12px;
}

.community-form-row .community-form-group {
    flex: 1;
}

.community-form-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.community-form-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #0B2E44;
}

.community-form-checkbox label {
    font-size: 14px;
    color: #333;
    margin: 0;
}

/* Secciones del formulario */
.community-form-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e5e5;
}

.community-form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.community-form-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #0B2E44;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #D4B06A;
    display: inline-block;
}

/* Hint/helper text bajo inputs */
.community-form-hint {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 4px;
}

/* Mejorar spacing en rows */
.community-form-row {
    display: flex;
    gap: 12px;
}

.community-form-row .community-form-group {
    flex: 1;
    margin-bottom: 16px;
}

/* Reducir margin en form groups dentro de secciones */
.community-form-section .community-form-group {
    margin-bottom: 16px;
}

.community-form-section .community-form-group:last-child {
    margin-bottom: 0;
}

/* ==========================================
   RECURRENCIA DE EVENTOS
   ========================================== */

.recurrence-options {
    background: #f0f9ff;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    border: 1px solid #bae6fd;
}

.recurrence-note {
    font-size: 12px;
    color: #0369a1;
    margin: 8px 0 0 0;
    line-height: 1.4;
}

.recurrence-info {
    display: block;
    font-size: 12px;
    color: #0369a1;
    margin-top: 4px;
}

/* ==========================================
   MENÚ DE OPCIONES DE EVENTO
   ========================================== */

.event-options-menu {
    position: fixed;
    inset: 0;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.event-options-menu.active {
    opacity: 1;
    pointer-events: auto;
}

.event-options-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.event-options-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 16px;
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0));
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.event-options-menu.active .event-options-content {
    transform: translateY(0);
}

.event-options-content button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px;
    border: none;
    background: #f9fafb;
    border-radius: 12px;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.event-options-content button:active {
    transform: scale(0.98);
    background: #f3f4f6;
}

.event-options-content button.cancel-btn {
    background: transparent;
    color: #666;
    justify-content: center;
    margin-bottom: 0;
}

/* ==========================================
   BANNER DE EVENTO CANCELADO
   ========================================== */

.event-cancelled-banner {
    background: #fee2e2;
    border-left: 4px solid #dc2626;
    padding: 16px 20px;
    color: #991b1b;
    font-weight: 600;
}

.event-cancelled-banner p {
    font-weight: normal;
    margin: 8px 0 0 0;
    font-size: 14px;
}

/* ==========================================
   MENÚ DE CONFIGURACIÓN DE COMUNIDAD
   ========================================== */

.community-settings-menu {
    position: fixed;
    inset: 0;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.community-settings-menu.active {
    opacity: 1;
    pointer-events: auto;
}

.community-settings-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.community-settings-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 20px 16px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0));
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.community-settings-menu.active .community-settings-content {
    transform: translateY(0);
}

.community-settings-header {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.community-settings-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #0B2E44;
    margin: 0;
    font-family: 'Lora', serif;
}

.community-settings-content button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px;
    border: none;
    background: #f9fafb;
    border-radius: 12px;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.community-settings-content button:active {
    transform: scale(0.98);
    background: #f3f4f6;
}

.community-settings-content button.danger-btn {
    background: #fef2f2;
    color: #dc2626;
}

.community-settings-content button.danger-btn:active {
    background: #fee2e2;
}

.community-settings-content button.cancel-btn {
    background: transparent;
    color: #666;
    justify-content: center;
    margin-bottom: 0;
    margin-top: 8px;
}

/* ==========================================
   MODAL DE CONFIRMACIÓN DE ELIMINACIÓN
   ========================================== */

.delete-confirm-modal {
    text-align: center;
    padding: 32px 24px !important;
}

.delete-confirm-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.delete-confirm-modal h3 {
    font-size: 22px;
    font-weight: 700;
    color: #dc2626;
    margin: 0 0 12px 0;
    font-family: 'Lora', serif;
}

.delete-confirm-modal > p {
    font-size: 14px;
    color: #555;
    margin: 0 0 16px 0;
    line-height: 1.5;
}

.delete-warning-list {
    text-align: left;
    background: #fef2f2;
    border-radius: 12px;
    padding: 16px 16px 16px 36px;
    margin: 0 0 20px 0;
    list-style: disc;
}

.delete-warning-list li {
    font-size: 13px;
    color: #991b1b;
    padding: 4px 0;
}

.delete-confirm-input {
    margin-bottom: 24px;
}

.delete-confirm-input label {
    display: block;
    font-size: 13px;
    color: #555;
    margin-bottom: 8px;
}

.delete-confirm-input input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 16px;
    text-align: center;
    font-weight: 600;
    letter-spacing: 2px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.delete-confirm-input input:focus {
    outline: none;
    border-color: #dc2626;
}

.delete-confirm-buttons {
    display: flex;
    gap: 12px;
}

.delete-confirm-buttons button {
    flex: 1;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-confirm-buttons .btn-cancel {
    background: #f3f4f6;
    color: #333;
    border: none;
}

.delete-confirm-buttons .btn-cancel:active {
    transform: scale(0.98);
}

.delete-confirm-buttons .btn-delete {
    background: #dc2626;
    color: white;
    border: none;
}

.delete-confirm-buttons .btn-delete:disabled {
    background: #fca5a5;
    cursor: not-allowed;
}

.delete-confirm-buttons .btn-delete:not(:disabled):active {
    transform: scale(0.98);
    background: #b91c1c;
}

/* ==========================================
   GESTIÓN DE MIEMBROS
   ========================================== */

.members-management,
.admins-management {
    padding-bottom: 32px;
}

.members-list,
.admins-list {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.member-item,
.admin-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: white;
    border-radius: 12px;
    padding: 14px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.member-avatar,
.admin-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0B2E44 0%, #154A6F 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
    flex-shrink: 0;
}

.member-info,
.admin-info {
    flex: 1;
    min-width: 0;
}

.member-info h4,
.admin-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: #0B2E44;
    margin: 0 0 4px 0;
}

.member-joined {
    font-size: 12px;
    color: #888;
}

.member-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.member-badge.owner {
    background: rgba(212, 176, 106, 0.15);
    color: #0B2E44;
}

.member-action-btn,
.admin-action-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.member-action-btn svg,
.admin-action-btn svg {
    color: #666;
}

/* Roles de admin */
.admin-role {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
}

.admin-role.owner { background: rgba(212, 176, 106, 0.2); color: #0B2E44; }
.admin-role.super_admin { background: #dbeafe; color: #1e40af; }
.admin-role.admin { background: #dcfce7; color: #166534; }
.admin-role.event_manager { background: #f3e8ff; color: #7e22ce; }
.admin-role.adoration_manager { background: #fce7f3; color: #be185d; }

.admin-pending {
    display: block;
    font-size: 11px;
    color: #dc2626;
    margin-top: 4px;
}

.admins-actions {
    padding: 16px 20px;
}

.btn-add-admin {
    width: 100%;
    padding: 14px;
    background: #0B2E44;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

/* Menús de acciones para miembros/admins */
.member-actions-menu,
.admin-actions-menu {
    position: fixed;
    inset: 0;
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.member-actions-menu.active,
.admin-actions-menu.active {
    opacity: 1;
    pointer-events: auto;
}

.member-actions-overlay,
.admin-actions-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.member-actions-content,
.admin-actions-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    padding: 20px 16px;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0));
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.member-actions-menu.active .member-actions-content,
.admin-actions-menu.active .admin-actions-content {
    transform: translateY(0);
}

.member-actions-header,
.admin-actions-header {
    text-align: center;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
    margin-bottom: 12px;
}

.member-actions-header h4,
.admin-actions-header h4 {
    font-size: 16px;
    font-weight: 600;
    color: #0B2E44;
    margin: 0;
}

.member-actions-content button,
.admin-actions-content button {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: none;
    background: #f9fafb;
    border-radius: 12px;
    font-size: 15px;
    color: #333;
    cursor: pointer;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.member-actions-content button:active,
.admin-actions-content button:active {
    transform: scale(0.98);
}

.member-actions-content button.danger-btn,
.admin-actions-content button.danger-btn {
    background: #fef2f2;
    color: #dc2626;
}

.member-actions-content button.cancel-btn,
.admin-actions-content button.cancel-btn {
    background: transparent;
    color: #666;
    justify-content: center;
    margin-bottom: 0;
}

/* ==========================================
   ADORACIÓN PERPETUA
   ========================================== */

.adoration-schedule {
    padding-bottom: 32px;
}

.adoration-grid {
    padding: 16px 20px;
}

.adoration-day {
    margin-bottom: 20px;
}

.adoration-day-header {
    font-size: 14px;
    font-weight: 600;
    color: #0B2E44;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e5e5;
}

.adoration-slots {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.adoration-slot {
    padding: 10px 6px;
    border-radius: 10px;
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.adoration-slot.available {
    background: #dcfce7;
    color: #166534;
}

.adoration-slot.taken {
    background: #fee2e2;
    color: #991b1b;
}

.adoration-slot.mine {
    background: #0B2E44;
    color: white;
    border-color: #0B2E44;
}

.adoration-slot.needs-help {
    background: rgba(212, 176, 106, 0.15);
    color: #0B2E44;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.adoration-slot-time {
    font-size: 11px;
    display: block;
}

.adoration-slot-status {
    font-size: 10px;
    margin-top: 2px;
    opacity: 0.8;
}

.adoration-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 20px;
    background: #f9fafb;
    border-top: 1px solid #eee;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #666;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 4px;
}

.legend-color.available { background: #dcfce7; }
.legend-color.taken { background: #fee2e2; }
.legend-color.mine { background: #0B2E44; }
.legend-color.needs-help { background: rgba(212, 176, 106, 0.2); }

/* ==========================================
   ABANDONAR COMUNIDAD
   ========================================== */

.leave-community-section {
    padding: 20px;
    margin-top: 20px;
    border-top: 1px solid #eee;
}

.btn-leave-community {
    width: 100%;
    padding: 14px;
    background: white;
    color: #dc2626;
    border: 2px solid #dc2626;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-leave-community:active {
    background: #fef2f2;
    transform: scale(0.98);
}

/* ==========================================
   ADORACIÓN PERPETUA - NUEVO SISTEMA
   ========================================== */

.adoration-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: linear-gradient(135deg, #FFF9F0 0%, rgba(212, 176, 106, 0.25) 100%);
    margin: 0 20px 16px;
    border-radius: 16px;
}

.adoration-info-icon {
    font-size: 48px;
}

.adoration-info-text h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0B2E44;
    margin: 0 0 4px 0;
    font-family: 'Lora', serif;
}

.adoration-info-text p {
    font-size: 13px;
    color: #666666;
    margin: 0;
}

.adoration-urgent-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: #fef2f2;
    border-left: 4px solid #dc2626;
    margin: 0 20px 16px;
    border-radius: 0 12px 12px 0;
}

.adoration-urgent-alert .urgent-icon {
    font-size: 20px;
}

.adoration-urgent-alert span {
    font-size: 14px;
    color: #991b1b;
    font-weight: 600;
}

.adoration-my-slots {
    padding: 16px 20px;
    background: #f0fdf4;
    margin: 0 20px 16px;
    border-radius: 16px;
    border: 1px solid #bbf7d0;
}

.adoration-my-slots h4 {
    font-size: 14px;
    font-weight: 600;
    color: #166534;
    margin: 0 0 12px 0;
}

.my-slots-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.my-slot-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: white;
    border-radius: 10px;
}

.my-slot-item .slot-day {
    font-size: 14px;
    font-weight: 600;
    color: #0B2E44;
    min-width: 80px;
}

.my-slot-item .slot-time {
    flex: 1;
    font-size: 13px;
    color: #666;
}

.my-slot-item .slot-cancel-btn {
    padding: 6px 12px;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.adoration-day-selector {
    display: flex;
    gap: 6px;
    padding: 12px 20px;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.adoration-day-selector::-webkit-scrollbar {
    display: none;
}

.day-btn {
    flex: 1;
    min-width: 45px;
    padding: 10px 6px;
    background: #f5f5f5;
    border: none;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.day-btn.active {
    background: #0B2E44;
    color: white;
}

.day-btn:active {
    transform: scale(0.95);
}

.adoration-slots-container {
    padding: 0 20px 20px;
}

.day-slots {
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.day-title {
    font-size: 16px;
    font-weight: 600;
    color: #0B2E44;
    margin: 0 0 16px 0;
    text-align: center;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.hours-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.hour-slot {
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.hour-slot:active {
    transform: scale(0.97);
}

.hour-slot .hour-time {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.hour-slot .hour-status {
    display: block;
    font-size: 11px;
}

.hour-slot.available {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.hour-slot.available .hour-status {
    color: #22c55e;
}

.hour-slot.taken {
    background: #f9fafb;
    color: #6b7280;
    border: 1px solid #e5e5e5;
    cursor: default;
}

.hour-slot.taken .hour-status {
    color: #9ca3af;
}

.hour-slot.mine {
    background: linear-gradient(135deg, #0B2E44 0%, #154A6F 100%);
    color: white;
    border: none;
}

.hour-slot.mine .hour-status {
    color: rgba(255, 255, 255, 0.9);
}

.hour-slot.urgent {
    background: rgba(212, 176, 106, 0.15);
    color: #0B2E44;
    border: 2px solid #D4B06A;
    animation: urgent-pulse 2s infinite;
}

.hour-slot.urgent .hour-status {
    color: #D4B06A;
}

@keyframes urgent-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 176, 106, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(212, 176, 106, 0); }
}

.adoration-admin-actions {
    padding: 20px;
}

.btn-init-slots {
    width: 100%;
    padding: 14px;
    background: white;
    color: #0B2E44;
    border: 2px solid #0B2E44;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-init-slots:active {
    background: #f5f5f5;
    transform: scale(0.98);
}

/* ==========================================
   MODAL ABANDONAR COMUNIDAD
   ========================================== */

.leave-confirm-modal {
    text-align: center;
    padding: 32px 24px !important;
}

.leave-confirm-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.leave-confirm-modal h3 {
    font-size: 22px;
    font-weight: 700;
    color: #0B2E44;
    margin: 0 0 12px 0;
    font-family: 'Lora', serif;
}

.leave-confirm-modal > p {
    font-size: 14px;
    color: #555;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.leave-warning-list {
    text-align: left;
    background: #fef3c7;
    border-radius: 12px;
    padding: 16px 16px 16px 36px;
    margin: 0 0 16px 0;
    list-style: disc;
}

.leave-warning-list li {
    font-size: 13px;
    color: #666666;
    padding: 4px 0;
}

.leave-note {
    font-size: 13px;
    color: #22c55e;
    font-weight: 500;
    margin: 0 0 24px 0 !important;
}

.leave-confirm-buttons {
    display: flex;
    gap: 12px;
}

.leave-confirm-buttons button {
    flex: 1;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.leave-confirm-buttons .btn-cancel {
    background: #f3f4f6;
    color: #333;
    border: none;
}

.leave-confirm-buttons .btn-cancel:active {
    transform: scale(0.98);
}

.leave-confirm-buttons .btn-leave {
    background: #dc2626;
    color: white;
    border: none;
}

.leave-confirm-buttons .btn-leave:active {
    transform: scale(0.98);
    background: #b91c1c;
}

.leave-confirm-buttons .btn-leave:disabled {
    background: #fca5a5;
    cursor: not-allowed;
}

/* Botón abandonar en el menú de settings */
.community-settings-content button.leave-btn {
    background: white;
    color: #dc2626;
    border: 2px solid #dc2626;
}

.community-settings-content button.leave-btn:active {
    background: #fef2f2;
}

/* Leyenda de colores mejorada */
.adoration-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 16px 20px;
    background: #f9fafb;
    margin: 0 20px 16px;
    border-radius: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #555;
    font-weight: 500;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 6px;
}

.legend-color.available {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.legend-color.taken {
    background: #f9fafb;
    border: 1px solid #e5e5e5;
}

.legend-color.mine {
    background: linear-gradient(135deg, #0B2E44 0%, #154A6F 100%);
}

.legend-color.urgent {
    background: rgba(212, 176, 106, 0.15);
    border: 2px solid #D4B06A;
}

/* ==========================================
   PANEL DE EXPLORACIÓN Y BÚSQUEDA
   ========================================== */

.explore-toggle-btn {
    padding: 10px 16px;
    background: #f5f5f5;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #0B2E44;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.explore-toggle-btn:active {
    transform: scale(0.95);
    background: #eee;
}

.community-search-container {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 20px;
}

.community-search-box {
    flex: 1;
    position: relative;
}

.community-search-box.large {
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 14px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: border-color 0.2s ease;
}

.community-search-box.large:focus-within {
    border-color: #0B2E44;
}

.search-clear-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.search-clear-btn:active {
    background: #e5e5e5;
    transform: scale(0.9);
}

.search-clear-btn svg {
    color: #666;
}

/* Panel de exploración - Layout flexbox para ocupar todo el espacio */
.explore-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    background: #F9F2E6;
    z-index: 60;
    overflow: hidden;
}

.explore-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    padding-top: calc(16px + env(safe-area-inset-top, 0));
    background: linear-gradient(135deg, #0B2E44 0%, #154A6F 100%);
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.explore-header h2 {
    flex: 1;
    font-size: 20px;
    font-weight: 600;
    color: white;
    margin: 0;
    font-family: 'Lora', serif;
}

.explore-header .community-back-btn {
    background: rgba(255, 255, 255, 0.15);
}

.explore-header .community-back-btn:active {
    background: rgba(255, 255, 255, 0.25);
}

.explore-header .community-back-btn svg {
    stroke: white;
}

.explore-search-section,
.explore-filters,
.explore-tabs {
    flex-shrink: 0;
}

.explore-panel .explore-content {
    flex: 1;
    overflow-y: auto !important;
    max-height: none !important;
    padding: 16px 20px;
    padding-bottom: calc(100px + env(safe-area-inset-bottom, 0));
    background: #F9F2E6;
}


.explore-search-section {
    padding: 16px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #eee;
}

/* Filtros */
.explore-filters {
    display: flex;
    gap: 10px;
    padding: 12px 20px;
    background: white;
    border-bottom: 1px solid #eee;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.explore-filters::-webkit-scrollbar {
    display: none;
}

.filter-group {
    flex-shrink: 0;
}

.filter-group select {
    padding: 10px 14px;
    background: #f5f5f5;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    appearance: none;
    padding-right: 30px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    min-width: 120px;
}

.filter-group select:focus {
    outline: none;
    background-color: #eee;
}

.filter-clear-btn {
    padding: 10px 14px;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

.filter-clear-btn:active {
    background: #fecaca;
}

/* Tabs */
.explore-tabs {
    display: flex;
    padding: 12px 20px;
    gap: 8px;
    background: white;
    border-bottom: 1px solid #eee;
}

.explore-tab {
    flex: 1;
    padding: 12px 16px;
    background: #f5f5f5;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.explore-tab.active {
    background: #0B2E44;
    color: white;
}

.explore-tab:active {
    transform: scale(0.98);
}

.explore-empty {
    text-align: center;
    padding: 48px 20px;
}

.explore-empty-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.explore-empty p {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.explore-empty span {
    font-size: 14px;
    color: #888;
}

/* Lista de comunidades en exploración */
.explore-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.explore-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.2s ease;
}

.explore-card:active {
    transform: scale(0.98);
}

.explore-card-image {
    flex-shrink: 0;
}

.explore-card-image img {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    object-fit: cover;
}

.explore-card-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: linear-gradient(135deg, #0B2E44 0%, #154A6F 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    font-weight: 600;
    color: white;
}

.explore-card-info {
    flex: 1;
    min-width: 0;
}

.explore-card-info h4 {
    font-size: 16px;
    font-weight: 600;
    color: #0B2E44;
    margin: 0 0 6px 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.verified-mini {
    color: #22c55e;
    font-size: 14px;
}

.explore-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.explore-card-type {
    font-size: 12px;
    color: #0369a1;
    background: #f0f9ff;
    padding: 3px 8px;
    border-radius: 8px;
}

.explore-card-location {
    font-size: 12px;
    color: #666;
}

.explore-card-desc {
    font-size: 13px;
    color: #555;
    margin: 0 0 8px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.explore-card-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #888;
}

.explore-card-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.explore-member-badge {
    flex-shrink: 0;
    padding: 8px 12px;
    background: #dcfce7;
    color: #166534;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    align-self: center;
}

.explore-join-btn {
    flex-shrink: 0;
    padding: 10px 18px;
    background: #0B2E44;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    align-self: center;
}

.explore-join-btn:active {
    transform: scale(0.95);
}

/* ==========================================
   NUEVO DISEÑO PROFESIONAL DE COMUNIDADES
   ========================================== */

.communities-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.community-card-pro {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 14px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid #e5e7eb;
}

.community-card-pro:active {
    transform: scale(0.98);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.card-pro-header {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 16px 12px;
    background: linear-gradient(180deg, #fafafa 0%, white 100%);
    border-bottom: 1px solid #f3f4f6;
}

.card-pro-avatar {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.card-pro-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-pro-avatar span {
    font-size: 22px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.card-pro-badges {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: flex-start;
}

.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
}

.verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 8px;
    background: #dcfce7;
    color: #15803d;
}

.card-pro-body {
    padding: 12px 16px;
}

.card-pro-title {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-pro-location {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-pro-description {
    font-size: 13px;
    color: #4b5563;
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-pro-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
}

.card-pro-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.stat-label {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
}

.member-status {
    font-size: 12px;
    font-weight: 600;
    color: #15803d;
    background: #dcfce7;
    padding: 8px 14px;
    border-radius: 10px;
}

.join-btn-pro {
    background: linear-gradient(135deg, #0B2E44 0%, #164e6e 100%);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(11, 46, 68, 0.25);
}

.join-btn-pro:hover {
    box-shadow: 0 4px 12px rgba(11, 46, 68, 0.35);
}

.join-btn-pro:active {
    transform: scale(0.95);
}

/* Lista de eventos en exploración */
.explore-events-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.explore-event-card {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.explore-event-card:active {
    transform: scale(0.98);
}

.explore-event-date {
    flex-shrink: 0;
    width: 54px;
    padding: 10px 8px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    text-align: center;
}

.explore-event-date .event-date-day {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #0B2E44;
    line-height: 1;
}

.explore-event-date .event-date-month {
    display: block;
    font-size: 11px;
    color: #0369a1;
    text-transform: uppercase;
    font-weight: 600;
    margin-top: 2px;
}

.explore-event-date .event-date-distance {
    display: block;
    font-size: 9px;
    color: #166534;
    background: #dcfce7;
    padding: 2px 4px;
    border-radius: 4px;
    margin-top: 4px;
    font-weight: 600;
}

.explore-event-info {
    flex: 1;
    min-width: 0;
}

.explore-event-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.explore-event-header .event-icon {
    font-size: 18px;
}

.explore-event-header h4 {
    font-size: 15px;
    font-weight: 600;
    color: #0B2E44;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.explore-event-community {
    font-size: 13px;
    color: #0369a1;
    margin: 0 0 6px 0;
}

.explore-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12px;
    color: #666;
}

.explore-event-spots {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    background: #f0fdf4;
    color: #166534;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
}

.explore-event-spots.full {
    background: #fee2e2;
    color: #991b1b;
}

.explore-event-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 10px;
    background: #f5f5f5;
    color: #666;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
}

.explore-event-badge.today {
    background: #dcfce7;
    color: #166534;
}

/* ==========================================
   NOTIFICACIONES
   ========================================== */

.notifications-screen {
    padding-bottom: 32px;
}

.notifications-list {
    padding: 0 20px;
}

.notification-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px;
    background: white;
    border-radius: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.notification-item.unread {
    background: #f0f9ff;
    border-left: 3px solid #0B2E44;
}

.notification-item:active {
    transform: scale(0.98);
}

.notification-icon {
    font-size: 28px;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-content h4 {
    font-size: 15px;
    font-weight: 600;
    color: #0B2E44;
    margin: 0 0 4px 0;
}

.notification-content p {
    font-size: 13px;
    color: #555;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.notification-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
}

.notification-community {
    color: #0369a1;
    font-weight: 500;
}

.notification-time {
    color: #888;
}

.notification-unread-dot {
    width: 10px;
    height: 10px;
    background: #0B2E44;
    border-radius: 50%;
    flex-shrink: 0;
    align-self: center;
}

.notifications-empty {
    text-align: center;
    padding: 60px 20px;
}

.notifications-empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.notifications-empty p {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.notifications-empty span {
    font-size: 14px;
    color: #888;
}

.mark-all-read-btn {
    padding: 8px 14px;
    background: #f5f5f5;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.2s ease;
}

.mark-all-read-btn:active {
    background: #eee;
}

/* ==========================================
   TOGGLE SWITCH
   ========================================== */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #0B2E44;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* ==========================================
   CONFIGURACIÓN DE NOTIFICACIONES
   ========================================== */

.notification-settings-content {
    padding: 16px 0;
}

.notification-setting-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #f9fafb;
    border-radius: 12px;
}

.notification-setting-info {
    flex: 1;
}

.notification-setting-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: #0B2E44;
    margin: 0 0 4px 0;
}

.notification-setting-info p {
    font-size: 13px;
    color: #666;
    margin: 0;
}

/* ==========================================
   MODAL DE INVITACIÓN
   ========================================== */

.invite-modal {
    text-align: center;
}

.invite-content {
    padding: 16px 0;
}

.invite-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.invite-content > p {
    font-size: 14px;
    color: #555;
    margin: 0 0 20px 0;
}

.invite-link-box {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.invite-link-box input {
    flex: 1;
    padding: 12px 14px;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    font-size: 13px;
    color: #333;
    background: #f9fafb;
}

.copy-link-btn {
    padding: 12px 16px;
    background: #0B2E44;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.copy-link-btn:active {
    transform: scale(0.95);
}

.invite-share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.share-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.share-btn:active {
    transform: scale(0.95);
}

.share-btn.whatsapp {
    background: #25D366;
    color: white;
}

.share-btn.telegram {
    background: #0088cc;
    color: white;
}

.share-btn.native {
    background: #f5f5f5;
    color: #333;
}

/* ==========================================
   UBICACIÓN / GEOLOCALIZACIÓN
   ========================================== */

.location-picker {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.location-coords {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: #f9fafb;
    border-radius: 10px;
    font-size: 14px;
}

.location-coords .no-location {
    color: #888;
}

.location-coords .has-location {
    color: #166534;
    font-weight: 500;
}

.location-coords .loading-location {
    color: #0369a1;
}

.btn-view-map {
    padding: 6px 12px;
    background: #0B2E44;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.btn-clear-location {
    width: 28px;
    height: 28px;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
    margin-left: auto;
}

.btn-get-location,
.btn-search-location {
    padding: 12px 16px;
    background: #f5f5f5;
    border: 2px solid #e5e5e5;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-get-location:active,
.btn-search-location:active {
    background: #eee;
    transform: scale(0.98);
}

/* ==========================================
   EXPLORAR - CERCANÍA
   ========================================== */

.explore-nearby-section {
    padding: 12px 20px;
    background: #f0fdf4;
    border-bottom: 1px solid #bbf7d0;
}

.btn-find-nearby {
    width: 100%;
    padding: 14px;
    background: white;
    border: 2px solid #22c55e;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    color: #166534;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-find-nearby:active {
    background: #f0fdf4;
    transform: scale(0.98);
}

.nearby-active {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: white;
    border-radius: 10px;
}

.nearby-active .nearby-icon {
    font-size: 20px;
}

.nearby-active span:nth-child(2) {
    flex: 1;
    font-size: 13px;
    color: #166534;
    font-weight: 500;
}

.btn-clear-nearby {
    width: 28px;
    height: 28px;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 50%;
    font-size: 14px;
    cursor: pointer;
}

.nearby-loading {
    text-align: center;
    padding: 14px;
    color: #0369a1;
    font-weight: 500;
}

/* Badge de distancia */
.distance-badge {
    position: absolute;
    bottom: 4px;
    right: 4px;
    padding: 4px 8px;
    background: rgba(0, 0, 0, 0.75);
    color: white;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.explore-card-image {
    position: relative;
}

/* Botón abrir mapa */
.btn-open-maps {
    padding: 4px 8px;
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-open-maps:active {
    background: #e0f2fe;
    transform: scale(0.95);
}

/* Eventos con distancia */
.explore-event-distance {
    display: inline-block;
    padding: 3px 8px;
    background: #f0f9ff;
    color: #0369a1;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

/* ==========================================
   ANIMACIONES Y TRANSICIONES
   ========================================== */

/* Animación de entrada para tarjetas */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Aplicar animaciones a elementos */
.community-card-v2 {
    animation: fadeInUp 0.4s ease-out forwards;
}

.community-list .community-card-v2:nth-child(1) { animation-delay: 0ms; }
.community-list .community-card-v2:nth-child(2) { animation-delay: 50ms; }
.community-list .community-card-v2:nth-child(3) { animation-delay: 100ms; }
.community-list .community-card-v2:nth-child(4) { animation-delay: 150ms; }
.community-list .community-card-v2:nth-child(5) { animation-delay: 200ms; }

.community-section {
    animation: fadeIn 0.3s ease-out forwards;
}

.community-empty-state {
    animation: scaleIn 0.4s ease-out forwards;
}

.event-card-new {
    animation: fadeInUp 0.3s ease-out forwards;
}

/* Animaciones para explore grid */
.communities-grid .community-card-pro {
    animation: fadeInUp 0.4s ease-out forwards;
    opacity: 0;
}

.communities-grid .community-card-pro:nth-child(1) { animation-delay: 0ms; }
.communities-grid .community-card-pro:nth-child(2) { animation-delay: 40ms; }
.communities-grid .community-card-pro:nth-child(3) { animation-delay: 80ms; }
.communities-grid .community-card-pro:nth-child(4) { animation-delay: 120ms; }
.communities-grid .community-card-pro:nth-child(5) { animation-delay: 160ms; }
.communities-grid .community-card-pro:nth-child(6) { animation-delay: 200ms; }

/* ==========================================
   CARRUSEL DE COMUNIDADES DESTACADAS
   ========================================== */

.featured-communities {
    margin: 0 -20px;
    padding: 0 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.featured-communities::-webkit-scrollbar {
    display: none;
}

.featured-communities-track {
    display: flex;
    gap: 12px;
    padding: 4px 0 16px;
}

.featured-card {
    flex: 0 0 auto;
    width: 160px;
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
}

.featured-card:active {
    transform: scale(0.97);
}

.featured-card-header {
    height: 60px;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 8px;
}

.featured-card-badge {
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    font-size: 9px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.featured-card-body {
    padding: 10px 12px 12px;
}

.featured-card-name {
    font-size: 13px;
    font-weight: 700;
    color: #0B2E44;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.featured-card-location {
    font-size: 11px;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
}

.featured-card-location svg {
    width: 10px;
    height: 10px;
    stroke: #aaa;
}

.featured-card-members {
    font-size: 10px;
    color: #666;
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==========================================
   MEJORAS DE HEADERS DE SECCIÓN
   ========================================== */

.community-section-header h3 {
    position: relative;
    padding-left: 12px;
}

.community-section-header h3::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 18px;
    background: linear-gradient(180deg, #D4B06A 0%, #c4a05a 100%);
    border-radius: 2px;
}

/* Botón de añadir mejorado */
.community-add-btn {
    background: linear-gradient(135deg, #0B2E44 0%, #1a4a6b 100%);
    box-shadow: 0 3px 10px rgba(11, 46, 68, 0.3);
}

.community-add-btn:active {
    box-shadow: 0 1px 5px rgba(11, 46, 68, 0.3);
}

/* ==========================================
   MEJORAS EXPLORE PANEL
   ========================================== */

.explore-header {
    background: linear-gradient(135deg, #0B2E44 0%, #154A6F 100%);
}

.explore-tabs {
    background: rgba(11, 46, 68, 0.03);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 16px;
}

.explore-tab {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.explore-tab.active {
    background: white;
    color: #0B2E44;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.communities-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 380px) {
    .communities-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

/* ==========================================
   PULIDO FINAL
   ========================================== */

/* Mejorar botones explore */
.community-explore-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.community-explore-btn:active {
    transform: scale(0.97);
    box-shadow: 0 2px 8px rgba(11, 46, 68, 0.3);
}

/* Loading spinner mejorado */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(11, 46, 68, 0.1);
    border-top-color: #0B2E44;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================
   CUSTOM DROPDOWN CON ICONOS
   ========================================== */

.custom-dropdown {
    position: relative;
    width: 100%;
}

.custom-dropdown-trigger {
    width: 100%;
    padding: 12px 16px;
    padding-right: 40px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    color: #334155;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s ease;
    text-align: left;
}

.custom-dropdown-trigger:hover {
    border-color: #0B2E44;
}

.custom-dropdown-trigger:focus {
    outline: none;
    border-color: #0B2E44;
    box-shadow: 0 0 0 3px rgba(11, 46, 68, 0.1);
}

.custom-dropdown-trigger .dropdown-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
}

.custom-dropdown-trigger .dropdown-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-dropdown-trigger .dropdown-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    stroke: #64748b;
    transition: transform 0.2s ease;
    pointer-events: none;
}

.custom-dropdown.open .dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.custom-dropdown-trigger.placeholder .dropdown-text {
    color: #94a3b8;
}

/* Lista de opciones */
.custom-dropdown-options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    max-height: 280px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
}

.custom-dropdown.open .custom-dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-dropdown-option {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.custom-dropdown-option:first-child {
    border-radius: 11px 11px 0 0;
}

.custom-dropdown-option:last-child {
    border-radius: 0 0 11px 11px;
}

.custom-dropdown-option:hover {
    background: #f1f5f9;
}

.custom-dropdown-option.selected {
    background: rgba(11, 46, 68, 0.08);
}

.custom-dropdown-option .option-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.custom-dropdown-option .option-text {
    flex: 1;
    font-size: 15px;
    color: #334155;
}

.custom-dropdown-option.selected .option-text {
    font-weight: 600;
    color: #0B2E44;
}

/* Checkmark para opción seleccionada */
.custom-dropdown-option .option-check {
    width: 18px;
    height: 18px;
    stroke: #0B2E44;
    opacity: 0;
    flex-shrink: 0;
}

.custom-dropdown-option.selected .option-check {
    opacity: 1;
}

/* Scrollbar estilizado */
.custom-dropdown-options::-webkit-scrollbar {
    width: 6px;
}

.custom-dropdown-options::-webkit-scrollbar-track {
    background: transparent;
}

.custom-dropdown-options::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* Dropdown pequeño para filtros */
.custom-dropdown.small .custom-dropdown-trigger {
    padding: 10px 14px;
    padding-right: 36px;
    font-size: 14px;
    border-radius: 10px;
}

.custom-dropdown.small .dropdown-icon {
    width: 18px;
    height: 18px;
}

.custom-dropdown.small .custom-dropdown-options {
    max-height: 240px;
}

.custom-dropdown.small .custom-dropdown-option {
    padding: 10px 14px;
}

.custom-dropdown.small .option-icon {
    width: 20px;
    height: 20px;
}

/* ==========================================
   COMMUNITY DETAIL V2 - DISEÑO PROFESIONAL
   ========================================== */

.community-detail-v2 {
    padding-bottom: 32px;
}

/* Header flotante v2 */
.community-detail-header-v2 {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(to bottom, rgba(11, 46, 68, 0.95) 0%, transparent 100%);
    z-index: 100;
    pointer-events: none;
}

.community-back-btn-v2,
.community-settings-btn-v2 {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    pointer-events: auto;
}

.community-back-btn-v2 svg,
.community-settings-btn-v2 svg {
    stroke: white;
}

.community-back-btn-v2:active,
.community-settings-btn-v2:active {
    transform: scale(0.92);
    background: rgba(255, 255, 255, 0.25);
}

/* Hero con imagen de fondo */
.community-hero-v2 {
    position: relative;
    min-height: 220px;
    margin-top: -64px;
    background-color: #0B2E44;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
}

.community-hero-overlay {
    width: 100%;
    padding: 60px 20px 24px;
    background: linear-gradient(to top,
        rgba(11, 46, 68, 0.98) 0%,
        rgba(11, 46, 68, 0.7) 50%,
        transparent 100%
    );
}

.community-hero-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(212, 176, 106, 0.3) 0%, rgba(212, 176, 106, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: 700;
    color: rgba(212, 176, 106, 0.7);
    font-family: 'Lora', serif;
}

.community-hero-content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.community-hero-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.community-type-badge-v2 {
    padding: 4px 12px;
    background: rgba(212, 176, 106, 0.25);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    color: #D4B06A;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.community-verified-badge-v2 {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #D4B06A;
    display: flex;
    align-items: center;
    justify-content: center;
}

.community-verified-badge-v2 svg {
    fill: white;
}

.community-hero-title {
    font-family: 'Lora', serif;
    font-size: 26px;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.community-hero-location {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: all 0.2s ease;
    margin-top: 4px;
}

.community-hero-location svg {
    stroke: #D4B06A;
    flex-shrink: 0;
}

.community-hero-location .external-link-icon {
    opacity: 0.6;
    transition: opacity 0.2s;
}

.community-hero-location:hover,
.community-hero-location:active {
    color: #D4B06A;
}

.community-hero-location:hover .external-link-icon {
    opacity: 1;
}

/* Stats cards */
.community-stats-v2 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 20px;
    margin-top: -10px;
}

.stat-card-v2 {
    background: white;
    border-radius: 16px;
    padding: 16px 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.2s ease;
}

.stat-card-v2:active {
    transform: scale(0.95);
}

.stat-card-number {
    display: block;
    font-size: 24px;
    font-weight: 700;
    color: #0B2E44;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Sección de contacto v2 */
.community-contact-section-v2 {
    margin: 0 20px 16px;
    padding: 16px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.community-contact-section-v2 h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #888;
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.community-contact-section-v2 h3 svg {
    stroke: #D4B06A;
}

.contact-creator-card-v2 {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-creator-avatar-v2 {
    position: relative;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.contact-creator-avatar-v2 img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(212, 176, 106, 0.3);
}

.avatar-placeholder-v2 {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0B2E44 0%, #164163 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
}

.creator-badge-v2 {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #D4B06A;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.creator-badge-v2 svg {
    fill: white;
}

.contact-creator-info-v2 {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.contact-creator-name-v2 {
    font-size: 15px;
    font-weight: 600;
    color: #0B2E44;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-creator-role-v2 {
    font-size: 12px;
    color: #888;
}

.contact-message-btn-v2 {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #0B2E44;
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.contact-message-btn-v2 svg {
    stroke: white;
}

.contact-message-btn-v2:active {
    transform: scale(0.95);
    background: #164163;
}

/* Modal de mensaje al creador - Overlay */
#message-creator-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal de mensaje al creador */
.message-creator-modal {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.message-creator-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.message-creator-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 17px;
    font-weight: 600;
    color: #0B2E44;
    margin: 0;
}

.message-creator-header h3 svg {
    stroke: #D4B06A;
}

.modal-close-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close-btn:active {
    background: #e5e5e5;
    transform: scale(0.95);
}

.modal-close-btn svg {
    stroke: #666;
}

.message-creator-body {
    padding: 20px;
}

.message-context {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px 0;
    padding: 10px 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.message-context strong {
    color: #0B2E44;
}

#message-creator-text {
    width: 100%;
    padding: 14px;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    resize: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

#message-creator-text:focus {
    outline: none;
    border-color: #D4B06A;
}

#message-creator-text::placeholder {
    color: #aaa;
}

.message-char-count {
    text-align: right;
    font-size: 12px;
    color: #888;
    margin-top: 6px;
}

.message-creator-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.message-creator-footer .btn-cancel {
    flex: 1;
    padding: 12px;
    background: white;
    border: 2px solid #e5e5e5;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.message-creator-footer .btn-cancel:active {
    background: #f5f5f5;
}

.btn-send-message {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: #0B2E44;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-send-message:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.btn-send-message:not(:disabled):active {
    background: #164163;
    transform: scale(0.98);
}

.btn-send-message svg {
    stroke: white;
}

.spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Modal overlay closing animation */
.community-modal-overlay.closing {
    opacity: 0;
}

.community-modal-overlay.closing .message-creator-modal {
    transform: translateY(20px);
}

/* Dark mode adaptations for v2 */
.theme-dark .community-detail-v2 {
    background: #1a1a2e;
}

.theme-dark .community-hero-v2 {
    background-color: #16213e;
}

.theme-dark .stat-card-v2 {
    background: #16213e;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.theme-dark .stat-card-number {
    color: white;
}

.theme-dark .community-contact-section-v2 {
    background: #16213e;
}

.theme-dark .contact-creator-name-v2 {
    color: white;
}

.theme-dark .message-creator-modal {
    background: #16213e;
}

.theme-dark .message-creator-header {
    border-color: rgba(255, 255, 255, 0.1);
}

.theme-dark .message-creator-header h3 {
    color: white;
}

.theme-dark .modal-close-btn {
    background: rgba(255, 255, 255, 0.1);
}

.theme-dark .modal-close-btn svg {
    stroke: #aaa;
}

.theme-dark .message-context {
    background: rgba(255, 255, 255, 0.05);
    color: #aaa;
}

.theme-dark .message-context strong {
    color: white;
}

.theme-dark #message-creator-text {
    background: #1a1a2e;
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.theme-dark #message-creator-text:focus {
    border-color: #D4B06A;
}

.theme-dark .message-creator-footer {
    background: rgba(255, 255, 255, 0.02);
    border-color: rgba(255, 255, 255, 0.1);
}

.theme-dark .message-creator-footer .btn-cancel {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.2);
    color: #aaa;
}

/* ==========================================
   BUZÓN DE MENSAJES (INBOX)
   ========================================== */

.community-inbox {
    min-height: 100vh;
    background: #f5f5f5;
}

.inbox-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: white;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    z-index: 10;
}

.inbox-header .community-back-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f5f5f5;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}

.inbox-header .community-back-btn:active {
    background: #e5e5e5;
}

.inbox-header .community-back-btn svg {
    stroke: #333;
}

.inbox-header-text {
    flex: 1;
    min-width: 0;
}

.inbox-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #0B2E44;
    margin: 0;
}

.inbox-community-name {
    font-size: 12px;
    color: #888;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-unread-count {
    padding: 4px 10px;
    background: #D4B06A;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
    flex-shrink: 0;
}

.inbox-messages {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.inbox-message {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    position: relative;
    transition: all 0.2s ease;
}

.inbox-message.unread {
    background: linear-gradient(to right, rgba(212, 176, 106, 0.08), white);
    border-left: 3px solid #D4B06A;
}

.inbox-message-avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
}

.inbox-message-avatar img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.inbox-message-avatar .avatar-placeholder {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0B2E44 0%, #164163 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 600;
}

.inbox-message-content {
    flex: 1;
    min-width: 0;
}

.inbox-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.inbox-message-sender {
    font-size: 14px;
    font-weight: 600;
    color: #0B2E44;
}

.inbox-message.unread .inbox-message-sender {
    font-weight: 700;
}

.inbox-message-date {
    font-size: 11px;
    color: #888;
}

.inbox-message-text {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin: 0;
    word-wrap: break-word;
}

.inbox-unread-dot {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #D4B06A;
}

.inbox-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.inbox-empty-state svg {
    margin-bottom: 20px;
}

.inbox-empty-state h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.inbox-empty-state p {
    font-size: 14px;
    color: #888;
    margin: 0;
    max-width: 280px;
}

.inbox-empty {
    min-height: 100vh;
    background: #f5f5f5;
}

.inbox-empty-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.inbox-empty-content svg {
    margin-bottom: 20px;
}

.inbox-empty-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.inbox-empty-content p {
    font-size: 14px;
    color: #888;
    margin: 0 0 24px 0;
}

/* Badge en botón de configuración */
.inbox-btn {
    position: relative;
}

.inbox-btn svg {
    stroke: #D4B06A;
}

.inbox-badge {
    position: absolute;
    top: 50%;
    right: 16px;
    transform: translateY(-50%);
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #e74c3c;
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inbox-badge.hidden {
    display: none;
}

/* Dark mode inbox */
.theme-dark .community-inbox {
    background: #1a1a2e;
}

.theme-dark .inbox-header {
    background: #16213e;
    border-color: rgba(255, 255, 255, 0.1);
}

.theme-dark .inbox-header .community-back-btn {
    background: rgba(255, 255, 255, 0.1);
}

.theme-dark .inbox-header .community-back-btn svg {
    stroke: white;
}

.theme-dark .inbox-header h2 {
    color: white;
}

.theme-dark .inbox-message {
    background: #16213e;
}

.theme-dark .inbox-message.unread {
    background: linear-gradient(to right, rgba(212, 176, 106, 0.1), #16213e);
}

.theme-dark .inbox-message-sender {
    color: white;
}

.theme-dark .inbox-message-text {
    color: #aaa;
}

.theme-dark .inbox-empty {
    background: #1a1a2e;
}

.theme-dark .inbox-empty-state h3,
.theme-dark .inbox-empty-content h3 {
    color: white;
}

/* Botón de responder en inbox */
.inbox-reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 14px;
    background: #f5f5f5;
    border: none;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #0B2E44;
    cursor: pointer;
    transition: all 0.2s;
}

.inbox-reply-btn svg {
    stroke: #0B2E44;
}

.inbox-reply-btn:active {
    background: #e5e5e5;
    transform: scale(0.95);
}

.theme-dark .inbox-reply-btn {
    background: rgba(255, 255, 255, 0.1);
    color: #ddd;
}

.theme-dark .inbox-reply-btn svg {
    stroke: #ddd;
}

/* Sección Mis Mensajes */
.my-messages-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 16px;
    background: white;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    margin-bottom: 16px;
}

.my-messages-btn svg {
    stroke: #D4B06A;
}

.my-messages-btn:active {
    transform: scale(0.98);
    background: #f9f9f9;
}

.my-messages-btn .messages-badge {
    margin-left: auto;
    padding: 2px 8px;
    background: #e74c3c;
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
}

.theme-dark .my-messages-btn {
    background: #16213e;
    color: #ddd;
}

/* Nombre de comunidad en mensaje */
.inbox-message-community {
    display: block;
    font-size: 11px;
    color: #D4B06A;
    margin-bottom: 4px;
}

.theme-dark .inbox-message-community {
    color: #D4B06A;
}

/* Indicador de mensaje enviado */
.msg-sent-indicator {
    color: #888;
    font-weight: 500;
}

/* Badge de no leídos en conversación */
.inbox-unread-badge {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #D4B06A;
    color: white;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

/* Flecha en items de conversación */
.conversation-arrow {
    stroke: #ccc;
    flex-shrink: 0;
}

.conversation-item {
    cursor: pointer;
}

.conversation-item:active {
    background: #f5f5f5;
}

/* Vista de hilo de conversación */
.conversation-thread {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: #f5f5f5;
}

.conversation-header-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.conversation-header-avatar img,
.conversation-header-avatar .avatar-placeholder-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.avatar-placeholder-small {
    background: linear-gradient(135deg, #0B2E44 0%, #164163 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.conversation-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.conversation-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
}

.conversation-bubble p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    word-wrap: break-word;
}

.conversation-bubble.sent {
    align-self: flex-end;
    background: #0B2E44;
    color: white;
    border-bottom-right-radius: 6px;
}

.conversation-bubble.received {
    align-self: flex-start;
    background: white;
    color: #333;
    border-bottom-left-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.bubble-time {
    display: block;
    font-size: 10px;
    margin-top: 6px;
    opacity: 0.7;
}

.conversation-bubble.sent .bubble-time {
    text-align: right;
    color: rgba(255, 255, 255, 0.7);
}

.conversation-bubble.received .bubble-time {
    color: #888;
}

/* Caja de respuesta */
.conversation-reply-box {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    padding: 12px 16px;
    background: white;
    border-top: 1px solid #eee;
}

.conversation-reply-box textarea {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    font-size: 14px;
    font-family: inherit;
    resize: none;
    max-height: 100px;
    line-height: 1.4;
}

.conversation-reply-box textarea:focus {
    outline: none;
    border-color: #D4B06A;
}

.conversation-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0B2E44;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.conversation-send-btn svg {
    stroke: white;
}

.conversation-send-btn:disabled {
    background: #ccc;
}

.conversation-send-btn:not(:disabled):active {
    transform: scale(0.92);
    background: #164163;
}

/* Dark mode conversación */
.theme-dark .conversation-thread {
    background: #1a1a2e;
}

.theme-dark .conversation-item:active {
    background: rgba(255, 255, 255, 0.05);
}

.theme-dark .conversation-bubble.received {
    background: #16213e;
    color: #ddd;
}

.theme-dark .conversation-reply-box {
    background: #16213e;
    border-color: rgba(255, 255, 255, 0.1);
}

.theme-dark .conversation-reply-box textarea {
    background: #1a1a2e;
    border-color: rgba(255, 255, 255, 0.1);
    color: white;
}
