/*
 * Estilos genericos para las plantillas de los proyectos de CMS 2
 */

.proyectos img { max-width: 100%; }


/* Lista productos: Ficha informativa */
.fichas-informativas.flexed {
    justify-content: space-between;
    flex-wrap: wrap;
}
.fichas-informativas .ficha-informativa {
    position: relative;
    height: 100%;
    border: 1px solid #c5c1c2;
    
    -webkit-box-shadow: 0px 0px 9px 0px rgba(197,193,194,1);
    -moz-box-shadow: 0px 0px 9px 0px rgba(197,193,194,1);
    box-shadow: 0px 0px 9px 0px rgba(197,193,194,1);
}

.ficha-informativa .imagen {
    position: relative;
}
.ficha-informativa .imagen .nombre,
.ficha-informativa .detalles {
    padding: 20px;
}

.ficha-informativa .imagen .nombre,
.ficha-informativa .ampliar {
    position: absolute;
    bottom: 0;
}

.ficha-informativa .imagen .nombre {
    width: 80%;
    color: #fff;
    background-color: #191919;
    text-transform: uppercase;
}
.ficha-informativa .detalles {
    margin-bottom: 60px;
}
.ficha-informativa .descripcion {
    text-transform: uppercase;
    font-size: 10pt;
    font-weight: bold;
    margin-bottom: 25px;
}
.ficha-informativa .ampliar {
    display: block;
    width: 90%;
    margin: 20px 5%;
    text-align: center;
    background-color: #191919;
    color: #fff !important;
    padding: 10px;
}


/* Galeria */
.proyectos.producto .galeria a {
    margin-bottom: 40px;
}










/*CONTROL DE ACCESO */

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

        /* ── WRAPPER PRINCIPAL ── */
        .ca-wrapper {
            margin: 20px;
            border: 1.5px solid #77bc1f;
            border-radius: 12px;
            overflow: hidden;
            font-family: Arial, sans-serif;
        }

        /* ── CABECERA ── */
        .ca-header {
            background: #77bc1f;
            padding: 12px 20px;
            display: flex;
            align-items: center;
            gap: 16px;
        }

        .ca-header-logo {
            max-height: 120px;
            padding: 5px;
            border-radius: 4px;
        }

        .ca-title-block {
            flex: 1;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
        }

        .ca-title-block h1 {
            font-size: 18px;
            font-weight: bold;
            color: white;
            margin: 0;
            padding: 0;
        }

        .ca-title-block p {
            font-size: 12px;
            color: rgba(255, 255, 255, 0.85);
            margin: 5px 0 0 0;
            padding: 0;
        }

        .ca-datetime {
            text-align: right;
            color: white;
            flex-shrink: 0;
        }

        .ca-datetime .ca-fecha {
            font-size: 13px;
            opacity: 0.9;
        }

        .ca-datetime .ca-reloj {
            font-size: 24px;
            font-weight: bold;
            letter-spacing: 2px;
            font-variant-numeric: tabular-nums;
        }

        /* ── CUERPO ── */
        .ca-body {
            background: #f9f9f9;
            padding: 20px;
        }

        .ca-sublabel {
            font-size: 13px;
            color: #666;
            margin-bottom: 14px;
        }

        /* ── CUADRÍCULA RESPONSIVE ── */
        .ca-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 12px;
        }

        /* ── TARJETA USUARIO ── */
        .ca-card {
            background: white;
            border: 1px solid #ddd;
            border-radius: 10px;
            padding: 16px 10px 14px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            transition: border-color 0.15s, background 0.15s;
        }

        .ca-card:hover {
            border-color: #77bc1f;
            background: #f2fae8;
        }

        .ca-horario {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            font-size: 11px;
            color: #4a8c0f;
            font-weight: 600;
            text-align: center;
        }

        .ca-horario-turno {
            background: #f2fae8;
            border: 1px solid #cdeaa5;
            border-radius: 6px;
            padding: 2px 8px;
            white-space: nowrap;
        }

        .ca-horario-vacio {
            font-size: 10px;
            color: #999;
            font-style: italic;
        }

        .ca-avatar {
            width: 44px;
            height: 44px;
            border-radius: 50%;
            background: #e8f7d4;
            border: 1.5px solid #77bc1f;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 15px;
            font-weight: bold;
            color: #4a8c0f;
            flex-shrink: 0;
        }

        .ca-nombre {
            font-size: 12px;
            font-weight: 600;
            color: #333;
            text-align: center;
            line-height: 1.3;
            word-break: break-word;
        }

        .ca-btn {
            font-size: 11px;
            background: #77bc1f;
            color: white;
            border: none;
            border-radius: 6px;
            padding: 5px 12px;
            cursor: pointer;
            font-family: Arial, sans-serif;
            font-weight: 600;
            width: 100%;
        }

        .ca-btn:hover {
            background: #63a018;
        }

        .ca-btn:active {
            transform: scale(0.97);
        }

        /* ── MODAL CONTRASEÑA ── */
        .ca-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.45);
            z-index: 9999;
            align-items: center;
            justify-content: center;
        }

        .ca-overlay.activo {
            display: flex;
        }

        .ca-modal {
            background: white;
            border-radius: 12px;
            padding: 28px 24px 22px;
            width: 320px;
            max-width: 90vw;
            text-align: center;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
        }

        .ca-modal-avatar {
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: #e8f7d4;
            border: 2px solid #77bc1f;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            font-weight: bold;
            color: #4a8c0f;
            margin: 0 auto 10px;
        }

        .ca-modal h2 {
            font-size: 15px;
            color: #333;
            margin-bottom: 4px;
            font-family: Arial, sans-serif;
        }

        .ca-modal p {
            font-size: 12px;
            color: #888;
            margin-bottom: 18px;
            font-family: Arial, sans-serif;
        }

        .ca-modal input[type="password"] {
            width: 100%;
            padding: 10px 14px;
            border: 1.5px solid #ddd;
            border-radius: 8px;
            font-size: 20px;
            letter-spacing: 6px;
            text-align: center;
            outline: none;
            margin-bottom: 8px;
            font-family: Arial, sans-serif;
        }

        .ca-modal input[type="password"]:focus {
            border-color: #77bc1f;
        }

        .ca-modal-error {
            font-size: 12px;
            color: #c0392b;
            min-height: 18px;
            margin-bottom: 12px;
            font-family: Arial, sans-serif;
        }

        .ca-modal-btns {
            display: flex;
            gap: 10px;
        }

        .ca-modal-btns button {
            flex: 1;
            padding: 9px;
            border-radius: 8px;
            border: none;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            font-family: Arial, sans-serif;
        }

        .ca-btn-cancelar {
            background: #f0f0f0;
            color: #555;
        }

        .ca-btn-cancelar:hover {
            background: #e0e0e0;
        }

        .ca-btn-confirmar {
            background: #77bc1f;
            color: white;
        }

        .ca-btn-confirmar:hover {
            background: #63a018;
        }

        /* ── VISTAS DE ESTADO ── */
        .ca-estado-container-centered {
            display: flex;
            justify-content: center;
            width: 100%;
        }

        .ca-estado-wrapper {
            margin: 20px;
            border: 1.5px solid #77bc1f;
            border-radius: 12px;
            overflow: hidden;
            font-family: Arial, sans-serif;
            width: 100%;
            max-width: 420px;
        }

        .ca-estado-header {
            background: #77bc1f;
            padding: 14px 20px;
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .ca-estado-header h2 {
            font-size: 16px;
            font-weight: bold;
            color: white;
            margin: 0;
            color: white !important;
        }

        .ca-estado-body {
            background: #f9f9f9;
            padding: 24px 20px;
            display: flex;
            flex-direction: column;
            gap: 12px;
            text-align: center;
        }

        .ca-estado-usuario {
            font-size: 14px;
            color: #555;
            margin-bottom: 4px;
        }

        .ca-estado-btn {
            padding: 12px 0;
            font-size: 14px;
            font-weight: bold;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            font-family: Arial, sans-serif;
            width: 100%;
            letter-spacing: 0.5px;
        }

        .ca-estado-btn.verde {
            background: #77bc1f;
            color: white;
        }

        .ca-estado-btn.verde:hover {
            background: #63a018;
        }

        .ca-estado-btn.rojo {
            background: #e74c3c;
            color: white;
        }

        .ca-estado-btn.rojo:hover {
            background: #c0392b;
        }


        .ca-estado-btn.naranja {
            background: #e67e22;
            color: white;
        }

        .ca-estado-btn.naranja:hover {
            background: #d35400;
        }

        .ca-estado-btn.azul {
            background: #2980b9;
            color: white;
        }

        .ca-estado-btn.azul:hover {
            background: #21618c;
        }

        /* ── TOASTS / ALERTAS ── */
        #ca-toast-container {
            position: fixed;
            inset: 0;
            z-index: 99999;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 14px;
            pointer-events: none;
        }

        .ca-toast {
            position: relative;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            gap: 12px;
            background: white;
            border-radius: 16px;
            padding: 32px 28px 24px;
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
            font-family: Arial, sans-serif;
            font-size: 14px;
            color: #333;
            width: 340px;
            max-width: 90vw;
            opacity: 0;
            transform: scale(0.85);
            transition: opacity 0.25s ease, transform 0.25s ease;
            pointer-events: auto;
            border-top: 5px solid #ccc;
        }

        .ca-toast.activo {
            opacity: 1;
            transform: scale(1);
        }

        .ca-toast-exito {
            border-top-color: #77bc1f;
        }

        .ca-toast-error {
            border-top-color: #e74c3c;
        }

        .ca-toast-icono {
            font-size: 34px;
            line-height: 1;
        }

        .ca-toast-texto {
            line-height: 1.5;
        }

        .ca-toast-cerrar {
            position: absolute;
            top: 8px;
            right: 12px;
            background: none;
            border: none;
            font-size: 20px;
            line-height: 1;
            color: #aaa;
            cursor: pointer;
            padding: 4px;
        }

        .ca-toast-cerrar:hover {
            color: #333;
        }

        /* ══════════════════════════════════════════════
       MEDIA QUERIES (RESPONSIVE DE CORTE DIAGONAL)
       ══════════════════════════════════════════════ --> */

        /* Pantallas medianas (Tablets y Laptops pequeñas) */
        @media (max-width: 1024px) {
            .ca-grid {
                grid-template-columns: repeat(3, 1fr);
            }
        }

        /* Pantallas pequeñas (Móviles en horizontal y Tablets verticales) */
        @media (max-width: 768px) {
            .ca-header {
                flex-direction: column;
                padding: 16px;
                gap: 12px;
            }

            .ca-title-block {
                order: 1;
            }

            .ca-datetime {
                order: 2;
                text-align: center;
                width: 100%;
                border-top: 1px solid rgba(255, 255, 255, 0.3);
                padding-top: 8px;
            }

            .ca-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px;
            }
        }

        /* Pantallas muy pequeñas (Móviles verticales estándar) */
        @media (max-width: 480px) {
            .ca-wrapper {
                margin: 10px;
            }

            .ca-header-logo {
                max-height: 90px;
            }

            .ca-title-block h1 {
                font-size: 16px;
            }

            .ca-datetime .ca-reloj {
                font-size: 20px;
            }

            .ca-body {
                padding: 12px;
            }

            .ca-grid {
                grid-template-columns: 1fr;
                gap: 8px;
            }

            .ca-card {
                flex-direction: row;
                justify-content: space-between;
                padding: 12px;
                text-align: left;
                gap: 12px;
            }

            .ca-nombre {
                text-align: left;
                flex: 1;
            }

            .ca-btn {
                width: auto;
                padding: 8px 14px;
            }
        }


        /* ── LEYENDA ── */
        .et-leyenda {
            display: flex;
            gap: 18px;
            margin-bottom: 14px;
            font-family: Arial, sans-serif;
            font-size: 12px;
            color: #555;
        }

        .et-leyenda-item {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .et-dot {
            display: inline-block;
            width: 10px;
            height: 10px;
            border-radius: 50%;
        }

        .et-dot.verde {
            background: #77bc1f;
        }

        .et-dot.amarillo {
            background: #f5d76e;
        }

        .et-dot.rojo {
            background: #e74c3c;
        }

        .et-dot.azul {
            background: aquamarine;
        }



        /* ── SOLO el borde de la tarjeta cambia de color ── */
        .ca-card.et-verde {
            border-color: #77bc1f;
        }

        .ca-card.et-amarillo {
            border-color: #f5d76e;
        }

        .ca-card.et-rojo {
            border-color: #e74c3c;
        }

        .ca-card.et-azul {
            border-color: aquamarine;
        }


        /* ── SOLO el avatar cambia de color ── */
        .ca-avatar.et-verde {
            background: #e8f7d4;
            border-color: #77bc1f;
            color: #4a8c0f;
        }

        .ca-avatar.et-amarillo {
            background: #f5d76e;
            border-color: #6b5900;
            color: #6b5900;
        }

        .ca-avatar.et-rojo {
            background: #fadbd8;
            border-color: #e74c3c;
            color: #a93226;
        }

        .ca-avatar.et-azul {
            background: aquamarine;
            border-color: blue;
            color: blue;
        }
