/* =========================================
   1. CARGA DE TIPOGRAFÍAS OFICIALES
   ========================================= */
@font-face {
    font-family: 'BD Supper';
    src: url('../fonts/bd-supper-regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
    font-display: swap; /* Optimización para Lighthouse */
}

@font-face {
    font-family: 'BD Supper';
    src: url('../fonts/bd-supper-bold.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

/* =========================================
   2. VARIABLES DE DISEÑO (Paleta de Colores)
   ========================================= */
:root {
    --color-principal: #1e402a;    /* Verde distintivo */
    --color-secundario: #ff9d35;   /* Naranja para botones y llamadas a la acción */
    --color-alerta: #ff1e54;       /* Rojo para errores o alertas */
    --color-fondo: #f8f9fa;        /* Fondo claro base */
    --color-texto: #2b2b2b;        /* Gris oscuro para alta legibilidad */
    --color-blanco: #ffffff;

    --color-principal-rgb: 30, 64, 42;
    --color-secundario-rgb: 255, 157, 53;
    --color-secundario-oscuro: #e68a25;
}


/* =========================================
   3. CONFIGURACIÓN DEL LIENZO (Body)
   ========================================= */
body {
    font-family: 'BD Supper', sans-serif;
    background-color: var(--color-fondo);
    color: var(--color-texto);
    margin: 0;
    min-height: 100vh;
    position: relative;
    z-index: 0;
}

/* Capa para el patrón de repetición (Mosaico) */
body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/mosaico.png');
    background-repeat: repeat;
    opacity: 0.08; /* Sumamente sutil para dar textura sin competir con el texto */
    z-index: -1;
    pointer-events: none; /* Evita interferencias con los clics en el móvil */
}

/* =========================================
   4. ESTILOS COMPONENTES (Botón de la Marca)
   ========================================= */
.btn-marca {
    background-color: var(--color-secundario);
    color: var(--color-blanco);
    font-family: 'BD Supper', sans-serif;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    transition: all 0.3s ease; /* Cambiamos a 'all' para que anime tanto el color como la sombra */
}

/* Agregamos :focus para móviles y oscurecemos un poco el fondo en hover */
.btn-marca:hover, 
.btn-marca:focus, 
.btn-marca:active {
    background-color: var(--color-secundario-oscuro) !important; /* Un tono naranja un poco más oscuro y forzado con !important */
    color: var(--color-blanco) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(var(--color-secundario-rgb), 0.5);
}

/* =========================================
   5. HEADER DE CAMPAÑA
   ========================================= */
.campaign-header {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.75));
    border: 1px solid rgba(30, 64, 42, 0.12);
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 6px 20px rgba(30, 64, 42, 0.08);
}

.campaign-header__logo {
    max-height: 88px;
    width: auto;
}

.campaign-header__seal {
    max-height: 150px;
    width: auto;
}

/* =========================================
   6. TARJETAS Y COMPONENTES DE INTERACCIÓN
   ========================================= */
.app-card {
    border-radius: 16px;
}

.app-title {
    color: var(--color-principal);
}

.status-title,
.loading-title,
.vote-success-title {
    color: var(--color-principal);
}

.voting-card {
    border-radius: 12px;
    overflow: hidden;
    background-color: var(--color-blanco);
}

.voting-card__image {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center;
}

.voting-card__title {
    color: var(--color-principal);
}

.voting-card__subtitle {
    color: rgba(var(--color-principal-rgb), 0.78);
    font-size: 0.82rem;
    letter-spacing: 0.02em;
}

.voting-card__divider {
    width: 100%;
    height: 1px;
    margin: 0.5rem 0 0.75rem;
    background: linear-gradient(
        90deg,
        rgba(var(--color-principal-rgb), 0.06) 0%,
        rgba(var(--color-principal-rgb), 0.24) 50%,
        rgba(var(--color-principal-rgb), 0.06) 100%
    );
}

.voting-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.voting-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: 0.4rem 0.25rem;
    background-color: rgba(var(--color-principal-rgb), 0.04);
}

.voting-stat__icon {
    color: var(--color-secundario);
    font-size: 0.95rem;
    margin-bottom: 0.15rem;
}

.voting-stat__value {
    color: var(--color-principal);
    font-size: 1.15rem;
    line-height: 1;
}

.voting-stat__label {
    color: rgba(var(--color-principal-rgb), 0.75);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.18rem;
}

@media (max-width: 576px) {
    .voting-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.icon-secondary {
    color: var(--color-secundario);
}

.app-navbar {
    background-color: var(--color-principal);
}

.app-nav-btn {
    border-radius: 8px;
    font-weight: 700;
}

.btn-marca-sm {
    background-color: var(--color-secundario);
    color: var(--color-blanco);
    border: none;
    border-radius: 8px;
    font-weight: 700;
}

.btn-marca-sm:hover,
.btn-marca-sm:focus,
.btn-marca-sm:active {
    background-color: var(--color-secundario-oscuro);
    color: var(--color-blanco);
}

.form-label {
    color: var(--color-principal);
    font-weight: 700;
}


.app-nav-link {
    color: var(--color-blanco);
    border-radius: 8px;
    font-weight: 700;
    border: 1px solid transparent;
    padding: 0.5rem 0.75rem;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.app-nav-link:hover,
.app-nav-link:focus-visible {
    color: var(--color-blanco);
    background-color: rgba(var(--color-blanco-rgb, 255, 255, 255), 0.12);
    border-color: rgba(var(--color-blanco-rgb, 255, 255, 255), 0.2);
}

.app-nav-link.active {
    color: var(--color-blanco);
    background-color: rgba(var(--color-secundario-rgb), 0.24);
    border-color: rgba(var(--color-secundario-rgb), 0.5);
    box-shadow: inset 0 -2px 0 var(--color-secundario);
}

.colaborador-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(var(--color-principal-rgb), 0.15);
}

.colaborador-avatar--placeholder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(var(--color-principal-rgb), 0.08);
    color: var(--color-principal);
    font-size: 1rem;
}

.modal-body-scrollable {
    max-height: 70vh;
    overflow-y: auto;
}

.current-photo-box {
    width: 100px;
    height: 100px;
    border: 2px dashed rgba(var(--color-principal-rgb), 0.25);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(var(--color-principal-rgb), 0.04);
}

.current-photo-thumb {
    max-width: 92px;
    max-height: 92px;
    object-fit: cover;
    border-radius: 10px;
}
