
/* ========================================
   TOOLBOX - ESTILOS GENERALES
======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --fondo: #f6f7fb;
    --blanco: #ffffff;
    --oscuro: #171a2b;
    --gris: #73778a;
    --principal: #6157e8;
    --principal-oscuro: #4c42cf;
    --principal-claro: #eeedff;
    --borde: #e9eaf1;
    --verde: #16a085;
    --sombra: 0 8px 30px rgba(25, 25, 60, 0.06);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--fondo);
    color: var(--oscuro);
    line-height: 1.6;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

.contenedor {
    width: min(1180px, 90%);
    margin: 0 auto;
}


/* ========================================
   CABECERA
======================================== */

.header {
    width: 100%;
    height: 76px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--borde);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
}

.header-contenido {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -1.5px;
    color: var(--oscuro);
}

.logo span {
    color: var(--principal);
}

.navegacion {
    display: flex;
    align-items: center;
    gap: 35px;
}

.navegacion a {
    color: var(--gris);
    font-size: 14px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.navegacion a:hover {
    color: var(--principal);
}


/* ========================================
   HERO
======================================== */

.hero {
    min-height: 420px;
    padding: 85px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background:
        radial-gradient(circle at 15% 20%, rgba(255,255,255,0.65), transparent 25%),
        radial-gradient(circle at 85% 80%, rgba(255,255,255,0.4), transparent 25%),
        linear-gradient(135deg, #6558ed, #8174f5 55%, #a18bff);
    color: white;
}

.hero-contenido {
    max-width: 760px;
}

.etiqueta-hero {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
    padding: 8px 14px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    margin-bottom: 22px;
}

.hero h1 {
    font-size: clamp(38px, 6vw, 65px);
    line-height: 1.12;
    letter-spacing: -2.5px;
    font-weight: 900;
    margin-bottom: 22px;
}

.hero h1 span {
    color: #e2ddff;
}

.hero p {
    max-width: 570px;
    margin: 0 auto 30px;
    color: rgba(255, 255, 255, 0.88);
    font-size: 16px;
}

.boton-hero {
    display: inline-block;
    background: white;
    color: var(--principal);
    padding: 14px 25px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.boton-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}


/* ========================================
   SECCIÓN DE HERRAMIENTAS
======================================== */

.seccion-herramientas {
    padding: 85px 0 100px;
}

.titulo-seccion {
    text-align: center;
    margin-bottom: 35px;
}

.etiqueta {
    color: var(--principal);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 2px;
}

.titulo-seccion h2,
.sobre h2 {
    font-size: clamp(29px, 4vw, 40px);
    letter-spacing: -1.5px;
    margin: 9px 0;
    font-weight: 900;
}

.titulo-seccion p {
    color: var(--gris);
    font-size: 15px;
}


/* ========================================
   BUSCADOR
======================================== */

.buscador-contenedor {
    max-width: 620px;
    margin: 0 auto 25px;
    position: relative;
}

.icono-buscador {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 26px;
    color: var(--gris);
    pointer-events: none;
}

.buscador-contenedor input {
    width: 100%;
    height: 56px;
    padding: 0 20px 0 52px;
    border: 1px solid var(--borde);
    border-radius: 13px;
    background: white;
    outline: none;
    font-size: 14px;
    box-shadow: var(--sombra);
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.buscador-contenedor input:focus {
    border-color: var(--principal);
    box-shadow: 0 0 0 4px rgba(97, 87, 232, 0.1);
}

.buscador-contenedor input::placeholder {
    color: #a0a2b0;
}


/* ========================================
   FILTROS DE CATEGORÍAS
======================================== */

.categorias {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 9px;
    margin-bottom: 20px;
}

.categoria {
    border: 1px solid var(--borde);
    background: white;
    color: var(--gris);
    padding: 9px 16px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    transition: all 0.2s ease;
}

.categoria:hover {
    border-color: var(--principal);
    color: var(--principal);
}

.categoria.activa {
    background: var(--principal);
    border-color: var(--principal);
    color: white;
}

.resultados-herramientas {
    color: var(--gris);
    font-size: 12px;
    margin: 0 0 20px;
    text-align: right;
}


/* ========================================
   GRID DE TARJETAS
======================================== */

.herramientas-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.tool-card {
    background: var(--blanco);
    border: 1px solid var(--borde);
    border-radius: 17px;
    padding: 25px;
    box-shadow: var(--sombra);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 35px rgba(25, 25, 60, 0.1);
}

.tool-icon {
    width: 47px;
    height: 47px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: var(--principal-claro);
    color: var(--principal);
    font-size: 23px;
    font-weight: 900;
    margin-bottom: 17px;
}

.tool-categoria {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.4px;
    color: var(--principal);
    margin-bottom: 5px;
}

.tool-card h3 {
    font-size: 19px;
    line-height: 1.3;
    letter-spacing: -0.4px;
    margin-bottom: 9px;
}

.tool-card p {
    color: var(--gris);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 17px;
}


/* ========================================
   CAMPOS DE FORMULARIO
======================================== */

.tool-card label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #55596d;
    margin: 10px 0 6px;
}

.tool-card input:not([type="checkbox"]):not([type="range"]):not([type="file"]),
.tool-card select,
.tool-card textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid var(--borde);
    background: #fbfbfd;
    border-radius: 9px;
    padding: 11px 12px;
    outline: none;
    color: var(--oscuro);
    font-size: 13px;
    transition: border 0.2s ease, box-shadow 0.2s ease;
}

.tool-card input:focus,
.tool-card select:focus,
.tool-card textarea:focus {
    border-color: var(--principal);
    box-shadow: 0 0 0 3px rgba(97, 87, 232, 0.09);
}

.tool-card textarea {
    resize: vertical;
    min-height: 90px;
    line-height: 1.5;
}

.tool-card input[type="file"] {
    width: 100%;
    max-width: 100%;
    border: 1px dashed #c9c8df;
    background: #fbfbfd;
    border-radius: 9px;
    padding: 10px;
    font-size: 12px;
    color: var(--gris);
}

.tool-card input[type="file"]::file-selector-button {
    border: none;
    background: var(--principal-claro);
    color: var(--principal);
    padding: 7px 10px;
    border-radius: 6px;
    margin-right: 9px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}

.tool-card input[type="range"] {
    width: 100%;
    accent-color: var(--principal);
    margin: 10px 0;
}

.tool-card input[type="checkbox"] {
    accent-color: var(--principal);
    width: 15px;
    height: 15px;
    cursor: pointer;
}


/* ========================================
   BOTONES
======================================== */

.boton-principal,
.boton-secundario {
    width: 100%;
    border: none;
    border-radius: 9px;
    padding: 12px 15px;
    font-size: 13px;
    font-weight: 800;
    margin-top: 16px;
    transition: all 0.2s ease;
}

.boton-principal {
    background: var(--principal);
    color: white;
}

.boton-principal:hover {
    background: var(--principal-oscuro);
    transform: translateY(-1px);
}

.boton-secundario {
    background: var(--principal-claro);
    color: var(--principal);
    border: 1px solid #e0defe;
}

.boton-secundario:hover {
    background: #e3e1ff;
}


/* ========================================
   RESULTADOS
======================================== */

.resultado {
    background: #f7f7ff;
    border: 1px solid #e9e7ff;
    border-radius: 9px;
    padding: 12px;
    margin-top: 13px;
    font-size: 13px;
    color: var(--oscuro);
    overflow-wrap: anywhere;
}

.resultado:empty {
    display: none;
}

.resultado strong {
    color: var(--principal);
}

.texto-ayuda {
    font-size: 11px !important;
    margin: 8px 0 0 !important;
    color: #9294a3 !important;
}

.resultado-password {
    margin-top: 14px;
    padding: 13px;
    background: #f7f7ff;
    border: 1px dashed #c9c5ff;
    border-radius: 9px;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
    color: var(--principal);
    overflow-wrap: anywhere;
}


/* ========================================
   ESTADÍSTICAS DEL CONTADOR
======================================== */

.estadisticas {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-top: 14px;
}

.estadistica {
    background: #f8f8fc;
    border: 1px solid var(--borde);
    border-radius: 9px;
    padding: 12px 8px;
    text-align: center;
}

.estadistica strong {
    display: block;
    font-size: 22px;
    color: var(--principal);
    line-height: 1.3;
}

.estadistica span {
    color: var(--gris);
    font-size: 10px;
}


/* ========================================
   OPCIONES Y CAMPOS DOBLES
======================================== */

.opciones-herramienta {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.tool-card .opcion {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    color: var(--gris);
    font-size: 12px;
    font-weight: 500;
}

.campos-dobles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.campos-dobles > div {
    min-width: 0;
}


/* ========================================
   VISTAS PREVIAS DE IMÁGENES
======================================== */

.vista-previa {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 0;
}

.vista-previa img {
    display: block;
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 9px;
    border: 1px solid var(--borde);
}

.resultado-qr {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
    margin-top: 14px;
    min-height: 0;
}

.resultado-qr:empty {
    display: none;
}

.resultado-qr img,
.resultado-qr canvas {
    max-width: 100%;
    height: auto;
}


/* ========================================
   SOBRE TOOLBOX
======================================== */

.sobre {
    background: white;
    padding: 75px 0;
    border-top: 1px solid var(--borde);
}

.sobre-contenido {
    max-width: 750px;
    text-align: center;
}

.sobre h2 {
    margin-top: 10px;
    margin-bottom: 18px;
}

.sobre p {
    color: var(--gris);
    font-size: 14px;
    margin: 12px auto;
    max-width: 680px;
}


/* ========================================
   PIE DE PÁGINA
======================================== */

.footer {
    background: #171a2b;
    color: white;
    padding: 45px 0 25px;
}

.footer-contenido {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.logo-footer {
    color: white;
}

.footer-marca p {
    color: #a7a9b8;
    font-size: 12px;
    margin-top: 5px;
}

.footer-enlaces {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 22px;
    margin: 27px 0;
}

.footer-enlaces a {
    color: #c3c4d0;
    font-size: 12px;
    transition: color 0.2s ease;
}

.footer-enlaces a:hover {
    color: white;
}

.copyright {
    width: 100%;
    border-top: 1px solid #303346;
    padding-top: 20px;
    color: #85889c;
    font-size: 11px;
}


/* ========================================
   ACCESIBILIDAD Y ESTADOS
======================================== */

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(97, 87, 232, 0.35);
    outline-offset: 3px;
}

.tool-card[hidden] {
    display: none !important;
}


/* ========================================
   TABLETS
======================================== */

@media (max-width: 950px) {

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

    .hero {
        min-height: 380px;
    }

}


/* ========================================
   MÓVILES
======================================== */

@media (max-width: 600px) {

    .header {
        height: 65px;
    }

    .logo {
        font-size: 22px;
    }

    .navegacion {
        gap: 15px;
    }

    .navegacion a {
        font-size: 11px;
    }

    .hero {
        min-height: 360px;
        padding: 65px 20px;
    }

    .hero h1 {
        font-size: 39px;
        letter-spacing: -1.7px;
    }

    .hero p {
        font-size: 14px;
    }

    .seccion-herramientas {
        padding: 60px 0 70px;
    }

    .titulo-seccion h2,
    .sobre h2 {
        font-size: 30px;
    }

    .titulo-seccion p {
        font-size: 13px;
    }

    .herramientas-grid {
        grid-template-columns: 1fr;
        gap: 17px;
    }

    .tool-card {
        padding: 21px;
    }

    .categorias {
        gap: 7px;
    }

    .categoria {
        padding: 8px 12px;
        font-size: 11px;
    }

    .resultados-herramientas {
        text-align: center;
    }

    .footer-enlaces {
        gap: 14px;
    }

    .sobre {
        padding: 60px 0;
    }

}


/* ========================================
   MÓVILES PEQUEÑOS
======================================== */

@media (max-width: 360px) {

    .contenedor {
        width: 92%;
    }

    .navegacion {
        gap: 10px;
    }

    .navegacion a {
        font-size: 10px;
    }

    .hero h1 {
        font-size: 33px;
    }

    .tool-card {
        padding: 17px;
    }

}

/* ==========================================
   SELECTOR DE IDIOMA
========================================== */

.selector-idioma {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 18px;
}

.boton-idioma {
    border: 1px solid #e1e3ed;
    background: transparent;
    color: #555b70;
    padding: 7px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.boton-idioma:hover {
    border-color: #7657e8;
    color: #7657e8;
}

.boton-idioma.activa {
    background: #7657e8;
    border-color: #7657e8;
    color: #ffffff;
}

/* Adaptación a móviles */
@media (max-width: 600px) {
    .selector-idioma {
        margin-left: 0;
        margin-top: 10px;
    }
}
