/* =============================================
   FREE TOOLS — CSS
   ============================================= */

/* Tool Page Hero */
.ft-hero {
    padding: 3rem 1.5rem 2rem;
    background: linear-gradient(180deg, #f8fafc 0%, #ffffff 100%);
    text-align: center;
}

.ft-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.25rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1.5px solid currentColor;
    margin-bottom: 1.25rem;
    opacity: 0.9;
}

.ft-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.ft-hero p.lead {
    font-size: 1.15rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.ft-trust-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.5rem;
    font-size: 0.9rem;
    color: #475569;
}

.ft-trust-badges span .check {
    color: #10b981;
    font-weight: 700;
    margin-right: 0.3rem;
}

/* =============================================
   CALCULATOR CARD
   ============================================= */
.ft-tool-card {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 20px 40px -12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    max-width: 780px;
    margin: 0 auto 3rem;
}

.ft-tool-card label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.ft-input {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-family: inherit;
    color: #1e293b;
    background: #f8fafc;
}

.ft-input:focus {
    border-color: var(--ft-accent, #10b981);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ft-accent, #10b981) 15%, transparent);
    background: white;
}

.ft-select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    outline: none;
    background: #f8fafc;
    color: #1e293b;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s;
}

.ft-select:focus {
    border-color: var(--ft-accent, #10b981);
    background: white;
}

.ft-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.ft-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 600px) {

    .ft-grid-2,
    .ft-grid-3 {
        grid-template-columns: 1fr;
    }
}

.ft-btn-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.ft-mode-btn {
    flex: 1;
    min-width: 120px;
    padding: 0.65rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: white;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.ft-mode-btn.active,
.ft-mode-btn:hover {
    border-color: var(--ft-accent, #10b981);
    color: var(--ft-accent, #10b981);
    background: color-mix(in srgb, var(--ft-accent, #10b981) 8%, white);
}

/* Results Panel */
.ft-result-panel {
    background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
    border: 1.5px solid #a7f3d0;
    border-radius: 14px;
    padding: 1.75rem;
    margin-top: 1.5rem;
}

.ft-result-panel.blue {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border-color: #93c5fd;
}

.ft-result-panel.amber {
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-color: #fcd34d;
}

.ft-result-panel.purple {
    background: linear-gradient(135deg, #faf5ff, #ede9fe);
    border-color: #c4b5fd;
}

.ft-result-panel.cyan {
    background: linear-gradient(135deg, #ecfeff, #cffafe);
    border-color: #67e8f9;
}

.ft-result-panel.red {
    background: linear-gradient(135deg, #fff5f5, #fee2e2);
    border-color: #fca5a5;
}

.ft-result-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.95rem;
    color: #374151;
}

.ft-result-row:last-child {
    border-bottom: none;
    padding-top: 1rem;
    margin-top: 0.5rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
}

.ft-result-label {
    color: #64748b;
    font-weight: 500;
}

.ft-result-value {
    font-weight: 700;
    font-family: 'Inter', monospace;
}

.ft-result-value.highlight {
    color: var(--ft-accent, #10b981);
    font-size: 1.5rem;
}

/* =============================================
   HUB PAGE — TOOLS GRID
   ============================================= */
.ft-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.75rem;
    margin-top: 3rem;
    margin-bottom: 5rem;
}

.ft-card {
    background: white;
    border-radius: 18px;
    padding: 2.25rem 2rem;
    text-align: center;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 24px 48px -12px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.ft-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--ft-card-accent, #10b981);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    transform-origin: left;
}

.ft-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px -4px rgba(0, 0, 0, 0.1), 0 32px 64px -12px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.ft-card:hover::before {
    transform: scaleX(1);
}

.ft-card-icon {
    font-size: 2.75rem;
    margin: 0 auto 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 75px;
    height: 75px;
    border-radius: 18px;
    background: color-mix(in srgb, var(--ft-card-accent, #10b981) 10%, white);
}

.ft-card-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.ft-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: #1e293b;
}

.ft-card-desc {
    color: #64748b;
    line-height: 1.65;
    margin-bottom: 1.75rem;
    flex-grow: 1;
    font-size: 0.95rem;
}

.ft-card-btn {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    background: var(--ft-card-accent, #10b981);
    color: white;
    transition: opacity 0.2s, transform 0.2s;
    margin-top: auto;
}

.ft-card:hover .ft-card-btn {
    opacity: 0.9;
    transform: scale(1.04);
}

/* =============================================
   HOW IT WORKS
   ============================================= */
.ft-how-it-works {
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    padding: 3.5rem 1.5rem;
    margin-bottom: 2rem;
}

.ft-how-it-works h2 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.ft-how-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 2rem;
}

.ft-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.ft-step-card {
    text-align: center;
    padding: 1.75rem 1.25rem;
    background: white;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
}

.ft-step-num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ft-accent, #10b981);
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.ft-step-card h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.ft-step-card p {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.6;
}

/* =============================================
   FAQ
   ============================================= */
.ft-faq-section {
    max-width: 780px;
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

.ft-faq-section h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: #0f172a;
    text-align: center;
    margin-bottom: 0.5rem;
}

.ft-faq-subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 2rem;
}

.ft-faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    background: white;
}

.ft-faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.ft-faq-question:hover {
    background: #f8fafc;
}

.ft-faq-question h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.ft-faq-icon {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #64748b;
    flex-shrink: 0;
    transition: transform 0.25s, background 0.2s;
}

.ft-faq-item.open .ft-faq-icon {
    transform: rotate(45deg);
    background: var(--ft-accent, #10b981);
    color: white;
}

.ft-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.ft-faq-item.open .ft-faq-answer {
    max-height: 300px;
}

.ft-faq-answer p {
    padding: 0 1.5rem 1.25rem;
    color: #475569;
    line-height: 1.7;
    font-size: 0.95rem;
    margin: 0;
}

/* =============================================
   CTA SECTION
   ============================================= */
.ft-cta-section {
    max-width: 900px;
    margin: 0 auto 4rem;
    border-radius: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 3rem 2rem;
    text-align: center;
    color: white;
}

.ft-cta-section h2 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.ft-cta-section p {
    font-size: 1rem;
    opacity: 0.85;
    margin-bottom: 1.75rem;
}

.ft-cta-btn {
    display: inline-block;
    padding: 0.9rem 2.25rem;
    background: white;
    color: #667eea;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 999px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.ft-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* =============================================
   RECEIPT / QUOTATION GENERATOR FORM
   ============================================= */
.ft-doc-paper {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 2rem;
    max-width: 780px;
    margin: 0 auto 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 20px 40px -12px rgba(0, 0, 0, 0.08);
}

.ft-doc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;
}

.ft-doc-title {
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    color: var(--ft-accent, #10b981);
}

.ft-doc-meta {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    text-align: right;
}

.ft-doc-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-end;
    font-size: 0.875rem;
    color: #64748b;
}

.ft-doc-meta-row input {
    width: 150px;
    text-align: right;
}

.ft-client-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
    .ft-client-grid {
        grid-template-columns: 1fr;
    }

    .ft-doc-header {
        flex-direction: column;
    }

    .ft-doc-meta {
        text-align: left;
    }

    .ft-doc-meta-row {
        justify-content: flex-start;
    }

    .ft-doc-meta-row input {
        text-align: left;
    }
}

.ft-client-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.08em;
    margin-bottom: 0.6rem;
}

.ft-doc-input {
    width: 100%;
    border: none;
    border-bottom: 1px dashed #cbd5e0;
    background: transparent;
    padding: 0.35rem 0.25rem;
    font-size: 0.9rem;
    color: #1e293b;
    outline: none;
    font-family: inherit;
    margin-bottom: 0.25rem;
    transition: border-color 0.2s;
}

.ft-doc-input:focus {
    border-bottom-color: var(--ft-accent, #10b981);
}

.ft-items-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.ft-items-table th {
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.08em;
    padding: 0.5rem 0.5rem;
    border-bottom: 1.5px solid #e2e8f0;
    text-align: left;
}

.ft-items-table th:last-child,
.ft-items-table td:last-child {
    text-align: right;
}

.ft-items-table th:nth-child(2),
.ft-items-table td:nth-child(2) {
    text-align: center;
}

.ft-items-table th:nth-child(3),
.ft-items-table td:nth-child(3) {
    text-align: right;
}

.ft-items-table td {
    padding: 0.4rem 0.5rem;
    vertical-align: middle;
}

.ft-items-table tr:last-child td {
    border-bottom: 1px solid #f1f5f9;
}

.ft-add-row-btn {
    background: none;
    border: 1.5px dashed #cbd5e0;
    border-radius: 8px;
    padding: 0.5rem 1rem;
    width: 100%;
    color: #94a3b8;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    margin-bottom: 1.5rem;
}

.ft-add-row-btn:hover {
    border-color: var(--ft-accent, #10b981);
    color: var(--ft-accent, #10b981);
    background: color-mix(in srgb, var(--ft-accent, #10b981) 5%, white);
}

.ft-delete-row {
    background: none;
    border: none;
    cursor: pointer;
    color: #fca5a5;
    font-size: 1rem;
    padding: 0.25rem;
    border-radius: 4px;
    transition: color 0.2s;
}

.ft-delete-row:hover {
    color: #ef4444;
}

.ft-doc-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1.5px solid #e2e8f0;
}

.ft-total-row {
    display: flex;
    gap: 2rem;
    font-size: 0.9rem;
    color: #64748b;
}

.ft-total-row.grand {
    font-size: 1.2rem;
    font-weight: 800;
    color: #0f172a;
    margin-top: 0.5rem;
}

.ft-total-val {
    min-width: 100px;
    text-align: right;
    font-weight: 600;
    color: #1e293b;
}

.ft-total-row.grand .ft-total-val {
    color: var(--ft-accent, #10b981);
}

.ft-doc-actions {
    display: flex;
    gap: 1rem;
    max-width: 780px;
    margin: 0 auto 3rem;
    flex-wrap: wrap;
}

.ft-doc-actions button {
    flex: 1;
    min-width: 160px;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.ft-btn-primary {
    background: var(--ft-accent, #10b981);
    color: white;
    border-color: var(--ft-accent, #10b981);
}

.ft-btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.ft-btn-secondary {
    background: white;
    color: var(--ft-accent, #10b981);
    border-color: var(--ft-accent, #10b981);
}

.ft-btn-secondary:hover {
    background: color-mix(in srgb, var(--ft-accent, #10b981) 8%, white);
}

/* Currency rate display */
.ft-rate-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.ft-swap-btn {
    background: white;
    border: 1.5px solid #e2e8f0;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
    align-self: flex-end;
    margin-bottom: 0.25rem;
    flex-shrink: 0;
}

.ft-swap-btn:hover {
    background: var(--ft-accent, #3b82f6);
    color: white;
    border-color: var(--ft-accent, #3b82f6);
    transform: rotate(180deg);
}

.ft-currency-row {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
}

/* Utility */
.container {
    max-width: 1200px;
    margin: 0 auto;
}

.text-center {
    text-align: center;
}