/*======================================================================
  Ruta: C:\xampp\htdocs\tickets\assets\css\layout.css
  Proyecto: CONTROL DE TICKETS
  Versión: 3.1.0
  Descripción: Header/Footer institucional GESEMP®
======================================================================*/

:root {
    --ct-azul: #1f4e78;
    --ct-azul-oscuro: #123b63;
    --ct-azul-profundo: #0f172a;
    --ct-dorado: #d4af37;
    --ct-amarillo: #facc15;
    --ct-verde: #15803d;
    --ct-rojo: #b91c1c;
    --ct-blanco: #ffffff;
    --ct-gris-50: #f8fafc;
    --ct-gris-200: #e2e8f0;
    --ct-gris-300: #cbd5e1;
    --ct-gris-400: #94a3b8;
    --ct-gris-500: #64748b;
    --ct-gris-700: #334155;
}

/* HEADER ============================================================= */

.ct-header {
    background: var(--ct-azul);
    color: var(--ct-blanco);
    border-bottom: 4px solid var(--ct-dorado);
}

.ct-header__contenido {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 150px;
    padding-top: 16px;
    padding-bottom: 16px;
}

.ct-identidad {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    color: var(--ct-blanco);
    text-decoration: none;
}

.ct-identidad:hover {
    color: var(--ct-blanco);
    text-decoration: none;
}

.ct-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 112px;
    flex: 0 0 112px;
    overflow: hidden;
    background: var(--ct-blanco);
    border: 2px solid rgba(255, 255, 255, .55);
    border-radius: 12px;
    box-shadow: 0 7px 18px rgba(15, 23, 42, .20);
}

.ct-logo img {
    display: block;
    width: 100%;
    height: 100%;
    padding: 6px;
    object-fit: contain;
}

.ct-logo strong {
    color: var(--ct-azul);
    font-size: 16px;
    text-align: center;
}

.ct-identidad__texto {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 160px;
}

.ct-identidad__texto strong {
    font-size: 24px;
    line-height: 1.1;
}

.ct-identidad__texto > span:last-child {
    color: #dbeafe;
    font-size: 13px;
}

.ct-identidad__marca {
    margin-bottom: 4px;
    color: var(--ct-amarillo);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.ct-header__acciones {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.ct-entorno {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 78px;
    max-width: 170px;
    color: #dbeafe;
    font-size: 12px;
}

.ct-entorno--usuario {
    min-width: 150px;
}

.ct-entorno strong {
    overflow-wrap: anywhere;
    color: var(--ct-blanco);
    font-size: 13px;
}

.ct-boton-header {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    max-width: 180px;
    padding: 9px 14px;
    color: var(--ct-blanco);
    background: var(--ct-azul-profundo);
    border: 2px solid #020617;
    border-radius: 8px;
    box-shadow: 0 4px 0 #020617;
    text-align: center;
    text-decoration: none;
    font-size: 12px;
    font-weight: 900;
    line-height: 1.15;
    transition:
        transform .15s ease,
        box-shadow .15s ease,
        background-color .15s ease;
}

.ct-boton-header:hover,
.ct-boton-header:focus-visible {
    color: var(--ct-blanco);
    background: #020617;
    transform: translateY(-1px);
    box-shadow: 0 5px 0 #000000;
    text-decoration: none;
}

.ct-boton-header--inicio {
    background: var(--ct-azul-profundo);
}

.ct-boton-header--manual {
    color: #713f12;
    background: var(--ct-amarillo);
    border-color: #a16207;
    box-shadow: 0 4px 0 #854d0e;
}

.ct-boton-header--manual:hover,
.ct-boton-header--manual:focus-visible {
    color: #713f12;
    background: #fde047;
}

.ct-boton-header--guia {
    color: var(--ct-blanco);
    background: var(--ct-verde);
    border-color: #166534;
    box-shadow: 0 4px 0 #14532d;
}

.ct-boton-header--guia:hover,
.ct-boton-header--guia:focus-visible {
    color: var(--ct-blanco);
    background: #166534;
}

.ct-boton-header--salir {
    background: var(--ct-rojo);
    border-color: #7f1d1d;
    box-shadow: 0 4px 0 #7f1d1d;
}

.ct-boton-header--salir:hover,
.ct-boton-header--salir:focus-visible {
    background: #991b1b;
}

/* NAVEGACIÓN ========================================================= */

.ct-navegacion {
    background: transparent;
    border-bottom: 1px solid var(--ct-gris-300);
    box-shadow: 0 3px 10px rgba(15, 23, 42, .06);
}

.ct-navegacion__contenido {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
}

.ct-menu-boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 14px;
    color: var(--ct-gris-700);
    background: var(--ct-gris-50);
    border: 2px solid var(--ct-gris-400);
    border-radius: 8px;
    box-shadow: 0 3px 0 var(--ct-gris-500);
    text-decoration: none;
    font-size: 13px;
    font-weight: 900;
}

.ct-menu-boton:hover,
.ct-menu-boton:focus-visible {
    color: var(--ct-blanco);
    background: var(--ct-azul);
    border-color: #153a5b;
    box-shadow: 0 4px 0 #153a5b;
    transform: translateY(-1px);
    text-decoration: none;
}

.ct-menu-boton--activo {
    color: var(--ct-blanco);
    background: var(--ct-azul);
    border-color: #153a5b;
    box-shadow: 0 3px 0 #153a5b;
}

.ct-contenido-principal {
    min-height: calc(100vh - 450px);
    padding-top: 24px;
    padding-bottom: 32px;
}

/* FOOTER ============================================================= */

.ct-footer {
    margin-top: 40px;
    color: var(--ct-gris-200);
    background: var(--ct-azul-oscuro);
    border-top: 4px solid var(--ct-dorado);
}

.ct-footer a {
    color: var(--ct-blanco);
    text-decoration: none;
}

.ct-footer a:hover,
.ct-footer a:focus-visible {
    color: #fde68a;
    text-decoration: underline;
}

.ct-footer__contenido {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    padding: 28px 0 18px;
}

.ct-footer__marca {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ct-footer__logo {
    display: block;
    width: 82px;
    height: 82px;
    object-fit: contain;
    background: var(--ct-blanco);
    border: 2px solid var(--ct-dorado);
    border-radius: 10px;
    padding: 5px;
}

.ct-footer__marca-texto {
    display: flex;
    flex-direction: column;
    gap: 5px;
    max-width: 430px;
}

.ct-footer__marca-texto strong {
    color: var(--ct-blanco);
    font-size: 18px;
}

.ct-footer__marca-texto span {
    line-height: 1.5;
}

.ct-footer__contacto {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;
    font-weight: 700;
}

.ct-footer__documentacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    padding: 4px 0 14px;
    font-weight: 800;
}

.ct-footer__linea {
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, .20);
}

.ct-footer__institucional {
    padding: 14px 0 24px;
    text-align: center;
    line-height: 1.7;
}

.ct-footer__institucional p {
    margin: 4px 0;
}

/* ACCESIBILIDAD ======================================================= */

.ct-boton-header:focus-visible,
.ct-menu-boton:focus-visible,
.ct-footer a:focus-visible {
    outline: 3px solid #fde047;
    outline-offset: 3px;
}

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

@media (max-width: 1180px) {
    .ct-header__contenido {
        align-items: flex-start;
        flex-direction: column;
    }

    .ct-header__acciones {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 900px) {
    .ct-logo {
        width: 92px;
        height: 92px;
        flex-basis: 92px;
    }

    .ct-identidad__texto strong {
        font-size: 21px;
    }

    .ct-entorno,
    .ct-entorno--usuario {
        flex: 1 1 145px;
        max-width: none;
    }

    .ct-boton-header {
        flex: 1 1 170px;
        max-width: none;
    }

    .ct-navegacion__contenido {
        flex-direction: column;
    }

    .ct-menu-boton {
        width: 100%;
    }

    .ct-footer__contenido {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .ct-footer__contacto {
        align-items: center;
    }
}

@media (max-width: 560px) {
    .ct-identidad {
        align-items: flex-start;
    }

    .ct-logo {
        width: 76px;
        height: 76px;
        flex-basis: 76px;
    }

    .ct-identidad__texto {
        min-width: 0;
    }

    .ct-identidad__texto strong {
        font-size: 18px;
    }

    .ct-header__acciones {
        gap: 10px;
    }

    .ct-entorno,
    .ct-entorno--usuario,
    .ct-boton-header {
        flex-basis: 100%;
    }

    .ct-footer__marca {
        flex-direction: column;
    }

    .ct-footer__documentacion {
        flex-direction: column;
    }

    .ct-footer__documentacion span {
        display: none;
    }
}
