/* ======================================
    Tools section styling
   --------------------------------------
    Reuses the main site palette:
        Moon Yellow: #f4c613
        Grey:        #212226
        White Smoke: #f4f4f4
        White:       #fff
    Self-contained: tool pages depend only on this file + Google Fonts,
    so they render consistently at any URL depth under /tools/.
   ======================================*/

* {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    background-color: #f4f4f4;
    color: #212226;
    font-family: "Open Sans", sans-serif;
    font-size: 15px;
    line-height: 1.7;
}

a {
    color: #c79a00;
    text-decoration: none;
    transition: color .3s;
}

a:hover,
a:focus {
    color: #f4c613;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Raleway", sans-serif;
    color: #212226;
    line-height: 1.25;
}

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ======================================
    Top navigation bar
   ======================================*/

.tools-nav {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #212226;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.tools-nav-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 14px 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

.tools-brand {
    font-family: "Raleway", sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
}

.tools-brand:hover,
.tools-brand:focus {
    color: #f4c613;
}

.tools-brand .arrow {
    color: #f4c613;
    margin-right: 8px;
}

/* Language switcher inside the dark nav bar */
.lang-switcher {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.lang-switcher .lang-btn {
    font-family: "Raleway", sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #fff;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: color .3s;
}

.lang-switcher .lang-btn:hover,
.lang-switcher .lang-btn:focus {
    color: #f4c613;
    outline: none;
}

.lang-switcher .lang-btn.active {
    color: #f4c613;
}

.lang-switcher .lang-sep {
    color: rgba(255, 255, 255, 0.6);
    margin: 0 9px;
    font-weight: 300;
}

/* ======================================
    Page hero / headings
   ======================================*/

.tools-hero {
    padding: 60px 0 30px;
    text-align: center;
}

.tools-hero h5 {
    color: #f4c613;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0 0 12px;
}

.tools-hero h1 {
    font-size: 38px;
    font-weight: 700;
    margin: 0 0 16px;
}

.tools-hero p {
    max-width: 720px;
    margin: 0 auto;
    color: #555;
}

.heading-underline {
    width: 60px;
    height: 3px;
    background-color: #f4c613;
    border: none;
    margin: 18px auto 0;
}

/* ======================================
    Tools grid (landing page)
   ======================================*/

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 26px;
    padding: 30px 0 60px;
}

.tool-card {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    background-color: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 30px 26px;
    transition: -webkit-transform .25s, box-shadow .25s;
    transition: transform .25s, box-shadow .25s;
}

.tool-card:hover {
    -webkit-transform: translateY(-5px);
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

.tool-card .tool-icon {
    font-size: 34px;
    color: #f4c613;
    margin-bottom: 16px;
}

.tool-card h3 {
    font-size: 21px;
    font-weight: 600;
    margin: 0 0 12px;
}

.tool-card p {
    color: #555;
    margin: 0 0 22px;
    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
}

.tool-card .tool-cta {
    display: inline-block;
    align-self: flex-start;
    font-family: "Raleway", sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 13px;
    color: #212226;
    background-color: #f4c613;
    padding: 10px 22px;
    border-radius: 26px;
}

.tool-card .tool-cta:hover {
    background-color: #212226;
    color: #f4c613;
}

.tools-empty {
    color: #777;
    font-style: italic;
    text-align: center;
    grid-column: 1 / -1;
}

/* ======================================
    Tool page layout (main + sidebar)
   ======================================*/

.tool-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 34px;
    padding: 10px 0 50px;
    align-items: start;
}

.tool-main {
    min-width: 0;
}

.tool-card-box {
    background-color: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 28px;
    margin-bottom: 30px;
}

.tool-card-box h2 {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 6px;
}

.tool-card-box .box-sub {
    color: #666;
    margin: 0 0 22px;
    font-size: 14px;
}

/* Mode tabs */
.tool-tabs {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    border-bottom: 1px solid #e3e3e3;
}

.tool-tab {
    font-family: "Raleway", sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: #777;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 10px 14px;
    cursor: pointer;
    transition: color .25s, border-color .25s;
}

.tool-tab:hover {
    color: #212226;
}

.tool-tab.active {
    color: #212226;
    border-bottom-color: #f4c613;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Form controls */
.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    font-family: "Raleway", sans-serif;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 7px;
    color: #444;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    font-family: "Open Sans", sans-serif;
    font-size: 15px;
    color: #212226;
    background-color: #fff;
    border: 1px solid #cfcfcf;
    border-radius: 6px;
    padding: 11px 13px;
    transition: border-color .25s, box-shadow .25s;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #f4c613;
    box-shadow: 0 0 0 3px rgba(244, 198, 19, 0.25);
}

textarea {
    resize: vertical;
    min-height: 130px;
    font-family: "Consolas", "Courier New", monospace;
    font-size: 14px;
    line-height: 1.5;
}

.btn-tool {
    font-family: "Raleway", sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 14px;
    color: #212226;
    background-color: #f4c613;
    border: none;
    border-radius: 26px;
    padding: 12px 30px;
    cursor: pointer;
    transition: background-color .25s, color .25s;
}

.btn-tool:hover {
    background-color: #212226;
    color: #f4c613;
}

.btn-tool:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.btn-secondary {
    background-color: transparent;
    color: #212226;
    border: 1px solid #cfcfcf;
}

.btn-secondary:hover {
    background-color: #212226;
    color: #fff;
    border-color: #212226;
}

.btn-row {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-top: 6px;
}

/* Result blocks */
.result {
    margin-top: 24px;
    padding: 20px;
    border-radius: 8px;
    background-color: #f7f7f4;
    border: 1px solid #e3e3e3;
}

.result.hidden {
    display: none;
}

.result-amount {
    font-family: "Raleway", sans-serif;
    font-size: 30px;
    font-weight: 700;
    color: #212226;
}

.result-amount .cur {
    color: #c79a00;
}

.result-detail {
    color: #555;
    font-size: 14px;
    margin-top: 8px;
}

.msg-error {
    color: #b00020;
    font-size: 14px;
    margin-top: 14px;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-top-color: #f4c613;
    border-radius: 50%;
    -webkit-animation: spin .7s linear infinite;
    animation: spin .7s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}

@-webkit-keyframes spin { to { -webkit-transform: rotate(360deg); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* Result table (batch mode) */
.table-wrap {
    overflow-x: auto;
    margin-top: 20px;
}

table.result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background-color: #fff;
}

table.result-table th,
table.result-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #ececec;
    text-align: left;
    white-space: nowrap;
}

table.result-table th {
    font-family: "Raleway", sans-serif;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #555;
    background-color: #f7f7f4;
}

table.result-table td.num,
table.result-table th.num {
    text-align: right;
}

table.result-table tr.row-error td {
    color: #b00020;
}

table.result-table tfoot td {
    font-weight: 700;
    background-color: #f7f7f4;
    border-top: 2px solid #f4c613;
}

/* ======================================
    Article + FAQ content
   ======================================*/

.article h2 {
    font-size: 24px;
    margin: 34px 0 14px;
}

.article h3 {
    font-size: 19px;
    margin: 26px 0 10px;
}

.article p {
    margin: 0 0 16px;
    color: #333;
}

.article ul,
.article ol {
    margin: 0 0 16px;
    padding-left: 22px;
    color: #333;
}

.article li {
    margin-bottom: 8px;
}

.faq-item {
    background-color: #fff;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    margin-bottom: 12px;
    padding: 4px 20px;
}

.faq-item summary {
    font-family: "Raleway", sans-serif;
    font-weight: 600;
    font-size: 16px;
    padding: 14px 0;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 28px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 4px;
    top: 12px;
    color: #f4c613;
    font-size: 22px;
    font-weight: 700;
}

.faq-item[open] summary::after {
    content: "\2013";
}

.faq-item .faq-body {
    padding: 0 0 16px;
    color: #444;
}

/* ======================================
    Sidebar (ads / partner area)
   ======================================*/

.tool-aside {
    position: -webkit-sticky;
    position: sticky;
    top: 90px;
}

.ad-box {
    background-color: #fff;
    border: 2px dashed #d2d2d2;
    border-radius: 8px;
    padding: 26px 20px;
    text-align: center;
}

.ad-box .ad-label {
    font-family: "Raleway", sans-serif;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #aaa;
    margin: 0 0 14px;
}

.ad-box p {
    font-size: 14px;
    color: #555;
    margin: 0 0 14px;
}

.ad-box a.ad-mail {
    display: inline-block;
    font-weight: 600;
    word-break: break-all;
}

.privacy-note {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 10px;
    background-color: #fff;
    border: 1px solid #e3e3e3;
    border-left: 4px solid #f4c613;
    border-radius: 6px;
    padding: 16px 18px;
    margin-bottom: 26px;
    font-size: 13px;
    color: #555;
}

.privacy-note .pn-icon {
    color: #f4c613;
    font-size: 18px;
    line-height: 1.4;
}

/* ======================================
    Footer (matches main site)
   ======================================*/

.tools-footer {
    background-color: #212226;
    padding: 30px 0;
    text-align: center;
}

.tools-footer p {
    margin: 0;
    font-family: "Raleway", sans-serif;
    font-size: 14px;
    letter-spacing: 1px;
    color: #f4f4f4;
}

.tools-footer a {
    color: #f4c613;
}

/* ======================================
    Responsive
   ======================================*/

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

    .tool-aside {
        position: static;
    }
}

@media (max-width: 480px) {
    .tools-hero h1 {
        font-size: 28px;
    }

    .tools-brand {
        font-size: 14px;
    }

    .lang-switcher .lang-btn {
        font-size: 13px;
    }
}