/* joomla150/templates/cassiopeia/css/votaciones.css */

/* Contenedor principal */
.concurso-votacion-simple {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Grid de fotos */
.fotos-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

/* Tarjeta de cada foto */
.foto-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.foto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

/* Imagen */
.foto-imagen {
    height: 200px;
    overflow: hidden;
}

.foto-imagen img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.foto-card:hover .foto-imagen img {
    transform: scale(1.05);
}

/* Información */
.foto-info {
    padding: 15px;
}

.foto-info h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    color: #333;
}

.descripcion {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

/* Formulario de voto */
.form-voto {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.email-votante {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.email-votante:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52,152,219,0.2);
}

.btn-votar {
    padding: 12px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-votar:hover {
    background: #27ae60;
}

.btn-votar:disabled,
.btn-votar.votado {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Mensajes */
.mensaje-voto {
    font-size: 13px;
    min-height: 20px;
    padding: 5px;
    border-radius: 3px;
    margin-top: 5px;
}

.mensaje-voto.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.mensaje-voto.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Resultados */
.resultados-concurso {
    max-width: 800px;
    margin: 30px auto;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.resultados-concurso h3 {
    text-align: center;
    margin-bottom: 20px;
    color: #333;
}

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

.ranking-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.posicion {
    font-size: 20px;
    font-weight: bold;
    color: #e74c3c;
    min-width: 40px;
}

.foto-mini {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 5px;
}

.ranking-item .info {
    flex: 1;
}

.ranking-item h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
}

.votos {
    font-size: 14px;
    color: #666;
    font-weight: bold;
}


/* Responsive */
@media (max-width: 768px) {
    .fotos-container {
        grid-template-columns: 1fr;
    }
    
    .ranking-item {
        flex-direction: column;
        text-align: center;
    }
    
    .posicion {
        align-self: center;
    }
}
/* ============================================
   MÓDULO RESULTADOS — ESTILO CORPORATIVO SFM
   ============================================ */

/* Contenedor principal */
.modulo-resultados-votacion {
    border: 1px solid #e3e3e3;
    border-radius: 10px;
    padding: 20px 25px;
    background: #fff;
    margin-top: 30px;
}

/* Título principal */
.modulo-resultados-votacion .titulo-modulo {
    font-size: 22px;
    margin-bottom: 20px;
    color: #0F1C4D;
    font-weight: 700;
}

/* Tabla */
.tabla-resultados {
    display: table;
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    border: 1px solid #dcdcdc;
}

/* Filas */
.tabla-resultados .tr {
    display: table-row;
}

/* Celdas */
.tabla-resultados .td,
.tabla-resultados .th {
    display: table-cell;
    padding: 14px 18px;
    vertical-align: middle;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

/* Encabezado */
.tabla-resultados .encabezado {
    background: #0F1C4D;
    color: white;
    font-weight: 600;
}

.tabla-resultados .encabezado .th {
    border-bottom: none;
}

/* ============================================
   DISTRIBUCIÓN DE COLUMNAS
   ============================================ */
.col-pos {
    width: 8%;
    min-width: 55px;
    text-align: center;
    font-weight: 700;
}

.col-img {
    width: 18%;
    min-width: 150px;
}

.col-nombre {
    width: 54%;
    color: #000;
    font-weight: 600;
    padding-left: 10px;
}

.col-votos {
    width: 10%;
    text-align: center;
}

/* Imagen miniatura */
.foto-mini {
    width: 130px;
    height: 95px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ccc;
    background: #f2f2f2;
}

/* Badge de votos */
.badge-votos {
    display: inline-block;
    background: #007bff;
    color: white;
    font-size: 13px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 12px;
}

/* Hover suave */
.tabla-resultados .fila:hover {
    background: #f7f8fc;
}

/* Quitar colores de podio */
.fila.oro,
.fila.plata,
.fila.bronce {
    background: transparent !important;
}

/* Estadísticas */
.estadisticas-modulo {
    margin-top: 12px;
    font-size: 14px;
}

.estadisticas-modulo .stat {
    margin-bottom: 4px;
}

/* ============================================
   RESPONSIVE — MODO TARJETA MÓVIL
   ============================================ */

@media (max-width: 768px) {

    /* Convertir tabla en estructura tipo tarjetas */
    .tabla-resultados {
        display: block;
        border: none;
    }

    .tabla-resultados .encabezado {
        display: none; /* Ocultar encabezado */
    }

    .tabla-resultados .tr {
        display: block;
        border: 1px solid #e5e5e5;
        border-radius: 8px;
        padding: 12px;
        margin-bottom: 15px;
        background: #fff;
    }

    .tabla-resultados .td {
        display: block;
        padding: 8px 5px;
        border: none !important;
    }

    /* Columna posición */
    .col-pos {
        font-size: 14px;
        opacity: 0.7;
        margin-bottom: 6px;
    }

    /* Imagen ocupa ancho completo */
    .col-img {
        width: 100% !important;
        min-width: auto;
        margin-bottom: 10px;
    }

    .foto-mini {
        width: 100%;
        height: auto;
    }

    /* Nombre */
    .col-nombre {
        width: 100% !important;
        font-size: 17px;
        margin-bottom: 10px;
        padding-left: 0;
    }

    /* Votos */
    .col-votos {
        width: 100% !important;
        text-align: left;
        margin-top: 5px;
    }
}
