/* css/tool-page.css */

/* --- VARIABLES LOCALES (SI SON NECESARIAS Y NO GLOBALES) --- */
:root {
    /* Si --primary-color es #007bff (0, 123, 255), --primary-color-rgb será 0,123,255 */
    /* Ejemplo, si no está en tu style.css global: */
    /* --primary-color-rgb: 0, 123, 255; */
    /* --secondary-color-rgb: 29, 233, 182; */
    /* Asumo que ya están definidas en tu style.css global */
}

/* --- CONTENEDOR PRINCIPAL DE LA PÁGINA DE HERRAMIENTA --- */
.tool-page-main {
    /* Si necesitas algún espaciado general para el main de herramientas */
}

/* --- CONTENEDORES DE PUBLICIDAD GLOBAL --- */
.ad-slot-container {
    width: 100%;
    margin: 1.5rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 90px;
    background: rgba(248, 250, 252, 0.5);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.ad-slot-container::before {
    content: 'Publicidad';
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 0.6rem;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 1px;
}


.top-ad { margin-bottom: 2rem; }
.mid-ad { margin: 3rem 0; }
.bottom-ad { margin-top: 2rem; }



/* --- BREADCRUMBS --- */
.breadcrumbs {
    background-color: var(--light-gray);
    /* Padding asimétrico en código pero simétrico en la vista: 
       arriba compensamos el header (80px) para que el texto quede centrado */
    padding: calc(var(--header-height) + 1.2rem) 0 1.2rem 0;
    font-size: 0.9rem;
    border-bottom: 1px solid #e2e8f0;
}
.breadcrumbs .container {
    /* No se necesita padding extra aquí si .container global ya lo tiene */
}
.breadcrumbs ol {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap; /* Para que los breadcrumbs pasen a nueva línea si son muchos */
    align-items: center;
}
.breadcrumbs li {
    display: flex;
    align-items: center;
    color: #6c757d; /* Un gris estándar para texto secundario */
}
.breadcrumbs li:not(:last-child)::after {
    content: '/';
    margin: 0 0.6em;
    color: #adb5bd; /* Un gris más claro para el separador */
}
.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}
.breadcrumbs a:hover {
    text-decoration: underline;
    color: var(--dark-blue); /* O var(--secondary-color) si prefieres */
}
.breadcrumbs li[aria-current="page"] {
    color: var(--text-color);
    font-weight: 600;
}

/* --- ENCABEZADO DE LA PÁGINA DE HERRAMIENTA --- */
.tool-page-header {
    text-align: center;
    padding: 3rem 0 2.5rem 0;
    /* background: linear-gradient(180deg, var(--card-background) 0%, var(--light-gray) 100%); */ /* Opcional: un degradado sutil */
}
.tool-page-header .container h1.tool-title {
    font-size: clamp(2rem, 5vw, 3.2rem); /* Un poco más grande si es H1 principal */
    margin-bottom: 0.75rem;
    color: var(--dark-blue);
    line-height: 1.25;
    font-weight: 700;
}
/* Quitar el after de section-title si lo hereda */
.tool-page-header .container h1.tool-title::after { display: none; } 

.tool-page-header .container p.tool-description {
    font-size: clamp(1.05rem, 2.5vw, 1.2rem); 
    color: #555;
    max-width: 800px; /* Buen ancho para legibilidad */
    margin: 0 auto 1.5rem auto; 
    line-height: 1.75;
}

/* --- SECCIÓN DE INTERFAZ DE LA HERRAMIENTA --- */
.tool-interface-section {
     padding-bottom: 3rem; /* Espacio antes de la siguiente sección */
}
/* El .container dentro de esta sección ya tiene un max-width de 1200px, que es bastante ancho.
   Si quieres que .tool-app-box sea más ancho que eso, necesitarías un .container-fluid o quitar el .container
   y aplicar max-width directamente a .tool-app-box, pero 1200px suele ser suficiente. */

/* Caja Principal de la Aplicación de Herramienta */
.tool-app-box {
    background-color: var(--card-background);
    padding: 2rem 2.5rem; /* Ajustar padding según necesidad */
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-hover); /* Sombra más pronunciada para destacar */
    border: 1px solid #dee2e6; /* Borde sutil */
    /* max-width: 900px;  Si se quiere un ancho específico diferente al container */
    /* margin: 0 auto; */ /* Si se usa max-width específico */
}
.tool-app-box h2.tool-main-title { 
    font-size: 1.7rem; 
    margin-top: 0;
    margin-bottom: 2rem; 
    color: var(--dark-blue);
    text-align: left; /* Alinear a la izquierda para un look más de "aplicación" */
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color); /* Línea de acento */
    display: flex; /* Para alinear ícono y texto */
    align-items: center;
}
.tool-app-box h2.tool-main-title i {
    margin-right: 0.6em;
    color: var(--primary-color); /* El ícono toma el color primario */
    font-size: 0.9em; /* Ajustar tamaño del ícono relativo al título */
}
.tool-app-box h2.tool-main-title::after { display: none; } /* Si hereda de .section-title */

.form-group { 
    margin-bottom: 1.75rem; 
}
.tool-app-box label {
    display: block; 
    font-weight: 600; 
    margin-bottom: 0.6rem; 
    font-size: 1rem; 
    color: var(--dark-blue); 
    font-family: var(--font-primary);
}
.tool-app-box input[type="text"],
.tool-app-box input[type="number"],
.tool-app-box input[type="url"],
.tool-app-box input[type="email"],
.tool-app-box input[type="password"],
.tool-app-box textarea,
.tool-app-box select {
    width: 100%; 
    padding: 0.9rem 1rem; 
    margin-bottom: 0.25rem; /* Espacio para hints */
    border: 1px solid #ced4da; /* Borde estándar gris */
    border-radius: 6px; 
    font-size: 1rem; 
    font-family: var(--font-secondary);
    box-sizing: border-box; 
    background-color: #f8f9fa; /* Fondo muy claro para inputs */
    color: var(--text-color);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.tool-app-box input[type="text"]:focus,
.tool-app-box input[type="number"]:focus,
.tool-app-box input[type="url"]:focus,
.tool-app-box input[type="email"]:focus,
.tool-app-box input[type="password"]:focus,
.tool-app-box textarea:focus,
.tool-app-box select:focus {
    border-color: var(--primary-color);
    /* Usar --primary-color-rgb si está definido para el box-shadow */
    box-shadow: 0 0 0 3px rgba(var(--primary-color-rgb, 0,123,255),0.25); 
    outline: none; 
    background-color: #fff; /* Fondo blanco al enfocar */
}
.tool-app-box textarea { 
    min-height: 120px; /* Altura mínima para textareas */
    resize: vertical; 
}
.tool-app-box select { 
    appearance: none; /* Quitar estilo por defecto del navegador */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23333' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3E%3C/svg%3E"); /* Flecha SVG */
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    background-size: 0.9em;
    padding-right: 2.5rem; /* Espacio para la flecha */
}
.input-hint { /* Para texto de ayuda debajo de los inputs */
    font-size: 0.85rem; 
    color: #6c757d; 
    margin-top: 0.25rem; 
    display: block; 
}

/* Grupo de Botones */
.tool-app-box .button-group { 
    margin-top: 2rem; 
    display: flex; 
    gap: 1rem; 
    flex-wrap: wrap; /* Para que los botones se ajusten en móviles */
    align-items: center; /* Alinear botones si tienen diferentes alturas */
}
.tool-app-box button,
.tool-app-box input[type="submit"],
.tool-app-box input[type="button"],
.tool-app-box .cta-button /* Para reusar la clase .cta-button */ {
    /* Hereda de .cta-button si se usa esa clase, o define aquí */
    padding: 0.85rem 1.8rem; 
    font-size: 1rem; 
    font-weight: 500; 
    cursor: pointer;
    /* transición ya en .cta-button */
}
/* Estilos específicos si no se usa .cta-button, o para sobrescribir */
.tool-app-box button:not(.cta-button) {
    background-color: var(--primary-color); color: white; border: none; border-radius: 6px; 
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.07);
}
.tool-app-box button:not(.cta-button):hover {
    background-color: var(--dark-blue); transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.tool-app-box button.secondary:not(.cta-button) { /* Botón secundario genérico */
    background-color: #6c757d; box-shadow: none; color:white;
}
.tool-app-box button.secondary:not(.cta-button):hover {
    background-color: #5a6268;
}
.tool-app-box button .icon, 
.tool-app-box .cta-button .icon,
.tool-app-box i /* Para FontAwesome en botones directamente */ { 
    margin-right: 0.6em; 
}

/* Área de Resultados (si está dentro de tool-app-box) */
.tool-app-box .results-area {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px dashed #ccc; /* Separador visual */
}
.tool-app-box .results-area label { /* Para el label de "Resultado:" */
    font-size: 1.1rem;
    font-family: var(--font-primary);
    color: var(--primary-color);
}
.tool-app-box .results-area textarea {
    background-color: #e9ecef; /* Fondo diferente para el output */
    color: var(--dark-blue);
    font-weight: 500;
    border-color: #adb5bd;
}
.tool-app-box .results-area textarea:focus {
    background-color: #e0e0e0; /* Ligeramente más oscuro al enfocar */
    border-color: var(--primary-color);
}
.tool-app-box .results-area button#tool-copy-button {
    background-color: var(--secondary-color);
    color: var(--dark-blue);
    font-weight: 600;
}
.tool-app-box .results-area button#tool-copy-button:hover {
    background-color: #18cca2; /* Un poco más oscuro de --secondary-color */
}


/* --- COMPONENTES PREMIUM (Corporate Clean) PARA REDISEÑOS --- */
.app-main-container { border: 1px solid #dee2e6; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.05); padding: 2.5rem; background: #ffffff; width: 100%; position: relative; }
.app-header-group { border-bottom: 2px solid #f1f5f9; margin-bottom: 2rem; padding-bottom: 1rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.app-title-seo { font-size: 1.5rem; font-weight: 700; color: #1e293b; margin: 0; display: flex; align-items: center; gap: 12px; }
.trust-badges-group { display: flex; gap: 8px; align-items: center; }
.trust-badge { font-size: 0.75rem; background: #ecfdf5; color: #059669; padding: 4px 10px; border-radius: 20px; font-weight: 600; text-transform: uppercase; border: none; }
.offline-badge { background: #eff6ff; color: #2563eb; }

.app-logic-surface { background: #ffffff; min-height: 250px; margin-bottom: 2rem; }
.app-stats-bar { display: flex; flex-wrap: wrap; gap: 20px; padding: 1.2rem; background: #f8fafc; border-radius: 10px; border-left: 4px solid #64748b; position: relative; }
.stat-block { flex: 1; min-width: 140px; }
.stat-label { display: block; font-size: 0.8rem; color: #64748b; margin-bottom: 4px; font-weight: 500; }
.stat-value { font-size: 1rem; font-weight: 700; color: #1e293b; }
.app-seo-tip { margin-top: 1.5rem; font-size: 0.85rem; color: #64748b; display: flex; align-items: center; gap: 8px; background: #fffbeb; padding: 10px 15px; border-radius: 8px; border: 1px solid #fef3c7; }

/* UTILIDADES PARA LA APP PREMIUM */
.ui-guide-block { border: 2px dashed #cbd5e1; border-radius: 8px; padding: 2rem; margin-bottom: 2rem; background: #f8fafc; }
.ui-guide-label { display: block; font-weight: 700; color: #475569; margin-bottom: 1rem; font-size: 0.9rem; text-transform: uppercase; }

.btn-group-demo { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 1.5rem; }
@media (max-width: 600px) { .btn-group-demo { flex-direction: column; } .btn-group-demo .btn-optikit { width: 100%; } }
.btn-optikit { padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; border: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: inherit;}
.btn-primary { background: #2563eb; color: white; }
.btn-success { background: #10b981; color: white; }
.btn-secondary { background: #64748b; color: white; }
.btn-danger { background: #ef4444; color: white; }
.btn-optikit:hover:not(:disabled) { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.btn-optikit:disabled, .btn-optikit[disabled], button:disabled { background-color: #e2e8f0 !important; color: #94a3b8 !important; cursor: not-allowed !important; box-shadow: none !important; transform: none !important; border: 1px solid #cbd5e1 !important;}

.form-group-demo { margin-bottom: 1rem; }
.form-label-demo { display: block; font-size: 0.9rem; font-weight: 600; color: #334155; margin-bottom: 5px; }
.form-control-demo { width: 100%; padding: 12px; border: 1px solid #d1d5db; border-radius: 8px; font-family: inherit; font-size: 0.95rem; color: #1e293b; background: #fff; box-sizing: border-box;}
.form-control-demo:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
select.form-control-demo { cursor: pointer; }

.dropzone-demo { border: 2px dashed #94a3b8; border-radius: 12px; padding: 3rem; text-align: center; color: #64748b; background: white; cursor: pointer; transition: border-color 0.3s; }
.dropzone-demo:hover { border-color: #2563eb; background: #f0f9ff; }

.toggle-switch { position: relative; display: inline-block; width: 50px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider-round { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.slider-round:before { position: absolute; content: ""; height: 18px; width: 18px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider-round { background-color: #2563eb; }
input:checked + .slider-round:before { transform: translateX(24px); }

.progress-bar-demo { width: 100%; background-color: #e2e8f0; border-radius: 10px; overflow: hidden; height: 12px; margin: 10px 0; }
.progress-fill-demo { height: 100%; background: linear-gradient(90deg, #2563eb, #64748b); width: 65%; transition: width 0.5s ease; }

.alert-demo { padding: 1rem; border-radius: 8px; margin-bottom: 1rem; display: flex; align-items: center; gap: 12px; font-size: 0.9rem; }
.alert-info { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }
.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }

.app-grid-layout { display: grid; grid-template-columns: 1fr 1.5fr; gap: 2rem; }
@media (max-width: 992px) { .app-grid-layout { grid-template-columns: 1fr; } }

.rating-stars { color: #f59e0b; display: flex; align-items: center; gap: 5px; font-size: 0.9rem; margin-top: 10px; }
.share-container { display: flex; align-items: center; gap: 15px; margin-top: 2rem; padding: 1rem; border-top: 1px solid #f1f5f9; }
.share-label { font-weight: 600; font-size: 0.85rem; color: #64748b; }
.share-btn { width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; text-decoration: none; transition: transform 0.2s; }
.share-btn:hover { transform: scale(1.1); }
.share-tw { background: #1da1f2; }
.share-wa { background: #25d366; }
.share-fb { background: #1877f2; }

/* Toast Notification Global Optikit */
.toast-optikit { visibility: hidden; min-width: 250px; background-color: #1e293b; color: #fff; text-align: center; border-radius: 8px; padding: 12px 20px; position: fixed; z-index: 9999; left: 50%; bottom: 30px; transform: translateX(-50%); box-shadow: 0 4px 12px rgba(0,0,0,0.2); font-size: 0.95rem; opacity: 0; transition: opacity 0.3s, bottom 0.3s; border: 1px solid #334155; }
.toast-optikit.show { visibility: visible; opacity: 1; bottom: 50px; }
.toast-optikit.error { background-color: #dc2626; border-color: #b91c1c; }

/* --- PESTAÑAS DE INFORMACIÓN --- */
.tool-info-tabs-section { 
    margin-top: 3.5rem; /* Más espacio antes de las pestañas */
    padding-bottom: 2rem;
}
.tabs-container {
    background-color: var(--card-background); 
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow); 
    overflow: hidden; 
    border: 1px solid #e0e0e0; 
}
.tab-buttons {
    display: grid; 
    grid-template-columns: repeat(3, 1fr);
    background-color: var(--light-gray); 
    border-bottom: 1px solid #d1d9e1;
    gap: 1px;
}
.tab-buttons::-webkit-scrollbar { display: none; } /* Ocultar scrollbar en Webkit */
.tab-buttons { -ms-overflow-style: none; scrollbar-width: none; } /* Ocultar scrollbar en Firefox/Edge */

.tab-button {
    padding: 0.9rem 1.2rem; 
    cursor: pointer; 
    border: none; 
    background-color: transparent;
    font-size: 0.95rem; 
    font-weight: 500; 
    flex-shrink: 0; /* Asegura que el texto nunca se corte */    font-family: var(--font-primary);
    color: #495057; /* Gris oscuro para pestañas inactivas */
    transition: color 0.2s ease, border-bottom-color 0.2s ease, background-color 0.2s ease;
    border-bottom: 3px solid transparent; 
    white-space: nowrap; /* Evitar que el texto del botón se rompa */
    display: inline-flex; 
    align-items: center; 
    gap: 0.5em;
    margin-bottom: -1px; /* Para que el borde inferior se superponga al borde del contenedor */
    position: relative;
}
.tab-button i { 
    font-size: 0.9em; 
    opacity: 0.7; 
    transition: opacity 0.2s ease;
}
.tab-button:hover { 
    color: var(--primary-color); 
    background-color: rgba(var(--primary-color-rgb, 0,123,255),0.05); /* Tinte sutil primario */
}
.tab-button.active {
    color: var(--primary-color); 
    border-bottom-color: var(--primary-color); 
    background-color: var(--card-background); /* Para que parezca "conectado" con el contenido */
    font-weight: 600;
}
.tab-button.active i { opacity: 1; color: var(--primary-color); }

.tab-content-area { 
    padding: 2rem 2.5rem; /* Buen padding para el contenido de las pestañas */
} 
.tab-content { 
    display: none; 
    animation: fadeInToolTab 0.4s ease-in-out; 
    line-height: 1.75;
}
.tab-content.active { display: block; }
@keyframes fadeInToolTab { 
    from { opacity: 0; transform: translateY(10px); } 
    to { opacity: 1; transform: translateY(0); } 
}

.tab-content h3 { 
    font-size: 1.6rem; 
    color: var(--dark-blue);
    margin-top: 0; 
    margin-bottom: 1.5rem; 
    display: flex; 
    align-items: center; 
    gap: 0.6em;
    padding-bottom: 0.75rem; 
    border-bottom: 1px solid var(--light-gray); /* Separador sutil */
}
.tab-content h3 i { 
    color: var(--primary-color); 
    font-size: 1em; 
}
.tab-content h4 { 
    font-size: 1.2rem; 
    margin-top: 2rem; /* Más espacio antes de subtítulos */
    margin-bottom: 0.75rem; 
    color: var(--dark-blue);
    font-weight: 600;
}
.tab-content p { margin-bottom: 1.2rem; }
.tab-content ul, .tab-content ol { 
    padding-left: 25px; 
    margin-bottom: 1.5rem; 
}
.tab-content li { 
    margin-bottom: 0.8rem; 
}
.tab-content strong { font-weight: 600; color: var(--dark-blue); }
.tab-content code {
    background-color: var(--light-gray);
    padding: 0.2em 0.4em;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
    color: var(--primary-color);
}

/* FAQ Items (dentro de .tab-content) */
.faq-item { 
    margin-bottom: 1.2rem; 
    border-bottom: 1px solid #f0f0f0; 
    padding-bottom: 1.2rem; 
}
.faq-item:last-child { 
    border-bottom: none; 
    margin-bottom: 0; 
    padding-bottom: 0; 
}
.faq-item summary {
    font-weight: 600; 
    cursor: pointer; 
    color: var(--dark-blue);
    font-size: 1.1rem; 
    list-style: none; /* Quitar marcador por defecto si se usa ::before o ::after */
    position: relative; 
    padding-left: 2em; /* Espacio para el ícono personalizado */
    transition: color 0.2s ease;
    font-family: var(--font-primary);
}
.faq-item summary:hover { color: var(--primary-color); }
.faq-item summary::before { /* Ícono de flecha o más/menos */
    content: '\f054'; /* Font Awesome "chevron-right" */
    font-family: 'Font Awesome 6 Free'; 
    font-weight: 900;
    position: absolute; 
    left: 0.25em; 
    top: 50%; 
    transform: translateY(-50%) rotate(0deg);
    transition: transform 0.25s ease-in-out;
    color: var(--secondary-color); /* Color secundario para el ícono */
    font-size: 0.8em;
}
.faq-item[open] summary::before { 
    transform: translateY(-50%) rotate(90deg); 
}
.faq-item p { 
    margin-top: 0.75rem; 
    padding-left: 2em; /* Alinear con el texto de summary */
    line-height: 1.7; 
    font-size: 0.95rem; 
}

/* --- BANNER ADICIONAL HORIZONTAL --- */
.ad-banner-section { 
    padding: 2rem 0; 
    /* background-color: var(--light-gray); Opcional si quieres diferenciarlo */
}
.ad-placeholder-horizontal {
    text-align: center; 
    background-color: #f0f2f5; /* Un gris muy neutro */
    padding: 1rem;
    border-radius: var(--border-radius); 
    min-height: 90px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    border: 1px dashed #ccc;
    color: #999;
}
.ad-placeholder-horizontal small { font-size: 0.85rem; }

/* --- HERRAMIENTAS RELACIONADAS --- */
.related-tools-section { 
    /* padding: 3rem 0; ya está en .content-section */
}
/* .related-tools-section .section-title { ... } ya definido globalmente */
#related-tools-grid {
    /* Reutiliza .tools-grid de style.css global, que es:
       display: grid;
       grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
       gap: 2rem;
    */
    /* Si necesitas que muestre 3-5 en una fila, el minmax debe ser ajustado
       Por ejemplo, para 4 tarjetas en un contenedor de 1200px (con gaps):
       (1200 - 3*32px_gap) / 4_items = (1200 - 96) / 4 = 1104 / 4 = 276px
       Entonces minmax(270px, 1fr) podría funcionar bien.
       minmax(260px, 1fr) que tienes puede ser suficiente para 4. Para 5 sería más apretado.
    */
}
.related-tools-section .tool-card { /* Reutiliza .tool-card global */
    /* Asegúrate que el estilo de .tool-card sea adecuado para esta sección */
}
.loading-related-tools i { color: var(--primary-color); }

/* --- SECCIÓN DE APOYO OPTIMIZADA --- */
/* Estilos de .support-optikit-section y .vibrant-bg ya están en style.css */
/* La plantilla HTML ya incluye las clases necesarias.
   Puedes añadir más especificidad si es necesario. */
.support-tool-section .section-title .highlight-support {
    /* Si --secondary-color no contrasta bien con --text-color-light del fondo vibrant-bg */
    /* color: #fff;  o algún otro color brillante */
    /* Por defecto usa el color de .highlight en .section-title, que puede ser var(--primary-color)
       Si .vibrant-bg es oscuro, .highlight-support debería ser claro.
       Si tu .highlight-support en style.css ya es claro, no se necesita esto. */
}
.support-tool-section .section-subtitle.light-text {
    color: rgba(255, 255, 255, 0.85) !important; /* Asegurar que sea claro si el fondo es oscuro */
}

/* --- SECCIÓN DE HERRAMIENTAS SUGERIDAS (DINÁMICA) --- */
.suggested-visual-wrapper {
    padding: 4rem 0;
    background-color: #f8fafc;
}

.suggested-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.suggested-card {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 12px;
    text-decoration: none;
    color: var(--dark-blue);
    border: 1px solid #eef2f6;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
    position: relative;
    overflow: hidden;
}

.suggested-card .card-icon-wrapper i {
    font-size: 1.25rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.card-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-right: 1.5rem;
}

.card-category-tag {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #94a3b8;
    margin-bottom: 2px;
}

.card-tool-name {
    font-weight: 800;
    font-size: 1.05rem;
    color: #1e293b;
    line-height: 1.25;
    transition: color 0.3s ease;
}

.card-micro-desc {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-arrow {
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: #f1f5f9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 0.7rem;
    transition: all 0.2s ease;
    border: 1px solid #e2e8f0;
}

.suggested-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-color);
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.08);
}

.suggested-card:hover .card-arrow {
    background: var(--primary-color);
    color: #ffffff !important;
    border-color: var(--primary-color);
    transform: translateY(-50%); /* Estático, sin desplazamiento */
}

.suggested-card:hover .card-tool-name {
    color: var(--primary-color);
}

.suggested-card:hover .card-icon-wrapper i {
    transform: scale(1.05);
}

/* --- DIVERSIFICACIÓN DE LAYOUTS DE SUGERENCIAS (ANTI-FOOTPRINT) --- */

/* 1. Layout Audit (Seguridad/Técnico) */
.suggested-grid.layout-audit .suggested-card {
    background: #f8fafc;
    border-left: 4px solid #1e293b;
    border-radius: 4px;
}
.suggested-grid.layout-audit .card-icon-wrapper i {
    background: #1e293b;
    color: #f8fafc;
    border-radius: 4px;
}
.suggested-grid.layout-audit .card-category-tag {
    background: #e2e8f0;
    color: #475569;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 1px;
}

/* 2. Layout AI (Tecnología/IA) */
.suggested-grid.layout-ai .suggested-card {
    border: 1px solid #e0e7ff;
    background: linear-gradient(to bottom right, #ffffff, #f5f3ff);
}
.suggested-grid.layout-ai .card-icon-wrapper i {
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    color: #fff;
    box-shadow: 0 4px 10px rgba(124, 58, 237, 0.2);
}
.suggested-grid.layout-ai .card-tool-name {
    color: #4338ca;
}

/* 3. Layout SEO (Marketing/Ventas) */
.suggested-grid.layout-seo .suggested-card {
    border-radius: 20px;
    background: #fff;
    border: 2px solid #f0fdf4;
}
.suggested-grid.layout-seo .card-icon-wrapper i {
    background: #10b981;
    color: #fff;
    border-radius: 50%;
}
.suggested-grid.layout-seo .card-category-tag {
    color: #059669;
    font-weight: 700;
}

/* 4. Layout Legal (Documentos/Ley) */
.suggested-grid.layout-legal .suggested-card {
    background: #fff;
    border: 1px solid #d1d5db;
    box-shadow: none;
    font-family: 'Times New Roman', serif;
}
.suggested-grid.layout-legal .card-icon-wrapper i {
    background: transparent;
    color: #374151;
    border: 1px solid #d1d5db;
}
.suggested-grid.layout-legal .card-tool-name {
    font-style: italic;
}

/* 5. Layout Ops (Productividad/Empresa) */
.suggested-grid.layout-ops .suggested-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}
.suggested-grid.layout-ops .card-icon-wrapper i {
    background: #f1f5f9;
    color: #6366f1;
}

/* Estilos comunes para la nueva estructura de tarjetas */
.card-icon-wrapper {
    flex-shrink: 0;
}
.card-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.card-tool-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1e293b;
    line-height: 1.3;
}
.card-category-tag {
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: 500;
    text-transform: capitalize;
}

.card-meta-top {
    margin-bottom: 2px;
}

.card-micro-desc {
    font-size: 0.8rem;
    color: #64748b;
    line-height: 1.4;
    margin: 4px 0 0 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-arrow {
    margin-left: auto;
    color: #cbd5e1;
    font-size: 0.8rem;
    transition: transform 0.3s ease, color 0.3s ease;
}

.suggested-card:hover .card-arrow {
    transform: translateX(5px);
    color: var(--primary-color);
}

/* Variaciones de color para romper la monotonía */
.color-var-1 .card-icon-wrapper i { color: #3b82f6; background: rgba(59, 130, 246, 0.1); }
.color-var-2 .card-icon-wrapper i { color: #10b981; background: rgba(16, 185, 129, 0.1); }
.color-var-3 .card-icon-wrapper i { color: #8b5cf6; background: rgba(139, 92, 246, 0.1); }
.color-var-4 .card-icon-wrapper i { color: #f59e0b; background: rgba(245, 158, 11, 0.1); }

.suggested-card:hover.color-var-1 { border-color: #3b82f6; }
.suggested-card:hover.color-var-2 { border-color: #10b981; }
.suggested-card:hover.color-var-3 { border-color: #8b5cf6; }
.suggested-card:hover.color-var-4 { border-color: #f59e0b; }

/* --- RESPONSIVIDAD ADICIONAL PARA PÁGINAS DE HERRAMIENTAS --- */
@media (max-width: 768px) {
    .tool-app-box {
        padding: 1.5rem;
    }
    .tool-app-box h2.tool-main-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    .tab-content-area {
        padding: 1.5rem;
    }
    .tab-content h3 {
        font-size: 1.4rem;
    }
    .tab-buttons {
        padding-left: 0.5rem; /* Menos padding en móviles */
    }
    .tab-button {
        padding: 0.8rem 1rem; /* Botones de pestaña más pequeños */
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .tool-page-header .container h1.tool-title {
        font-size: clamp(1.8rem, 6vw, 2.5rem);
    }
    .tool-page-header .container p.tool-description {
        font-size: 1rem;
    }
    .tool-app-box .button-group {
        flex-direction: column; /* Botones en columna en móviles muy pequeños */
    }
    .tool-app-box .button-group button,
    .tool-app-box .button-group .cta-button {
        width: 100%; /* Botones ocupan todo el ancho */
    }
}

/* --- CURIOSITY BOX (¿SABÍAS QUÉ?) --- */
.curiosity-box {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 1.5rem;
    border-radius: 12px;
    margin: 3rem auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    max-width: 1000px;
}

.curiosity-icon {
    width: 45px;
    height: 45px;
    background: #22c55e;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1.2rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
}

.curiosity-text h4 {
    margin: 0 0 0.5rem 0;
    color: #166534;
    font-size: 1.1rem;
    font-weight: 700;
}

.curiosity-text p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #14532d;
}

@media (max-width: 600px) {
    .curiosity-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
        padding: 1.2rem;
    }
}

/* ============================================================
   TEMA IA TECNOLÓGICO (LIGHT TECH)
   Se activa aplicando class="theme-ai" al <body>
   ============================================================ */

body.theme-ai {
    background-color: #f0f4f8;
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(56, 189, 248, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 100% 100%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h1v1H0V0zm10 10h1v1h-1v-1zm10 10h1v1h-1v-1zm10 10h1v1h-1v-1z' fill='%23cbd5e1' fill-opacity='0.4' fill-rule='evenodd'/%3E%3C/svg%3E");
    color: #334155;
}

/* Ajustes de Header y Breadcrumbs */
.theme-ai .breadcrumbs { background-color: rgba(255, 255, 255, 0.7); border-bottom-color: #e2e8f0; }
.theme-ai .tool-page-header .container h1.tool-title { color: #0f172a; text-shadow: 2px 2px 4px rgba(0,0,0,0.05); }
.theme-ai .tool-page-header .container p.tool-description { color: #64748b; }

/* Contenedor Principal (Light Glassmorphism) */
.theme-ai .app-main-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid #ffffff;
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08), 0 0 20px rgba(56, 189, 248, 0.05);
}

.theme-ai .app-header-group { border-bottom: 2px solid #f1f5f9; }
.theme-ai .app-title-seo { color: #1e293b; }
.theme-ai .app-title-seo i { color: #0ea5e9; }

/* Superficie de Lógica */
.theme-ai .app-logic-surface { background: #fff; border-radius: 12px; }

/* Controles de Formulario Clean Tech */
.theme-ai .form-label-demo { color: #475569; font-weight: 700; font-size: 0.85rem; }
.theme-ai .form-control-demo {
    background: #f8fafc;
    border: 2px solid #f1f5f9;
    color: #1e293b;
    font-family: 'Open Sans', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.theme-ai .form-control-demo:focus {
    background: #fff;
    border-color: #0ea5e9;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
}

/* Área de Salida Especial */
.theme-ai .output-column {
    background: #f1f5f9 !important;
    border: 2px solid #e2e8f0 !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}
.theme-ai #result-content, .theme-ai #output-text { color: #0f172a; font-family: 'Fira Code', monospace; font-size: 0.9rem; }

/* Barra de Estadísticas */
.theme-ai .app-stats-bar {
    background: linear-gradient(90deg, #f8fafc 0%, #f1f5f9 100%);
    border-left: 5px solid #0ea5e9;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.theme-ai .stat-label { color: #64748b; text-transform: uppercase; letter-spacing: 0.5px; }
.theme-ai .stat-value { color: #0369a1; font-weight: 800; }

/* Botones Modernos */
.theme-ai .btn-primary {
    background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
    border: none;
}
.theme-ai .btn-primary:hover:not(:disabled) {
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

.theme-ai .btn-secondary {
    background: #fff;
    border: 2px solid #e2e8f0;
    color: #64748b;
}
.theme-ai .btn-secondary:hover { 
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #334155;
}

/* Tips y Alertas */
.theme-ai .app-seo-tip {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0369a1;
}
.theme-ai .app-seo-tip strong { color: #0284c7; }

/* Pestañas Tech Light */
.theme-ai .tabs-container { border-color: #e2e8f0; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.theme-ai .tab-buttons { background: #f8fafc; border-bottom: 2px solid #e2e8f0; }
.theme-ai .tab-button.active { background: #fff; color: #2563eb; border-bottom: 2px solid #2563eb; }

/* Secciones de Información */
.theme-ai .example-card, .theme-ai .tip-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.theme-ai .example-card:hover { border-color: #0ea5e9; box-shadow: 0 10px 15px rgba(0,0,0,0.05); }

/* Curiosidad Box */
.theme-ai .curiosity-box {
    background: #eff6ff;
    border: 1px solid #dbeafe;
}
.theme-ai .curiosity-icon { background: #3b82f6; }

/* Scrollbar */
.theme-ai ::-webkit-scrollbar-track { background: #f1f5f9; }
.theme-ai ::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
.theme-ai ::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ============================================================
   TEMA FINANZAS E INVERSIÓN (TRUST & GOLD)
   Se activa aplicando class="theme-finance" al <body>
   ============================================================ */
body.theme-finance {
    background-color: #f0fdf4;
    background-image: 
        radial-gradient(circle at 0% 0%, rgba(16, 185, 129, 0.05) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 0l2 10h-4l2-10z' fill='%2310b981' fill-opacity='0.03'/%3E%3C/svg%3E");
}
.theme-finance .app-main-container { border-top: 5px solid #10b981; box-shadow: 0 15px 35px rgba(16, 185, 129, 0.08); }
.theme-finance .app-title-seo i, .theme-finance .stat-value { color: #059669; }
.theme-finance .btn-primary { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.theme-finance .form-control-demo:focus { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1); }

/* ============================================================
   TEMA MARKETING Y SEO (CREATIVE ORANGE)
   Se activa aplicando class="theme-marketing" al <body>
   ============================================================ */
body.theme-marketing {
    background-color: #fffaf5;
    background-image: 
        radial-gradient(circle at 100% 0%, rgba(245, 158, 11, 0.05) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='1' fill='%23f59e0b' fill-opacity='0.1'/%3E%3C/svg%3E");
}
.theme-marketing .app-main-container { border-top: 5px solid #f59e0b; box-shadow: 0 15px 35px rgba(245, 158, 11, 0.08); }
.theme-marketing .app-title-seo i, .theme-marketing .stat-value { color: #d97706; }
.theme-marketing .btn-primary { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.theme-marketing .form-control-demo:focus { border-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1); }

/* ============================================================
   TEMA DESARROLLO Y DISEÑO (MODERN TEAL)
   Se activa aplicando class="theme-dev" al <body>
   ============================================================ */
body.theme-dev {
    background-color: #f0f9ff;
    background-image: 
        linear-gradient(135deg, rgba(14, 165, 233, 0.05) 0%, transparent 100%),
        url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h1v1H0V0zm15 15h1v1h-1v-1z' fill='%230ea5e9' fill-opacity='0.05'/%3E%3C/svg%3E");
}
.theme-dev .app-main-container { border-top: 5px solid #0ea5e9; font-family: 'Open Sans', sans-serif; }
.theme-dev .app-title-seo i, .theme-dev .stat-value { color: #0284c7; }
.theme-dev .btn-primary { background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%); }
.theme-dev .form-control-demo { font-family: 'Fira Code', monospace; font-size: 0.9rem; }

/* ============================================================
   TEMA PRODUCTIVIDAD Y GESTIÓN (ELEGANT INDIGO)
   Se activa aplicando class="theme-productivity" al <body>
   ============================================================ */
body.theme-productivity {
    background-color: #f5f3ff;
    background-image: 
        radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.05) 0%, transparent 100%);
}
.theme-productivity .app-main-container { border-top: 5px solid #6366f1; border-radius: 20px; }
.theme-productivity .app-title-seo i, .theme-productivity .stat-value { color: #4f46e5; }
.theme-productivity .btn-primary { background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%); border-radius: 50px; }
