/* ===================================================
   tools.css — Premium Design System for /eszkozok/
   Centralized styles for all tool pages.
   =================================================== */

/* ── Decorative Hero Background ── */
.hero {
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f0fe 40%, #f5f0ff 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -120px;
    right: -80px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 109, 255, 0.07) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -60px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 145, 255, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

/* ── Tools Hub Grid Cards ── */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
    margin: 3rem 0;
}

.tool-card {
    background: #ffffff;
    padding: 2.5rem 2rem;
    border-radius: 30px;
    border: 2px solid rgb(101 146 205 / 80%);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
}

.tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tool-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 28px rgba(0, 109, 255, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 109, 255, 0.25);
}

.tool-card:hover::before {
    opacity: 1;
}

.tool-icon {
    font-size: 2.75rem;
    margin-bottom: 1.25rem;
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, #e8f2ff 0%, #dce8ff 100%);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s ease;
    box-shadow: 0 3px 10px rgba(0, 109, 255, 0.08);
}

.tool-card:hover .tool-icon {
    transform: scale(1.08) rotate(-2deg);
    box-shadow: 0 6px 16px rgba(0, 109, 255, 0.15);
}

.tool-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.75rem;
    color: var(--secondary);
    font-weight: 700;
}

.tool-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    line-height: 1.55;
}

.btn-tool {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #0091FF 100%);
    color: #fff;
    border: none;
    padding: 0.85rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(0, 109, 255, 0.2);
}

.tool-card:hover .btn-tool {
    box-shadow: 0 5px 16px rgba(0, 109, 255, 0.3);
    transform: translateY(-1px);
}

/* ── Main Tool Container (used by all individual tool pages) ── */
.counter-container,
.tool-container {
    background: #ffffff;
    border-radius: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02);
    padding: 2.5rem;
    margin-bottom: 3rem;
    border: 2px solid rgb(101 146 205 / 80%);
    position: relative;
}

.counter-container::before,
.tool-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: 30px 30px 0 0;
}

/* ── Textarea Input ── */
.counter-textarea,
.text-area,
.font-input {
    width: 100%;
    padding: 1.5rem;
    border: 2px solid #cbd5e1;
    border-radius: 14px;
    font-size: 1.1rem;
    font-family: inherit;
    resize: vertical;
    outline: none;
    transition: all 0.25s ease;
    background: #fafbfd;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.02);
}

.counter-textarea:focus,
.text-area:focus,
.font-input:focus {
    border-color: var(--primary);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 109, 255, 0.08), inset 0 2px 4px rgba(0, 0, 0, 0.01);
}

.counter-textarea::placeholder,
.text-area::placeholder,
.font-input::placeholder {
    color: #94a3b8;
}

/* ── Stat Cards (Counter pages) ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: linear-gradient(145deg, #f8fafd 0%, #f0f4fa 100%);
    padding: 1.5rem 1rem;
    border-radius: 14px;
    text-align: center;
    border: 1.5px solid #cbd5e1;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover {
    border-color: rgba(0, 109, 255, 0.2);
    box-shadow: 0 4px 14px rgba(0, 109, 255, 0.08);
    transform: translateY(-2px);
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.82rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── Stats Mini (Case converter, Space remover) ── */
.stats-mini {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 1.25rem;
    color: var(--text-light);
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(145deg, #f8fafd 0%, #f0f4fa 100%);
    border-radius: 12px;
    border: 1px solid #e8ecf2;
}

/* ── Buttons ── */
.actions,
.btn-group {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-group {
    width: 100%;
    margin-bottom: 1rem;
}

.counter-container .btn,
.tool-container .btn {
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.25s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.counter-container .btn-primary,
.tool-container .btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, #0091FF 100%);
    box-shadow: 0 3px 10px rgba(0, 109, 255, 0.2);
}

.counter-container .btn-primary:hover,
.tool-container .btn-primary:hover {
    box-shadow: 0 5px 16px rgba(0, 109, 255, 0.3);
    transform: translateY(-1px);
}

.counter-container .btn-secondary,
.tool-container .btn-secondary {
    border: 1.5px solid #cbd5e1;
    background: #fff;
}

.counter-container .btn-secondary:hover,
.tool-container .btn-secondary:hover {
    background: #f8fafc;
    border-color: var(--primary);
    color: var(--primary);
}

/* ── Options Grid (Strikethrough, Converters) ── */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-bottom: 2rem;
    background: linear-gradient(145deg, #f8fafd 0%, #f0f4fa 100%);
    padding: 1.5rem;
    border-radius: 14px;
    border: 1.5px solid #cbd5e1;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.625rem 0.75rem;
    border-radius: 10px;
    transition: all 0.2s ease;
    border: 1.5px solid transparent;
}

.option-item:hover {
    background: #fff;
    border-color: rgba(0, 109, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 109, 255, 0.05);
}

.option-item input[type="radio"] {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
    accent-color: var(--primary);
}

.option-label {
    font-size: 0.95rem;
    color: var(--secondary);
    font-weight: 500;
}

/* ── Result Area (Strikethrough, Converters) ── */
.result-area {
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(145deg, #f8fafd 0%, #f2f5fa 100%);
    border: 2px solid #cbd5e1;
    border-radius: 14px;
    font-size: 1.25rem;
    min-height: 120px;
    word-break: break-all;
    margin-bottom: 1rem;
    color: var(--secondary);
    transition: border-color 0.2s;
}

/* ── Font Cards (Font Converter) ── */
.fonts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.font-card {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 14px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.font-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 109, 255, 0.1);
    border-color: rgba(0, 109, 255, 0.2);
}

.font-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.font-name {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-light);
    font-weight: 700;
}

.copy-btn {
    background: linear-gradient(145deg, #f0f4fa 0%, #e8ecf4 100%);
    border: 1.5px solid #cbd5e1;
    padding: 0.5rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary);
}

.copy-btn:hover {
    background: linear-gradient(135deg, var(--primary) 0%, #0091FF 100%);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 3px 10px rgba(0, 109, 255, 0.25);
}

.font-preview {
    font-size: 1.35rem;
    word-break: break-all;
    min-height: 2rem;
    color: var(--secondary);
    padding: 0.75rem;
    background: #fafbfd;
    border-radius: 10px;
    border: 1px solid #f0f2f6;
}

/* ── FAQ Section ── */
.faq-section {
    margin-top: 3rem;
}

.faq-section h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Also target h2 that acts as FAQ heading inside prose */
.prose h2+.faq-item {
    margin-top: 1.25rem;
}

.faq-item {
    margin-bottom: 1rem;
    background: #ffffff;
    padding: 1.25rem 1.5rem;
    border-radius: 12px;
    border: 1.5px solid #cbd5e1;
    border-left: 4px solid var(--primary);
    transition: all 0.25s ease;
}

.faq-item:hover {
    border-left-color: var(--accent);
    box-shadow: 0 4px 14px rgba(0, 109, 255, 0.06);
    transform: translateX(2px);
}

/* Critical: Reset inherited .prose margins inside FAQ items */
.faq-item h3,
.prose .faq-item h3 {
    font-size: 1.05rem;
    margin: 0 0 0.5rem 0;
    padding: 0;
    color: var(--secondary);
    font-weight: 700;
    line-height: 1.4;
}

.faq-item p,
.prose .faq-item p {
    margin: 0;
    color: var(--text-main);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ── Related Tools Section ── */
.related-tools-section {
    margin-top: 5rem;
    margin-bottom: 5rem;
    padding-top: 3rem;
    border-top: 2px solid #cbd5e1;
}

.related-tools-section h2 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: 0.5rem;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.related-tool-card {
    background: #ffffff;
    padding: 1.75rem;
    border-radius: 30px;
    border: 2px solid rgb(101 146 205 / 80%);
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.related-tool-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.related-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 109, 255, 0.1);
    border-color: rgba(0, 109, 255, 0.2);
}

.related-tool-card:hover::before {
    opacity: 1;
}

.related-tool-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #e8f2ff 0%, #dce8ff 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 8px rgba(0, 109, 255, 0.06);
    transition: all 0.3s ease;
}

.related-tool-card:hover .related-tool-icon {
    transform: scale(1.05);
}

.related-tool-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--secondary);
    font-weight: 700;
}

.related-tool-card p {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

/* ── Copy Feedback Animation ── */
.copy-feedback {
    position: absolute;
    top: -40px;
    right: 0;
    background: linear-gradient(135deg, var(--primary), #0091FF);
    color: #fff;
    padding: 0.5rem 1.25rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    transform: translateY(10px);
    pointer-events: none;
    box-shadow: 0 3px 10px rgba(0, 109, 255, 0.25);
}

.copy-feedback.show {
    opacity: 1;
    transform: translateY(0);
}

/* Font card specific overlay feedback */
.font-card .copy-feedback {
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 109, 255, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    transform: none;
    font-size: 1rem;
}

.font-card.copied .copy-feedback {
    opacity: 1;
}

/* ── Input Groups (Labels) ── */
.input-group label,
.input-wrapper label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--secondary);
    font-size: 1.05rem;
}

/* ── Copy Button Wrapper ── */
.copy-button-wrapper {
    display: flex;
    justify-content: flex-end;
}

/* ── Page Content Section (below tool) ── */
.page-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    margin: 3rem auto;
    border: 1.5px solid #e8ecf2;
}

/* ── Mobile Responsive ── */
@media (max-width: 640px) {

    .counter-container,
    .tool-container {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .counter-textarea,
    .text-area,
    .font-input {
        padding: 1.25rem;
        font-size: 1rem;
    }

    .stat-card {
        padding: 1.25rem 0.75rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    .options-grid {
        grid-template-columns: 1fr 1fr;
    }

    .fonts-grid {
        grid-template-columns: 1fr;
    }

    .tools-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .tool-card {
        padding: 2rem 1.5rem;
    }

    .font-preview {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {

    .counter-container,
    .tool-container {
        padding: 1.25rem;
    }

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

    .stats-mini {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }
}