/*
  =============================================================================
  ESTILOS GLOBALES - PLATAFORMA DE VOTACIONES
  =============================================================================
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&display=swap');

:root {
    --primary-color: #005aa2;
    --accent-color: #005aa2;
    --text-color: #005aa2;
    --bg-color: #ffffff;
    --font-main: 'Inter', sans-serif;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Botón oscuro elegante, con hover dinámico */
.btn-primary {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    text-decoration: none;
    padding: 16px 48px;
    border-radius: 50px;
    /* Bordes totalmente redondeados */
    font-weight: 800;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all var(--transition-speed) ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 90, 162, 0.3);
}

/* Etiqueta oscura de la izquierda */
.highlight-box {
    background-color: var(--primary-color);
    color: #ffffff;
    display: inline-block;
    padding: 12px 24px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 1.1rem;
    margin-bottom: 25px;
}

/* Título que tiene dos líneas finitas a los lados */
.section-title {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 1.6rem;
    font-weight: 800;
    text-transform: uppercase;
    margin: 60px 0 50px;
    color: var(--primary-color);
    letter-spacing: 1px;
}

.section-title::before,
.section-title::after {
    content: "";
    flex: 1;
    border-bottom: 2px solid var(--primary-color);
    margin: 0 20px;
    /* Separación entre la línea y el texto */
}

/* Banner principal: */
.main-banner {
    width: 100%;
    max-width: 1200px;
    height: 300px;
    margin: 20px auto 30px;
    background: linear-gradient(135deg, #111 0%, #333 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    overflow: hidden;
    position: relative;
}

.main-banner picture {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

.main-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.main-banner-content {
    position: relative;
    z-index: 2;
    padding: 20px;
}

.main-banner-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: #fff;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
}

.main-banner-content p {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-color);
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8);
}

/* Navegación tipo texto plano */
.nav-menu {
    display: flex;
    justify-content: flex-start;
    gap: 30px;
    padding: 30px 0 15px;
    border-bottom: 1px solid #eaeaea;
    margin-bottom: 20px;
}

.nav-menu a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 800;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color var(--transition-speed);
}

.nav-menu a:hover {
    color: var(--accent-color);
}

/* Sección de los párrafos explicativos con QR */
.voting-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 35px;
    margin-bottom: 60px;
    background: #f8fafc;
    padding: 24px 28px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
}

.voting-info-text {
    flex: 1;
}

.voting-info p {
    font-size: 1.1rem;
    margin-bottom: 0;
    color: #475569;
    line-height: 1.6;
}

.voting-info-qr {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    flex-shrink: 0;
}

.voting-info-qr span {
    font-weight: 800;
    color: #005aa2;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.voting-info-qr img {
    width: 110px;
    height: 110px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 90, 162, 0.08);
    border: 1px solid #e2e8f0;
    background: #fff;
    padding: 6px;
    transition: transform 0.2s ease;
}

.voting-info-qr img:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .voting-info {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 20px;
    }

    .voting-info p {
        text-align: center;
    }
}

/* Botón flotante para votar (esquina inferior derecha) */
.btn-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    font-size: 1rem;
    padding: 18px 40px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.btn-floating:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 90, 162, 0.4);
}

/* 
  Grilla para los proyectos. 
  Usamos grid para tener 2 columnas que se acomodan fácil.
*/
.projects-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 50px 40px;
    margin-bottom: 80px;
}

/* Card de cada proyecto */
.project-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: #ffffff;
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    padding: 12px 12px 20px 12px;
    cursor: pointer;
    position: relative;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

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

/* El cuadro de la foto del proyecto (Estilo Base) */
.project-image-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
    background-color: #005aa2;
    aspect-ratio: 16/9;
}

/* El cuadro de la foto SÓLO en la PÁGINA PRINCIPAL: borde azul de 4px */
.project-card .project-image-wrapper {
    border: 4px solid var(--primary-color);
    border-radius: 8px;
}

.project-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Efecto al poner el mouse: pequeño zoom en la imagen */
.project-card:hover .project-image-wrapper img {
    transform: scale(1.05);
}

/* Textos de la tarjeta */
.project-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 4px;
    padding: 0 10px;
}

.project-category {
    font-size: 0.95rem;
    font-weight: 400;
    color: #005aa2;
    padding: 0 10px;
}

.project-direction {
    font-size: 0.8rem;
    font-weight: 500;
    color: #888;
    padding: 0 10px;
    margin-bottom: 10px;
}



/* 
  Diseño responsivo:
*/
@media (max-width: 768px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 1.2rem;
    }

    .main-banner {
        height: 200px;
    }

    .main-banner-content h1 {
        font-size: 2rem;
    }

    .btn-floating {
        left: 50%;
        right: auto;
        transform: translateX(-50%) translateY(0);
        bottom: 20px;
        width: calc(100% - 40px);
        max-width: 320px;
        text-align: center;
        padding: 14px 20px;
        font-size: 0.85rem;
        white-space: nowrap;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
        opacity: 1;
    }

    .btn-floating:hover {
        transform: translateX(-50%) translateY(-3px);
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35);
    }
}

/* 
  =============================================================================
  3. ESTILOS DEL MODAL (Proyectos)
  =============================================================================
*/

.modal-overlay {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    overflow: auto;
    opacity: 0;
    transition: opacity var(--transition-speed) ease;
}

.modal-overlay.active {
    display: block;
    opacity: 1;
}

.modal-content {
    background-color: var(--bg-color);
    margin: 5% auto;
    padding: 40px;
    border-radius: 12px;
    width: 90%;
    max-width: 1000px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: translateY(-20px);
    transition: transform var(--transition-speed) ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

@media (min-width: 769px) {
    .modal-content {
        margin: 5vh auto;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
    }

    .modal-body {
        flex: 1;
        min-height: 0;
    }

    .modal-left-col,
    .modal-info {
        max-height: 100%;
        overflow-y: auto;
        padding-right: 15px;
    }

    .modal-info::-webkit-scrollbar,
    .modal-left-col::-webkit-scrollbar {
        width: 6px;
    }

    .modal-info::-webkit-scrollbar-thumb,
    .modal-left-col::-webkit-scrollbar-thumb {
        background-color: #ccc;
        border-radius: 10px;
    }

    .modal-info::-webkit-scrollbar-thumb:hover,
    .modal-left-col::-webkit-scrollbar-thumb:hover {
        background-color: var(--primary-color);
    }
}

#gracias-lista-container::-webkit-scrollbar {
    width: 6px;
}

#gracias-lista-container::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 10px;
}

#gracias-lista-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color);
}

.close-btn {
    color: #999;
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close-btn:hover {
    color: var(--accent-color);
}

.modal-title {
    font-size: clamp(1.2rem, 3.5vw, 1.8rem);
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 8px;
    padding-right: 40px;
    line-height: 1.2;
}

.modal-address {
    font-size: 1.1rem;
    color: #005aa2;
    margin-bottom: 30px;
    font-weight: 600;
}

/* Layout interno del modal: 2 columnas */
.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

.modal-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
}

/* Scrollbar personalizada para la galería */
.modal-gallery::-webkit-scrollbar {
    width: 6px;
}

.modal-gallery::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 10px;
}

.modal-gallery img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: zoom-in;
    transition: transform 0.2s;
}

.modal-gallery img:hover {
    transform: scale(1.02);
}

.lightbox-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-overlay img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-lightbox:hover {
    color: var(--accent-color);
}

/* Botones de navegación en Lightbox */
.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.6rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.lightbox-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: translateY(-50%) scale(1.1);
}

/* Área táctil ampliada para móviles en el Lightbox */
.lightbox-btn::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
}

.lightbox-btn-prev {
    left: 20px;
}

.lightbox-btn-next {
    right: 20px;
}

@media (max-width: 768px) {
    .lightbox-btn {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
        background: rgba(0, 0, 0, 0.5);
        /* Mayor contraste en móviles */
    }

    .lightbox-btn-prev {
        left: 10px;
    }

    .lightbox-btn-next {
        right: 10px;
    }
}

.modal-info h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 5px;
}

.modal-description-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #444;
    margin-bottom: 30px;
}

.modal-description-text ul,
.modal-description-text ol {
    padding-left: 25px;
    margin-top: 10px;
    margin-bottom: 15px;
}

.modal-description-text li {
    margin-bottom: 6px;
}

/* Etiquetas de Clasificación en Modal */
.badge-classification {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-caminos,
.badge-vial,
.badge-vialidad-rural {
    background-color: #ffedd5;
    color: #9a3412;
}

.badge-deportes,
.badge-deporte {
    background-color: #ccfbf1;
    color: #115e59;
}

.badge-cultural,
.badge-cultura {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-salud {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-comercio {
    background-color: #f3e8ff;
    color: #6b21a8;
}

.badge-infraestructura {
    background-color: #e2e8f0;
    color: #1e293b;
}

.badge-recreacion {
    background-color: #fae8ff;
    color: #86198f;
}

.badge-area-verde {
    background-color: #dcfce7;
    color: #166534;
}

.modal-map iframe {
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.modal-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eaeaea;
}

@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-content {
        margin: 10% auto;
        padding: 25px;
    }
}

#confirm-modal .modal-content {
    overflow-y: auto;
}

#confirm-modal .modal-content::-webkit-scrollbar {
    width: 6px;
}

#confirm-modal .modal-content::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 10px;
}

#confirm-modal .modal-content::-webkit-scrollbar-thumb:hover {
    background-color: var(--primary-color);
}

/* ==========================================================================
   ESTILOS DE LA PÁGINA DE VOTACIÓN
   ========================================================================== */

.voting-container {
    padding-top: 40px;
    padding-bottom: 60px;
}

.voting-header {
    text-align: center;
    margin-bottom: 40px;
}

.voting-subtitle {
    max-width: 700px;
    margin: 0 auto;
    color: #555;
    font-size: 1.1rem;
}

.voting-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 450px), 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

.voting-card {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #eaeaea;
    border-radius: 12px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.voting-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0, 90, 162, 0.1);
}

.voting-card.selected {
    border-color: #f59e0b;
    background-color: rgba(245, 158, 11, 0.06);
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.22);
}

.voting-card.selected:hover {
    border-color: #d97706;
    box-shadow: 0 10px 24px rgba(245, 158, 11, 0.32);
}

.voting-card .project-image-wrapper {
    width: 120px;
    height: 90px;
    margin-bottom: 0;
    margin-right: 20px;
    flex-shrink: 0;
    border-radius: 8px;
}

.voting-card-content {
    flex-grow: 1;
}

.voting-card-content .project-title {
    font-size: 1.15rem;
    margin-bottom: 5px;
    color: var(--text-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3em;
    max-height: 2.6em;
}

.voting-card-content .project-category {
    font-size: 0.9rem;
    color: #666;
}

.voting-card-content .project-votes {
    font-size: 0.95rem;
    font-weight: 400;
    font-style: italic;
    color: green;
    margin-top: 5px;
}

/* Insignia de Ranking */
.selection-badge {
    position: absolute;
    top: -10px;
    left: -10px;
    width: 35px;
    height: 35px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
}

.voting-card.selected .selection-badge {
    opacity: 1;
    transform: scale(1);
    background-color: #f59e0b;
}

/* Formulario de Votación */
.voting-form-section {
    background: #f9f9fc;
    border-radius: 12px;
    padding: 40px;
    border: 1px solid #eaeaea;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select {
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-main);
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.form-disclaimer {
    font-size: 0.85rem;
    color: #666;
    margin-top: 30px;
    margin-bottom: 30px;
    line-height: 1.5;
}

.form-submit {
    text-align: center;
}

/* Responsividad extra para la página de votación */
@media (max-width: 600px) {
    .voting-card {
        flex-direction: column;
        text-align: center;
    }

    .voting-card .project-image-wrapper {
        width: 100%;
        height: 180px;
        margin-right: 0;
        margin-bottom: 15px;
    }

    .form-row {
        flex-direction: column;
        gap: 15px;
    }

    .voting-form-section {
        padding: 20px;
    }
}

/* ==========================================================================
   ESTILOS DEL MODAL DE CONFIRMACIÓN Y CLAVE ÚNICA
   ========================================================================== */

.confirm-selection-wrapper {
    text-align: center;
    margin-top: 20px;
}

.btn-large {
    font-size: 1.1rem;
    padding: 20px 50px;
}

.summary-list-container {
    background: #f9f9fc;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #eaeaea;
}

.summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-item {
    padding: 12px 15px;
    border-bottom: 1px solid #e0e0e0;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 15px;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-badge {
    background-color: var(--primary-color);
    color: white;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.auth-buttons-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.btn-clave-unica {
    display: inline-flex;
    align-items: center;
    background-color: #004b85;
    color: #ffffff;
    text-decoration: none;
    padding: 16px 30px;
    border-radius: 50px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    transition: all var(--transition-speed) ease;
    font-size: 1rem;
}

.btn-clave-unica:hover {
    background-color: #003366;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 75, 133, 0.4);
}

@media (max-width: 600px) {
    .auth-buttons-container {
        flex-direction: column;
        width: 100%;
    }

    .btn-clave-unica,
    .auth-buttons-container .btn-primary {
        width: 100%;
        justify-content: center;
    }
}

/* ==========================================================================
   BOTÓN SUBIR ARRIBA
   ========================================================================== */
.scroll-top-btn {
    display: none;
    /* Oculto por defecto, se muestra con JS */
    position: fixed;
    bottom: 100px;
    /* Movido arriba del botón flotante de votar */
    right: 30px;
    z-index: 1000;
    font-size: 24px;
    border: none;
    outline: none;
    background-color: var(--primary-color);
    color: white;
    cursor: pointer;
    padding: 12px 18px;
    border-radius: 50%;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: background-color 0.3s, transform 0.3s, opacity 0.3s;
    opacity: 0.8;
}

.scroll-top-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-5px);
    opacity: 1;
}

@media (max-width: 768px) {
    .scroll-top-btn {
        bottom: 85px;
        right: 15px;
        padding: 8px 12px;
        font-size: 16px;
        background-color: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        color: var(--primary-color);
        border: 1px solid rgba(0, 90, 162, 0.2);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
        opacity: 0.9;
    }
}

/* BOTON DE VOLVER */
a.back-btn {
    text-decoration: none;
    color: #005aa2;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s, transform 0.3s, opacity 0.3s;
}

/* ==========================================================================
   TOAST NOTIFICATIONS (NOTIFICACIONES EN ESQUINA)
   ========================================================================== */
.toast-card {
    position: fixed;
    top: 25px;
    right: 25px;
    background-color: #ffffff;
    color: #333;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55), opacity 0.4s;
    opacity: 0;
    border-left: 5px solid #28a745;
}

.toast-card.active {
    transform: translateX(0);
    opacity: 1;
}

.toast-icon {
    font-weight: bold;
    color: #28a745;
    font-size: 1.3rem;
}

.toast-message {
    font-size: 0.95rem;
    font-weight: 700;
    color: #333;
}

.toast-close {
    background: none;
    border: none;
    color: #aaa;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 0;
    margin-left: 10px;
    line-height: 1;
}

.toast-close:hover {
    color: #666;
}

/* ==========================================================================
   BOTONES DE ACCIÓN DE TABLAS (MANTENEDOR)
   ========================================================================== */
.btn-action-edit,
.btn-action-delete,
.btn-action-restore {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: inherit;
}

.btn-action-edit {
    background-color: #e0f2fe;
    color: #0369a1;
}

.btn-action-edit:hover {
    background-color: #bae6fd;
    color: #025a87;
    transform: translateY(-1px);
}

.btn-action-delete {
    background-color: #fee2e2;
    color: #991b1b;
}

.btn-action-delete:hover {
    background-color: #fecaca;
    color: #7f1d1d;
    transform: translateY(-1px);
}

.btn-action-restore {
    background-color: #dcfce7;
    color: #166534;
}

.btn-action-restore:hover {
    background-color: #bbf7d0;
    color: #14532d;
    transform: translateY(-1px);
}

/* ==========================================================================
   BOTÓN FLOTANTE DE CONFIRMACIÓN DE SELECCIÓN (VOTAR)
   ========================================================================== */
.btn-floating-confirm {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(300px);
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 90, 162, 0.3);
    padding: 16px 40px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    background-color: var(--primary-color);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), background-color 0.3s ease;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.btn-floating-confirm.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.btn-floating-confirm:hover {
    background-color: #004b85;
    transform: translateX(-50%) translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 90, 162, 0.45);
}

.btn-floating-confirm.btn-floating-incomplete {
    background-color: #64748b;
    /* Gris pizarra amigable e informativo */
    box-shadow: 0 10px 25px rgba(100, 116, 139, 0.3);
}

.btn-floating-confirm.btn-floating-complete {
    background-color: var(--primary-color);
    /* Azul corporativo activo */
    box-shadow: 0 10px 25px rgba(0, 90, 162, 0.3);
}

@media (max-width: 768px) {
    .btn-floating-confirm {
        bottom: 20px;
        width: calc(100% - 40px);
        max-width: 320px;
        text-align: center;
        padding: 14px 20px;
        font-size: 0.95rem;
    }
}

/* =============================================================================
   CARRUSEL DEL MODAL - ESTILOS GLOBALES
   Necesarios en todas las páginas que usan project-modal.php,
   incluyendo el panel de administración.
   ============================================================================= */

.modal-left-col {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-left-col>* {
    flex-shrink: 0;
}

.modal-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 10px;
    background: #111;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: zoom-in;
    display: block;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.45);
    color: white;
    border: none;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 5;
    backdrop-filter: blur(4px);
}

.carousel-btn::before {
    content: '';
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
}

.carousel-btn:hover {
    background: rgba(0, 90, 162, 0.85);
}

.carousel-btn-prev {
    left: 10px;
}

.carousel-btn-next {
    right: 10px;
}

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 7px;
    z-index: 5;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.carousel-dot.active {
    background: #fff;
    transform: scale(1.3);
}

@media (max-width: 768px) {
    .modal-left-col {
        margin-bottom: 10px;
    }
}

/* =============================================================================
   INTERRUPTOR DESLIZANTE (SWITCH)
   Usado en el Mantenedor de Proyectos para habilitar/bloquear votaciones.
   ============================================================================= */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 22px;
    margin: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d93c54;
    /* Rojo para Bloqueado */
    transition: .3s;
    border-radius: 34px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.switch input:checked+.switch-slider {
    background-color: #28a745;
    /* Verde para Habilitado */
}

.switch input:focus+.switch-slider {
    box-shadow: 0 0 1px #28a745;
}

.switch input:checked+.switch-slider:before {
    transform: translateX(24px);
}

/* =============================================================================
   MODAL OBLIGATORIO DE PERFIL (#profile-modal)
   ============================================================================= */
#profile-modal {
    opacity: 1;
    /* Forzar opacidad para que sea visible de inmediato */
}

#profile-modal .modal-content {
    transform: translateY(0);
    margin: 8% auto;
}

#profile-modal .modal-title {
    padding-right: 0;
    /* Anular el padding-right reservado para el botón cerrar y lograr centrado real */
}