/* ============================================================
   ÁREA DE COMUNIDAD - DISEÑO ESPECTACULAR
   Paleta de colores: #74132e (vino) y #ffb44f (dorado)
   ============================================================ */

/* Contenedor principal de comunidad */
.comunidad-container {
    animation: fadeInUp 0.8s ease;
}

/* ============================================================
   CTA PARA USUARIOS NO REGISTRADOS
   ============================================================ */
.comunidad-cta {
    background:
        linear-gradient(135deg, rgba(253, 245, 230, 0.95) 0%, rgba(249, 243, 232, 0.95) 100%),
        url('../img/books-background.jpg') center/cover no-repeat;
    border-radius: 16px;
    border-left: 6px solid #ffb44f;
    padding: 40px;
    box-shadow:
        0 8px 24px rgba(116, 19, 46, 0.15),
        inset 0 2px 4px rgba(184, 101, 26, 0.05);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.comunidad-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        #74132e 0%,
        #ffb44f 25%,
        #b8651a 50%,
        #ffb44f 75%,
        #74132e 100%);
    opacity: 0.6;
}

.comunidad-cta-header {
    margin-bottom: 20px;
}

.comunidad-cta-header i {
    font-size: 3.5rem;
    color: #ffb44f;
    display: block;
    margin-bottom: 15px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.comunidad-cta-header h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #74132e;
    margin: 0;
    text-shadow: 0 2px 4px rgba(116, 19, 46, 0.1);
}

.comunidad-cta-text {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.8;
    margin: 20px 0 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Stats preview */
.comunidad-stats-preview {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.stat-preview-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 25px;
    border: 2px solid rgba(184, 101, 26, 0.2);
    transition: all 0.3s ease;
}

.stat-preview-item:hover {
    border-color: #ffb44f;
    box-shadow: 0 4px 12px rgba(255, 180, 79, 0.3);
    transform: translateY(-2px);
}

.stat-preview-item i {
    font-size: 1.5rem;
    color: #74132e;
}

.stat-preview-item span {
    font-weight: 600;
    color: #74132e;
    font-size: 1.1rem;
}

/* Botones del CTA */
.comunidad-cta-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.btn-comunidad-join {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 30px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.15rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #74132e 0%, #8d1a3a 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(116, 19, 46, 0.4);
}

.btn-comunidad-join::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-comunidad-join:hover::before {
    left: 100%;
}

.btn-comunidad-join:hover {
    background: linear-gradient(135deg, #8d1a3a 0%, #a52244 100%);
    color: white;
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 25px rgba(116, 19, 46, 0.5);
}

/* Nota del CTA */
.comunidad-cta-note {
    text-align: center;
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

.link-acceso {
    color: #74132e;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.link-acceso:hover {
    color: #ffb44f;
    border-bottom-color: #ffb44f;
}

/* ============================================================
   PANEL DE BIENVENIDA (USUARIOS REGISTRADOS)
   ============================================================ */
.comunidad-welcome {
    background: linear-gradient(135deg, #ffffff 0%, #fdf5e6 100%);
    border-radius: 16px;
    border: 2px solid rgba(255, 180, 79, 0.3);
    padding: 30px;
    box-shadow: 0 6px 20px rgba(116, 19, 46, 0.12);
    transition: all 0.3s ease;
}

.comunidad-welcome:hover {
    box-shadow: 0 10px 30px rgba(116, 19, 46, 0.18);
    transform: translateY(-2px);
}

.comunidad-welcome-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid rgba(116, 19, 46, 0.1);
}

.welcome-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #ffb44f;
    box-shadow: 0 4px 12px rgba(255, 180, 79, 0.4);
    flex-shrink: 0;
}

.welcome-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.welcome-avatar i {
    font-size: 4rem;
    color: #74132e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-info h4 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #74132e;
    margin: 0;
}

.welcome-info p {
    color: #b8651a;
    margin: 5px 0 0;
    font-size: 0.95rem;
}

/* User stats en el panel de bienvenida */
.comunidad-user-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: space-around;
}

.user-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #fdf5e6 0%, #f9f3e8 100%);
    border-radius: 12px;
    flex: 1;
    transition: all 0.3s ease;
}

.user-stat-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(255, 180, 79, 0.3);
}

.stat-value {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 700;
    color: #74132e;
    display: block;
}

.stat-label {
    font-size: 0.85rem;
    color: #b8651a;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-ver-perfil {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: linear-gradient(135deg, #74132e 0%, #8d1a3a 100%);
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 4px 12px rgba(116, 19, 46, 0.3);
    width: 100%;
    justify-content: center;
}

.btn-ver-perfil:hover {
    background: linear-gradient(135deg, #8d1a3a 0%, #a52244 100%);
    color: white;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 18px rgba(116, 19, 46, 0.4);
}

/* ============================================================
   ACTIVIDAD RECIENTE
   ============================================================ */
.comunidad-activity {
    background: linear-gradient(135deg, #fdf5e6 0%, #f9f3e8 100%);
    border-radius: 12px;
    border-left: 6px solid #b8651a;
    padding: 25px;
    box-shadow: 0 6px 18px rgba(116, 19, 46, 0.1);
}

.comunidad-section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #74132e;
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comunidad-section-title i {
    color: #ffb44f;
    font-size: 1.3rem;
}

.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 10px;
    border-left: 3px solid #ffb44f;
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(255, 180, 79, 0.2);
    transform: translateX(5px);
}

.activity-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #ffb44f;
    flex-shrink: 0;
}

.activity-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.activity-avatar i {
    font-size: 2.5rem;
    color: #74132e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-content {
    flex: 1;
}

.activity-user {
    font-weight: 700;
    color: #74132e;
    margin: 0 0 5px 0;
    font-size: 0.95rem;
}

.activity-action {
    color: #666;
    margin: 0 0 8px 0;
    font-size: 0.9rem;
}

.activity-action a {
    color: #74132e;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.activity-action a:hover {
    color: #ffb44f;
    text-decoration: underline;
}

.activity-meta {
    display: flex;
    gap: 15px;
    align-items: center;
}

.activity-rating {
    color: #ffb44f;
    font-size: 1rem;
}

.activity-time {
    color: #999;
    font-size: 0.8rem;
}

/* ============================================================
   MIEMBROS DESTACADOS
   ============================================================ */
.comunidad-featured {
    background: linear-gradient(135deg, #ffffff 0%, #fdf5e6 100%);
    border-radius: 12px;
    border: 2px solid rgba(255, 180, 79, 0.3);
    padding: 25px;
    box-shadow: 0 6px 18px rgba(116, 19, 46, 0.1);
}

.featured-members {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.featured-member-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #fdf5e6 0%, #f9f3e8 100%);
    border-radius: 10px;
    border: 2px solid rgba(184, 101, 26, 0.2);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.featured-member-card:hover {
    border-color: #ffb44f;
    box-shadow: 0 6px 16px rgba(255, 180, 79, 0.3);
    transform: translateY(-3px) scale(1.02);
}

.featured-avatar {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #ffb44f;
    box-shadow: 0 4px 10px rgba(255, 180, 79, 0.3);
    flex-shrink: 0;
}

.featured-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-avatar i {
    font-size: 3rem;
    color: #74132e;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-info {
    flex: 1;
}

.featured-info h5 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #74132e;
    margin: 0 0 5px 0;
}

.featured-stats {
    color: #b8651a;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.featured-stats i {
    color: #ffb44f;
    margin-right: 5px;
}

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

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .comunidad-cta {
        padding: 30px 20px;
    }

    .comunidad-cta-header h3 {
        font-size: 1.6rem;
    }

    .comunidad-cta-header i {
        font-size: 2.5rem;
    }

    .comunidad-cta-text {
        font-size: 1rem;
    }

    .comunidad-stats-preview {
        gap: 20px;
    }

    .stat-preview-item {
        padding: 12px 20px;
    }

    .btn-comunidad-join {
        width: 100%;
        justify-content: center;
    }

    .comunidad-welcome-header {
        flex-direction: column;
        text-align: center;
    }

    .comunidad-user-stats {
        flex-direction: column;
        gap: 15px;
    }

    .activity-item {
        flex-direction: column;
        text-align: center;
    }

    .activity-avatar {
        margin: 0 auto;
    }

    .activity-meta {
        justify-content: center;
    }

    .featured-member-card {
        flex-direction: column;
        text-align: center;
    }

    .featured-avatar {
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .comunidad-cta {
        padding: 25px 15px;
    }

    .comunidad-cta-header h3 {
        font-size: 1.4rem;
    }

    .comunidad-stats-preview {
        flex-direction: column;
        gap: 15px;
    }

    .stat-preview-item {
        width: 100%;
    }

    .btn-comunidad-join {
        font-size: 1rem;
        padding: 12px 24px;
    }

    .welcome-avatar {
        width: 60px;
        height: 60px;
    }

    .welcome-info h4 {
        font-size: 1.3rem;
    }
}
