/* ========================================
   Página de Perfil - RiFortuna Style
   ======================================== */

/* Hero Section */
.perfil-hero {
    background: linear-gradient(135deg, #0a1628 0%, #162544 50%, #00D190 100%);
    min-height: 100vh;
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

.perfil-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 150%;
    background: radial-gradient(circle, rgba(0, 209, 144, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.perfil-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 60%;
    height: 100%;
    background: radial-gradient(circle, rgba(0, 209, 144, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Tarjeta Principal */
.perfil-main-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.perfil-top-section {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 350px;
}

/* Lado Izquierdo - Avatar */
.perfil-avatar-side {
    background: linear-gradient(180deg, #0d2137 0%, #1a3a5c 50%, #0d2137 100%);
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border-right: 4px solid var(--primary-color);
}

/* Marco del Avatar */
.avatar-frame {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    padding: 5px;
    background: linear-gradient(135deg, var(--primary-color), #00a876);
    margin-bottom: 25px;
    box-shadow: 0 10px 40px rgba(0, 209, 144, 0.5);
}

.avatar-frame img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* Rating Box */
.perfil-rating-box {
    background: rgba(0, 209, 144, 0.15);
    padding: 15px 25px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(0, 209, 144, 0.3);
}

.rating-stars {
    margin-bottom: 8px;
}

.rating-stars .star {
    color: #ffc107;
    font-size: 1.2rem;
    margin: 0 2px;
}

.rating-stars .star.empty {
    color: rgba(255, 255, 255, 0.25);
}

.rating-count {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin: 0;
}

/* Redes Sociales (lado derecho, debajo de la bio) */
.perfil-social-horizontal {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.perfil-social-horizontal a {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.perfil-social-horizontal a:hover {
    transform: translateY(-3px) scale(1.05);
}

.perfil-social-horizontal a.instagram {
    background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    box-shadow: 0 4px 15px rgba(225, 48, 108, 0.3);
}

.perfil-social-horizontal a.instagram:hover {
    box-shadow: 0 6px 20px rgba(225, 48, 108, 0.5);
}

.perfil-social-horizontal a.tiktok {
    background: #000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.perfil-social-horizontal a.tiktok:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}

.perfil-social-horizontal a.facebook {
    background: #1877f2;
    box-shadow: 0 4px 15px rgba(24, 119, 242, 0.3);
}

.perfil-social-horizontal a.facebook:hover {
    box-shadow: 0 6px 20px rgba(24, 119, 242, 0.5);
}

.perfil-social-horizontal a.twitter {
    background: #1da1f2;
    box-shadow: 0 4px 15px rgba(29, 161, 242, 0.3);
}

.perfil-social-horizontal a.twitter:hover {
    box-shadow: 0 6px 20px rgba(29, 161, 242, 0.5);
}

/* Stats Verticales (lado izquierdo) */
.perfil-stats-vertical {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
}

.stat-item-v {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.stat-item-v .stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.stat-item-v.en-curso .stat-icon {
    background: var(--primary-color);
    color: #fff;
}

.stat-item-v.ganadas .stat-icon {
    background: #ffc107;
    color: #000;
}

.stat-item-v.finalizadas .stat-icon {
    background: #e91e63;
    color: #fff;
}

.stat-item-v .stat-info {
    flex: 1;
}

.stat-item-v .stat-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.stat-item-v .stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 4px 0 0 0;
    font-weight: 500;
}

/* Lado Derecho - Info */
.perfil-info-side {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

/* Badge de Rol */
.perfil-rol-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary-color), #00a876);
    color: #fff;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    width: fit-content;
    margin-bottom: 15px;
    box-shadow: 0 4px 15px rgba(0, 209, 144, 0.3);
}

/* Nombre */
.perfil-nombre {
    font-size: 2.5rem;
    font-weight: 800;
    color: #09152D;
    margin-bottom: 5px;
    line-height: 1.2;
}

/* Empresa */
.perfil-empresa {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.perfil-empresa i {
    color: var(--primary-color);
}

/* Bio */
.perfil-bio {
    color: #555;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 25px;
    padding-left: 15px;
    border-left: 3px solid var(--primary-color);
}

/* Stats Row */
.perfil-stats-row {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 20px;
    border-radius: 15px;
    flex: 1;
    min-width: 180px;
}

.stat-item.en-curso {
    background: linear-gradient(135deg, rgba(0, 209, 144, 0.12), rgba(0, 209, 144, 0.05));
    border: 1px solid rgba(0, 209, 144, 0.35);
}

.stat-item.ganadas {
    background: linear-gradient(135deg, rgba(9, 21, 45, 0.1), rgba(9, 21, 45, 0.03));
    border: 1px solid rgba(9, 21, 45, 0.25);
}

.stat-item.finalizadas {
    background: linear-gradient(135deg, rgba(233, 30, 99, 0.12), rgba(233, 30, 99, 0.05));
    border: 1px solid rgba(233, 30, 99, 0.35);
}

.stat-icon {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-item.en-curso .stat-icon {
    background: var(--primary-color);
    color: #fff;
}

.stat-item.ganadas .stat-icon {
    background: #09152D;
    color: #fff;
}

.stat-item.finalizadas .stat-icon {
    background: #e91e63;
    color: #fff;
}

.stat-info .stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #09152D;
    line-height: 1;
    margin: 0;
}

.stat-info .stat-label {
    font-size: 0.8rem;
    color: #666;
    margin: 3px 0 0 0;
}

/* ========================================
   Sección de Rifas
   ======================================== */
.rifas-section {
    background: #f8f9fa;
    padding: 60px 0;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 20px;
}

.section-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #09152D;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-header h3::before {
    content: '';
    width: 5px;
    height: 30px;
    background: var(--primary-color);
    border-radius: 3px;
}

/* Filtros */
.filter-tabs {
    display: flex;
    gap: 10px;
}

.filter-tab {
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid #ddd;
    background: #fff;
    color: #666;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-tab:hover,
.filter-tab.active {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: #fff;
}

/* Tarjetas de Rifas */
.rifa-card-new {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.rifa-card-new:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.rifa-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.rifa-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.rifa-card-new:hover .rifa-card-image img {
    transform: scale(1.1);
}

.rifa-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rifa-badge.activa {
    background: var(--primary-color);
    color: #fff;
}

.rifa-badge.finalizada {
    background: #e91e63;
    color: #fff;
}

.rifa-card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.rifa-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.rifa-brand {
    font-weight: 700;
    color: #09152D;
    font-size: 0.95rem;
    margin: 0;
}

.rifa-type {
    color: var(--primary-color);
    font-size: 0.8rem;
    font-weight: 500;
    margin: 0;
}

.rifa-countdown {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #e91e63;
    font-size: 0.85rem;
    font-weight: 500;
}

.rifa-desc {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 15px;
    flex: 1;
}

.rifa-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.rifa-price {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

.rifa-price strong {
    font-size: 1.2rem;
    color: #09152D;
}

.btn-ver-rifa {
    background: linear-gradient(135deg, #09152D, #1a2a4a);
    color: #fff;
    border: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-ver-rifa:hover {
    background: linear-gradient(135deg, var(--primary-color), #00a876);
    color: #fff;
    transform: translateX(3px);
}

/* Botón Volver */
.btn-volver {
    background: #fff;
    color: #09152D;
    border: 2px solid #09152D;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.btn-volver:hover {
    background: #09152D;
    color: #fff;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 991px) {
    .perfil-top-section {
        grid-template-columns: 1fr;
    }

    .perfil-avatar-side {
        padding: 30px;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        border-right: none;
        border-bottom: 4px solid var(--primary-color);
    }

    .avatar-frame {
        margin-bottom: 0;
    }

    .perfil-social-horizontal {
        justify-content: center;
        margin-top: 15px;
    }

    .perfil-stats-vertical {
        flex-direction: row;
        justify-content: center;
        gap: 15px;
        margin-top: 15px;
    }

    .stat-item-v {
        flex-direction: column;
        text-align: center;
        padding: 15px;
        min-width: 100px;
    }

    .stat-item-v .stat-icon {
        margin-bottom: 8px;
    }

    .perfil-nombre {
        font-size: 2rem;
        text-align: center;
    }

    .perfil-info-side {
        text-align: center;
        align-items: center;
    }

    .perfil-bio {
        border-left: none;
        padding-left: 0;
        border-top: 3px solid var(--primary-color);
        padding-top: 15px;
    }
}

@media (max-width: 576px) {
    .perfil-hero {
        padding: 20px 0;
    }

    .perfil-main-card {
        border-radius: 20px;
        margin: 0 10px;
    }

    .perfil-avatar-side {
        padding: 25px 15px;
    }

    .avatar-frame {
        width: 120px;
        height: 120px;
    }

    .perfil-social-horizontal {
        justify-content: center;
    }

    .perfil-social-horizontal a {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .perfil-stats-vertical {
        flex-wrap: wrap;
    }

    .stat-item-v {
        min-width: 90px;
        padding: 12px 10px;
    }

    .perfil-info-side {
        padding: 25px 20px;
    }

    .perfil-nombre {
        font-size: 1.6rem;
    }

    .section-header {
        flex-direction: column;
        text-align: center;
    }

    .filter-tabs {
        justify-content: center;
    }
}
