:root {
    --app-bg: #f5f7fb;
}

html, body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    background: var(--app-bg);
}

.hero {
    background:
        radial-gradient(circle at top left, rgba(13,110,253,.16), transparent 35%),
        radial-gradient(circle at bottom right, rgba(111,66,193,.14), transparent 35%),
        #ffffff;
}

.activity-card,
.app-card {
    border: 0;
    border-radius: 1.25rem;
    box-shadow: 0 .5rem 1.5rem rgba(17,24,39,.08);
}

.activity-image {
    width: 100%;
    height: 330px;
    object-fit: cover;
    border-radius: 1rem;
    background: #e9ecef;
}

.empty-image {
    height: 330px;
    border-radius: 1rem;
    background: linear-gradient(135deg, #eef4ff, #f3edff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: #0d6efd;
}

.login-wrapper,
.register-wrapper {
    min-height: calc(100vh - 74px);
}

.stat-card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 .35rem 1rem rgba(17,24,39,.06);
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef4ff;
    color: #0d6efd;
    font-size: 1.3rem;
}


/* ============================================================
   ACTIVIDAD PÚBLICA / ESTILO SOCIAL
   ============================================================ */

.activity-detail-image {
    width: 100%;
    height: 370px;
    object-fit: cover;
    border-radius: 1rem;
    background: #e9ecef;
}

.activity-detail-empty {
    width: 100%;
    height: 370px;
    border-radius: 1rem;
    background: linear-gradient(135deg, #eef4ff, #f3edff);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: #0d6efd;
}

.activity-info-box {
    height: 100%;
    border: 1px solid #dee2e6;
    border-radius: .85rem;
    padding: 1rem;
    background: #fff;
}

.character-card {
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 .35rem 1rem rgba(17,24,39,.07);
    transition: transform .2s ease, box-shadow .2s ease;
}

.character-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 .7rem 1.5rem rgba(17,24,39,.10);
}

.character-image {
    width: 100%;
    height: 260px;
    object-fit: cover;
    background: #e9ecef;
}

.character-empty {
    width: 100%;
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #eef4ff, #f3edff);
    color: #0d6efd;
    font-size: 4rem;
}

.social-post {
    border-radius: 1rem;
}

.social-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #111827;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.social-avatar-primary {
    background: #0d6efd;
    font-size: 1.15rem;
}

.social-avatar-muted {
    background: #e9ecef;
    color: #6c757d;
    font-size: 1.15rem;
}

.social-comment-text {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.55;
}

.min-w-0 {
    min-width: 0;
}

@media (max-width: 767.98px) {
    .activity-detail-image,
    .activity-detail-empty {
        height: 280px;
    }

    .character-image,
    .character-empty {
        height: 230px;
    }
}


/* Personajes: la tarjeta pública solo muestra imagen, nombre y comentarios. */
.character-card .card-body {
    display: flex;
    flex-direction: column;
}

.character-card .card-body .btn {
    margin-top: auto;
}


/* ============================================================
   ACTIVIDAD.PHP - CABECERA SIMPLIFICADA
   ============================================================ */

.actividad-detalle-card {
    overflow: hidden;
    border: 0;
    border-radius: 1.35rem;
    background: #fff;
    box-shadow: 0 .65rem 2rem rgba(17,24,39,.08);
}

.actividad-detalle-grid {
    display: grid;
    grid-template-columns: minmax(320px, 43%) 1fr;
    min-height: 410px;
}

.actividad-detalle-imagen {
    min-height: 410px;
    overflow: hidden;
    background: #e9ecef;
}

.actividad-detalle-imagen img {
    width: 100%;
    height: 100%;
    min-height: 410px;
    display: block;
    object-fit: cover;
}

.actividad-detalle-sin-imagen {
    width: 100%;
    height: 100%;
    min-height: 410px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e7f1ff, #f4edff);
    color: #0d6efd;
    font-size: 5rem;
}

.actividad-detalle-contenido {
    display: flex;
    align-items: center;
    padding: 2.75rem 3rem;
}

.actividad-detalle-inner {
    width: 100%;
    max-width: 780px;
}

.actividad-detalle-titulo {
    margin: 0 0 .8rem;
    color: #111827;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.08;
}

.actividad-detalle-descripcion {
    margin: 0 0 1.6rem;
    color: #6c757d;
    font-size: 1.08rem;
    line-height: 1.65;
}

.actividad-detalle-fecha {
    display: inline-flex;
    align-items: center;
    gap: .8rem;
    padding: .85rem 1.1rem;
    border: 1px solid #e5e7eb;
    border-radius: .9rem;
    background: #f8f9fa;
}

.actividad-detalle-fecha-icono {
    width: 42px;
    height: 42px;
    min-width: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e7f1ff;
    color: #0d6efd;
}

.actividad-detalle-fecha small,
.actividad-detalle-fecha strong {
    display: block;
}

.actividad-detalle-fecha small {
    color: #6c757d;
    margin-bottom: .12rem;
}

@media (max-width: 991.98px) {

    .actividad-detalle-grid {
        grid-template-columns: 1fr;
    }

    .actividad-detalle-imagen,
    .actividad-detalle-imagen img,
    .actividad-detalle-sin-imagen {
        min-height: 310px;
        height: 310px;
    }

    .actividad-detalle-contenido {
        padding: 1.75rem;
    }
}

@media (max-width: 575.98px) {

    .actividad-detalle-imagen,
    .actividad-detalle-imagen img,
    .actividad-detalle-sin-imagen {
        min-height: 260px;
        height: 260px;
    }

    .actividad-detalle-contenido {
        padding: 1.3rem;
    }

    .actividad-detalle-fecha {
        width: 100%;
    }
}

/* ============================================================
   ACTIVIDAD.PHP - CABECERA ESTILO FACEBOOK / RED SOCIAL
   ============================================================ */

.actividad-facebook-card {
    overflow: visible;
    border: 0;
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 .55rem 1.8rem rgba(17,24,39,.08);
}

.actividad-facebook-cover {
    position: relative;
    width: 100%;
    height: 390px;
    overflow: hidden;
    border-radius: 1.25rem 1.25rem 0 0;
    background: #e9ecef;
}

.actividad-facebook-cover img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
}

.actividad-facebook-cover-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e7f1ff, #f4edff);
    color: #0d6efd;
    font-size: 5rem;
}

.actividad-facebook-info {
    position: relative;
    display: flex;
    gap: 1.4rem;
    padding: 0 2.25rem 2rem;
}

.actividad-facebook-avatar {
    width: 112px;
    height: 112px;
    min-width: 112px;
    margin-top: -56px;
    position: relative;
    z-index: 2;
    border-radius: 50%;
    border: 5px solid #fff;
    background: #0d6efd;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 .35rem 1rem rgba(13,110,253,.22);
}

.actividad-facebook-main {
    flex: 1;
    min-width: 0;
    padding-top: 1.35rem;
}

.actividad-facebook-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.25rem;
}

.actividad-facebook-title {
    margin: 0 0 .45rem;
    color: #111827;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.08;
}

.actividad-facebook-description {
    max-width: 850px;
    margin: 0;
    color: #6c757d;
    font-size: 1.07rem;
    line-height: 1.55;
}

.actividad-facebook-details {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem;
    margin-top: 1.35rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.actividad-facebook-date {
    display: inline-flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border-radius: .85rem;
    background: #f0f2f5;
}

.actividad-facebook-date-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #e7f1ff;
    color: #0d6efd;
}

.actividad-facebook-date small,
.actividad-facebook-date strong {
    display: block;
}

.actividad-facebook-date small {
    color: #6c757d;
    margin-bottom: .1rem;
}

@media (max-width: 991.98px) {
    .actividad-facebook-cover {
        height: 320px;
    }

    .actividad-facebook-info {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .actividad-facebook-title-row {
        display: block;
    }

    .actividad-facebook-back {
        margin-top: 1rem;
    }
}

@media (max-width: 575.98px) {
    .actividad-facebook-cover {
        height: 245px;
    }

    .actividad-facebook-info {
        display: block;
        padding: 0 1.15rem 1.35rem;
    }

    .actividad-facebook-avatar {
        width: 88px;
        height: 88px;
        min-width: 88px;
        margin-top: -44px;
        font-size: 2rem;
    }

    .actividad-facebook-main {
        padding-top: .85rem;
    }

    .actividad-facebook-title {
        font-size: 1.85rem;
    }

    .actividad-facebook-date {
        width: 100%;
    }

    .actividad-facebook-back {
        width: 100%;
    }
}


/* ============================================================
   AJUSTE FINAL: PORTADA TIPO FACEBOOK (BANNER HORIZONTAL)
   ============================================================ */
.actividad-facebook-card {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.actividad-facebook-cover {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 2.7 / 1 !important;
    max-height: 360px !important;
    min-height: 0 !important;
    overflow: hidden !important;
    border-radius: 1.1rem 1.1rem 0 0 !important;
}

.actividad-facebook-cover img {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    object-fit: cover !important;
    object-position: center center !important;
}

.actividad-facebook-info {
    padding: 1.35rem 1.75rem 1.6rem !important;
}

.actividad-facebook-main {
    padding-top: 0 !important;
}

.actividad-facebook-avatar {
    display: none !important;
}

@media (max-width: 767.98px) {
    .actividad-facebook-cover {
        aspect-ratio: 16 / 7 !important;
        max-height: 260px !important;
    }

    .actividad-facebook-info {
        padding: 1.1rem 1.15rem 1.3rem !important;
    }
}
