/* FERIAS — estilos propios. Clases semánticas, cortas, sin guiones. */
:root {
    --cprin: #7a3b1d;
    --cfondo: #f4f2ef;
    --clateral: #2b2420;
}

body { background: var(--cfondo); }

/* Botón con el color corporativo */
.bprin, .bprin:hover, .bprin:focus, .bprin:active {
    background: var(--cprin) !important;
    border-color: var(--cprin) !important;
    color: #fff !important;
}
.bprin:hover { filter: brightness(1.1); }
a { color: var(--cprin); }
.nav-tabs .nav-link { color: #555; }
.nav-tabs .nav-link.active { color: var(--cprin); font-weight: 600; }
.page-item.active .page-link { background: var(--cprin); border-color: var(--cprin); }

/* Panel admin */
.barrasup { background: var(--clateral); }
.lateral { width: 240px; background: var(--clateral) !important; color: #eee; min-height: 100vh; }
@media (min-width: 992px) {
    .lateral { position: sticky; top: 0; height: 100vh; flex-shrink: 0; }
}
.lateral .offcanvas-header { color: #fff; }
.lateralint { display: flex; flex-direction: column; height: 100%; padding: 1rem .75rem; }
.marca { color: #fff; font-weight: 700; font-size: 1.2rem; text-decoration: none; padding: .25rem .75rem 1rem; }
.lateral .nav-link { color: #cfc6bf; border-radius: .375rem; padding: .5rem .75rem; }
.lateral .nav-link i { width: 1.4rem; display: inline-block; }
.lateral .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.lateral .nav-link.active { color: #fff; background: var(--cprin); }
.lateral .nav-link.disabled { color: #7d726a; }
.usuariolat { margin-top: auto; padding: 1rem .75rem 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.principal { padding: 1.5rem; min-width: 0; }
@media (max-width: 575px) { .principal { padding: 1rem .75rem; } }
.cifra { border: 0; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.card { border-color: #e5e0da; }

/* Área pública / acceso (mobile first) */
.cajapub { max-width: 440px; margin: 0 auto; padding: 2rem 1rem; }
.marcapub { text-align: center; font-weight: 700; font-size: 1.6rem; color: var(--cprin); margin: 1rem 0 1.5rem; }
.tarjeta { background: #fff; border-radius: .75rem; padding: 1.5rem; box-shadow: 0 2px 10px rgba(0, 0, 0, .06); }

/* Instalador */
.cinstal { max-width: 720px; margin: 0 auto; padding: 2rem 1rem; }
.pasos { display: flex; gap: .25rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.paso { flex: 1; text-align: center; padding: .5rem; background: #e9e4de; border-radius: .375rem; font-size: .85rem; color: #777; }
.paso.hecho { background: #d7ead9; color: #2c6b34; }
.paso.actual { background: var(--cprin); color: #fff; font-weight: 600; }

/* Área del participante (mobile first) */
.cpart { padding-bottom: 72px; }
.cabpart { position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
    background: var(--cprin); color: #fff; padding: .5rem 1rem; padding-top: max(.5rem, env(safe-area-inset-top)); }
.cuerpopart { max-width: 720px; margin: 0 auto; padding: 1rem; }
.navpart { position: fixed; bottom: 0; left: 0; right: 0; z-index: 10; display: flex; background: #fff;
    border-top: 1px solid #e5e0da; padding-bottom: env(safe-area-inset-bottom); }
.navpart a { flex: 1; display: flex; flex-direction: column; align-items: center; padding: .45rem 0; font-size: .72rem;
    color: #777; text-decoration: none; }
.navpart a i { font-size: 1.35rem; line-height: 1.2; }
.navpart a.activo { color: var(--cprin); font-weight: 600; }
.avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; background: #eee; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: #999; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.bgrande { padding: .9rem 1rem; }
.barraprin { background: var(--cprin); }
.bloqueficha { background: #fff; border-radius: .75rem; padding: 1rem; margin-bottom: 1rem; box-shadow: 0 1px 4px rgba(0, 0, 0, .05); }
.bloqueficha legend { font-size: 1rem; font-weight: 600; float: none; width: auto; margin-bottom: .75rem; }
.barraguardar { position: sticky; bottom: 76px; padding: .5rem 0; }
.cadmin .barraguardar { bottom: 0; background: var(--cfondo); }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.zonapeligro summary { cursor: pointer; }
.min-w-0 { min-width: 0; }

/* Galería */
.galeria { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .5rem; }
@media (max-width: 400px) { .galeria { grid-template-columns: repeat(2, 1fr); } }
.galeria .foto, .subirfoto { position: relative; aspect-ratio: 1; border-radius: .5rem; overflow: hidden; background: #ddd; }
.subirfoto { display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer;
    border: 2px dashed #bbb; background: #fff; color: #777; text-align: center; font-size: .85rem; }
.subirfoto:hover { border-color: var(--cprin); color: var(--cprin); }
.galeria .foto img { width: 100%; height: 100%; object-fit: cover; user-select: none; -webkit-user-drag: none; }
.galeria .foto.arrastrando { opacity: .5; outline: 3px solid var(--cprin); }
.accfoto { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around;
    background: linear-gradient(transparent, rgba(0, 0, 0, .65)); padding: .35rem 0 .2rem; }
.accfoto button, .accfoto a { background: none; border: 0; color: #fff; font-size: 1.1rem; padding: .2rem .5rem; }
.asa { position: absolute; top: .25rem; right: .25rem; background: rgba(0, 0, 0, .5); color: #fff; border-radius: .35rem;
    padding: .25rem .2rem; cursor: grab; touch-action: none; font-size: 1.1rem; line-height: 1; }
.marcaportada { display: none; position: absolute; top: .25rem; left: .25rem; background: #f5b301; color: #fff;
    border-radius: 50%; width: 1.7rem; height: 1.7rem; align-items: center; justify-content: center; font-size: .85rem; }
.foto.esportada .marcaportada { display: flex; }
.foto.esportada .bportada { visibility: hidden; }
.filasubida { margin: .25rem 0; }
.filasubida .nombre { display: block; font-size: .8rem; color: #666; }
.filasubida .progress { height: .4rem; }

/* Admin: participantes, categorías */
.minilista { width: 44px; height: 44px; border-radius: .375rem; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; }
.minilista.vacia { background: #eee; color: #aaa; }
.colmini { width: 56px; }
.tablapar .col1 { width: 36px; }
.etiq { background: #fff; border: 1px solid #6c757d; color: #6c757d; font-weight: 500; }
.punto { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .35rem; vertical-align: middle; }
.listacheck { max-height: 260px; overflow-y: auto; border: 1px solid #e5e0da; border-radius: .375rem; padding: .5rem .75rem; }
.ordenmini { width: 4.5rem; }
.colancha { max-width: 980px; }
.colestrecha { max-width: 640px; }
.barramasiva { background: #faf8f6; }
.estrellas { display: inline-flex; flex-direction: row-reverse; gap: .15rem; }
.estrellas input { display: none; }
.estrellas label { font-size: 1.4rem; color: #ccc; cursor: pointer; }
.estrellas input:checked ~ label, .estrellas label:hover, .estrellas label:hover ~ label { color: #f5b301; }
