/* ==========================================================
   CONTENEDOR GENERAL
   ========================================================== */

.cf-concurso {
    width: 100%;
    margin: 0 auto;
}

.cf-encabezado {
    max-width: 900px;
    margin: 0 auto 35px;
    text-align: center;
}


/* ==========================================================
   GALERÍA
   ========================================================== */

.cf-galeria {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
}

.cf-fotografia {
    position: relative;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 7px;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.cf-fotografia:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.cf-imagen-boton {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.cf-imagen {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: #eeeeee;
}

.cf-imagen img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.cf-imagen-boton:hover img {
    transform: scale(1.04);
}

.cf-lupa {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.72);
    color: #ffffff;
    font-size: 16px;
    pointer-events: none;
}

.cf-contenido-foto {
    padding: 12px;
}

.cf-titulo-foto {
    margin: 0 0 10px;
    font-size: 15px;
    line-height: 1.3;
}

.cf-autor-miniatura {
    margin: -4px 0 10px;
    color: #666666;
    font-size: 12px;
}

.cf-boton-seleccionar {
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 4px;
    background: #222222;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.cf-boton-seleccionar:hover,
.cf-boton-seleccionar:focus {
    background: #000000;
    color: #ffffff;
}

.cf-boton-seleccionar:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}


/* ==========================================================
   MODAL
   ========================================================== */

#cfModalVotacion .modal-dialog {
    width: calc(100% - 30px);
    max-width: 1500px;
}

.cf-modal-votacion-contenido {
    overflow: hidden;
    border: 0;
    border-radius: 10px;
}

.cf-modal-votacion-contenido .modal-header {
    align-items: flex-start;
    padding: 20px 25px;
}

#cfModalVotacionTitulo {
    margin: 0;
    font-size: 22px;
    font-weight: 700;
}

.cf-modal-votacion-autor {
    margin: 4px 0 0;
    color: #666666;
    font-size: 15px;
}

#cfModalVotacion .modal-body {
    padding: 0;
}

.cf-votacion-layout {
    display: grid;
    grid-template-columns:
        minmax(0, 2.2fr)
        360px;
    min-height: 700px;
}


.cf-resumen-autor{
    margin:4px 0 18px;
    color:#666;
    font-size:15px;
}

#cfResumenTitulo{
    margin:18px 0 0;
    font-size:22px;
    font-weight:700;
    text-align:center;
}

.cf-separador-voto{
    margin:22px 0;
}

.cf-instruccion-texto{
    margin-bottom:28px;
    text-align:center;
    color:#666;
}

/* ==========================================================
   FOTO HORIZONTAL
   ========================================================== */

.cf-votacion-fotografia {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 18px;
    background: #eeeeee;
}

.cf-votacion-fotografia img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
}


/* ==========================================================
   FOTO VERTICAL
   ========================================================== */

#cfModalVotacion.cf-foto-vertical .modal-dialog {
    max-width: 1120px;
}

#cfModalVotacion.cf-foto-vertical .cf-votacion-layout {
    grid-template-columns:
        minmax(480px, 1fr)
        360px;
}

#cfModalVotacion.cf-foto-vertical
.cf-votacion-fotografia {
    padding: 18px 28px;
}

#cfModalVotacion.cf-foto-vertical
.cf-votacion-fotografia img {
    width: auto;
    max-width: 100%;
    max-height: 82vh;
}


/* ==========================================================
   FORMULARIO
   ========================================================== */

.cf-votacion-formulario {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 35px;
    background: #ffffff;
}

.cf-instruccion-voto {
    margin-bottom: 28px;
    text-align: center;
}

.cf-instruccion-voto h3 {
    margin: 0 0 8px;
    font-size: 25px;
    font-weight: 700;
}

.cf-instruccion-voto p {
    margin: 0;
    color: #666666;
}

.cf-check-votacion {
    margin: 25px 0;
    padding: 18px 18px 18px 44px;
    border: 1px solid #dddddd;
    border-radius: 7px;
    background: #f8f8f8;
}

.cf-check-votacion .form-check-input {
    margin-top: 4px;
}

.cf-area-captcha {
    display: flex;
    justify-content: center;
    min-height: 65px;
    margin: 22px 0 25px;
}

.cf-area-captcha .cf-turnstile {
    width: 100%;
}

.cf-turnstile-error {
    width: 100%;
    margin: 0;
    padding: 12px;
    border: 1px solid #dc3545;
    border-radius: 6px;
    color: #842029;
    background: #f8d7da;
    font-size: 14px;
}

.cf-area-confirmacion {
    display: flex;
    justify-content: center;
    padding-top: 10px;
}

.cf-boton-confirmar-voto {
    width: 100%;
    min-height: 58px;
    padding: 15px 25px;
    border: 0;
    border-radius: 6px;
    background: #202020;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    text-align: center;
    cursor: pointer;
    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

.cf-boton-confirmar-voto:hover,
.cf-boton-confirmar-voto:focus {
    background: #000000;
    color: #ffffff;
}

.cf-boton-confirmar-voto:active {
    transform: translateY(1px);
}

.cf-boton-confirmar-voto:disabled {
    opacity: 0.6;
    cursor: wait;
}


.cf-ranking-thumb{
    width:70px;
    height:70px;
    object-fit:cover;
    border-radius:6px;
    display:block;
}


.cf-votacion-finalizada {
    display: flex;
    min-height: 420px;
    padding: 40px 25px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.cf-votacion-finalizada .dashicons {
    width: 54px;
    height: 54px;
    margin-bottom: 20px;
    color: #16833b;
    font-size: 54px;
}

.cf-votacion-finalizada h3 {
    margin: 0 0 15px;
    font-size: 27px;
    font-weight: 700;
}

.cf-votacion-finalizada p {
    max-width: 320px;
    margin: 0 0 8px;
    color: #646970;
    font-size: 16px;
    line-height: 1.6;
}

.form-check-label a {
    color: #0d6efd;
    text-decoration: underline;
    font-weight: 600;
}

.form-check-label a:hover {
    text-decoration: none;
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 1199px) {
    .cf-galeria {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    #cfModalVotacion .modal-dialog,
    #cfModalVotacion.cf-foto-vertical .modal-dialog {
        max-width: 850px;
    }

    .cf-votacion-layout,
    #cfModalVotacion.cf-foto-vertical
    .cf-votacion-layout {
        display: block;
        min-height: 0;
    }

    .cf-votacion-fotografia,
    #cfModalVotacion.cf-foto-vertical
    .cf-votacion-fotografia {
        min-height: 380px;
        padding: 18px;
    }

    .cf-votacion-fotografia img,
    #cfModalVotacion.cf-foto-vertical
    .cf-votacion-fotografia img {
        max-height: 60vh;
    }

    .cf-votacion-formulario {
        padding: 30px 25px;
    }
}

@media (max-width: 767px) {
    .cf-galeria {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
        gap: 14px;
    }
}

@media (max-width: 575px) {
    #cfModalVotacion .modal-dialog {
        width: calc(100% - 16px);
        margin: 8px auto;
    }

    .cf-modal-votacion-contenido .modal-header {
        padding: 15px 18px;
    }

    .cf-votacion-fotografia,
    #cfModalVotacion.cf-foto-vertical
    .cf-votacion-fotografia {
        min-height: 280px;
        padding: 12px;
    }

    .cf-votacion-formulario {
        padding: 25px 18px;
    }

    .cf-instruccion-voto h3 {
        font-size: 22px;
    }
}

@media (max-width: 420px) {
    .cf-galeria {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   BACKEND CONCURSO FOTOGRÁFICO
   ========================================================= */

    .cf-admin-wrap {
            max-width: 1400px;
        }

        .cf-admin-tarjetas {
            display: grid;
            grid-template-columns:
                repeat(auto-fit, minmax(210px, 1fr));
            gap: 20px;
            margin: 25px 0;
        }

        .cf-admin-tarjeta {
            padding: 22px;
            background: #ffffff;
            border: 1px solid #dcdcde;
            border-radius: 8px;
            box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
        }

        .cf-admin-etiqueta {
            display: block;
            margin-bottom: 10px;
            color: #646970;
            font-size: 14px;
            font-weight: 600;
        }

        .cf-admin-numero {
            display: block;
            color: #1d2327;
            font-size: 32px;
            line-height: 1;
        }

        .cf-admin-panel {
            margin-top: 25px;
            padding: 24px;
            background: #ffffff;
            border: 1px solid #dcdcde;
            border-radius: 8px;
        }

        .cf-admin-panel h2 {
            margin-top: 0;
        }

        .cf-ranking-fila {
            display: grid;
            grid-template-columns:
                minmax(180px, 300px)
                minmax(200px, 1fr)
                160px;
            gap: 18px;
            align-items: center;
            padding: 14px 0;
            border-bottom: 1px solid #f0f0f1;
        }

        .cf-ranking-fila:last-child {
            border-bottom: 0;
        }

        .cf-ranking-titulo {
            font-weight: 600;
        }

        .cf-ranking-barra {
            height: 18px;
            overflow: hidden;
            background: #f0f0f1;
            border-radius: 20px;
        }

        .cf-ranking-progreso {
            height: 100%;
            background: #2271b1;
            border-radius: 20px;
        }

        .cf-ranking-total {
            text-align: right;
            font-weight: 600;
        }
.cf-filtros-votos {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 18px;
}

.cf-filtros-votos input[type="search"] {
    min-width: 260px;
}

.cf-filtros-votos select {
    min-width: 240px;
}

.cf-total-votos {
    color: #646970;
    font-weight: 600;
}

.cf-tabla-scroll {
    overflow-x: auto;
}

.cf-tabla-votos th,
.cf-tabla-votos td {
    vertical-align: middle;
}

.cf-tabla-votos code {
    white-space: nowrap;
}

.cf-estado {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.cf-estado-ok {
    color: #116329;
    background: #edfaef;
}

.cf-estado-error {
    color: #8a2424;
    background: #fbeaea;
}

.cf-admin-vacio {
    padding: 24px;
    color: #646970;
    text-align: center;
    background: #f6f7f7;
    border-radius: 6px;
}
 .cf-acciones-votos {
    margin: 0 0 18px;
}   
 
    .cf-panel-estado {
    margin-top: 20px;
}

.cf-panel-estado-contenido {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: center;
}

.cf-panel-estado h2 {
    margin-bottom: 10px;
}

.cf-estado-concurso {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.cf-concurso-abierto {
    color: #116329;
    background: #edfaef;
}

.cf-concurso-cerrado {
    color: #8a2424;
    background: #fbeaea;
}

.cf-ranking-titulo{
    display:flex;
    flex-direction:column;
    gap:3px;
}

.cf-ranking-autor{
    color:#646970;
    font-size:12px;
}


.cf-ranking-info{
    display:flex;
    align-items:center;
    gap:15px;
}

.cf-ranking-miniatura img{
    display:block;
}

.cf-sin-miniatura{
    width:70px;
    height:70px;
    display:flex;
    align-items:center;
    justify-content:center;
    background:#f6f7f7;
    color:#777;
    font-size:11px;
    border-radius:6px;
    border:1px solid #ddd;
}

.cf-ranking-titulo{
    display:flex;
    flex-direction:column;
    gap:4px;
}

.cf-ranking-autor{
    font-size:12px;
    color:#646970;
}


@media (max-width: 782px) {
    .cf-panel-estado-contenido {
        align-items: flex-start;
        flex-direction: column;
    }
}


    @media (max-width: 782px) {
            .cf-ranking-fila {
                grid-template-columns: 1fr;
                gap: 8px;
            }

            .cf-ranking-total {
                text-align: left;
            }
        }

