/* =========================================
   HARTI TOOLS
   CURRENCY CONVERTER
   ========================================= */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #111827;
    background: #f4f7fb;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}


/* =========================================
   CONTAINER
   ========================================= */

.container {
    width: min(1100px, calc(100% - 40px));
    margin: 0 auto;
}


/* =========================================
   HEADER
   ========================================= */

.site-header {
    background: #121c2d;
    color: #ffffff;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.back-link {
    color: #ffffff !important;
    text-decoration: none !important;
}

.brand {
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.back-link {
    font-size: 14px;
    font-weight: 600;
}

.brand:hover,
.back-link:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}


/* =========================================
   HERO
   ========================================= */

.hero {
    padding: 76px 0 64px;
    background: #ffffff;
    border-bottom: 1px solid #e5eaf1;
}

.eyebrow,
.section-label,
.result-label {
    display: block;
    margin-bottom: 12px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;
    max-width: 760px;
    color: #121c2d;
    font-size: clamp(38px, 6vw, 64px);
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.hero-text {
    max-width: 700px;
    margin: 22px 0 0;
    color: #526174;
    font-size: 20px;
    line-height: 1.65;
}


/* =========================================
   CALCULATOR SECTION
   ========================================= */

.calculator-section {
    padding: 56px 0;
}

.calculator-card {
    max-width: 820px;
    margin: 0 auto;
    padding: 36px;
    background: #ffffff;
    border: 1px solid #dfe5ee;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.calculator-header {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 30px;
}

.tool-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border-radius: 14px;
    font-size: 25px;
}

.calculator-header h2 {
    margin: 0 0 6px;
    color: #121c2d;
    font-size: 26px;
    line-height: 1.2;
}

.calculator-header p {
    margin: 0;
    color: #64748b;
}


/* =========================================
   FORM
   ========================================= */

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #263244;
    font-size: 14px;
    font-weight: 700;
}

.form-group input,
.form-group select {
    width: 100%;
    min-height: 52px;
    padding: 12px 14px;
    color: #111827;
    background: #ffffff;
    border: 1px solid #cfd7e3;
    border-radius: 10px;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #64748b;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.12);
}

.currency-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr);
    align-items: end;
    gap: 16px;
}

.currency-row .form-group {
    margin-bottom: 22px;
}

.swap-button {
    width: 54px;
    height: 52px;
    margin-bottom: 22px;
    padding: 0;
    color: #121c2d;
    background: #ffffff;
    border: 1px solid #cfd7e3;
    border-radius: 10px;
    font-size: 22px;
    font-weight: 700;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.swap-button:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    transform: translateY(-1px);
}

.calculate-button {
    width: 100%;
    min-height: 54px;
    margin-top: 6px;
    padding: 14px 20px;
    color: #ffffff;
    background: #121c2d;
    border: 1px solid #121c2d;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 800;
    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.calculate-button:hover {
    background: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.14);
}


/* =========================================
   ERROR
   ========================================= */

.error-message {
    min-height: 24px;
    margin: 4px 0 8px;
    color: #b42318;
    font-size: 14px;
    font-weight: 600;
}


/* =========================================
   RESULT
   ========================================= */

.result-section {
    margin-top: 32px;
    padding: 30px;
    background: #f8fafc;
    border: 1px solid #dfe5ee;
    border-radius: 14px;
}

.conversion-result {
    margin: 4px 0 20px;
    color: #121c2d;
    font-size: clamp(32px, 5vw, 46px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.rate-info {
    display: grid;
    gap: 8px;
    padding-top: 18px;
    border-top: 1px solid #dfe5ee;
}

.rate-info p {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.rate-info strong {
    color: #263244;
}


/* =========================================
   INFORMATION SECTIONS
   ========================================= */

.info-section {
    padding: 72px 0;
    background: #ffffff;
    border-top: 1px solid #e5eaf1;
}

.info-section:nth-of-type(even) {
    background: #f8fafc;
}

.info-section h2,
.related-section h2 {
    max-width: 760px;
    margin: 0 0 20px;
    color: #121c2d;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.info-section p,
.related-section > .container > p {
    max-width: 780px;
    margin: 0 0 18px;
    color: #526174;
    font-size: 17px;
    line-height: 1.75;
}

.info-block {
    margin-bottom: 42px;
}


/* =========================================
   STEPS
   ========================================= */

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.step {
    display: flex;
    gap: 16px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #dfe5ee;
    border-radius: 14px;
}

.step-number {
    flex: 0 0 auto;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.step h3 {
    margin: 0 0 8px;
    color: #121c2d;
    font-size: 18px;
    line-height: 1.3;
}

.step p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
}


/* =========================================
   FORMULA BOX
   ========================================= */

.formula-box {
    max-width: 780px;
    margin: 24px 0;
    padding: 22px 24px;
    background: #f1f5f9;
    border-left: 4px solid #121c2d;
    border-radius: 8px;
    color: #121c2d;
    font-size: 17px;
    overflow-x: auto;
}


/* =========================================
   USE CASES
   ========================================= */

.use-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 34px;
}

.use-card {
    padding: 26px;
    background: #ffffff;
    border: 1px solid #dfe5ee;
    border-radius: 14px;
}

.use-card h3 {
    margin: 0 0 8px;
    color: #121c2d;
    font-size: 19px;
}

.use-card p {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
}


/* =========================================
   FAQ
   ========================================= */

.faq-section {
    padding-bottom: 82px;
}

.faq-item {
    max-width: 820px;
    padding: 24px 0;
    border-bottom: 1px solid #dfe5ee;
}

.faq-item:first-of-type {
    border-top: 1px solid #dfe5ee;
}

.faq-item h3 {
    margin: 0 0 8px;
    color: #121c2d;
    font-size: 18px;
}

.faq-item p {
    margin: 0;
    font-size: 15px;
}


/* =========================================
   RELATED TOOLS
   ========================================= */

.related-section {
    padding: 72px 0;
    background: #f8fafc;
    border-top: 1px solid #e5eaf1;
}

.related-tools {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 32px;
}

.related-tools a {
    display: block;
    min-height: 150px;
    padding: 26px 24px;
    background: #ffffff;
    border: 1px solid #dfe5ee;
    border-radius: 14px;
    color: #111827 !important;
    text-decoration: none !important;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}

.related-tools a:hover {
    color: #111827 !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    border-color: #c5cedb;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.related-tools a strong {
    display: block;
    margin-bottom: 10px;
    color: #111827 !important;
    font-size: 18px;
}

.related-tools a small {
    display: block;
    color: #64748b !important;
    font-size: 14px;
    line-height: 1.55;
}


/* =========================================
   FOOTER
   ========================================= */

.site-footer {
    padding: 30px 0;
    background: #121c2d;
    color: #ffffff;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.footer-inner strong {
    font-size: 14px;
    letter-spacing: 0.08em;
}

.footer-inner span {
    color: #cbd5e1;
    font-size: 13px;
}


/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 800px) {

    .container {
        width: min(100% - 28px, 1100px);
    }

    .header-inner {
        min-height: 64px;
    }

    .hero {
        padding: 56px 0 48px;
    }

    .hero-text {
        font-size: 18px;
    }

    .calculator-section {
        padding: 36px 0;
    }

    .calculator-card {
        padding: 24px;
        border-radius: 14px;
    }

    .currency-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .currency-row .form-group {
        margin-bottom: 18px;
    }

    .swap-button {
        width: 100%;
        height: 44px;
        margin: 0 0 18px;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .use-grid {
        grid-template-columns: 1fr;
    }

    .related-tools {
        grid-template-columns: 1fr;
    }

    .info-section,
    .related-section {
        padding: 56px 0;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}


@media (max-width: 520px) {

    .brand {
        font-size: 17px;
    }

    .back-link {
        font-size: 13px;
    }

    .hero h1 {
        font-size: 40px;
    }

    .calculator-header {
        gap: 12px;
    }

    .tool-icon {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .calculator-header h2 {
        font-size: 22px;
    }

    .result-section {
        padding: 24px;
    }

    .conversion-result {
        font-size: 32px;
    }

}