/* =========================================
   RESETEO BÁSICO Y VARIABLES
   ========================================= */
:root {
    --lime: #b2f705;
    --black: #000000;
    --box-bg: #f6f6f6;
    --text-dark: #333333;
    --text-light: #888888;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Montserrat', sans-serif; }
body { background-color: #ffffff; color: var(--text-dark); overflow-x: hidden;}
.hidden { display: none !important; }
.mobile-text { display: none; }

/* =========================================
   HEADER Y CONTROLES
   ========================================= */
.top-header { width: 100%; background-color: var(--black); }
.logo-menu { display: flex; align-items: center; justify-content: space-between; padding: 0 30px; height: 110px; }
.logo-creativity { height: 45px; width: auto; object-fit: contain; display: block;} 
.header-controls { display: flex; align-items: center; gap: 20px; }
.language-selector { display: flex; gap: 15px; align-items: center; }
.lang-icon { width: 26px; height: auto; cursor: pointer; opacity: 0.4; transition: opacity 0.3s; }
.lang-icon.active-lang { opacity: 1; }

.btn-reset { border: none; padding: 10px 20px; font-size: 11px; font-weight: 800; cursor: pointer; border-radius: 4px; letter-spacing: 0.5px; transition: 0.3s; }
.btn-reset:active { transform: scale(0.97); }
.btn-lime { background-color: var(--lime); color: var(--black); }
.btn-lime:hover { background-color: #9cdb04; }

.header-separator { height: 40px; width: 100%; background-color: var(--black); }

/* =========================================
   ANIMACIÓN HEADER DINÁMICO
   ========================================= */
.dynamic-header {
    position: relative; width: 100%; overflow: hidden; background-size: cover; background-position: center;
    background-repeat: no-repeat; background-image: url('../images/Header_Fondo_420px.jpg'); 
    height: 256px;
}
.header-layer { position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; padding-left: 20%; }

@keyframes sweep-clip {
    0%, 10% { clip-path: polygon(0 0, 10% 0, 10% 100%, 0 100%); }
    90%, 100% { clip-path: polygon(0 0, 90% 0, 90% 100%, 0 100%); }
}
@keyframes sweep-line { 0%, 10% { left: 10%; } 90%, 100% { left: 90%; } }

.mask-layer { clip-path: polygon(0 0, 10% 0, 10% 100%, 0 100%); animation: sweep-clip 6s infinite ease-in-out alternate; }
.sweeper-line { position: absolute; top: 0; bottom: 0; width: 1px; background-color: rgba(0,0,0,0.5); left: 10%; animation: sweep-line 6s infinite ease-in-out alternate; z-index: 10; }
.sweeper-line::before { content: ''; position: absolute; top: 0; left: -6px; width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 10px solid var(--black); }

.header-text-block { display: flex; flex-direction: column; text-align: left; }
.header-triangle { width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 10px solid var(--black); margin-bottom: 5px; margin-left: 5px; }
.hl-1 { font-size: 55px; font-weight: 800; color: var(--black); display: flex; align-items: center; gap: 12px; line-height: 1; letter-spacing: -1px;}
.hl-pill { background-color: var(--black); border-radius: 10px; padding: 5px 15px; display: inline-block; }
.base-layer .hl-pill span { color: #ffffff; -webkit-text-stroke: 0; }
.mask-layer .hl-pill span { color: var(--lime); -webkit-text-stroke: 0; }
.hl-2 { font-size: 55px; font-weight: 800; color: var(--black); line-height: 1; letter-spacing: -1px;}
.hl-3 { font-size: 18px; font-weight: 600; color: #444; margin-top: 15px; line-height: 1.3; }

/* =========================================
   SUBMENÚ Y PASOS
   ========================================= */
.submenu { height: 64px; background-color: #e6e6e6; display: flex; align-items: center; justify-content: space-between; padding: 0 30px; position: relative;}
.proyecto-title { font-weight: 600; color: #888; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.proyecto-title span:last-child { color: var(--black); font-size: 32px; font-weight: 700; line-height: 1; } 
.steps-container { position: absolute; left: 50%; transform: translateX(-50%); display: flex; align-items: center; }
.steps-indicator { list-style: none; display: flex; align-items: center; font-size: 11px; font-weight: 800; color: #999; }
.steps-indicator li { display: flex; align-items: center; white-space: nowrap; position: relative;}
.steps-indicator li span:last-child { border: 2px solid var(--black); background-color: var(--black); color: #ffffff; border-radius: 50%; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; margin-left: 8px; font-weight: 800; }
.steps-indicator li:not(:last-child)::after { content: ''; display: block; width: 40px; height: 2px; background-color: #999; margin: 0 15px; }
.steps-indicator li.active { color: var(--black); }
.steps-indicator li.active span:last-child { border-color: var(--lime); background-color: var(--lime); color: var(--black); }

/* =========================================
   GRILLA MODULAR BASE (Mobile First)
   ========================================= */
.main-wrapper { width: 100%; min-width: 320px; margin: 0 auto; background-color: #fff; overflow-x: hidden; }
.main-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 10px; padding: 30px 15px; justify-content: center; }
.module-box { background-color: var(--box-bg); border-radius: 15px; padding: 30px; grid-column: span 2; }
.step1-upload-layout { display: flex; flex-direction: column; align-items: center; text-align: center; width: 100%; justify-content: center;}
.upload-text-area { margin-bottom: 30px;}

/* =========================================
   GRILLA ESCRITORIO FLUIDA (769px - 1279px)
   ========================================= */
@media (min-width: 769px) {
    .main-wrapper { width: 100%; max-width: 1280px; }
    .dynamic-header { background-image: url('../images/Header_Fondo_1280px.jpg'); }
    .main-grid { grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 40px 20px; }
    
    #mod-upload { grid-column: span 3; }
    #mod-privacy { grid-column: span 1; }
    #mod-params { grid-column: 1; grid-row: 1; }
    #mod-disclaimer { grid-column: 1; grid-row: 2; }
    #mod-config { grid-column: 2 / span 2; grid-row: 1 / span 3; }
    #mod-analyze { grid-column: 4; grid-row: 1 / span 3; }

    .step1-upload-layout { flex-direction: row; justify-content: center; gap: 30px; text-align: left; }
    .upload-text-area { max-width: 600px; margin-bottom: 0; align-items: flex-start;}
}

/* 3 Columnas para Tablet en el Paso 3 */
@media (min-width: 769px) and (max-width: 1279px) {
    .step3-active .main-grid { grid-template-columns: 140px 1fr 180px; gap: 15px; padding: 20px 10px; }
    .step3-active #step3-menu { grid-column: 1; padding: 20px 5px;}
    .step3-active #step3-canvas-box { grid-column: 2; }
    .step3-active #step3-right-box { grid-column: 3; display: flex !important; }

    .submenu { height: auto; padding: 20px 30px; flex-direction: column; justify-content: center; gap: 15px; position: static;}
    .steps-container { position: static; transform: none; width: 100%; justify-content: center; }
    .proyecto-title { width: 100%; justify-content: center; }
    
    #mod-config.row-layout { flex-direction: column; align-items: center; gap: 25px; }
    #mod-config .config-col { width: 100%; text-align: center !important; }
    #mod-config .simplified-radio-group { align-items: center; justify-content: center; }
    #mod-config .step-preview-container { width: 100%; margin-top: 10px; border-top: none; padding-top: 0;}
}

@media (min-width: 769px) and (max-width: 1024px) {
    .hl-1, .hl-2 { font-size: 38px; }
    .hl-3 { font-size: 14px; }
    .title-main { font-size: 28px; }
}

/* =========================================
   GRILLA ESCRITORIO ESTRICTA (1280px)
   ========================================= */
@media (min-width: 1280px) {
    .step1-upload-layout { gap: 60px; }
    .step3-active .main-grid { grid-template-columns: 180px 1fr 310px; gap: 20px; }
    #step3-menu { grid-column: 1; padding: 20px 10px;}
    #step3-canvas-box { grid-column: 2; }
    #step3-right-box { grid-column: 3; }
}

/* =========================================
   GRILLA ESCRITORIO GRANDE FLUIDA (1728px)
   ========================================= */
@media (min-width: 1728px) {
    .main-wrapper { width: 100%; max-width: 1728px; }
    .dynamic-header { background-image: url('../images/Header_Fondo_1728px.jpg'); }
    .main-grid { grid-template-columns: repeat(6, 1fr); gap: 20px; padding: 40px 30px; }
    #mod-upload { grid-column: span 4; }
    #mod-privacy { grid-column: span 2; }
    #mod-params { grid-column: 1; grid-row: 1; }
    #mod-config { grid-column: 2 / span 4; grid-row: 1 / span 2; } 
    #mod-analyze { grid-column: 6; grid-row: 1 / span 2; } 
    #mod-disclaimer { grid-column: 1; grid-row: 2; }
    
    .step3-active .main-grid { grid-template-columns: 200px 1fr 310px; }
}

/* =========================================
   ESTILOS GENERALES
   ========================================= */
.flex-center-col { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; width: 100%; }
.flex-start-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-start; height: 100%; width: 100%; }
.row-layout { flex-direction: row; gap: 30px; align-items: flex-start; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.align-start { align-items: flex-start; }

.title-main { color: var(--black); font-weight: 800; font-size: 34px; line-height: 1.15; }
.subtitle-main { color: #666; font-size: 17px; font-weight: 500; line-height: 1.5; }
.mt-20 { margin-top: 20px; }

.upload-btn-container, .analyze-btn-container { display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; text-align: center; transition: transform 0.3s; width: 100%; }
.upload-btn-container:hover, .analyze-btn-container:hover { transform: scale(1.03); }
.btn-icon { width: 180px; height: 180px; object-fit: contain; }
.btn-text { font-size: 14px; font-weight: 700; color: var(--black); margin-top: 15px; letter-spacing: 0.5px;}

.btn-image-wrapper { position: relative; width: 150px; height: 150px; margin: 0 auto 10px; }
.btn-normal, .btn-hover { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity 0.4s; }
.btn-normal { opacity: 1; z-index: 1; }
.btn-hover { opacity: 0; z-index: 2; }
.analyze-btn-container:hover .btn-normal { opacity: 0; }
.analyze-btn-container:hover .btn-hover { opacity: 1; }

.sidebar-title { font-size: 13px; color: var(--black); margin-bottom: 20px; text-transform: uppercase; font-weight: 800; }
.param-config { display: flex; flex-direction: column; gap: 15px; }
.control-item { display: flex; align-items: center; gap: 12px; }
.control-item img { width: 24px; height: 24px; object-fit: contain;}
.control-item span { font-size: 11px; font-weight: 700; color: var(--text-light); }

.ai-disclaimer { font-size: 11.5px; color: var(--text-light); line-height: 1.6; }
.ai-disclaimer strong { color: var(--black); font-weight: 700; }
.sidebar-divider { border: none; border-top: 1px solid #ddd; margin: 25px 0; width: 80%;}

.simplified-radio-group { display: flex; flex-direction: column; gap: 15px; }
.simplified-radio-group input[type="radio"] { appearance: none; width: 18px; height: 18px; border: 2px solid #ccc; border-radius: 50%; outline: none; cursor: pointer; margin-right: 10px; position: relative; top: 2px; }
.simplified-radio-group input[type="radio"]:checked { border-color: var(--lime); }
.simplified-radio-group input[type="radio"]:checked::before { content: ""; display: block; width: 10px; height: 10px; background-color: var(--lime); border-radius: 50%; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.radio-option { display: flex; align-items: flex-start; cursor: pointer; }
.radio-label-content strong { font-size: 16px; color: var(--black); display: block; }
.radio-label-content span { font-size: 10px; color: var(--text-light); }

.step-preview-container { margin-top: 30px; border-top: 1px solid #eee; padding-top: 20px; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;}
.step-preview-placeholder { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 160px; width: 100%; background-color: #fff; border-radius: 8px; border: 1px dashed #ccc; color: #aaa; font-style: italic; font-size: 12px; padding: 10px;}
.thumbnail-img { max-width: 130px; max-height: 130px; width: auto; height: auto; object-fit: contain; box-shadow: 0 2px 5px rgba(0,0,0,0.1); border-radius: 4px; display: block; margin: 0 auto; }

.privacy-title { color: var(--black); font-size: 22px; font-weight: 800; line-height: 1.3; }
.privacy-limits { color: var(--text-light); font-size: 14px; line-height: 1.8; margin-bottom: 30px; }
.privacy-limits strong { color: var(--black); }
.privacy-note { color: var(--text-light); font-size: 13px; font-style: italic; line-height: 1.6; }

/* Toggles Paso 3 */
.step3-controls-container-vertical { display: flex; flex-direction: column; gap: 20px; margin-top: 20px; width: 100%; }
.toggle-control-item { display: flex; flex-direction: column; align-items: center; text-align: center; }
.toggle-label { font-size: 10px; color: var(--text-light); font-weight: 700; margin-top: 10px; }
.switch-ui { position: relative; display: inline-block; width: 60px; height: 30px; }
.switch-ui input { opacity: 0; width: 0; height: 0; }
.slider-ui { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #000; transition: .4s; border-radius: 34px; }
.slider-ui:before { position: absolute; content: "OFF"; font-size: 9px; font-weight: bold; color: #555; line-height: 22px; height: 22px; width: 22px; left: 4px; bottom: 4px; background-color: #fff; border-radius: 50%; transition: .4s; text-align: center; }
.switch-ui input:checked + .slider-ui { background-color: #000; border: 2px solid #000; }
.switch-ui input:checked + .slider-ui:before { transform: translateX(30px); content: "ON"; color: var(--black); background-color: var(--lime); }

/* =========================================
   CANVAS Y REFERENCIAS MAPA DE CALOR
   ========================================= */
.image-preview { position: relative; max-width: 100%; box-shadow: 0 0 10px rgba(0,0,0,0.1); }
.grid-overlay { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background-image: linear-gradient(to right, rgba(150, 150, 150, 0.2) 1px, transparent 1px), linear-gradient(to bottom, rgba(150, 150, 150, 0.2) 1px, transparent 1px); background-size: 15px 15px; pointer-events: none; z-index: 5; }
canvas { display: block; max-width: 100%; max-height: 500px; margin: 0 auto; }

.heatmap-ref-vertical { display: flex; flex-direction: column; align-items: center; gap: 15px; width: 100%; }
.heatmap-ref-item { display: flex; align-items: center; gap: 10px; width: 110px; }
.heatmap-ref-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.heatmap-ref-item span { font-size: 9px; line-height: 1.2; text-align: left; color: var(--black); font-weight: 600; }
.dot-red { background-color: #e52c1f; } .dot-yellow { background-color: #f7a928; } .dot-green { background-color: #4caf50; } .dot-blue { background-color: #1f4287; }

/* =========================================
   BANDA NEGRA: ANÁLISIS RESUMIDO
   ========================================= */
.analysis-summary-band { width: 100%; background-color: #222; padding: 40px 20px; border-bottom: 10px solid #fff;}
.section-title-lime { color: var(--lime); font-size: 24px; font-weight: 800; text-align: center; margin-bottom: 30px; letter-spacing: -0.5px;}
.section-title-dark { color: #333; font-size: 24px; font-weight: 800; text-align: center; margin-bottom: 30px; letter-spacing: -0.5px;}
.section-subtitle-white { color: #fff; font-size: 12px; margin-top: -20px; margin-bottom: 30px;}

.summary-content-grid { display: grid; grid-template-columns: 1fr 1fr; max-width: 1280px; margin: 0 auto; gap: 40px; }
@media (max-width: 1024px) { .summary-content-grid { grid-template-columns: 1fr; } }

.summary-colors-box, .summary-bubbles-box { border: 1px solid #444; border-radius: 12px; padding: 20px; background: transparent; }
.summary-colors-box h4, .summary-bubbles-box h4 { color: #fff; font-size: 11px; font-weight: 600; margin-bottom: 20px; text-align: center;}

/* COLORES PRINCIPALES */
.colors-detailed-list { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 25px 15px; 
    width: 100%; 
    max-width: 600px; 
    margin: 0 auto; 
}
.color-detailed-item { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    justify-content: flex-start; 
}
.color-circle-big { 
    width: 40px; 
    height: 40px; 
    border-radius: 50%; 
    border: 3px solid rgba(255, 255, 255, 0.1); 
    flex-shrink: 0; 
}
.color-detailed-info { 
    display: flex; 
    flex-direction: column; 
    justify-content: center; 
    gap: 2px; 
    text-align: left; 
}
.color-pct-line { font-size: 14px; font-weight: 800; color: #fff; line-height: 1; } 
.color-hex-line, .color-rgb-line { font-size: 9px; color: #aaa; font-weight: 400; text-transform: uppercase; } 

@media (max-width: 768px) { 
    .colors-detailed-list { grid-template-columns: repeat(2, 1fr); } 
}

/* BURBUJAS */
.bubbles-container { display: flex; justify-content: space-around; gap: 10px; flex-wrap: wrap; }
.bubble-item { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 110px;}
.bubble-circle { width: 102px; height: 102px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 12px; text-align: center; position: relative;}
.bubble-circle span { color: #fff; font-size: 10px; font-weight: 700; text-transform: uppercase; line-height: 1.2; }
.bubble-label { color: #fff; font-size: 10px; font-weight: 800; letter-spacing: 1px; }

.b-rojo { background-color: #e10428; }
.b-rosa { background-color: #d71a4b; }
.b-fucsia { background-color: #cc476c; }
.b-naranja { background-color: #f8a937; }

/* =========================================
   ACORDEONES PLEGADOS INDEPENDIENTES 
   ========================================= */
.general-analysis-area { width: 100%; background-color: #e6e6e6; padding: 40px 20px; }
.accordion-grid { display: grid; grid-template-columns: 1fr 1fr; max-width: 1280px; margin: 0 auto; gap: 20px; align-items: start; }
@media (max-width: 768px) { .accordion-grid { grid-template-columns: 1fr; } }

.accordion-box { background-color: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.accordion-header { padding: 20px; display: flex; justify-content: space-between; align-items: center; cursor: pointer; transition: background 0.3s; }
.accordion-header:hover { background-color: #f9f9f9; }

.accordion-header span { font-size: 16px; font-weight: 300; color: #333; text-transform: uppercase; } 
.acc-icons { display: flex; align-items: center; gap: 10px; }
.acc-check { width: 16px; height: 16px; object-fit: contain; } 
.acc-arrow { font-size: 12px; color: #000; transition: transform 0.3s; }

.accordion-content { display: none; background-color: #fff; border-top: 1px solid #eee; }
.accordion-box.expanded .accordion-content { display: block; }
.accordion-box.expanded .acc-arrow { transform: rotate(180deg); }

.advertising-analysis-area { width: 100%; background-color: #1a1a1a; padding: 40px 20px; border-bottom: 20px solid var(--lime); }
.adv-accordion-grid { display: grid; grid-template-columns: 1fr 1fr; max-width: 1280px; margin: 0 auto; gap: 20px; align-items: start;}
@media (max-width: 768px) { .adv-accordion-grid { grid-template-columns: 1fr; } }

.adv-scoring-box { max-width: 1280px; margin: 20px auto 0; background: #fff; border-radius: 8px; padding: 30px; display: flex; justify-content: space-between; align-items: center; }
.adv-scoring-text { flex: 1; padding-right: 30px;}
.adv-scoring-text h3 { font-size: 16px; font-weight: 300; color: #333; margin-bottom: 10px; }
.adv-scoring-text p { font-size: 12px; color: #666; line-height: 1.6; }
.adv-scoring-number { font-size: 80px; font-weight: 800; color: var(--black); line-height: 1; letter-spacing: -2px;}
@media (max-width: 768px) { .adv-scoring-box { flex-direction: column; text-align: center; } .adv-scoring-text { padding-right: 0; margin-bottom: 20px;} }

/* =========================================
   PRELOADER Y FOOTER
   ========================================= */
.circular-spinner { border: 4px solid #e6e6e6; border-top: 4px solid var(--lime); border-radius: 50%; width: 50px; height: 50px; animation: spin 1s linear infinite; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.global-footer { width: 100%; display: flex; flex-direction: column; }
.footer-lime-bar { height: 30px; background-color: var(--lime); display: flex; justify-content: flex-end; align-items: center; padding: 0 40px; }
.global-footer-version { font-size: 10px; font-weight: 800; color: var(--black); letter-spacing: 0.5px; }

.footer-black-content { background-color: var(--black); padding: 30px 40px; display: flex; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; gap: 20px; }
.footer-info { display: flex; flex-direction: column; align-items: flex-start; text-align: left; }
.global-footer-logo { margin-bottom: 10px; display: block; max-height: 30px; width: auto; object-fit: contain; } 
.global-footer-text { font-size: 10px; color: #888; line-height: 1.6; }
.footer-legal-links { margin-top: 15px; display: flex; gap: 10px; flex-wrap: wrap; }
.footer-legal-links a { color: #888; text-decoration: none; font-size: 10px; transition: color 0.3s; }
.footer-legal-links a:hover { color: var(--lime); text-decoration: underline; }

.footer-counter { font-size: 11px; color: #888; letter-spacing: 0.5px; border: 1px solid #333; padding: 10px 15px; border-radius: 6px; white-space: nowrap;}
.footer-counter strong { color: var(--lime); font-size: 14px; margin-left: 5px; }

/* Modal y Banner Cookies */
.cookie-banner { position: fixed; bottom: 0; left: 0; width: 100%; background-color: var(--black); color: #fff; z-index: 9999; padding: 20px; box-shadow: 0 -5px 15px rgba(0,0,0,0.5); }
.cookie-content { max-width: 1280px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; align-items: center; text-align: center; }
.cookie-content p { font-size: 12px; line-height: 1.6; color: #ccc; margin: 0; text-align: left;}
.cookie-content a { color: var(--lime); text-decoration: underline; font-weight: 700;}
.cookie-buttons { display: flex; gap: 10px; flex-shrink: 0;}
.btn-cookie-accept, .btn-cookie-reject { border: none; padding: 12px 24px; font-size: 11px; font-weight: 800; cursor: pointer; border-radius: 4px; letter-spacing: 0.5px; transition: 0.3s; }
.btn-cookie-accept { background-color: var(--lime); color: var(--black); }
.btn-cookie-accept:hover { background-color: #9cdb04; }
.btn-cookie-reject { background-color: transparent; border: 1px solid #666; color: #ccc; }
.btn-cookie-reject:hover { background-color: #333; color: #fff; border-color: #999;}
@media (min-width: 768px) { .cookie-content { flex-direction: row; justify-content: space-between; } .cookie-content p { flex: 1; margin-right: 30px; } }

.pdf-modal { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: rgba(0,0,0,0.85); z-index: 10000; display: flex; align-items: center; justify-content: center; }
.pdf-modal-content { background-color: #fff; border-radius: 15px; padding: 30px; width: 90%; max-width: 800px; max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 10px 30px rgba(0,0,0,0.5); }
.pdf-modal-content h3 { color: var(--black); font-size: 20px; font-weight: 800; text-align: center; margin-bottom: 20px; text-transform: uppercase; }
.pdf-page-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 25px; overflow-y: auto; padding: 20px; background: var(--box-bg); border-radius: 10px; flex-grow: 1; }
.pdf-thumb-wrapper { position: relative; cursor: pointer; border: 3px solid transparent; border-radius: 8px; padding: 5px; background-color: #fff; transition: transform 0.2s, border-color 0.2s; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.pdf-thumb-wrapper:hover { transform: translateY(-3px); }
.selected-pdf-thumb { border-color: var(--lime); transform: scale(1.05); }
.pdf-thumb-img { width: 100%; height: auto; display: block; border-radius: 4px; }
.pdf-thumb-number { position: absolute; top: -12px; right: -12px; background-color: var(--black); color: var(--lime); width: 26px; height: 26px; border-radius: 50%; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.pdf-modal-actions { display: flex; justify-content: center; gap: 20px; margin-top: 25px; padding-top: 20px; border-top: 1px solid #ddd; }
@media (max-width: 768px) { .pdf-modal-actions { flex-direction: column; } .pdf-modal-actions button { width: 100%; } }

/* =========================================
   HERRAMIENTA MIRA IA (POPUP Y CURSOR)
   ========================================= */
.mira-btn-container { position: relative; width: 44px; height: 44px; margin: 0 auto 20px; cursor: pointer; }
.mira-normal, .mira-hover { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity 0.3s; }
.mira-hover { opacity: 0; }
.mira-btn-container:hover .mira-normal { opacity: 0; }
.mira-btn-container:hover .mira-hover { opacity: 1; }
/* Estado Activo del Botón */
.mira-btn-container.active .mira-normal { opacity: 0; }
.mira-btn-container.active .mira-hover { opacity: 1; border-radius: 50%; box-shadow: 0 0 15px var(--lime); }

/* Puntero Cruz Lima */
#mira-cursor {
    position: absolute; width: 80px; height: 80px; border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.4); pointer-events: none;
    transform: translate(-50%, -50%); z-index: 50;
    display: flex; align-items: center; justify-content: center;
}
.mira-cross { position: relative; width: 30px; height: 30px; }
.mira-cross::before, .mira-cross::after { content: ''; position: absolute; background-color: var(--lime); }
.mira-cross::before { top: 14px; left: 0; width: 30px; height: 2px; }
.mira-cross::after { top: 0; left: 14px; width: 2px; height: 30px; }
.mira-cross-center { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 12px; height: 12px; border: 2px solid var(--lime); border-radius: 50%; }

/* Pop-up Negro 20% Transparencia (0.8 opacity) */
#mira-popup {
    position: absolute; top: 20px; right: 20px; width: 280px;
    background-color: rgba(0, 0, 0, 0.85); border-radius: 12px; padding: 25px 20px 20px;
    color: #fff; z-index: 60; box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    backdrop-filter: blur(4px); border: 1px solid #333;
    cursor: grab;
    user-select: none;
}
#mira-popup:active { cursor: grabbing; }
#mira-close-btn {
    position: absolute; top: 8px; right: 8px; background: var(--lime); color: var(--black);
    border: none; border-radius: 50%; width: 20px; height: 20px;
    font-size: 14px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
#mira-close-btn:hover { background: #fff; }
#mira-popup-content { font-size: 12px; line-height: 1.6; font-weight: 300; text-align: left; cursor: text;}
/* Resaltado Lima dentro del Popup */
#mira-popup-content strong { color: var(--lime); font-weight: 700; }

#canvas-container { cursor: default; }

/* =========================================
   MENÚ CONTEXTUAL MIRA (COMBO)
   ========================================= */
.mira-btn-container { opacity: 0.3; pointer-events: none; transition: opacity 0.4s; }
.mira-btn-container.enabled { opacity: 1; pointer-events: auto; }

#mira-context-menu {
    position: absolute;
    background-color: rgba(20, 20, 20, 0.95);
    border: 1px solid #444;
    border-radius: 10px;
    padding: 10px;
    width: 200px;
    z-index: 70;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.mira-menu-item {
    background: transparent;
    border: none;
    color: #bbb;
    text-align: left;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mira-menu-item:hover { background-color: rgba(255,255,255,0.1); color: #fff; }
.mira-menu-item.probable { color: var(--black); background-color: var(--lime); font-weight: 800; font-size: 13px; padding: 12px; }
.mira-menu-item.probable:hover { background-color: #9cdb04; }
.mira-menu-prob-text { font-size: 9px; opacity: 0.7; }

/* =========================================
   TERMINAL DE TECNOLOGÍAS (PASO 2)
   ========================================= */
.tech-terminal {
    background-color: transparent; color: #666; padding: 20px 0 0 0; margin-top: 15px; font-size: 11px; text-align: left; width: 100%;
}
.tech-terminal h4 { color: #444; font-size: 12px; margin-bottom: 15px; font-weight: 700; border-bottom: none; }
.tech-line { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-family: 'Montserrat', sans-serif; font-weight: 500; color: #666; }
.term-loader { width: 14px; height: 14px; border: 2px solid #ddd; border-top: 2px solid var(--lime); border-radius: 50%; animation: spin 1s linear infinite; display: inline-block; flex-shrink: 0; }
.term-check { color: var(--lime); font-weight: 900; font-size: 14px; display: inline-block; width: 14px; text-align: center; flex-shrink: 0; text-shadow: 0 0 1px rgba(0,0,0,0.2); }

/* =========================================
   HERRAMIENTA DE GOTERO (CSS)
   ========================================= */
#dropper-indicator { position: absolute; pointer-events: none; transform: translate(-50%, -50%); z-index: 100; }
#dropper-indicator::before, #dropper-indicator::after { content: ''; position: absolute; top: 50%; left: 50%; background-color: var(--lime); animation: blinkGotero 1.5s infinite; }
#dropper-indicator::before { width: 20px; height: 20px; border-radius: 50%; background-color: transparent; border: 3px solid var(--lime); transform: translate(-50%, -50%); }
#dropper-indicator::after { width: 2px; height: 30px; transform: translate(-50%, -50%); }
.dropper-indicator-horizontal { content: ''; position: absolute; top: 50%; left: 50%; width: 30px; height: 2px; background-color: var(--lime); transform: translate(-50%, -50%); animation: blinkGotero 1.5s infinite; }
@keyframes blinkGotero { 0% { opacity: 0.2; } 50% { opacity: 1; } 100% { opacity: 0.2; } }

#color-picker-popup {
    position: absolute; top: 20px; right: 20px; width: 250px; background-color: rgba(0, 0, 0, 0.85); border: 1px solid #333; padding: 20px; border-radius: 12px; z-index: 110; box-shadow: 0 10px 25px rgba(0,0,0,0.5); backdrop-filter: blur(4px); cursor: grab; text-align: left; color: #fff;
}
#color-picker-popup.dragging { cursor: grabbing; }
.color-popup-content { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.color-popup-header { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; padding-bottom: 10px; border-bottom: 1px dashed var(--lime); }
.color-popup-header span { font-weight: 800; font-size: 13px; color: var(--lime); text-transform: uppercase; font-family: 'Montserrat', sans-serif; }
#color-popup-close { background: var(--lime); border: none; border-radius: 50%; width: 22px; height: 22px; font-size: 14px; font-weight: bold; color: var(--black); cursor: pointer; display: flex; align-items: center; justify-content: center; }
#color-popup-close:hover { background: #fff; }
.color-swatch-circle { width: 80px; height: 80px; border-radius: 50%; border: 3px solid #555; margin: 5px 0 15px; box-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.color-values-container { width: 100%; font-family: 'Montserrat', sans-serif; font-size: 12px; color: #fff; }
.color-val-line { display: flex; justify-content: space-between; margin-bottom: 8px; }
.color-val-label { font-weight: 700; text-transform: uppercase; color: #aaa; }
.color-val-text { font-weight: 600; color: #fff; }
.btn-copy { background-color: var(--lime); color: var(--black); border: none; padding: 3px 8px; border-radius: 4px; font-size: 9px; font-weight: 800; cursor: pointer; transition: background 0.3s; }
.btn-copy:hover { background-color: #fff; }

/* =========================================
   HERRAMIENTA ZOOM (Indicador Flotante)
   ========================================= */
#canvas-container { overflow: hidden; }
#analyzedImage, .grid-overlay { transition: transform 0.15s ease-out; }
#zoom-indicator {
    position: absolute; width: 80px; height: 80px; background-color: rgba(0, 0, 0, 0.7); border-radius: 50%; pointer-events: none; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; z-index: 200; box-shadow: 0 4px 15px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.1);
}
.zoom-indicator-inner { display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--lime); font-family: 'Montserrat', sans-serif; }
#zoom-icon-text { font-size: 28px; font-weight: 400; line-height: 1; margin-bottom: 2px; }
#zoom-pct-text { font-size: 13px; font-weight: 800; line-height: 1; }

/* =========================================
   PINES EN LA IMAGEN (CHINCHETA)
   ========================================= */
.pin-marker { position: absolute; transform: translate(-50%, -100%); display: flex; flex-direction: column; align-items: center; cursor: pointer; pointer-events: auto; z-index: 150; transition: transform 0.1s; }
.pin-marker:hover, .pin-marker.active-pin { z-index: 160; transform: translate(-50%, -100%) scale(1.15); }
.pin-circle { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #000; font-weight: 800; font-size: 10px; font-family: 'Montserrat', sans-serif; box-shadow: 0 2px 5px rgba(0,0,0,0.5); border: 2px solid transparent; }
.pin-line { width: 2px; height: 12px; }
.pin-marker.active-pin .pin-circle { border-color: #fff; box-shadow: 0 0 10px rgba(255,255,255,0.8); }

/* POP-UP DE COMENTARIOS */
#comment-popup { position: absolute; width: 320px; background-color: rgba(35, 35, 35, 0.95); border: 1px solid #444; border-radius: 12px; padding: 20px; z-index: 2000; box-shadow: 0 10px 30px rgba(0,0,0,0.7); backdrop-filter: blur(5px); cursor: grab; }
#comment-popup.dragging { cursor: grabbing; }
.cp-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.cp-title { color: var(--lime); font-size: 14px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.cp-color-dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.cp-close { background: var(--lime); color: #000; border: none; border-radius: 50%; width: 22px; height: 22px; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cp-textarea { width: 100%; background: #fff; border: none; border-radius: 6px; padding: 10px; font-family: 'Montserrat', sans-serif; font-size: 12px; color: #444; resize: none; height: 90px; margin-bottom: 15px; }
.cp-textarea:disabled { background: #f0f0f0; color: #666; }
.cp-color-selector { margin-bottom: 15px; }
.cp-color-help { font-size: 9px; color: #aaa; margin-bottom: 8px; display: block; }
.cp-swatches { display: flex; gap: 8px; }
.cp-swatch { width: 16px; height: 16px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.cp-swatch.selected { border-color: #fff; transform: scale(1.2); }
.cp-actions { display: flex; justify-content: space-between; gap: 10px; }
.cp-btn { flex: 1; padding: 10px; border-radius: 6px; border: none; font-weight: 800; font-size: 11px; cursor: pointer; text-transform: uppercase; }
.cp-btn-borrar { background: #333; color: #aaa; }
.cp-btn-borrar:hover { background: #e52c1f; color: #fff; }
.cp-btn-guardar { background: var(--lime); color: #000; }
.cp-btn-editar { background: #555; color: #fff; }

/* =========================================
   FIX CAJA ERROR (LIMPIA)
   ========================================= */
.error-alert-box {
    background-color: #fff;
    border: 1px solid #555 !important;
    border-left: 5px solid #555 !important;
    padding: 15px; 
    border-radius: 8px; 
    color: #444; 
    font-size: 12px; 
    margin-bottom: 20px;
    box-shadow: none !important;
}

/* =========================================
   SCANNER LINE (PRELOADER)
   ========================================= */
#scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background-color: var(--lime);
    box-shadow: 0 0 15px rgba(0,0,0,0.8), 0 0 5px var(--lime);
    z-index: 500;
    animation: scanAnim 2.5s infinite alternate ease-in-out;
    pointer-events: none;
}

@keyframes scanAnim {
    0% { left: 0%; }
    100% { left: calc(100% - 3px); }
}


/* =========================================
   SISTEMA DE COMENTARIOS (DESKTOP Y MOBILE)
   ========================================= */

/* MURO DE CONTENCIÓN PARA EL PANEL DERECHO */
#step3-right-box {
    width: 100%;
    max-width: 100%;
    overflow: hidden; /* Evita que la grilla colapse por textos largos */
}
#comments-sidebar-container {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.comments-sidebar-inner {
    background: #252525;
    border-radius: 12px;
    padding: 15px;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}
.comments-title {
    color: #fff;
    font-size: 14px;
    text-align: center;
    margin-bottom: 15px;
    font-weight: 600;
}
.comments-list-container {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 480px;
    width: 100%;
    scrollbar-width: none; 
    -ms-overflow-style: none;
}
.comments-list-container::-webkit-scrollbar { display: none; }

/* ESTILO DESKTOP (ANCHO Y ALTO RÍGIDO - CERO ELASTICIDAD) */
.comment-list-item {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 10px;
    cursor: pointer;
    border-top: 6px solid var(--tag-color, #ccc);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    height: 50px !important;      
    min-height: 50px !important;  /* FIX: Obliga a que la altura mínima sea 50px */
    max-height: 50px !important;
    flex-shrink: 0 !important;    /* FIX: Prohíbe a Flexbox aplastar el comentario */
    width: 100%;                  
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;    
}
.cli-number-box {
    font-size: 20px;
    font-weight: 800;
    color: #333;
    width: 50px; /* Ancho fijo para el número */                  
    flex-shrink: 0;                
    border-right: 1px solid #ddd;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cli-text {
    font-size: 12px;
    color: #666;
    width: calc(100% - 50px); /* Matemática estricta: 100% menos los 50px del número */
    flex: none; /* Anula la elasticidad de flexbox */
    white-space: nowrap !important;        
    overflow: hidden !important;          
    text-overflow: ellipsis !important;   
    padding: 0 15px;
    box-sizing: border-box;
    display: block;
}
.cli-draft {
    font-style: italic;
    color: #999;
}

.mobile-scroll-arrow { display: none; }
.desktop-only { display: block; }
.mobile-only { display: none; }

/* =========================================
   ESTILOS DE BURBUJAS CONCEPTO
   ========================================= */
.concepto-container {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 10px;
    margin-top: 25px;
    padding: 10px;
    flex-wrap: wrap;
}

.burbuja-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 110px;
}

/* Burbuja 1: Sólida */
.b-full {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.b-full span {
    font-size: 10px;
    font-weight: 800;
    color: #000;
    line-height: 1.2;
    text-transform: uppercase;
}

/* Burbujas 2, 3, 4: Progreso Circular */
.b-progress {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: conic-gradient(var(--p-color) var(--p-angle), #e6e6e6 0deg);
}

.b-progress::after {
    content: '';
    position: absolute;
    width: 86px;
    height: 86px;
    background-color: #fff;
    border-radius: 50%;
    z-index: 1;
}

.b-progress-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.b-progress-content .lvl {
    font-size: 11px;
    font-weight: 400;
    color: #333;
}

.b-progress-content .pct {
    font-size: 20px;
    font-weight: 800;
    color: #000;
    line-height: 1;
}

.b-label {
    font-size: 11px;
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
}

/* =========================================
   AMPLIACIÓN: TÍTULOS / CLAIMS / CTA / TXT
   ========================================= */
.textos-status-container {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 25px;
    justify-content: space-between;
}

.texto-status-item {
    flex: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.texto-status-pill {
    background-color: #222;
    color: #fff;
    padding: 12px 10px;
    border-radius: 25px;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.texto-status-pill.disabled {
    background-color: #e6e6e6;
    color: #999;
}

.texto-validation {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 0 5px;
}

.texto-validation img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    flex-shrink: 0;
    margin-top: 2px;
}

.texto-validation img.error-icon {
    width: 14px; 
    height: 14px;
    margin-top: 3px;
}

.texto-validation span {
    font-size: 10px;
    color: #666;
    line-height: 1.3;
}

.texto-status-item.disabled-item {
    opacity: 0.5; 
}

/* =========================================
   ERRORES ORTOGRÁFICOS POR CATEGORÍA
   ========================================= */
.texto-errores-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 10px;
    padding-left: 2px;
    width: 100%; 
}

.error-word-pill {
    background-color: #e10428;
    color: #fff;
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(225, 4, 40, 0.3);
    
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
}

/* =========================================
   AMPLIACIÓN: COLORES (DASHBOARD)
   ========================================= */
.adv-colores-wrapper { margin-top: 20px; }
.adv-colores-subtitle { font-size: 14px; font-weight: 400; color: #555; margin-bottom: 15px; }

/* Grid de colores locales */
.adv-colores-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 25px; }
.adv-color-box { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 2px solid transparent; transition: 0.3s; }

/* Borde rojo cuando hay coincidencia con el logo */
.adv-color-box.highlight-corp { border-color: #e10428; }
.adv-color-circle { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.adv-color-info { display: flex; flex-direction: column; font-size: 10px; color: #777; line-height: 1.3; }
.adv-color-info .adv-color-hex { font-weight: 700; color: #333; font-size: 11px; }
.adv-color-info .adv-color-pct { margin-top: 3px; }
.adv-color-info .adv-color-pct strong { font-size: 14px; color: #444; }

/* Color corporativo grande (Bottom) */
.adv-colores-corp-list { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 15px; }
.adv-color-box-large { display: flex; align-items: center; gap: 15px; }
.adv-color-circle-large { width: 60px; height: 60px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 4px 8px rgba(0,0,0,0.15); }
.adv-color-info-large { display: flex; flex-direction: column; font-size: 12px; color: #666; justify-content: center; line-height: 1.4;}
.adv-color-info-large .adv-color-hex { font-weight: 800; color: #333; font-size: 15px;}
.adv-color-info-large .adv-color-pct { margin-top: 3px; }
.adv-color-info-large .adv-color-pct strong { font-size: 20px; color: #333; }

.adv-colores-footer { font-size: 11px; color: #999; border-top: 1px solid #eee; padding-top: 15px; margin-top: 10px; }

@media (max-width: 768px) {
    .adv-colores-grid { grid-template-columns: repeat(2, 1fr); }
}

/* =========================================
   AMPLIACIÓN: INDIVIDUOS (DISEÑO GRID RESPONSIVO)
   ========================================= */
.adv-ind-metrics { display: flex; justify-content: space-between; margin: 25px 0; align-items: center; }
.adv-ind-metric-box { display: flex; align-items: center; gap: 10px; }
.adv-ind-metric-box span { font-size: 12px; font-weight: 500; color: #666; text-align: right; width: 90px; line-height: 1.2; }
.adv-ind-metric-box strong { font-size: 50px; font-weight: 800; color: #222; line-height: 1; }

/* Contenedor principal de la tabla: SOLUCIÓN TOOLTIP FUERA */
.adv-ind-table-container { width: 100%; margin-bottom: 30px; background: #fff; border-radius: 12px; border: 1px solid #eee; overflow: visible; } 

/* Cabecera Escritorio: PUNTAS REDONDEADAS Y LÍNEAS BLANCAS DIVISORIAS */
.ind-header-desktop {
    display: grid;
    grid-template-columns: repeat(5, 1fr); 
    background-color: #000;
    color: #fff;
    text-align: center;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    border-radius: 12px 12px 0 0; 
    overflow: hidden; 
}
.ind-header-desktop > div {
    padding: 15px 10px;
    border-right: 1px solid #fff; 
    display: flex;
    align-items: center;
    justify-content: center;
}
.ind-header-desktop > div:last-child {
    border-right: none;
}

/* Filas base: LÍNEAS GRISES DIVISORIAS ENTRE COLUMNAS BAJO ENCABEZADO */
.ind-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr); 
    border-bottom: 1px solid #eee;
    align-items: center;
    text-align: center;
    background: #fff;
    position: relative;
    box-sizing: border-box; 
}
.ind-row:last-child { border-bottom: none; }

.ind-row > div:not(.ind-adequate-wrapper) {
    border-right: 1px solid #eee; 
}
.ind-row .ind-adequate-wrapper {
    border-right: none;
}

.ind-col-data-wrapper { display: contents; }
.ind-col-name, .ind-data-val, .ind-data-action, .ind-adequate-wrapper {
    padding: 20px 10px; /* AUMENTAMOS EL ESPACIO VERTICAL */
}
.ind-col-name { font-weight: 800; color: #000; font-size: 14px; }
.ind-data-val { font-size: 12px; line-height: 1.4; } 
.ind-data-val.edad-val { font-weight: 800; font-size: 20px; color: #e10428; }
.ind-data-action { text-align: left; font-size: 11px; line-height: 1.4; }
.ind-data-label { display: none; }

/* Barra de Emoción y Etiquetas Apiladas: SOLUCIÓN DESBORDAMIENTO */
.emotion-bar-container { position: relative; width: 100%; max-width: 160px; height: auto; margin: 0 auto; padding-bottom: 5px;}
.emotion-bar-track { display: flex; width: 100%; height: 14px; border-radius: 10px; overflow: hidden; }
.eb-red { flex: 1; background-color: #e10428; }
.eb-yellow { flex: 1; background-color: #fcc107; }
.eb-green { flex: 1; background-color: #8cc63f; }
.eb-marker { position: absolute; top: 7px; width: 16px; height: 16px; background-color: #000; border: 2px solid #fff; border-radius: 50%; transform: translate(-50%, -50%); box-shadow: 0 1px 3px rgba(0,0,0,0.3); transition: left 0.5s ease; }
.eb-labels { display: flex; justify-content: space-between; width: 100%; margin-top: 10px; } 
.eb-col { display: flex; flex-direction: column; align-items: center; font-size: 9px; line-height: 1.2; color: #888; font-weight: 600;}

/* Botones Interactivos (Columna Adecuado) */
.ind-adequate-wrapper { display: flex; align-items: center; justify-content: center; gap: 8px; position: relative; }
.btn-ind-eval { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #ccc; color: #ccc; background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 800; transition: 0.3s; }
.btn-ind-eval:hover { transform: scale(1.1); }
.btn-ind-eval.check.active { border-color: #8cc63f; color: #8cc63f; }
.btn-ind-eval.cross.active { border-color: #e10428; color: #e10428; }

/* Tooltip info: SOLUCIÓN CAPA SUPERIOR Y POR FUERA DE LA TABLA */
.ind-info-btn { width: 14px; height: 14px; background: #b2f705; color: #000; font-weight: 900; border-radius: 50%; font-size: 10px; display: none; align-items: center; justify-content: center; cursor: help; position: absolute; right: 5px; top: 8px; z-index: 10; }
.ind-info-btn.visible { display: flex; }
.ind-info-tooltip { position: absolute; bottom: 120%; right: 0px; width: 220px; background: #333; color: #fff; font-size: 10px; padding: 12px; border-radius: 8px; display: none; z-index: 9999; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.4); pointer-events: none; } 
.ind-info-tooltip::after { content: ''; position: absolute; top: 100%; right: 8px; border-width: 6px; border-style: solid; border-color: #333 transparent transparent transparent; } 
.ind-info-btn:hover + .ind-info-tooltip { display: block; }

.adv-ind-footer { border-top: 1px solid #eee; padding-top: 20px; }
.adv-ind-footer h6 { font-size: 11px; font-weight: 700; color: #777; margin-bottom: 12px; text-transform: uppercase; }

/* Mobile Header Block: NUEVA VISUAL MOBILE ANTES DE LISTA */
.ind-mobile-list-header {
    display: none; 
}

/* =========================================
   AMPLIACIÓN: LOGOTIPOS Y UBICACIÓN
   ========================================= */
.adv-logos-container { 
    display: flex; 
    align-items: center; 
    justify-content: space-around; 
    gap: 15px; 
    margin-top: 25px; 
    flex-wrap: wrap; 
}

.adv-logo-col { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 10px; 
    width: 120px; 
    text-align: center; 
}

.adv-logo-bubble { 
    width: 110px; 
    height: 110px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 11px; 
    font-weight: 800; 
    color: #000; 
    text-transform: uppercase; 
    padding: 15px; 
    line-height: 1.2; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
}
.adv-logo-bubble.b-grey { background-color: #cccccc; }
.adv-logo-bubble.b-lime { background-color: var(--lime); }

.adv-logo-loc-box { 
    display: flex; 
    flex-direction: column; 
    gap: 15px; 
    flex: 1; 
    min-width: 200px; 
}

.adv-logo-loc-line { 
    display: flex; 
    align-items: center; 
    gap: 12px; 
}

.adv-logo-flag { 
    width: 28px; 
    height: 28px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 1px solid #ddd; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.15); 
}

.adv-logo-loc-text { 
    font-size: 11px; 
    font-weight: 800; 
    color: #000; 
    text-transform: uppercase; 
    line-height: 1.3;
}

.adv-logo-loc-footer { 
    border-top: 1px solid #999; 
    padding-top: 10px; 
    margin-top: 10px; 
    text-align: center; 
    font-size: 11px; 
    font-weight: 800; 
    color: #000; 
    text-transform: uppercase; 
}

/* =========================================
   AMPLIACIÓN: TARGET
   ========================================= */
.adv-target-container { 
    display: flex; 
    justify-content: space-around; 
    gap: 10px; 
    margin-top: 25px; 
    flex-wrap: wrap; 
}
.adv-target-col { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
    gap: 12px; 
    width: 110px; 
}
.adv-target-bubble { 
    width: 110px; 
    height: 110px; 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    padding: 10px; 
    color: #fff; 
    font-weight: 800; 
    font-size: 10px; 
    text-transform: uppercase; 
    line-height: 1.2; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.15); 
    text-align: center;
}
.adv-target-bubble span {
    display: block;
    width: 100%;
    overflow-wrap: break-word; /* Salto de línea inteligente */
    word-break: normal; /* Evita cortar letras por la mitad si la palabra entera cabe abajo */
    hyphens: none; /* Quitamos los guiones automáticos que a veces confunden */
    font-size: 8.5px; /* Un pelín más pequeño para garantizar que "UNIVERSITARIO" quepa en el ancho */
    line-height: 1.3;
}
.adv-target-bubble.t-1 { background-color: #e73b2d; }
.adv-target-bubble.t-2 { background-color: #e75d29; font-size: 26px; } 
.adv-target-bubble.t-3 { background-color: #f8a937; }
.adv-target-bubble.t-4 { background-color: #fcc107; }
/* Forzar tamaño gigante solo para los valores dentro de la burbuja de Edades (t-2) */
.adv-target-bubble.t-2 span {
    font-size: 24px !important; 
    line-height: 1;
    word-break: normal;
}
.adv-target-title { 
    font-size: 11px; 
    font-weight: 700; 
    color: #333; 
    text-transform: uppercase; 
    line-height: 1.2; 
}

/* =========================================
   AMPLIACIÓN: LEGALES Y REFERENCIAS
   ========================================= */
.adv-legales-tags {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    margin-top: 20px;
}
.adv-legales-pill {
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* =========================================
   1. NIVELACIÓN DE CAJAS (ESCRITORIO)
   ========================================= */
#adv-results {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px;
}

#adv-results .accordion-box {
    display: flex;
    flex-direction: column;
    margin-bottom: 0; 
    align-self: start; 
}

#adv-results .accordion-box.expanded {
    align-self: stretch; 
}

#adv-results .accordion-box.expanded .accordion-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

#adv-results .accordion-box.expanded .accordion-content > div {
    flex-grow: 1;
}

/* =========================================
   NUEVA CAJA DE COLORES (BRANDFETCH)
   ========================================= */
.brand-columns-wrapper {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    justify-content: space-around;
    flex-wrap: wrap;
}
.brand-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 45%;
    min-width: 140px;
    background: #fdfdfd;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
}
.brand-col-bubble {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    color: #000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}
.brand-col-title { font-size: 11px; font-weight: 800; text-transform: uppercase; text-align: center; }
.brand-col-subtitle { font-size: 11px; color: #666; text-align: center; margin: 10px 0; }
.brand-api-footer { font-size: 9px; color: #999; margin-top: 20px; text-align: center; font-style: italic; }

/* =========================================
   NUEVA CAJA DE LOGOTIPOS (FLEX CLEAN)
   ========================================= */
.logos-flex-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin-top: 15px;
    width: 100%;
}
.logo-brand-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 25px;
    padding: 20px;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 12px;
}
.logo-box-clean {
    width: 130px;
    height: 70px;
    min-width: 130px; 
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    overflow: hidden; 
}
.logo-box-clean img {
    max-width: 100% !important;
    max-height: 100% !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}
.logo-bubble-clean {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    color: #000;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.bubble-grey { background-color: #ccc; }
.bubble-lime { background-color: var(--lime); }

.logo-flags-col {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-width: 180px;
}
.logo-flag-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- ESTILOS WIKIPEDIA (PALABRAS IMPORTANTES) --- */
.wiki-keywords-container { margin-top: 25px; border-top: 1px dashed #ccc; padding-top: 15px; }
.wiki-keywords-title { font-size: 11px; color: #666; text-transform: uppercase; font-weight: 800; margin-bottom: 12px; }
.wiki-pill { display: inline-flex; align-items: center; background-color: var(--lime); border-radius: 6px; padding: 6px 12px; margin-right: 8px; margin-bottom: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.wiki-pill.clickable { cursor: pointer; transition: transform 0.2s; }
.wiki-pill.clickable:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(0,0,0,0.15); }
.wiki-pill-text { font-size: 11px; font-weight: 800; color: #000; text-transform: uppercase; }
.wiki-pill-arrow { font-size: 9px; color: #000; margin-left: 8px; font-weight: 900; }

/* Pop-up de Wikipedia */
#wiki-popup {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 320px; background-color: #fff; border-radius: 12px; z-index: 99999;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3); border: 2px solid var(--lime);
    padding: 20px; color: #333; display: none;
}
.wiki-popup-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding-bottom: 10px; margin-bottom: 15px; }
.wiki-popup-title { font-size: 16px; font-weight: 800; color: #000; text-transform: uppercase; }
.wiki-popup-close { background: #eee; border: none; border-radius: 50%; width: 24px; height: 24px; font-weight: bold; cursor: pointer; color: #000; }
.wiki-popup-close:hover { background: #e52c1f; color: #fff; }
.wiki-popup-body { font-size: 12px; line-height: 1.6; color: #555; max-height: 200px; overflow-y: auto; }
.wiki-popup-footer { margin-top: 15px; font-size: 9px; color: #999; text-align: center; font-style: italic; }

/* =========================================
   MEDIA QUERIES MÓVIL (AJUSTE FINAL)
   ========================================= */
@media (max-width: 768px) {
    .desktop-text { display: none !important; }
    .mobile-text { display: inline-block !important; }

    .top-header { height: auto; display: flex; flex-direction: column; }
    .logo-menu { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; gap: 15px; padding: 20px 30px; height: 220px; align-items: center; }
    .step1-active .logo-menu { height: 110px; grid-template-rows: auto; }
    
    .logo-creativity { grid-column: 1 / 2; grid-row: 1 / 2; justify-self: flex-start; margin: 0; }
    .header-controls { display: contents; } 
    .language-selector { grid-column: 2 / 3; grid-row: 1 / 2; justify-self: flex-end; margin: 0; width: auto; }
    .btn-reset { grid-column: 1 / 3; grid-row: 2 / 3; width: 100%; margin: 0; padding: 15px 0; text-align: center; }

    .dynamic-header { height: 526px !important; }
    .header-layer { padding-left: 10%; padding-top: 15%; align-items: flex-start; }
    .hl-1 { font-size: 32px; gap: 8px;}
    .hl-2 { font-size: 32px; margin-top: 10px;}
    .hl-3 { font-size: 14px; margin-top: 20px;}
    .hl-pill { padding: 4px 10px; border-radius: 8px;}
    
    .steps-indicator { gap: 0; }
    .steps-indicator li:not(:last-child)::after { width: 20px; margin: 0 10px; }

    .title-main { font-size: 24px; }
    .subtitle-main { font-size: 14px; }
    .row-layout { flex-direction: column; }
    
    .footer-black-content { flex-direction: column; align-items: center; text-align: center; justify-content: center; padding: 30px 20px; }
    .footer-info { align-items: center; text-align: center; } 
    .footer-legal-links { justify-content: center; }
    .footer-counter { margin-top: 10px; }
    .footer-lime-bar { justify-content: center; }

    .cookie-buttons { flex-direction: column; width: 100%; }
    .btn-cookie-accept, .btn-cookie-reject { width: 100%; }
    
    /* REORDENAMOS LAS CAJAS EN MÓVIL (Paso 3) */
    .step3-active .main-grid { 
        display: flex !important; 
        flex-direction: column !important; 
        gap: 20px; 
        padding: 10px;
    }
    
    .step3-active #step3-canvas-box { order: 1; width: 100%; } 
    .step3-active #step3-menu { 
        order: 2; 
        width: 100%; 
        padding: 20px !important; 
    }
    .step3-active #step3-right-box { 
        order: 3; 
        display: block !important; 
        width: 100%; 
        padding: 0 !important;
        margin-top: 10px;
    } 
    
    .step3-controls-container-vertical { 
        flex-direction: row !important; 
        flex-wrap: wrap; 
        justify-content: center !important; 
        gap: 20px !important;
        margin-top: 0 !important;
    }
    .heatmap-ref-vertical { display: none !important; }
    .mira-btn-container { margin: 0 !important; }
    .mira-btn-wrapper-mobile {
        display: flex;
        flex-direction: row;
        justify-content: center;
        gap: 30px;
        width: 100%;
        margin-bottom: 20px;
    }
    
    /* Popup de Mira centralizado abajo para prevenir overflow horizontal */
    #mira-popup {
        width: 90% !important;
        left: 5% !important;
        right: auto !important;
        bottom: 10px !important;
        top: auto !important;
        transform: none !important;
    }

    /* FIX MÓVIL: Proyecto 01 arriba de bolitas */
    .submenu {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        padding: 20px 15px !important;
        gap: 15px !important;
        position: relative !important;
        align-items: center !important;
    }
    .proyecto-title {
        position: relative !important;
        width: 100% !important;
        justify-content: center !important;
        margin: 0 !important;
        order: 1 !important; 
    }
    .steps-container {
        position: relative !important;
        left: auto !important;
        transform: none !important;
        display: flex !important;
        width: 100% !important;
        justify-content: center !important;
        margin: 0 !important;
        order: 2 !important; 
    }

    /* OCULTAR LUPA Y ARRASTRE */
    #btnActivarZoom, #btnActivarArrastre {
        display: none !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }

    /* FIX MÓVIL: CAJA INDIVIDUOS */
    .adv-ind-metrics { display: none; }
    .ind-mobile-list-header {
        display: block;
        background-color: #000;
        color: #fff;
        padding: 15px;
        border-radius: 12px 12px 0 0; 
        font-weight: 700;
        font-size: 12px;
        text-transform: uppercase;
        margin-bottom: 0;
        text-align: center;
    }
    .ind-header-desktop { display: none; } 
    .adv-ind-table-container { border-radius: 0 0 12px 12px; border-top: none; } 
    .ind-row { grid-template-columns: 1fr 2fr; padding: 0; align-items: stretch; }
    .ind-col-name { display: flex; align-items: center; justify-content: center; border-right: 1px solid #eee; padding: 15px; }
    .ind-col-data-wrapper { display: flex; flex-direction: column; }
    
    .ind-col-name, .ind-data-val, .ind-data-action {
        padding: 20px 15px; 
        border-bottom: 1px solid #eee;
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .ind-data-action { border-bottom: none; align-items: flex-start; }

    .ind-row .ind-data-label { display: block !important; margin-bottom: 10px !important; font-size: 10px; font-weight: 800; text-align: center; width: 100%;}
    .ind-adequate-wrapper { grid-column: span 2; border-top: 1px solid #eee; justify-content: space-around; flex-wrap: wrap; gap: 10px;}
    .ind-adequate-wrapper .btn-ind-eval { flex-shrink: 0; } 
    .ind-info-tooltip { position: fixed; bottom: 50%; left: 50%; transform: translate(-50%, 50%); right: auto; z-index: 9999; }
    .ind-info-tooltip::after { display: none; } 
    
    #adv-results {
        grid-template-columns: 1fr;
    }

    /* SISTEMA DE COMENTARIOS MÓVIL (CARRUSEL) */
    #comments-sidebar-container {
        width: 100% !important;
        height: auto !important;
        padding: 0 10px !important; 
        order: -1; 
    }
    .comments-sidebar-inner {
        background: #1a1a1a !important;
        border-radius: 12px !important; 
        padding: 10px 0 !important;
    }
    .comments-title {
        color: #fff !important;
        font-size: 12px !important;
        margin-bottom: 5px !important;
        letter-spacing: 1px;
    }
    .mobile-comments-wrapper {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        width: 100%;
    }
    .mobile-scroll-arrow {
        display: block; 
        color: #fff;
        font-size: 18px;
        padding: 0 15px;
        cursor: pointer;
        user-select: none;
    }
    .mobile-scroll-arrow.hidden {
        visibility: hidden; 
    }
    
    /* CARRUSEL CENTRADO Y CONTENIDO */
    .comments-list-container {
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding: 5px 0 !important;
        margin: 0 auto !important;
        gap: 8px !important;
        width: max-content !important; 
        max-width: 250px !important;   
        scroll-behavior: smooth;
    }
    .comment-list-item {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        background: #fff !important;
        border-radius: 8px !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 52px !important;
        min-width: 52px !important;
        height: 52px !important;
        border-top: 8px solid var(--tag-color, #ccc) !important;
        box-shadow: none !important;
        flex-shrink: 0;
    }
    .cli-number-box {
        border: none !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 20px !important;
        width: 100% !important;
        height: 100% !important;
    }
    .cli-text { display: none !important; }
    #comments-scroll-arrow { display: none !important; }
}

@media (max-width: 500px) {
    .logo-menu { padding: 15px; }
}