@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/*--------------------------- RESET ---------------------------*/

* { margin: 0; padding: 0; box-sizing: border-box; list-style: none; }

/*--------------------------- NAV HORIZONTAL ---------------------------*/

.nav {
    display: flex;
    align-items: center;
    height: 58px;
    padding: 10px 0;
    font-weight: bold;
    background-color: #4e4e4e;
    --img1: scale(1);
    --img2: scale(0);
}

/* Editor rapido en nav */
.nav-editor-item {
    position: relative;
}

.nav-editor-button {
    font-size: 16px;
    font-weight: bold;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    gap: .35rem;
}

.nav-editor-button:hover {
    background-color: rgba(79,70,229,.16);
}

.nav-editor-menu {
    position: absolute;
    top: calc(100%);
    right: 0;
    z-index: 2200;
    min-width: 148px;
    padding: 6px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 8px;
    background: rgba(15, 23, 42, .98);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.nav-editor-item:hover .nav-editor-menu,
.nav-editor-item:focus-within .nav-editor-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-editor-menu a {
    display: block;
    padding: 9px 10px;
    border-radius: 6px;
    color: #e5e7eb;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.nav-editor-menu a:hover,
.nav-editor-menu a:focus {
    background: rgba(79, 70, 229, .22);
    color: #fff;
    outline: none;
}

.nav-mobile-more-item {
    display: none;
    position: relative;
}

.nav-mobile-more-button {
    border: 0;
    background: transparent;
    color: #e5e7eb;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.nav-mobile-more-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 2300;
    min-width: 158px;
    padding: 7px;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: 8px;
    background: rgba(15, 23, 42, .98);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .35);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-4px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}

.nav-mobile-more-item.is-open .nav-mobile-more-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-mobile-more-title {
    display: block;
    padding: 6px 9px 5px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.nav-mobile-more-menu a {
    display: block;
    padding: 9px 10px;
    border-radius: 6px;
    color: #e5e7eb;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.nav-mobile-more-menu a:hover,
.nav-mobile-more-menu a:focus {
    background: rgba(79, 70, 229, .22);
    color: #fff;
    outline: none;
}

.nav-mobile-more-separator {
    display: block;
    height: 1px;
    margin: 6px 4px;
    background: rgba(148, 163, 184, .18);
}

@media (max-width: 1024px) {
    .nav-editor-button .dropdown__span { display: none; }
    .nav-editor-menu {
        right: auto;
        left: 50%;
        min-width: 126px;
        transform: translate(-50%, -4px);
    }
    .nav-editor-item:hover .nav-editor-menu,
    .nav-editor-item:focus-within .nav-editor-menu {
        transform: translate(-50%, 0);
    }
}

.nav:has(.dropdown:target) { --img1: scale(0); --img2: scale(1); --clip: inset(0 0 0 0); }

.ul__a1 {
    display: flex; 
    align-items: center; /*height: 58px;*/
    width: 100%;
    padding-right: 125px;
}

.nav__container__5 {
    display: grid;
    grid-template-columns: max-content max-content;
    grid-template-areas: "title img";
    justify-content: space-between;
    align-items: center;
}

.nav__menu,
.nav__menu--second {
    color: rgb(184, 187, 191);
    text-decoration: none;
    display: flex;
    align-items: center;
    position: absolute;
    right: 10px;
    top: 50%;
    padding: .3em .7em;
    gap: .6rem;
    background-color: transparent;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.nav__menu         { grid-area: img; z-index: 2001; transform: translateY(-50%) var(--img1, scale(1)); }
.nav__menu--second { z-index: 2001; transform: translateY(-50%) var(--img2, scale(0)); }
.nav__menu:hover   { background-color: rgba(255,255,255,0.08); }

.dropdown {
    position: fixed;
    background-color: #000;
    width: 50%;
    max-width: 50%;
    top: 0; right: 0; bottom: 0;
    padding: 0;
    overflow-y: auto;
    clip-path: var(--clip, inset(0 0 0 100%));
    transition: clip-path .5s;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

.dropdown > li { display: flex; flex-direction: column; height: 100%; gap: 10px; }

/*--------------------------- SIDEBAR ---------------------------*/

.dropdown1 { background-color: #000; width: 100%; height: auto; overflow-y: visible; padding: 1em; }

.dropdown__link {
    color: rgb(184, 187, 191);
    padding: 1em .7em;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .6rem;
    position: relative;
    background-color: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dropdown__link:hover                        { background-color: rgba(255,255,255,0.05); }
.ul__a1 > .dropdown__list > .dropdown__link { padding: .4em .7em; }

.dropdown__check { display: none; }
.dropdown__check:checked ~ .dropdown__content               { grid-template-rows: 1fr; }
.dropdown__check:checked ~ .dropdown__link                  { background-color: #28303B; }
.dropdown__check:checked ~ .dropdown__link .dropdown__arrow { transform: rotate(180deg); }

.dropdown__arrow   { margin-left: auto; transition: transform 0.2s; }
.dropdown__content { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.3s ease; }
.dropdown__sub     { overflow: hidden; }
.dropdown__li      { width: 85%; list-style: none; margin-left: auto; overflow: hidden; }

.dropdown__anchor       { padding: 1em 0; display: block; color: #B6BABE; text-decoration: none; transition: color 0.2s; }
.dropdown__anchor:hover { color: #fff; }

@media (max-width: 768px) {
    /* Punto 11 — mayor área de tap en enlaces del sidebar nivel 2 */
    .dropdown__anchor { padding: 0.9em 8px; }
    .dropdown__li     { width: 100%; }
}

.dropdown__list--level2            { width: 100%; margin-left: 0; }
.dropdown__list--level2 .dropdown__link { padding-left: 1.5em; font-size: 0.95em; }
.dropdown__list--level2 .dropdown__li   { width: 90%; }

/*--------------------------- BUSCADOR ---------------------------*/

.container { position: absolute; left: 22%; top: 10%; z-index: 2100; }

.search-input-box {
    width: 100%;
    background-color: #2f3640;
    border-radius: 5px;
    position: relative;
    color: #f5f6f4;
    box-shadow: 0 1px 5px 3px rgba(0,0,0,0.12);
}

.search-input-box input {
    width: 100%;
    border: none;
    outline: none;
    border-radius: 5px;
    height: 44px;
    padding: 0 50px 0 16px;
    font-size: 15px;
    font-weight: 500;
    background-color: #2f3640;
    color: #f5f6f4;
}

.lupita            { position: absolute; right: 8px; top: 12px; cursor: pointer; }
.dropdown__icon--2 { display: block; width: 20px; height: 20px; }

.container-suggestions {
    position: absolute;
    left: 0; right: 0;
    max-height: 280px;
    opacity: 0;
    pointer-events: none;
    padding: 0;
    overflow-y: auto;
    transition: opacity 0.2s;
    background-color: #2f3640;
    border-radius: 0 0 5px 5px;
    z-index: 2100;
}
.search-input-box.active .container-suggestions    { opacity: 1; pointer-events: auto; padding: 10px 8px; }
.search-input-box.active .container-suggestions li { display: block; }

.container-suggestions li          { list-style: none; width: 100%; padding: 8px 12px; border-radius: 5px; display: none; cursor: pointer; transition: background-color 0.2s; font-weight: 500; }
.container-suggestions li:hover,
.container-suggestions li.selected { background-color: #414b57; }

.suggestion-category {
    padding: 8px 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    background-color: #1a1a1a;
    cursor: default;
    border-top: 1px solid #333;
}
.suggestion-category:first-child { border-top: none; }
.suggestion-item strong          { color: #4f46e5; font-weight: 600; }

.no-results       { text-align: center; color: #666; font-style: italic; cursor: default; }
.no-results:hover { background-color: transparent; }

.container-suggestions::-webkit-scrollbar       { width: 6px; }
.container-suggestions::-webkit-scrollbar-track { background: #1a1a1a; }
.container-suggestions::-webkit-scrollbar-thumb { background: #4e4e4e; border-radius: 3px; }
.container-suggestions::-webkit-scrollbar-thumb:hover { background: #666; }

/*--------------------------- UTILIDADES ---------------------------*/

.dropdown__icon,
.nav__icon         { width: 20px; height: 20px; }
.nav__icon--home   { width: 18px; height: 18px; flex-shrink: 0; }
.nav__icon--ia     { filter: invert(1) opacity(.75); }
.dropdown__span--close { color: #ef4444; }

.nav__btn--share {
    display: none; /* Reemplazado por share por sección */
}

/*--------------------------- SHARE POR SECCIÓN ---------------------------*/

.tutorial-section {
    position: relative;
}

.section-share-btn {
    display: inline-flex;
    margin-left: auto; /* Esto lo empuja a la derecha */
    display: flex;     /* Cambia a flex para que el margin-left auto funcione */
    width: max-content; /* Asegura que no ocupe todo el ancho */
    align-items: center;
    gap: 0;
    padding: 7px 9px;
    background: transparent;
    border: 1px solid #ffffff;
    color: #ffffff;
    border-radius: 5px;
    font-size: 12px;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: gap 0.15s ease, border-color 0.2s ease, color 0.2s ease;
    margin-top: 16px;
}

.section-share-btn svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.section-share-btn span {
    display: none;
}

.section-share-btn:hover {
    border-color: #4f46e5;
    color: #a5b4fc;
}

.section-share-btn.copied {
    gap: 6px;
    border-color: #10b981;
    color: #10b981;
}

.section-share-btn.copied span {
    display: inline;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 0 10px;
    height: 32px;
    background-color: #2d2d2d;
    color: #fff;
    border: 1px solid #404040;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 500;
    flex-shrink: 0;
    transition: all 0.2s ease;
}
.btn-action:hover  { background-color: #3d3d3d; border-color: #4f46e5; transform: translateY(-1px); }
.btn-action:active { transform: translateY(0); }
.btn-action.copied { background-color: #059669; border-color: #10b981; }
.btn-action svg    { width: 14px; height: 14px; }
/*--------------------------- CHATBOT ---------------------------*/

.chatbot-wrapper { display: flex; flex-direction: column; height: 100%; font-family: 'Inter', 'Segoe UI', sans-serif; }

.chat-toolbar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    height: 58px;
    background-color: #1a1a1a;
    border-bottom: 1px solid #2d2d2d;
    flex-shrink: 0;
}

.chat-lang-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    height: 32px;
    background-color: #4f46e5;
    color: white;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.chat-lang-badge img { width: 20px; height: 20px; filter: invert(1); }

.chat-model-select {
    height: 32px;
    padding: 0 8px;
    max-width: 200px;
    background-color: #1e1e1e;
    border: 1px solid #404040;
    color: #a0a0a0;
    border-radius: 6px;
    font-size: 11px;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s, color 0.2s;
}
.chat-model-select:hover,
.chat-model-select:focus  { border-color: #4f46e5; color: #fff; }
.chat-model-select option { background-color: #1e1e1e; color: #d4d4d4; }

.chat-context-bar      { display: flex; align-items: center; gap: 8px; padding: 8px 20px; background-color: #252525; border-bottom: 1px solid #333; flex-shrink: 0; }
.chat-context-bar span { color: #666; font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }

.chat-context-file {
    color: #4f46e5 !important;
    font-family: 'Courier New', monospace !important;
    font-size: 12px !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 400 !important;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    background-color: #1e1e1e;
    min-height: 0;
    overscroll-behavior: contain;
}
.chat-messages::-webkit-scrollbar       { width: 12px; }
.chat-messages::-webkit-scrollbar-track { background: #1a1a1a; }
.chat-messages::-webkit-scrollbar-thumb { background: #404040; border-radius: 6px; border: 2px solid #1a1a1a; }
.chat-messages::-webkit-scrollbar-thumb:hover { background: #4f46e5; }

.chat-welcome        { text-align: center; padding: 30px 10px; }
.chat-welcome img    { width: 44px; height: 44px; filter: invert(1) opacity(0.18); margin: 0 auto 14px; display: block; }
.chat-welcome p      { font-size: 13px; line-height: 1.7; color: #555; }
.chat-welcome strong { color: #4f46e5; }

.chat-bubble      { display: flex; gap: 10px; align-items: flex-start; animation: chatFadeInUp 0.25s ease; }
.chat-bubble.user { flex-direction: row-reverse; }

@keyframes chatFadeInUp {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

.chat-bubble-avatar {
    width: 28px; height: 28px;
    border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.chat-bubble.user .chat-bubble-avatar     { background: #4f46e5; padding: 6px; }
.chat-bubble.user .chat-bubble-avatar img { width: 100%; height: 100%; filter: invert(1); }
.chat-bubble.bot  .chat-bubble-avatar     { background: #2d2d2d; border: 1px solid #404040; padding: 5px; }
.chat-bubble.bot  .chat-bubble-avatar img { width: 100%; height: 100%; filter: invert(1) opacity(0.7); }

.chat-bubble-content { max-width: 85%; }

.chat-bubble-text                   { padding: 10px 14px; border-radius: 6px; font-size: 13px; line-height: 1.6; word-break: break-word; }
.chat-bubble.user .chat-bubble-text { background-color: #4f46e5; color: #fff; }
.chat-bubble.bot  .chat-bubble-text { background-color: #252525; color: #d4d4d4; border: 1px solid #333; }

.chat-typing              { display: flex; gap: 5px; padding: 4px 2px; align-items: center; }
.chat-typing span         { width: 7px; height: 7px; background: #4f46e5; border-radius: 50%; animation: typingBounce 1.2s infinite; }
.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
    30%           { transform: translateY(-6px); opacity: 1; }
}

.chat-error-msg { background-color: #2d1515; border: 1px solid #7f1d1d; color: #fca5a5; padding: 10px 14px; border-radius: 6px; font-size: 12px; display: block; }

.chat-input-area { display: flex; gap: 8px; align-items: flex-end; padding: 12px 20px; background-color: #252525; border-top: 1px solid #333; flex-shrink: 0; }

.chat-input-area textarea {
    flex: 1;
    background-color: #1e1e1e;
    border: 1px solid #404040;
    color: #d4d4d4;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    resize: none;
    outline: none;
    min-height: 36px; height: 36px; max-height: 120px;
    line-height: 1.5;
    transition: border-color 0.2s;
    overflow-y: hidden;
}
.chat-input-area textarea:focus        { border-color: #4f46e5; }
.chat-input-area textarea::placeholder { color: #555; }
.chat-input-area textarea::-webkit-scrollbar       { width: 12px; }
.chat-input-area textarea::-webkit-scrollbar-track { background: #1a1a1a; }
.chat-input-area textarea::-webkit-scrollbar-thumb { background: #404040; border-radius: 6px; border: 2px solid #1a1a1a; }
.chat-input-area textarea::-webkit-scrollbar-thumb:hover { background: #4f46e5; }

.chat-send-btn {
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px;
    background-color: #4f46e5;
    color: #fff;
    border: 1px solid #4f46e5;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.chat-send-btn:hover    { background-color: #4338ca; border-color: #4338ca; transform: translateY(-1px); }
.chat-send-btn:active   { transform: translateY(0); }
.chat-send-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.chat-send-btn svg      { width: 16px; height: 16px; }

.chat-code-block  { margin: 8px 0; border-radius: 6px; overflow: hidden; border: 1px solid #333; }
.chat-code-header { display: flex; align-items: center; justify-content: space-between; background-color: #2d2d2d; padding: 4px 8px 4px 12px; border-bottom: 1px solid #333; }
.chat-code-label  { font-size: 10px; color: #a0a0a0; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

.chat-copy-btn {
    display: flex; align-items: center; gap: 5px;
    background: transparent;
    border: 1px solid #444;
    color: #888;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-family: 'Inter', 'Segoe UI', sans-serif;
    cursor: pointer;
    transition: all 0.2s;
}
.chat-copy-btn svg    { width: 12px; height: 12px; }
.chat-copy-btn:hover  { border-color: #4f46e5; color: #fff; }
.chat-copy-btn.copied { border-color: #10b981; color: #10b981; }

.chat-code-block pre { margin: 0; padding: 14px 16px; background-color: #1e1e1e; overflow-x: auto; font-size: 12px; line-height: 1.6; }
.chat-code-block pre code { color: #d4d4d4; font-family: 'Courier New', monospace; background: transparent; }
.chat-code-block pre::-webkit-scrollbar       { height: 8px; }
.chat-code-block pre::-webkit-scrollbar-track { background: #1a1a1a; }
.chat-code-block pre::-webkit-scrollbar-thumb { background: #404040; border-radius: 6px; }
.chat-code-block pre::-webkit-scrollbar-thumb:hover { background: #4f46e5; }

.chat-inline-code { background-color: #2d2d2d; color: #818cf8; padding: 1px 5px; border-radius: 4px; font-size: 12px; font-family: 'Courier New', monospace; border: 1px solid #333; }

.chat-close-btn       { border-color: #7f1d1d; }
.chat-close-btn:hover { border-color: #ef4444 !important; background-color: #2d1515; }
.chat-close-btn svg   { width: 14px; height: 14px; }

.chat-close-mobile { display: none; }

.dropdown#menu { padding: 0; background-color: #1e1e1e; }

/*--------------------------- CHATBOT — MARKDOWN ---------------------------*/

.chat-bubble-text h1,
.chat-bubble-text h2,
.chat-bubble-text h3 { color: #fff; margin: 10px 0 6px; line-height: 1.3; }
.chat-bubble-text h1 { font-size: 16px; }
.chat-bubble-text h2 { font-size: 15px; }
.chat-bubble-text h3 { font-size: 14px; }

.chat-bubble-text p            { margin: 0 0 8px; }
.chat-bubble-text p:last-child { margin-bottom: 0; }

.chat-bubble-text ul,
.chat-bubble-text ol { padding-left: 18px; margin: 6px 0; }
.chat-bubble-text li    { margin-bottom: 4px; line-height: 1.5; list-style: disc; }
.chat-bubble-text ol li { list-style: decimal; }

.chat-bubble-text strong { color: #fff; }
.chat-bubble-text a      { color: #818cf8; text-decoration: underline; }

.chat-bubble-text table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
    border-collapse: collapse;
    margin: 10px 0;
    font-size: 12px;
}
.chat-bubble-text table::-webkit-scrollbar       { height: 6px; }
.chat-bubble-text table::-webkit-scrollbar-track { background: #1a1a1a; border-radius: 3px; }
.chat-bubble-text table::-webkit-scrollbar-thumb { background: #404040; border-radius: 3px; }
.chat-bubble-text table::-webkit-scrollbar-thumb:hover { background: #4f46e5; }
.chat-bubble-text th                    { background-color: #4f46e5; color: #fff; padding: 6px 10px; text-align: left; white-space: nowrap; }
.chat-bubble-text td                    { padding: 6px 10px; border-bottom: 1px solid #333; color: #d4d4d4; white-space: nowrap; }
.chat-bubble-text tr:nth-child(even) td { background-color: #1a1a2e; }
.chat-bubble-text blockquote            { border-left: 3px solid #4f46e5; margin: 8px 0; padding: 6px 12px; background-color: #1a1a2e; color: #aaa; font-style: italic; }

/*--------------------------- RESPONSIVE ---------------------------*/

@media (max-width: 1024px) {
    .lupita {top: 8px;}
    .nav { padding: 0 8px; }
    .ul__a1 { gap: 6px; width: 100%; }
    .nav__span--desktop { display: none; }
    .nav__menu .dropdown__span { display: none; }
    /* .ul__a1 > .dropdown__list:last-child { margin-left: auto; } */

    .container {
        position: relative;
        left: auto; top: auto;
        transform: none;
        flex: 1; min-width: 0;
        z-index: auto;
    }

    .search-input-box { width: 100%; }
    .search-input-box input { height: 34px; font-size: 13px; font-weight: 500; /*width: 234px; *//*padding: 0 38px 0 12px; */}

    .nav__menu--second {
        position: static;
        transform: var(--img2, scale(0));
        padding: .3em .4em;
        flex-shrink: 0;
        margin-left: auto;
    }
    .nav__menu--second .dropdown__span { display: none; }
}

@media (max-width: 768px) {
    .nav__menu {
        right: auto;
        padding: .3em .4em;
    }
    /*.nav__menu--second { display: none; }*/

    .dropdown { width: 100%; max-width: 100%; top: 0; }

    /* Igualar padding horizontal de todos los botones del nav */
    .ul__a1 { gap: 0; }
    .ul__a1 > .dropdown__list > .dropdown__link { padding: 8px; }
    .nav__btn--share { padding: 8px; }

    /* Punto 7 — buscador: z-index por encima del overlay del sidebar */
    .container-suggestions { z-index: 2200; }

    /* Punto 8 — chat: min-height para que el teclado virtual no aplaste los mensajes */
    .chat-messages { min-height: 120px; }

    /* Punto 9 — nav: el buscador no se queda sin espacio */
    .ul__a1 { width: 100%; min-width: 0; }
    .container { min-width: 0; flex-shrink: 1; }

    .chat-close-mobile {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px; height: 32px;
        flex-shrink: 0;
        border-radius: 6px;
        transition: background-color 0.2s;
    }
    .chat-close-mobile:hover { background-color: rgba(239,68,68,0.1); }
    .chat-close-mobile svg   { width: 18px; height: 18px; }

    .chat-toolbar-header { gap: 6px; padding: 0 8px; }
    .chat-lang-badge     { padding: 0 8px; font-size: 0; letter-spacing: 0; gap: 0; }
    .chat-lang-badge img { width: 18px; height: 18px; }
    .chat-model-select   { width: 160px; min-width: 0; font-size: 10px; }

    .chat-bubble-avatar  { display: none; }
    .chat-bubble-content { max-width: 100%; }
    .chat-bubble.user    { justify-content: right; }
    .chat-messages       { padding: 10px 8px; gap: 8px; }
    .chat-bubble-text    { padding: 8px 10px; font-size: 13px; }
}

@media (max-width: 360px) {
    .tutorial-intro h1   { font-size: 22px; }
    .tutorial-section h2 { font-size: 18px; }
}

@media (max-width: 320px) {
    .ul__a1 > .dropdown__list > .dropdown__link { padding: 0; }
    .nav { padding: 0; }
    .nav__menu--second, .nav__menu {
        padding: 3px;
    }
    .ul__a1 {
        padding: 0 3px;
        gap: 0 4px;
    }
}

/*--------------------------- FOOTER ---------------------------*/

.site-footer {
    background: #1a1a1a;
    border-top: 1px solid #273244;
    padding: 40px 40px 24px;
    margin-top: 48px;
    margin-left: -310px;
    padding-left: 350px;
    font-family: 'Poppins', 'Segoe UI', system-ui, sans-serif; /* Unificado con tu fuente Poppins */
}

/* CORRECCIÓN: Estructura vertical limpia para la marca */
.site-footer__brand {
    display: flex;
    flex-direction: column; /* Cambiado a columna para unificar marca + eslogan */
    align-items: flex-start;
    gap: 6px;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid #273244;
}

.site-footer__brand strong {
    color: #f8fafc;
    font-size: 24px; /* Un poco más imponente */
    font-weight: 700;
    letter-spacing: -0.5px;
}

.site-footer__brand span {
    max-width: 600px;
    color: #94a3b8; /* Gris con excelente contraste */
    font-size: 14px;
    line-height: 1.5;
    text-align: left; /* Alineado correctamente debajo del título */
    font-weight: 300;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px; /* Más espacio entre columnas */
    margin-bottom: 32px;
}

.site-footer__heading {
    margin: 0 0 16px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: #818cf8; /* Indigo un poco más vivo para jerarquía */
}

.site-footer__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px; /* Más aire entre enlaces */
}

.site-footer__link {
    display: inline-flex;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13.5px;
    line-height: 1.4;
    transition: color 0.15s, transform 0.15s, opacity 0.15s;
}

/* CORRECCIÓN HOVER: Solo se ejecuta en dispositivos con mouse (PC) */
@media (hover: hover) {
    .site-footer__link:hover {
        color: #ffffff;
        transform: translateX(4px); /* Animación sutil interactiva */
    }
}

/* CORRECCIÓN ACCESIBILIDAD MÓVIL: Feedback rápido al tocar con el dedo sin quedarse trabado */
.site-footer__link:active {
    color: #ffffff;
    opacity: 0.7;
}

.site-footer__bottom {
    border-top: 1px solid #273244;
    padding-top: 20px;
    display: flex;
    justify-content: center; /* Centrado absoluto para un acabado elegante */
    align-items: center;
    gap: 12px;
}

/* CORRECCIÓN: Mayor contraste y legibilidad en el texto final */
.site-footer__copy {
    margin: 0;
    font-size: 13px;
    color: #94a3b8; /* Tono corregido para legibilidad WCAG */
    font-weight: 400;
}

@media (max-width: 1024px) {
    .site-footer {
        margin-left: 0;
        padding-left: 40px;
        padding-right: 40px;
    }
}

@media (max-width: 768px) {
    .site-footer {
        padding: 30px 20px 20px;
    }
    .site-footer__brand {
        margin-bottom: 16px;
    }
    .site-footer__grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

@media (max-width: 480px) {
    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Páginas sin sidebar */
.site-footer--panel {
    margin-left: 0 !important;
    padding-left: 40px !important;
}


/*--------------------------- LOGIN / FEEDBACK / LOGOUT NAV ---------------------------*/

/* Empuja el primer item de la derecha contra el chat IA */
.nav__item--right { margin-left: auto; }

/* Feedback — verde */
.nav__btn--feedback       { color: #10b981; gap: .4rem; }
.nav__btn--feedback:hover { background-color: rgba(16,185,129,0.08); }
.nav__btn--feedback .nav__icon { color: #10b981; }

/* Login — discreto */
.nav__btn--login         { opacity: 0.6; }
.nav__btn--login:hover   { opacity: 1; background-color: rgba(255,255,255,0.05); }

/* Logout — ícono rojo solo */
.nav__btn--logout        { opacity: 0.5; }
.nav__btn--logout:hover  { opacity: 1; background-color: rgba(239,68,68,0.08); }
.nav__btn--logout:hover .nav__icon { color: #ef4444; }

/* En ≤1024px ocultar el texto FEEDBACK, dejar solo ícono */
@media (max-width: 1024px) {
    .nav__span--feedback { display: none; }
    .ul__a1 { padding-right: 0px;  display: flex !important;}
    .nav__item--right {
        justify-content: flex-end;
        display: flex;
        align-items: center;
        padding-right: 0px; 
    }
    .nav__container__5 {
        padding: 0px 5px 0px 0px;
    }
}

/* En ≤768px reducir padding de los botones de la derecha */
@media (max-width: 768px) {
    .nav__btn--feedback,
    .nav__btn--login,
    .nav__btn--logout { padding: .3em .4em; }
        .nav__container__5 {
        padding: 0;
    }
}

/*--------------------------- NAV MOBILE COMPACTO ---------------------------*/

@media (max-width: 768px) {
    .nav {
        height: 58px;
        padding: 0 6px;
    }

    .ul__a1 {
        display: flex !important;
        align-items: center;
        gap: 4px;
        width: 100%;
        min-width: 0;
        padding-right: 0 !important;
    }

    .nav-auth-item,
    .nav-editor-item {
        display: none !important;
    }

    .nav-mobile-more-item {
        display: flex;
        flex: 0 0 auto;
    }

    .nav-search-item {
        flex: 1 1 auto;
        min-width: 0;
    }

    .nav-home-item,
    .nav-mobile-more-item,
    .ul__a1 > .dropdown__list:first-child {
        flex: 0 0 auto;
    }

    .nav-search-item .container {
        width: 232px; /*Fijarse */
        min-width: 0;
        flex: 1 1 auto;
    }

    .nav-search-item .search-input-box {
        width: 100%;
        min-width: 0;
    }

    .nav-search-item .search-input-box input {
        width: 100%;
        min-width: 0;
        height: 38px;
    }

    .nav__container__5 {
        display: flex;
        align-items: center;
        position: static;
        padding: 0;
    }

    .nav__menu,
    .nav__menu--second,
    .nav-mobile-more-button,
    .hamburger,
    .nav-home-item > .dropdown__link {
        width: 38px;
        height: 38px;
        min-width: 38px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 !important;
        border-radius: 8px;
    }

/*===============================*/
/*
    .nav__menu,
    .nav__menu--second {
        position: static !important;
        right: auto;
        top: auto;
        margin-left: 0;
    }

    .nav__menu {
        transform: none !important;
    }

    .nav__menu--second {
        display: none;
    }
*/
/*===============================*/
    
    .nav__menu .dropdown__span,
    .nav-mobile-more-button .dropdown__span {
        display: none;
    }

    .nav-mobile-more-button:hover {
        background: rgba(255, 255, 255, .08);
    }
    
}


/*
@media (max-width: 768px) {
    .nav__btn--feedback,
    .nav__btn--login,
    .nav__btn--logout { padding: .3em .4em; }
        .nav__container__5 {
        padding: 0;
    }
}
*/

@media (max-width: 425px) {
    .nav-search-item .container {
        width: 100%; /*Fijarse */
    }
}

.site-footer__visits {
    margin: 0;
    color: #94a3b8;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}
