/**
 * TheUNiCo UI Module CSS V5.3.8
 * Header V5.3 con 3 TUZ: TUZlogo + TUZinput + TUZresponse
 * Solo dos estilos: Simplificado (home) y Extendido (otras páginas)
 *
 * V5.3.8: Keyboard navigation accessibility improvements
 * - Focus indicators: Visible outline on all buttons during TAB navigation
 * - Color: Corporate brown (#8B7355) outline + background highlight
 * - Circular TAB navigation: Input → Buttons → Info → (back to Input)
 *
 * V5.3.7: Enhanced UI/UX - Response Zone & Input Redesign
 * - Input: Mayor visibilidad (800px, border 2px, mejor sombra)
 * - Response Zone: Lateral derecha fija (400px), mismo estilo que input
 * - Drag & Drop: Ambos elementos arrastrables con reset
 * - Keyboard-first: ESC para cerrar response zone
 *
 * V5.3.6: Universal transparency system for all pages
 * - Glass-morphism effect on inherited theme backgrounds
 * - Hierarchy: Hero (70%) → Content (85%) → Cards (80%)
 * - Supports: index, theunico, uipo, gandt, 3x4-ai, indeex, about, contact,
 *             principle-*, brand_*, legal pages
 */

/* ================================================================
   RESET & BASE
   ================================================================ */

* {
    box-sizing: border-box;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.seo-nav {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

body.tuz-v53-mode {
    padding-top: 70px;
}

/* Override home-base.css overflow hidden for non-home pages */
html:has(body.tuz-v53-mode.home-container) {
    overflow: auto !important;
    height: auto !important;
}

body.tuz-v53-mode.home-container {
    overflow: auto !important;
    height: auto !important;
    min-height: 100vh;
    background-attachment: fixed !important;
    position: relative;
    /* Ensure page ends at footer - white below */
    background-color: white;
}


/* ================================================================
   THEME INHERITANCE - Glass-morphism for content sections
   Hierarchy: Hero (more theme) → Content (readable) → Footer (solid close)
   ================================================================ */

/* ----------------------------------------------------------------
   INDEX PAGE (home-container class)
   ---------------------------------------------------------------- */

/* Hero: 70% white - more theme visible for welcoming feel */
body.tuz-v53-mode.home-container .home-hero {
    background: rgba(255, 255, 255, 0.70) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Content sections: 85% white - prioritize readability */
body.tuz-v53-mode.home-container .metrics-section,
body.tuz-v53-mode.home-container .services-overview,
body.tuz-v53-mode.home-container .powered-by-section,
body.tuz-v53-mode.home-container .complementary-section {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Cards: 80% white - subtle theme presence */
body.tuz-v53-mode.home-container .metric-card,
body.tuz-v53-mode.home-container .service-card {
    background: rgba(255, 255, 255, 0.80) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Text remains dark for readability */
body.tuz-v53-mode.home-container .metric-description,
body.tuz-v53-mode.home-container .service-description {
    color: #555 !important;
}

/* ----------------------------------------------------------------
   UNIVERSAL TRANSPARENCY - All pages except home.html
   Applied when theme is inherited from home selection
   ---------------------------------------------------------------- */

/* Heroes: 70% white - welcoming, more theme visible */
body.tuz-v53-mode:not(.home-container) .theunico-hero,
body.tuz-v53-mode:not(.home-container) .uipo-hero,
body.tuz-v53-mode:not(.home-container) .gandt-hero,
body.tuz-v53-mode:not(.home-container) .hero-3x4,
body.tuz-v53-mode:not(.home-container) .about-hero,
body.tuz-v53-mode:not(.home-container) .indeex-hero {
    background: rgba(255, 255, 255, 0.70) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Content sections: 85% white - prioritize readability */
body.tuz-v53-mode:not(.home-container) .page-content,
body.tuz-v53-mode:not(.home-container) .about-content,
body.tuz-v53-mode:not(.home-container) .pattern-intro,
body.tuz-v53-mode:not(.home-container) .pattern-benefits,
body.tuz-v53-mode:not(.home-container) .powered-by-section,
body.tuz-v53-mode:not(.home-container) .architecture-section,
body.tuz-v53-mode:not(.home-container) .framework-section,
body.tuz-v53-mode:not(.home-container) .about-section,
body.tuz-v53-mode:not(.home-container) .cta-section {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Cards: 80% white - subtle theme presence */
body.tuz-v53-mode:not(.home-container) .principle-card,
body.tuz-v53-mode:not(.home-container) .phase-card,
body.tuz-v53-mode:not(.home-container) .pillar-card,
body.tuz-v53-mode:not(.home-container) .element-card,
body.tuz-v53-mode:not(.home-container) .value-card,
body.tuz-v53-mode:not(.home-container) .stat-item,
body.tuz-v53-mode:not(.home-container) .creation-card,
body.tuz-v53-mode:not(.home-container) .benefit-card,
body.tuz-v53-mode:not(.home-container) .pattern-step,
body.tuz-v53-mode:not(.home-container) .component-layer,
body.tuz-v53-mode:not(.home-container) .feature-box {
    background: rgba(255, 255, 255, 0.80) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* Ensure text readability on transparent backgrounds */
body.tuz-v53-mode:not(.home-container) .page-content p,
body.tuz-v53-mode:not(.home-container) .about-content p,
body.tuz-v53-mode:not(.home-container) .section-subtitle {
    color: #555 !important;
}

/* Special handling for gradient sections (like Virtuous Cycle) - keep original */
body.tuz-v53-mode:not(.home-container) .page-content[style*="linear-gradient"] {
    background: linear-gradient(90deg, #d97757 0%, #8B7355 33%, #6B8E6F 66%, #131314 100%) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* Dark hero sections stay dark (like theunico.html, indeex-pattern.html) */
body.tuz-v53-mode:not(.home-container) .theunico-hero,
body.tuz-v53-mode:not(.home-container) .indeex-hero {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.85) 0%, rgba(45, 45, 45, 0.85) 100%) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ----------------------------------------------------------------
   PRINCIPLE PAGES (principle-*.html)
   ---------------------------------------------------------------- */

body.tuz-v53-mode:not(.home-container) .principle-hero {
    background: rgba(255, 255, 255, 0.70) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

body.tuz-v53-mode:not(.home-container) .content-section,
body.tuz-v53-mode:not(.home-container) main:not(.about-page) {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ----------------------------------------------------------------
   BRAND & LEGAL PAGES (brand_*.html, legal.html)
   ---------------------------------------------------------------- */

body.tuz-v53-mode:not(.home-container) .brand-container,
body.tuz-v53-mode:not(.home-container) .legal-container {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 16px;
    margin-top: 20px;
}

body.tuz-v53-mode:not(.home-container) .brand-header,
body.tuz-v53-mode:not(.home-container) .legal-header {
    background: rgba(255, 255, 255, 0.70) !important;
}

body.tuz-v53-mode:not(.home-container) .brand-section,
body.tuz-v53-mode:not(.home-container) .legal-section {
    background: rgba(255, 255, 255, 0.85) !important;
}

body.tuz-v53-mode:not(.home-container) .brand-item,
body.tuz-v53-mode:not(.home-container) .credit-item,
body.tuz-v53-mode:not(.home-container) .color-swatch {
    background: rgba(255, 255, 255, 0.80) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

/* ----------------------------------------------------------------
   GaNDT SUBPAGES (gandt-preludio.html, gandt-genesis.html, etc.)
   ---------------------------------------------------------------- */

body.tuz-v53-mode:not(.home-container) .phase-hero {
    background: rgba(255, 255, 255, 0.70) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ----------------------------------------------------------------
   3x4 AI SUBPAGES (3x4-ai-drivers.html, 3x4-ai-layers.html, etc.)
   ---------------------------------------------------------------- */

body.tuz-v53-mode:not(.home-container) .hero-drivers,
body.tuz-v53-mode:not(.home-container) .hero-layers,
body.tuz-v53-mode:not(.home-container) .hero-phases {
    background: rgba(255, 255, 255, 0.70) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ================================================================
   HEADER V5.3 - Transparent, Always Compact
   ================================================================ */

.tuz-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: transparent;
    padding: 1.5rem 1rem;
}

.tuz-row-main {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0;
    position: static;
}

/* ================================================================
   TUZlogo
   ================================================================ */

.tuz-logo {
    position: fixed;
    left: 1rem;
    top: 0.5rem;
}

.tuz-logo-link {
    display: inline-block;
    font-family: 'Brush Script MT', cursive;
    font-size: 2.2rem;
    font-weight: 400;
    letter-spacing: 1px;
    color: #8B7355;
    text-decoration: none;
    /* Subtle multi-layer shadow for visibility on any background */
    text-shadow:
        0 0 8px rgba(255, 255, 255, 0.9),
        0 0 16px rgba(255, 255, 255, 0.7),
        0 0 24px rgba(255, 255, 255, 0.5),
        0 1px 2px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    white-space: nowrap;
    padding: 0.3rem 0;
}

.tuz-logo-link:hover {
    text-shadow:
        0 0 12px rgba(255, 255, 255, 1),
        0 0 20px rgba(255, 255, 255, 0.8),
        0 0 30px rgba(255, 255, 255, 0.6),
        0 1px 3px rgba(0, 0, 0, 0.15);
}

/* ================================================================
   TUZinput Extended - Enhanced Visibility (V5.3.7)
   ================================================================ */

.tuz-prompt-extended {
    /* Layout */
    display: flex;
    align-items: center;
    gap: 0.25rem;

    /* Size - Increased height for better visibility */
    width: 720px;
    max-width: 92vw;

    /* Visual - Enhanced border and shadow for prominence */
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #8B7355;  /* Corporate brown - visible border */
    border-radius: 50px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);  /* Deeper shadow */

    /* Spacing - Increased vertical padding for taller input */
    padding: 0.65rem 0.75rem 0.65rem 0.5rem;

    /* Positioning - Always centered on screen */
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: 16px;
    z-index: 999;

    /* Transitions */
    transition: box-shadow 0.3s ease;
}

/* Draggable state */
.tuz-prompt-extended.dragging {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    cursor: grabbing;
}

/* Drag handle */
.tuz-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 28px;
    cursor: grab;
    color: #ccc;
    user-select: none;
    transition: color 0.2s;
    flex-shrink: 0;
}

.tuz-drag-handle:hover {
    color: #999;
}

.tuz-drag-handle:active {
    cursor: grabbing;
    color: #8B7355;
}

.tuz-drag-icon {
    pointer-events: none;
}

.tuz-prompt-extended:focus-within {
    outline: none !important;
    /* Keep border, add glow effect on focus */
    box-shadow: 0 8px 32px rgba(139, 115, 85, 0.35),
                0 0 0 3px rgba(139, 115, 85, 0.15) !important;
}

.tuz-prompt-extended:focus,
.tuz-prompt-extended *:focus {
    outline: none !important;
}

/* Separators between icon groups */
.tuz-prompt-separator {
    display: block;
    width: 1px;
    height: 16px;
    background: rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

/* Buttons inside prompt */
.tuz-prompt-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #aaa;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.tuz-prompt-btn:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #666;
}

.tuz-prompt-btn:active {
    transform: scale(0.95);
}

/* V5.3.8-fix: Focus indicator for keyboard navigation */
.tuz-prompt-btn:focus {
    outline: none;
}

.tuz-prompt-btn:focus-visible {
    outline: 2px solid #8B7355;
    outline-offset: 2px;
    background: rgba(139, 115, 85, 0.08);
    color: #8B7355;
}

/* Menu hamburger icon - Same as home.html */
.menu-icon {
    display: block;
    width: 14px;
    height: 1.5px;
    background: #aaa;
    position: relative;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    width: 14px;
    height: 1.5px;
    background: #aaa;
    left: 0;
}

.menu-icon::before { top: -4px; }
.menu-icon::after { bottom: -4px; }

.menu-btn:hover .menu-icon,
.menu-btn:hover .menu-icon::before,
.menu-btn:hover .menu-icon::after {
    background: #666;
}

/* Input field */
.tuz-input-field {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 0.4rem 0;
    font-size: 0.9rem;
    font-weight: 300;
    color: #1a1a1a;
    outline: none !important;
    box-shadow: none !important;
    min-width: 150px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.tuz-input-field:focus,
.tuz-header .tuz-input-field:focus,
#theunico-input:focus,
input.tuz-input-field:focus {
    outline: none !important;
    outline-width: 0 !important;
    outline-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Override global focus from main.css - BUT allow focus indicators on buttons for accessibility */
.tuz-header input:focus {
    outline: none !important;
    outline-width: 0 !important;
}

.tuz-input-field::placeholder {
    color: #aaa;
}

.tuz-input-field:focus::placeholder {
    color: #ccc;
}

/* Char counter */
.tuz-char-counter {
    font-size: 0.6rem;
    color: #bbb;
    flex-shrink: 0;
    font-family: 'Inter', sans-serif;
    margin-right: 2px;
}

/* Thinking dots (LLM processing indicator) - Left aligned */
.tuz-thinking-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    margin-right: 8px;
}

.tuz-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: tuz-pulse 1.4s ease-in-out infinite;
}

.tuz-dot-coral {
    background: #d97757;
    animation-delay: 0s;
}

.tuz-dot-brown {
    background: #8B7355;
    animation-delay: 0.2s;
}

.tuz-dot-green {
    background: #6B8E6F;
    animation-delay: 0.4s;
}

.tuz-dot-black {
    background: #131314;
    animation-delay: 0.6s;
}

@keyframes tuz-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.5);
        opacity: 0.6;
    }
}

/* Language selector */
.tuz-lang-selector {
    display: flex;
    gap: 0.15rem;
    flex-shrink: 0;
}

.tuz-lang-btn {
    padding: 0.2rem 0.4rem;
    border: none;
    background: transparent;
    color: #bbb;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.tuz-lang-btn:hover {
    color: #666;
}

.tuz-lang-btn.active {
    color: #8B7355;
    background: rgba(139, 115, 85, 0.08);
}

/* V5.3.8-fix: Focus indicator for language buttons */
.tuz-lang-btn:focus {
    outline: none;
}

.tuz-lang-btn:focus-visible {
    outline: 2px solid #8B7355;
    outline-offset: 2px;
    color: #8B7355;
    background: rgba(139, 115, 85, 0.12);
}

/* SVG icons size */
.tuz-prompt-btn svg {
    width: 14px;
    height: 14px;
}

/* Star icon transition */
.tuz-star-icon {
    transition: fill 0.2s ease;
}

/* Voice active state */
.tuz-voice-btn.active {
    background: #ef4444;
    color: white;
}

/* V6.5.0: ElevenLabs Agent button */
.tuz-agent-btn {
    color: #8B7355;
}

.tuz-agent-btn:hover {
    background: rgba(139, 115, 85, 0.1);
    color: #8B7355;
}

/* Agent active state - Pulsing animation when connected */
.tuz-agent-btn.active {
    background: #6B8E6F;
    color: white;
    animation: agent-pulse 2s infinite;
}

.tuz-agent-btn.connecting {
    background: #d97757;
    color: white;
    animation: agent-pulse 1s infinite;
}

@keyframes agent-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(107, 142, 111, 0.4); }
    50% { box-shadow: 0 0 0 6px rgba(107, 142, 111, 0); }
}

/* ================================================================
   TUZresponse Floating
   ================================================================ */

.tuz-response-floating {
    /* Positioning - Centered below prompt by default */
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    top: 100px;  /* Below the prompt */

    /* Size - Resizable in width only, dynamic height */
    width: 400px;
    min-width: 300px;
    max-width: 800px;
    max-height: calc(100vh - 120px);
    resize: horizontal;  /* User can resize width */
    overflow: auto;  /* Required for resize to work */

    /* Visual - Matching input styling for unified identity */
    background: rgba(255, 255, 255, 0.98);
    border: 2px solid #8B7355;  /* Same as input */
    border-radius: 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);  /* Same as input */

    /* Layout */
    display: flex;
    flex-direction: column;

    /* Animation */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, box-shadow 0.3s ease;

    /* Layering */
    z-index: 998;  /* Below input (999) but above content */
}

.tuz-response-floating.visible {
    opacity: 1;
    visibility: visible;
}

.tuz-response-floating.dismissing {
    opacity: 0;
}

/* Draggable state - Enhanced shadow like input */
.tuz-response-floating.dragging {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    cursor: move;
}

/* Header section with drag handle, timer, and close button */
.tuz-response-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(139, 115, 85, 0.2);
    cursor: move;  /* Entire header is draggable */
}

.tuz-response-drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    cursor: move;
    user-select: none;
    padding: 0.25rem;
    transition: color 0.2s;
}

.tuz-response-drag-handle:hover {
    color: #666;
}

.tuz-response-drag-handle .tuz-drag-icon {
    opacity: 0.6;
}

.tuz-response-label {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
    user-select: none;
}

.tuz-response-timer {
    font-size: 0.7rem;
    color: #bbb;
    min-width: 20px;
    text-align: right;
    margin-right: 0.5rem;
}

/* V6.4.0: Audio button - "Nota del autor" - Enhanced visibility */
.tuz-response-audio {
    background: rgba(139, 115, 85, 0.15);
    border: 1.5px solid #8B7355;
    border-radius: 6px;
    color: #8B7355;
    cursor: pointer;
    padding: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-left: 0.5rem;
    margin-right: 1rem;
}

.tuz-response-audio:hover {
    background: rgba(139, 115, 85, 0.25);
    color: #6B8E6F;
    border-color: #6B8E6F;
    transform: scale(1.05);
}

.tuz-response-audio .tuz-speaker-playing-icon {
    display: none;
}

.tuz-response-pause {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    margin-right: 0.5rem;
}

.tuz-response-pause:hover {
    color: #666;
}

.tuz-response-pause.paused .tuz-pause-icon {
    display: none;
}

.tuz-response-pause.paused .tuz-play-icon {
    display: block !important;
}

.tuz-response-close {
    background: none;
    border: none;
    color: #999;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    line-height: 1;
}

.tuz-response-close:hover {
    color: #666;
}

/* Response label - separado del drag handle */
.tuz-response-label {
    margin-left: 0.75rem;
    margin-right: 0.5rem;
}

/* Color selector - círculos de colores corporativos */
.tuz-color-selector {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    margin-right: 0.5rem;
}

.tuz-color-btn {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.tuz-color-btn[data-color="#d97757"] {
    background: #d97757;
}

.tuz-color-btn[data-color="#8B7355"] {
    background: #8B7355;
}

.tuz-color-btn[data-color="#6B8E6F"] {
    background: #6B8E6F;
}

.tuz-color-btn[data-color="#131314"] {
    background: #131314;
}

.tuz-color-btn:hover {
    transform: scale(1.2);
    border-color: rgba(0, 0, 0, 0.3);
}

.tuz-color-btn.active {
    border-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.5);
}

/* Content section - Scrollable if needed */
.tuz-response-content {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;  /* Content scrolls vertically */
    overflow-x: hidden;  /* No horizontal scroll in content */
    font-size: 0.9rem;  /* Más pequeño - prueba */
    font-weight: 400;   /* Normal - permite estilos inline del Executor */
    color: #d97757;     /* Coral corporativo por defecto */
    line-height: 1.6;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ================================================================
   Info Button & Popup
   ================================================================ */

.tuz-info-btn {
    position: relative;
}

.tuz-info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: 1.5px solid #8B7355;
    border-radius: 50%;
    font-family: 'Times New Roman', Times, serif;
    font-style: italic;
    font-weight: 400;
    font-size: 0.7rem;
    color: #8B7355;
    line-height: 1;
}

/* TheUNiCo info display - Corporate palette */
.tuz-info-logo {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.tuz-info-logo .tu-th,
.tu-th { color: #d97757; }
.tuz-info-logo .tu-eu,
.tu-eu { color: #8B7355; }
.tuz-info-logo .tu-ni,
.tu-ni { color: #6B8E6F; }
.tuz-info-logo .tu-co,
.tu-co { color: #131314; }

.tuz-info-by {
    font-size: 0.8rem;
    color: #666;
    margin-left: 0.5rem;
}

.tuz-info-by em {
    font-family: 'Brush Script MT', cursive;
    font-style: normal;
    font-size: 1rem;
    color: #8B7355;
}

.tuz-info-version {
    font-size: 0.7rem;
    color: #999;
    margin-left: 0.5rem;
}

/* ================================================================
   SIDEBAR MENU (Left) - Same as home.html
   ================================================================ */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1002;
    transform: translateX(-100%);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.sidebar.open {
    transform: translateX(0);
}

.sidebar-header {
    padding: 2rem 1.5rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.95) !important;
}

.sidebar-logo {
    font-family: 'Brush Script MT', cursive;
    font-size: 1.8rem;
    color: #8B7355;
    letter-spacing: 2px;
}

.sidebar-close {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: transparent;
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    color: #fff;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-link {
    padding: 1rem 0.75rem;
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    border-radius: 8px;
    transition: all 0.3s;
    display: block;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    padding-left: 1rem;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 0.75rem 0;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-tagline {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.4);
    font-style: italic;
    letter-spacing: 0.02em;
}

/* Sidebar Logo Colors - All white except InternationalCIO */
.link-logo {
    font-weight: 600;
    letter-spacing: -0.02em;
    color: #fff;
}

/* ================================================================
   MEMORY SIDEBAR (Right - My Journey)
   ================================================================ */

.tuz-memory-sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 12px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    transition: right 0.25s ease-out;
    overflow-y: auto;
}

.tuz-memory-sidebar.open {
    right: 0;
}

.tuz-memory-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.tuz-memory-sidebar-title {
    font-family: 'Brush Script MT', cursive;
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 2px;
    color: #8B7355;
}

.tuz-memory-sidebar-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 2rem;
    line-height: 1;
    color: #999;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tuz-memory-sidebar-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

.tuz-memory-section {
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.tuz-memory-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tuz-memory-section-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.tuz-memory-empty {
    color: #999;
    font-size: 0.9rem;
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

.tuz-memory-item {
    padding: 0.75rem;
    background: rgba(139, 115, 85, 0.05);
    border-radius: 6px;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.tuz-memory-item:hover {
    background: rgba(139, 115, 85, 0.1);
    border-left-color: #8B7355;
}

.tuz-memory-command {
    font-weight: 500;
    color: #8B7355;
    flex: 1;
}

.tuz-memory-desc {
    font-size: 0.8rem;
    color: #666;
}

/* ================================================================
   OVERLAY - Same as home.html
   ================================================================ */

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.sidebar-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ================================================================
   VOICE VISUALIZER - V5.3.10: Diseño fino horizontal
   ================================================================ */

.tuz-voice-visualizer {
    position: fixed;
    top: 78px;  /* V5.3.10: Justo debajo del prompt */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    padding: 0.3rem 0.8rem;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    z-index: 1001;
    display: none;
    width: auto;  /* V5.3.10: Se ajusta al contenido */
    max-width: 95vw;
}

.tuz-voice-visualizer.active {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.wave-container {
    display: flex;
    gap: 4px;  /* V5.3.10: Más juntas para más líneas */
    align-items: center;
    justify-content: center;
    height: 24px;
    width: 100%;
}

.wave {
    width: 3px;  /* V5.3.10: Más finas */
    height: 18px;
    border-radius: 1.5px;
    animation: wave 0.8s ease-in-out infinite;
}

/* V5.3.10: 4 colores corporativos */
.wave-coral { background: #d97757; animation-delay: 0s; }
.wave-brown { background: #8B7355; animation-delay: 0.1s; }
.wave-green { background: #6B8E6F; animation-delay: 0.2s; }
.wave-black { background: #131314; animation-delay: 0.3s; }

@keyframes wave {
    0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
    50% { transform: scaleY(1); opacity: 1; }
}

.voice-text {
    display: none; /* V5.3.10: Solo ondas, sin texto */
}

/* ================================================================
   ANIMATIONS
   ================================================================ */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@media (max-width: 768px) {
    body.tuz-v53-mode {
        padding-top: 60px;
    }

    .tuz-header {
        padding: 0.75rem;
    }

    .tuz-row-main {
        gap: 1rem;
    }

    .tuz-logo-link {
        font-size: 1.4rem;
    }

    .tuz-prompt-extended {
        padding: 0.3rem 0.5rem 0.3rem 0.75rem;
    }

    .sidebar,
    .tuz-memory-sidebar {
        width: 280px;
    }

    .sidebar {
        transform: translateX(-100%);
    }

    .tuz-memory-sidebar {
        right: -300px;
    }
}

@media (max-width: 480px) {
    .tuz-logo {
        display: none;
    }

    .tuz-prompt-btn {
        width: 24px;
        height: 24px;
    }

    .tuz-prompt-btn svg {
        width: 12px;
        height: 12px;
    }

    .tuz-lang-selector {
        display: none;
    }
}

/* ================================================================
   LOADING STATE
   ================================================================ */

.tuz-input-field.loading {
    background: linear-gradient(90deg, #f5f5f5 25%, #e8e8e8 50%, #f5f5f5 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ================================================================
   ACCESSIBILITY
   ================================================================ */

@media (prefers-contrast: high) {
    .tuz-prompt-extended {
        border: 2px solid #333;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tuz-prompt-extended,
    .sidebar,
    .tuz-memory-sidebar,
    .sidebar-overlay,
    .tuz-response-floating,
    .wave {
        transition: none;
        animation: none;
    }
}

/* ================================================================
   PRINT
   ================================================================ */

@media print {
    .tuz-header,
    .sidebar,
    .tuz-memory-sidebar,
    .sidebar-overlay,
    .tuz-voice-visualizer {
        display: none !important;
    }

    body.tuz-v53-mode {
        padding-top: 0;
    }
}

/* ================================================================
   SCROLLBAR
   ================================================================ */

.sidebar::-webkit-scrollbar,
.tuz-memory-sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track,
.tuz-memory-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.tuz-memory-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

/* ================================================================
   UTILITIES
   ================================================================ */

.tuz-hidden {
    display: none !important;
}

.tuz-visible {
    display: block !important;
}

.tuz-fade-in {
    animation: fadeIn 0.3s ease;
}
