/*
 * ESTILOS GENERALES DE LA MAQUETA DE MIA
 *
 * Este bloque se conserva como referencia, pero no se aplica porque modifica
 * elementos globales del portal (body, enlaces, imagenes, .container, etc.)
 * y entra en conflicto con Bootstrap y los componentes existentes.
 * Los estilos activos y aislados del widget comienzan en .mia-widget.
 *

:root {
    --blue-900: #0f4f90;
    --blue-800: #155998;
    --blue-700: #2d67c4;
    --blue-500: #3d72e6;
    --blue-100: #dce9ff;
    --slate-900: #1b2433;
    --slate-700: #49566a;
    --slate-500: #7d8796;
    --slate-200: #d8e0ec;
    --slate-100: #eef3f9;
    --paper: #ffffff;
    --page: #f5f7fb;
    --green-700: #248742;
    --green-500: #72b842;
    --green-300: #b6de7f;
    --shadow-lg: 0 20px 45px rgba(17, 45, 86, 0.12);
    --shadow-md: 0 12px 26px rgba(20, 48, 89, 0.09);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Nunito Sans", sans-serif;
    color: var(--slate-900);
    background:
        radial-gradient(circle at top left, rgba(61, 114, 230, 0.08), transparent 24rem),
        linear-gradient(180deg, #f7faff 0%, var(--page) 42%, #edf3fa 100%);
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: var(--blue-700);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

button,
input {
    font: inherit;
}

.container {
    width: min(1660px, calc(100% - 48px));
    margin: 0 auto;
}

.gov-bar {
    background: #3366cc;
    color: #fff;
}

.gov-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 56px;
}

.gov-mark img {
    width: 140px;
    filter: brightness(0) invert(1);
}

.lang-pill {
    border: 0;
    border-radius: 10px;
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
    color: #3366cc;
    background: #fff;
}

.site-header {
    background: var(--paper);
    border-bottom: 1px solid rgba(25, 59, 120, 0.08);
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    min-height: 110px;
    padding: 20px 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.brand__logo {
    width: 88px;
    object-fit: contain;
}

.brand__copy h1,
.brand__copy p {
    margin: 0;
}

.brand__copy h1 {
    font-family: "Lexend", sans-serif;
    font-size: clamp(1.8rem, 2.2vw, 2.5rem);
    font-weight: 500;
    letter-spacing: -0.04em;
}

.brand__copy p {
    margin-top: 4px;
    color: var(--blue-800);
    font-size: 1rem;
    font-weight: 700;
}

.login-link {
    font-size: 1rem;
    color: var(--blue-700);
}

.main-nav {
    background: #f1f4f8;
    border-bottom: 4px solid var(--blue-900);
}

.main-nav__inner {
    display: flex;
    align-items: stretch;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 84px;
    padding: 18px 22px;
    color: #1f2530;
    text-align: center;
    font-size: 1rem;
    line-height: 1.15;
}

.nav-item--active {
    background: var(--blue-900);
    color: #fff;
    font-weight: 800;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 0 28px;
    font-size: 0.95rem;
}

.page-shell {
    padding-bottom: 40px;
}

.hero-section {
    margin-bottom: 32px;
}

.hero-stage {
    position: relative;
    overflow: hidden;
    min-height: 430px;
    border-radius: 0;
    background:
        linear-gradient(180deg, rgba(9, 54, 90, 0.08), rgba(7, 57, 50, 0.18)),
        url("https://haciendafusagasuga.gov.co/vistas/images/portada5.png") center center / cover no-repeat;
    box-shadow: var(--shadow-md);
}

.hero-stage__art {
    display: none;
}

.skyline {
    position: absolute;
    bottom: 112px;
    left: 8%;
    right: 8%;
    height: 160px;
    background:
        linear-gradient(90deg,
            transparent 0 6%,
            rgba(7, 77, 101, 0.9) 6% 11%,
            transparent 11% 14%,
            rgba(7, 77, 101, 0.9) 14% 19%,
            transparent 19% 24%,
            rgba(7, 77, 101, 0.9) 24% 31%,
            transparent 31% 35%,
            rgba(7, 77, 101, 0.9) 35% 43%,
            transparent 43% 49%,
            rgba(7, 77, 101, 0.9) 49% 57%,
            transparent 57% 62%,
            rgba(7, 77, 101, 0.9) 62% 69%,
            transparent 69% 74%,
            rgba(7, 77, 101, 0.9) 74% 81%,
            transparent 81% 87%,
            rgba(7, 77, 101, 0.9) 87% 94%,
            transparent 94% 100%);
    opacity: 0.78;
}

.skyline--back {
    bottom: 210px;
    left: 18%;
    right: 12%;
    height: 120px;
    opacity: 0.18;
}

.hill {
    position: absolute;
    bottom: -8%;
    width: 58%;
    height: 220px;
    background: var(--green-500);
    border-radius: 50%;
}

.hill--left {
    left: -8%;
    transform: rotate(10deg);
}

.hill--right {
    right: -10%;
    background: #4d9f35;
    transform: rotate(-8deg);
}

.hero-figure {
    position: absolute;
    bottom: 96px;
    width: 220px;
    height: 220px;
    background:
        radial-gradient(circle at 50% 26%, rgba(255, 255, 255, 0.14), transparent 16%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0.16));
    clip-path: polygon(42% 0%, 58% 0%, 60% 10%, 58% 18%, 67% 30%, 71% 45%, 66% 46%, 62% 36%, 58% 100%, 42% 100%, 38% 44%, 33% 54%, 28% 100%, 14% 100%, 22% 44%, 34% 28%, 42% 18%, 40% 10%);
    opacity: 0.4;
}

.hero-figure--left {
    left: 4%;
    transform: scale(0.8);
}

.hero-figure--right {
    right: 8%;
}

.hero-card {
    position: absolute;
    top: 36px;
    left: 50%;
    transform: translateX(-50%);
    display: grid;
    justify-items: center;
    width: 244px;
    z-index: 2;
}

.hero-card__avatar {
    display: grid;
    place-items: center;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    border: 4px solid rgba(14, 50, 108, 0.7);
    background:
        radial-gradient(circle at 36% 30%, #ffd4de, transparent 18%),
        radial-gradient(circle at 64% 30%, #ffb4c6, transparent 18%),
        linear-gradient(145deg, #ff856d 0%, #cf3d29 25%, #65269f 70%, #413f82 100%);
    box-shadow: 0 12px 28px rgba(16, 34, 69, 0.22);
}

.hero-card__avatar span {
    padding-top: 76px;
    font-family: "Lexend", sans-serif;
    font-size: 1.25rem;
    color: #fff;
}

.hero-card__badge,
.hero-card__title,
.hero-card__subtitle {
    width: 100%;
    text-align: center;
    background: rgba(255, 255, 255, 0.96);
}

.hero-card__badge {
    margin-top: -10px;
    padding: 10px 18px 0;
    border-radius: 14px 14px 0 0;
    color: #30476c;
    font-size: 1rem;
    font-weight: 700;
}

.hero-card__title {
    padding: 0 18px;
    font-family: "Lexend", sans-serif;
    font-size: 3rem;
    line-height: 0.9;
    color: #0b8d87;
    font-weight: 800;
}

.hero-card__subtitle {
    padding: 0 18px 12px;
    border-radius: 0 0 14px 14px;
    color: #27356e;
    font-size: 1.5rem;
    font-weight: 700;
}

.hero-copy {
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    width: min(92%, 820px);
    text-align: center;
    color: #fff;
    z-index: 2;
}

.hero-copy h2 {
    margin: 0;
    font-family: "Lexend", sans-serif;
    font-size: clamp(2rem, 3vw, 3rem);
    font-weight: 700;
    text-shadow: 0 6px 16px rgba(15, 42, 66, 0.28);
}

.hero-copy p {
    margin: 10px 0 0;
    font-size: 1.08rem;
}

.hero-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 3rem;
    z-index: 2;
}

.hero-control--prev {
    left: 28px;
}

.hero-control--next {
    right: 28px;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 34px;
}

.quick-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 160px;
    border-radius: 14px;
    background: linear-gradient(180deg, #4377ef 0%, #3566d9 100%);
    box-shadow: var(--shadow-md);
    color: #fff;
    text-align: center;
}

.quick-card:hover {
    text-decoration: none;
}

.quick-card__icon {
    font-size: 2rem;
    opacity: 0.92;
}

.quick-card__label {
    font-family: "Lexend", sans-serif;
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    gap: 28px;
    align-items: start;
}

.content-column {
    display: grid;
    gap: 24px;
}

.panel {
    background: var(--paper);
    border: 1px solid rgba(31, 66, 124, 0.08);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

.media-panel {
    padding: 24px;
}

.media-video-shell {
    overflow: hidden;
    border-radius: 18px;
    background: #0d1016;
}

.media-video {
    display: block;
    width: 100%;
    min-height: 355px;
    background: #0d1016;
    object-fit: cover;
}

.media-preview {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background:
        linear-gradient(125deg, rgba(22, 31, 40, 0.92), rgba(57, 59, 61, 0.58)),
        radial-gradient(circle at 30% 40%, rgba(255, 181, 120, 0.34), transparent 16%);
}

.media-preview::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, transparent 0 76%, rgba(5, 8, 13, 0.74) 100%),
        repeating-linear-gradient(
            90deg,
            transparent 0 88px,
            rgba(255, 255, 255, 0.82) 88px 92px,
            transparent 92px 180px
        );
    opacity: 0.8;
}

.media-preview--large {
    min-height: 355px;
}

.media-preview--small {
    min-height: 230px;
}

.media-preview__play {
    position: absolute;
    left: 22px;
    bottom: 20px;
    z-index: 1;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
}

.media-preview__caption {
    position: absolute;
    right: 24px;
    bottom: 24px;
    left: 94px;
    z-index: 1;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
}

.contact-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 228px;
    gap: 22px;
    margin-top: 20px;
    align-items: stretch;
}

.whatsapp-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 164px;
    border-radius: 14px;
    background: #28d35f;
    color: #fff;
    font-size: 1.4rem;
    font-weight: 800;
}

.whatsapp-card:hover {
    text-decoration: none;
}

.whatsapp-card__icon {
    font-size: 2.6rem;
}

.qr-card {
    display: grid;
    place-items: center;
    padding: 10px;
    border-radius: 14px;
    background: var(--slate-100);
}

.notice-card,
.campaign-card {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 24px;
    padding: 20px;
}

.notice-card__copy h3,
.campaign-card__text h3,
.login-panel h2,
.footer-contact__copy h2,
.footer-contact__copy h3 {
    margin: 0;
    font-family: "Lexend", sans-serif;
}

.notice-card__copy p,
.notice-card__copy li,
.campaign-card__text p,
.campaign-card__text li,
.footer-contact__copy p {
    font-size: 1rem;
    line-height: 1.5;
}

.notice-card__copy ul,
.campaign-card__text ul {
    margin: 14px 0 0;
    padding-left: 20px;
}

.campaign-card__poster {
    position: relative;
    min-height: 360px;
    overflow: hidden;
    border-radius: 18px;
    background:
        radial-gradient(circle at 82% 78%, rgba(255, 224, 142, 0.34), transparent 14rem),
        linear-gradient(180deg, #19b7d3 0%, #17a6c4 55%, #0b89a8 100%);
    color: #fff;
}

.campaign-card__poster::before {
    content: "";
    position: absolute;
    inset: auto -8% -18% auto;
    width: 230px;
    height: 230px;
    background: radial-gradient(circle, #ffd24c, #ffb300);
    border-radius: 50%;
    opacity: 0.95;
}

.campaign-card__poster-copy {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 18px;
    padding: 28px;
    max-width: 78%;
}

.campaign-card__poster-copy strong {
    font-family: "Lexend", sans-serif;
    font-size: 2rem;
    line-height: 1.05;
}

.campaign-card__poster-copy span {
    display: inline-flex;
    width: fit-content;
    padding: 12px 18px;
    border: 2px solid rgba(255, 230, 166, 0.86);
    border-radius: 999px;
    font-size: 1.3rem;
    font-weight: 700;
}

.campaign-card__seal {
    position: absolute;
    left: 28px;
    bottom: 22px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: #fff;
    color: #0c8b88;
    font-family: "Lexend", sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
}

.campaign-card__text {
    align-self: center;
}

.campaign-card__text h3 {
    font-size: 2rem;
    line-height: 1.15;
}

.campaign-card__text p {
    margin: 16px 0 0;
}

.sidebar-column {
    gap: 24px;
}

.login-panel {
    padding: 34px 36px;
}

.login-panel h2 {
    font-size: clamp(2.1rem, 3vw, 3.4rem);
    color: var(--blue-900);
    text-align: center;
    font-weight: 500;
}

.login-panel__hint {
    margin: 18px 0 26px;
    text-align: center;
    font-size: 1.2rem;
}

.login-form {
    display: grid;
    gap: 12px;
}

.login-form label {
    font-size: 1rem;
    text-align: center;
    color: #30394a;
}

.login-form input {
    width: 100%;
    padding: 16px 18px;
    border: 1px solid rgba(42, 66, 110, 0.28);
    border-radius: 8px;
    background: #fff;
}

.login-form button {
    width: min(100%, 210px);
    margin: 12px auto 0;
    padding: 14px 22px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(180deg, #4a76dd 0%, #3764d1 100%);
}

.login-links {
    display: grid;
    gap: 16px;
    margin-top: 24px;
    text-align: center;
}

.login-links p {
    margin: 0;
}

.poster-panel {
    display: grid;
    place-items: center;
    padding: 16px;
}

.poster-panel img {
    width: min(100%, 420px);
    border-radius: 8px;
}

.footer-contact {
    margin-top: 30px;
}

.footer-contact__card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 170px;
    gap: 28px 48px;
    padding: 42px;
    border-radius: var(--radius-lg);
    background: #fff;
    box-shadow: var(--shadow-md);
}

.footer-contact__copy {
    text-align: center;
}

.footer-contact__copy h2 {
    color: var(--blue-700);
    font-size: clamp(1.7rem, 2.4vw, 2.6rem);
    font-weight: 500;
}

.footer-contact__copy h3 {
    margin-top: 38px;
    color: var(--blue-700);
    font-size: 1.65rem;
    font-weight: 700;
}

.footer-contact__copy p {
    margin: 7px 0;
}

.footer-contact__brand {
    display: grid;
    place-items: start center;
}

.footer-contact__brand img {
    width: 120px;
}

.footer-contact__links {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 22px 44px;
    padding-top: 10px;
}

.accessibility-rail {
    position: fixed;
    right: 0;
    top: 38%;
    z-index: 9;
    display: grid;
    gap: 10px;
    padding: 14px 10px 14px 14px;
    border-radius: 18px 0 0 18px;
    background: var(--blue-900);
    box-shadow: 0 18px 36px rgba(7, 33, 79, 0.16);
}

.accessibility-rail button {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: #fff;
    color: var(--blue-900);
    font-weight: 800;
}

*/

.mia-widget {
    --slate-900: #1b2433;
    --slate-500: #7d8796;

    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 12;
    font-family: "Nunito Sans", Arial, sans-serif;
}

/* Normalizaciones limitadas al widget para no sobrescribir Bootstrap. */
.mia-widget,
.mia-widget *,
.mia-widget *::before,
.mia-widget *::after {
    box-sizing: border-box;
}

.mia-widget img {
    display: block;
    max-width: 100%;
}

.mia-widget button,
.mia-widget textarea {
    font: inherit;
}

.mia-widget__launcher,
.mia-widget__chooser,
.mia-widget__panel {
    transition: opacity 220ms ease, transform 220ms ease, visibility 220ms ease;
}

.mia-widget__launcher {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 10px 20px 10px 10px;
    border: 1px solid rgba(29, 49, 90, 0.08);
    border-radius: 999px;
    background: #fff;
    color: var(--slate-900);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.mia-widget__launcher:hover {
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 10px 34px rgba(0, 0, 0, 0.16);
}

.mia-widget__launcher-avatar,
.mia-widget__avatar,
.mia-widget__message-avatar {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
}

.mia-widget__launcher-avatar img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(23, 41, 77, 0.08);
}

.mia-widget__status {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 11px;
    height: 11px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #22c55e;
}

.mia-widget__launcher-copy {
    display: grid;
    min-width: 120px;
    text-align: left;
    gap: 2px;
}

.mia-widget__launcher-copy strong {
    font-size: 1.05rem;
    font-weight: 800;
}

.mia-widget__launcher-copy small {
    color: var(--slate-500);
    font-size: 0.92rem;
}

.mia-widget__launcher-icon {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #eff6ff;
    color: #2563eb;
    font-size: 1.1rem;
    font-weight: 800;
}

.mia-widget__chooser,
.mia-widget__panel {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 380px;
    overflow: hidden;
    border: 1px solid #f3f4f6;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 24px 60px rgba(17, 24, 39, 0.18);
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(0.96);
    pointer-events: none;
}

.mia-widget__chooser {
    display: grid;
    gap: 20px;
    padding: 22px;
}

.mia-widget__panel {
    display: flex;
    flex-direction: column;
    height: 600px;
}

.mia-widget.is-choice-open .mia-widget__launcher,
.mia-widget.is-chat-open .mia-widget__launcher {
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(0.8);
    pointer-events: none;
}

.mia-widget.is-choice-open .mia-widget__chooser {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.mia-widget.is-chat-open .mia-widget__panel {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.mia-widget__chooser-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.mia-widget__chooser-head h3 {
    margin: 6px 0 8px;
    font-family: "Lexend", sans-serif;
    font-size: 1.35rem;
    line-height: 1.2;
}

.mia-widget__chooser-head span {
    color: #6b7280;
    font-size: 0.92rem;
    line-height: 1.45;
}

.mia-widget__chooser-kicker {
    margin: 0;
    color: #2563eb;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.mia-widget__chooser-close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #9ca3af;
    font-size: 1.15rem;
    flex-shrink: 0;
}

.mia-widget__chooser-close:hover {
    background: #f9fafb;
    color: #4b5563;
}

.mia-widget__chooser-options {
    display: grid;
    gap: 14px;
}

.mia-widget__option {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(247, 250, 255, 1));
    color: #1f2937;
    text-align: left;
    box-shadow: 0 10px 22px rgba(31, 51, 83, 0.06);
}

.mia-widget__option:hover {
    transform: translateY(-2px);
    border-color: #bfdbfe;
    box-shadow: 0 14px 28px rgba(31, 51, 83, 0.1);
}

.mia-widget__option-icon {
    display: inline-grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-family: "Lexend", sans-serif;
    font-size: 1rem;
    font-weight: 800;
    flex-shrink: 0;
}

.mia-widget__option-icon--mia {
    background: linear-gradient(135deg, #dbeafe, #eef2ff);
    color: #2563eb;
}

.mia-widget__option-icon--app {
    background: linear-gradient(135deg, #dcfce7, #ecfccb);
    color: #15803d;
}

.mia-widget__option-copy {
    display: grid;
    gap: 3px;
    flex: 1;
}

.mia-widget__option-copy strong {
    font-size: 1rem;
    font-weight: 800;
}

.mia-widget__option-copy small {
    color: #6b7280;
    font-size: 0.86rem;
    line-height: 1.45;
}

.mia-widget__option-arrow {
    color: #94a3b8;
    font-size: 1.35rem;
    font-weight: 700;
}

.mia-widget__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 16px;
    border-bottom: 1px solid #f3f4f6;
    background: #fff;
}

.mia-widget__identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mia-widget__avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #f3f4f6;
}

.mia-widget__avatar .mia-widget__status {
    width: 10px;
    height: 10px;
    right: 0;
    bottom: 0;
}

.mia-widget__identity-copy {
    display: grid;
    gap: 0;
}

.mia-widget__identity-copy h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
}

.mia-widget__identity-copy span {
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 600;
}

.mia-widget__close {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #9ca3af;
    font-size: 1.15rem;
}

.mia-widget__close:hover {
    background: #f9fafb;
    color: #4b5563;
}

.mia-widget__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-height: 0;
    background: #f9fafb;
}

.mia-widget__messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px 16px;
}

.mia-widget__message-group {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.mia-widget__message-avatar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e5e7eb;
    background: #fff;
}

.mia-widget__message {
    max-width: 85%;
    padding: 14px 16px;
    border: 1px solid #f3f4f6;
    border-radius: 18px 18px 18px 4px;
    background: #fff;
    color: #1f2937;
    font-size: 0.95rem;
    line-height: 1.62;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.mia-widget__composer {
    padding: 16px;
    border-top: 1px solid #f3f4f6;
    background: #fff;
}

.mia-widget__input-shell {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 28px;
    background: #f9fafb;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.mia-widget__input-shell:focus-within {
    border-color: #60a5fa;
    background: #fff;
    box-shadow: 0 0 0 2px #dbeafe;
}

.mia-widget__mic,
.mia-widget__send {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 50%;
    flex-shrink: 0;
}

.mia-widget__mic {
    background: transparent;
    color: #9ca3af;
    font-size: 1rem;
}

.mia-widget__mic:hover {
    color: #2563eb;
    background: #eff6ff;
}

.mia-widget__textarea {
    flex: 1;
    max-height: 120px;
    min-height: 24px;
    padding: 6px 2px;
    border: 0;
    outline: 0;
    resize: none;
    background: transparent;
    color: #1f2937;
    font-size: 0.93rem;
    line-height: 1.5;
    overflow-y: auto;
}

.mia-widget__textarea::placeholder {
    color: #9ca3af;
}

.mia-widget__send {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    font-size: 1rem;
}

.mia-widget__counter {
    margin-top: 6px;
    padding-right: 6px;
    text-align: right;
    color: #9ca3af;
    font-size: 0.72rem;
    font-weight: 700;
}

/*
 * ESTILOS RESTANTES DE LA MAQUETA GENERAL
 *
 * Se conservan desactivados porque no pertenecen al widget y afectan clases
 * compartidas por el portal, entre ellas .container y .nav-item.

.site-footer {
    margin-top: 28px;
    background: #3366cc;
    color: #fff;
}

.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 122px;
}

.site-footer__inner p {
    margin: 0;
    font-size: 0.96rem;
}

.site-footer__logos {
    display: flex;
    align-items: center;
    gap: 26px;
}

.site-footer__logos img:first-child {
    width: 102px;
}

.site-footer__logos img:last-child {
    width: 144px;
    filter: brightness(0) invert(1);
}

@media (max-width: 1280px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .sidebar-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        display: grid;
    }
}

@media (max-width: 1080px) {
    .quick-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .notice-card,
    .campaign-card,
    .footer-contact__card {
        grid-template-columns: 1fr;
    }

    .footer-contact__brand {
        place-items: center;
    }
}

@media (max-width: 820px) {
    .container {
        width: min(100% - 24px, 100%);
    }

    .site-header__inner,
    .brand {
        flex-direction: column;
        text-align: center;
    }

    .main-nav__inner {
        justify-content: stretch;
    }

    .nav-item {
        width: 100%;
        min-height: 64px;
    }

    .hero-stage {
        min-height: 520px;
    }

    .hero-card {
        top: 28px;
        width: 200px;
    }

    .hero-card__title {
        font-size: 2.4rem;
    }

    .hero-copy {
        bottom: 18px;
    }

    .contact-strip,
    .sidebar-column {
        grid-template-columns: 1fr;
    }

    .login-panel {
        padding: 28px 22px;
    }

    .accessibility-rail {
        top: auto;
        bottom: 24px;
    }

    .mia-widget {
        right: 14px;
        bottom: 14px;
    }

    .mia-widget__panel {
        width: min(380px, calc(100vw - 28px));
        height: min(600px, calc(100vh - 28px));
    }

    .mia-widget__chooser {
        width: min(380px, calc(100vw - 28px));
    }

    .site-footer__inner {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding: 22px 0;
    }
}

@media (max-width: 560px) {
    .quick-links {
        grid-template-columns: 1fr;
    }

    .hero-control {
        width: 44px;
        height: 44px;
        font-size: 2.3rem;
    }

    .hero-control--prev {
        left: 12px;
    }

    .hero-control--next {
        right: 12px;
    }

    .brand__copy h1 {
        font-size: 1.6rem;
    }

    .campaign-card__poster-copy {
        max-width: 100%;
    }

    .mia-widget__launcher {
        padding-right: 16px;
    }

    .mia-widget__launcher-copy strong {
        font-size: 0.98rem;
    }

    .mia-widget__launcher-copy small {
        font-size: 0.84rem;
    }

    .mia-widget__chooser {
        padding: 18px;
    }

    .mia-widget__option {
        padding: 14px;
    }
}

*/

/* Ajustes responsive exclusivos del widget MIA. */
@media (max-width: 820px) {
    .mia-widget {
        right: 14px;
        bottom: 14px;
    }

    .mia-widget__panel {
        width: min(380px, calc(100vw - 28px));
        height: min(600px, calc(100vh - 28px));
    }

    .mia-widget__chooser {
        width: min(380px, calc(100vw - 28px));
    }
}

@media (max-width: 560px) {
    .mia-widget__launcher {
        padding-right: 16px;
    }

    .mia-widget__launcher-copy strong {
        font-size: 0.98rem;
    }

    .mia-widget__launcher-copy small {
        font-size: 0.84rem;
    }

    .mia-widget__chooser {
        padding: 18px;
    }

    .mia-widget__option {
        padding: 14px;
    }
}
