/* Herramientas gratuitas (/herramientas/*). Mismo lenguaje visual que blog.css. */

.tool-breadcrumb {
    font-size: 0.85rem;
    margin-bottom: 0.6rem;
    opacity: 0.85;
}

.tool-breadcrumb a {
    color: inherit;
    text-decoration: underline;
}

.tool-section {
    background: var(--white);
}

.tool-section > .wrapper {
    width: var(--container-width);
    max-width: 1180px;
    margin: 0 auto;
    padding: 2.5rem 0;
}

.tool-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.tool-card {
    padding: 1.6rem;
    border: 1px solid var(--landing-line, rgba(42, 24, 124, 0.14));
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 10px 28px rgba(23, 19, 47, 0.06);
}

.tool-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tool-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-size: 0.92rem;
    font-weight: var(--bold);
    color: var(--color-1);
}

.tool-form input[type="text"],
.tool-form input[type="url"],
.tool-form select {
    width: 100%;
    padding: 0.75rem 0.85rem;
    font: inherit;
    font-weight: 400;
    font-size: 1rem;
    border: 1px solid var(--landing-line, rgba(42, 24, 124, 0.24));
    border-radius: calc(var(--radius) * 0.6);
    background: var(--white);
    color: var(--color-1);
}

.tool-form input:focus,
.tool-form select:focus {
    outline: 2px solid var(--color-2);
    outline-offset: 1px;
}

.tool-radio {
    border: 0;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.2rem;
}

.tool-radio legend {
    font-size: 0.92rem;
    font-weight: var(--bold);
    color: var(--color-1);
    margin-bottom: 0.4rem;
}

.tool-form .tool-radio label {
    flex-direction: row;
    align-items: center;
    font-weight: 400;
}

.tool-more summary,
.tool-faq summary {
    cursor: pointer;
    font-weight: var(--bold);
    color: var(--color-1);
}

.tool-more[open] {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.8rem;
}

.tool-presets {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
}

.tool-presets button {
    padding: 0.4rem 0.8rem;
    font: inherit;
    border: 1px solid var(--color-2);
    border-radius: 999px;
    background: transparent;
    color: var(--color-1);
    cursor: pointer;
}

.tool-form .btn {
    align-self: flex-start;
    border: 0;
    cursor: pointer;
}

.tool-note {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.55;
    color: rgba(23, 19, 47, 0.7);
}

.tool-result {
    margin-top: 1.4rem;
    padding-top: 1.4rem;
    border-top: 1px solid var(--landing-line, rgba(42, 24, 124, 0.14));
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.tool-result canvas {
    width: 100%;
    max-width: 320px;
    height: auto;
    border: 1px solid var(--landing-line, rgba(42, 24, 124, 0.14));
}

.tool-big {
    margin: 0;
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: var(--bold);
    color: var(--color-1);
}

.tool-error {
    margin: 0;
    color: #b42318;
    font-weight: var(--bold);
}

.tool-rows {
    margin: 0;
    display: flex;
    flex-direction: column;
}

.tool-rows > div {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.55rem 0;
    border-bottom: 1px dashed var(--landing-line, rgba(42, 24, 124, 0.14));
}

.tool-rows dt,
.tool-rows dd {
    margin: 0;
}

.tool-rows dd {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.tool-rows .is-strong {
    font-weight: var(--bold);
    font-size: 1.1rem;
    color: var(--color-1);
    border-bottom: 0;
}

.tool-cta {
    position: sticky;
    top: 6rem;
    padding: 1.8rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    border-radius: calc(var(--radius) * 1.2);
    background:
        radial-gradient(circle at 85% 15%, rgba(126, 104, 255, 0.22), transparent 32%),
        var(--color-1);
    color: var(--white);
}

.tool-cta h2 {
    margin: 0;
    font-size: 1.35rem;
    line-height: 1.25;
}

.tool-cta p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
}

.tool-cta .btn {
    align-self: flex-start;
}

.tool-content {
    max-width: 900px !important;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tool-content h2 {
    margin: 1rem 0 0;
    color: var(--color-1);
    font-size: clamp(1.25rem, 3vw, 1.6rem);
}

.tool-table-wrap {
    overflow-x: auto;
}

.tool-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
}

.tool-table th,
.tool-table td {
    padding: 0.55rem 0.6rem;
    text-align: right;
    white-space: nowrap;
    border-bottom: 1px solid var(--landing-line, rgba(42, 24, 124, 0.14));
}

.tool-table th:first-child,
.tool-table td:first-child {
    text-align: left;
}

.tool-table thead th {
    color: var(--color-1);
    background: var(--landing-paper, #f7f5ef);
}

.tool-faq {
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--landing-line, rgba(42, 24, 124, 0.14));
}

.tool-faq p {
    margin: 0.6rem 0 0;
    line-height: 1.6;
}

.tool-links {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.tool-links a {
    color: var(--color-1);
    text-decoration: underline;
}

@media (max-width: 860px) {
    .tool-layout {
        grid-template-columns: 1fr;
    }

    .tool-cta {
        position: static;
    }

    .tool-card {
        padding: 1.2rem;
    }
}

/* Los estilos globales ponen display:flex en .wrapper y solo estilan .btn por contexto. */
.tool-page .tool-section > .wrapper.tool-layout {
    display: grid;
}

.tool-page .tool-section > .wrapper.tool-content {
    display: flex;
}

.tool-page .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-weight: var(--bold);
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    background: var(--color-2);
    color: var(--white);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tool-page .btn:hover,
.tool-page .btn:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(42, 24, 124, 0.25);
}

.tool-page .tool-cta .btn {
    background: var(--white);
    color: var(--color-1);
}

.tool-page .btn .btn-desc,
.tool-page .btn i {
    color: inherit;
}

@media (max-width: 860px) {
    .tool-page .tool-section > .wrapper.tool-layout {
        grid-template-columns: 1fr;
    }
}
