/* =========================================================
   TOOLVETA - PREMIUM TOOL UI
========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    background: #f4f7fb;
    color: #17213a;

    line-height: 1.6;

    transition:
        background .25s ease,
        color .25s ease;
}

button,
input,
select,
textarea {
    font: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}


/* =========================================================
   GLOBAL CONTAINER
========================================================= */

.container {
    width: min(1120px, calc(100% - 40px));
    margin: auto;
}


/* =========================================================
   HEADER
========================================================= */

header {
    background: rgba(255,255,255,.96);

    border-bottom: 1px solid #e7ebf1;

    position: sticky;
    top: 0;

    z-index: 1000;

    backdrop-filter: blur(12px);
}

header .container {
    min-height: 74px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* Logo */

.logo {
    display: flex;
    align-items: center;
    gap: 10px;

    font-size: 25px;
    font-weight: 800;

    letter-spacing: -.7px;

    color: #17213a;
}

.logo::before {
    content: "";

    width: 7px;
    height: 7px;

    background: #2563eb;

    border-radius: 50%;
}


/* Navigation */

nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

nav a {
    color: #526078;

    font-size: 14px;
    font-weight: 600;

    transition: color .2s ease;
}

nav a:hover {
    color: #2563eb;
}


/* =========================================================
   DARK MODE SWITCH
========================================================= */

.theme-toggle {
    width: 52px;
    height: 28px;

    padding: 3px;

    border: 0;
    border-radius: 50px;

    background: #111827;

    cursor: pointer;

    display: flex;
    align-items: center;

    transition: background .25s ease;
}

.theme-toggle span {
    width: 22px;
    height: 22px;

    background: white;

    border-radius: 50%;

    transform: translateX(0);

    transition: transform .25s ease;
}

body.dark-mode .theme-toggle {
    background: white;
}

body.dark-mode .theme-toggle span {
    background: #111827;

    transform: translateX(24px);
}


/* =========================================================
   HERO
========================================================= */

.hero {
    padding: 90px 0 85px;

    text-align: center;

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(37,99,235,.09),
            transparent 45%
        ),
        linear-gradient(
            180deg,
            #f7f9fd,
            #edf3fb
        );
}

.tagline {
    margin-bottom: 14px;

    color: #2563eb;

    font-size: 13px;

    font-weight: 800;

    letter-spacing: 2px;
}

.hero h1 {
    max-width: 850px;

    margin: auto;

    font-size: clamp(38px, 5vw, 62px);

    line-height: 1.05;

    letter-spacing: -2.5px;

    color: #17213a;

    font-weight: 850;
}

.hero-text {
    max-width: 700px;

    margin: 22px auto 38px;

    color: #64748b;

    font-size: 18px;
}


/* Search */

.search-box {
    width: min(700px, 100%);

    margin: auto;
}

.search-box input {
    width: 100%;

    height: 64px;

    padding: 0 24px;

    background: white;

    border: 1px solid #d9e0e9;

    border-radius: 14px;

    outline: none;

    font-size: 17px;

    color: #17213a;

    box-shadow:
        0 10px 35px rgba(30,50,90,.07);

    transition:
        border .2s ease,
        box-shadow .2s ease;
}

.search-box input:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 4px rgba(37,99,235,.10);
}


/* =========================================================
   TOOLS SECTION
========================================================= */

.tools-section {
    padding: 75px 0;

    background: white;
}

.tools-section h2 {
    margin-bottom: 8px;

    font-size: 30px;

    line-height: 1.25;

    letter-spacing: -.7px;

    color: #17213a;
}

.category-title {
    margin-top: 65px !important;
}

.category-description {
    margin-bottom: 24px;

    color: #64748b;

    font-size: 15px;
}


/* =========================================================
   TOOL CARDS
========================================================= */

.tools-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0,1fr));

    gap: 18px;
}

.tool-card {
    position: relative;

    min-height: 150px;

    padding: 25px 60px 25px 24px;

    background: white;

    border: 1px solid #e2e7ef;

    border-radius: 16px;

    box-shadow:
        0 3px 10px rgba(15,23,42,.025);

    overflow: hidden;

    transition:
        transform .22s ease,
        box-shadow .22s ease,
        border-color .22s ease;
}

.tool-card::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;

    width: 3px;
    height: 0;

    background: #2563eb;

    transition: height .25s ease;
}

.tool-card:hover {
    transform: translateY(-5px);

    border-color: #cdd7e5;

    box-shadow:
        0 16px 35px rgba(15,23,42,.09);
}

.tool-card:hover::before {
    height: 100%;
}

.tool-card h3 {
    margin-bottom: 8px;

    color: #17213a;

    font-size: 17px;

    font-weight: 750;

    line-height: 1.35;
}

.tool-card p {
    color: #64748b;

    font-size: 14px;

    line-height: 1.6;
}

.tool-card::after {
    content: "→";

    position: absolute;

    right: 19px;
    top: 50%;

    width: 32px;
    height: 32px;

    display: flex;
    align-items: center;
    justify-content: center;

    transform: translateY(-50%);

    border-radius: 50%;

    background: #f1f5f9;

    color: #64748b;

    transition:
        background .2s ease,
        color .2s ease,
        transform .2s ease;
}

.tool-card:hover::after {
    background: #2563eb;

    color: white;

    transform:
        translateY(-50%)
        translateX(3px);
}


/* =========================================================
   TOOL PAGE BACKGROUND
========================================================= */

.tool-page {
    padding: 55px 0 90px;

    min-height: calc(100vh - 150px);

    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(37,99,235,.055),
            transparent 35%
        ),
        #f4f7fb;
}


/* =========================================================
   TOOL HEADER
========================================================= */

.tool-header {
    max-width: 850px;

    margin: 0 auto 30px;

    text-align: center;
}

.tool-header .tagline {
    margin-bottom: 9px;
}

.tool-header h1 {
    margin-bottom: 9px;

    color: #17213a;

    font-size: clamp(34px,5vw,48px);

    line-height: 1.1;

    letter-spacing: -1.5px;
}

.tool-header > p:last-child {
    color: #64748b;

    font-size: 17px;
}


/* =========================================================
   MAIN CALCULATOR CARD
========================================================= */

.calculator-box {
    width: min(930px, 100%);

    margin: auto;

    padding: 42px;

    background: white;

    border: 1px solid #e0e5ec;

    border-radius: 20px;

    box-shadow:
        0 15px 45px rgba(20,35,60,.08);
}


/* =========================================================
   FORM LABELS
========================================================= */

.calculator-box label {
    display: block;

    margin-bottom: 10px;

    color: #17213a;

    font-size: 16px;

    font-weight: 750;
}


/* =========================================================
   INPUTS
========================================================= */

.calculator-box input,
.calculator-box select,
.calculator-box textarea {
    width: 100%;

    min-height: 58px;

    padding: 0 17px;

    background: #fff;

    border: 1px solid #d4dce7;

    border-radius: 11px;

    outline: none;

    color: #17213a;

    font-size: 16px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.calculator-box textarea {
    padding-top: 15px;
    padding-bottom: 15px;
}

.calculator-box input::placeholder {
    color: #94a3b8;
}

.calculator-box input:focus,
.calculator-box select:focus,
.calculator-box textarea:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 4px rgba(37,99,235,.09);
}


/* =========================================================
   FORM SPACING
========================================================= */

.calculator-box label + input,
.calculator-box label + select,
.calculator-box label + textarea {
    margin-bottom: 25px;
}


/* =========================================================
   TWO COLUMN INPUTS
   Works automatically when wrappers use .form-row
========================================================= */

.form-row {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0,1fr));

    gap: 35px;
}


/* =========================================================
   CALCULATE BUTTON
========================================================= */

.calculator-box button {
    width: 100%;

    min-height: 60px;

    margin-top: 4px;

    border: 0;

    border-radius: 11px;

    background:
        linear-gradient(
            135deg,
            #2864e8,
            #1d58db
        );

    color: white;

    font-size: 17px;

    font-weight: 750;

    cursor: pointer;

    box-shadow:
        0 8px 20px rgba(37,99,235,.22);

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        filter .2s ease;
}

.calculator-box button:hover {
    transform: translateY(-2px);

    filter: brightness(1.03);

    box-shadow:
        0 13px 27px rgba(37,99,235,.28);
}

.calculator-box button:active {
    transform: translateY(0);
}


/* =========================================================
   RESULT PANEL
========================================================= */

.result {
    margin-top: 30px;

    padding: 28px;

    min-height: 85px;

    background:
        linear-gradient(
            135deg,
            #f3f8ff,
            #eef5ff
        );

    border: 1px solid #cfe1ff;

    border-radius: 15px;

    color: #17213a;

    animation:
        resultAppear .3s ease;
}

@keyframes resultAppear {

    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }

}

.result:empty {
    min-height: 80px;
}

.result h2 {
    margin-bottom: 20px;

    color: #2563eb;

    font-size: 22px;
}

.result h3 {
    color: #17213a;

    font-size: 18px;
}

.result p {
    margin: 10px 0;

    color: #526078;
}

.result strong {
    color: #17213a;
}

.result hr {
    margin: 20px 0;

    border: 0;

    border-top: 1px solid #d7e4f5;
}


/* =========================================================
   RESULT VALUE
========================================================= */

.result .value,
.result .result-value {
    font-size: 30px;

    font-weight: 800;

    color: #2563eb;
}


/* =========================================================
   TOOL CONTENT
========================================================= */

.tool-content {
    width: min(900px,100%);

    margin: 45px auto 0;
}

.tool-content h2 {
    margin-top: 42px;

    margin-bottom: 13px;

    color: #17213a;

    font-size: 25px;

    line-height: 1.3;
}

.tool-content h2:first-child {
    margin-top: 0;
}

.tool-content h3 {
    margin-top: 25px;

    margin-bottom: 8px;

    color: #17213a;

    font-size: 18px;
}

.tool-content p {
    margin-bottom: 16px;

    color: #64748b;

    font-size: 15px;

    line-height: 1.8;
}


/* =========================================================
   ABOUT SECTION
========================================================= */

.about-section {
    padding: 75px 0;

    background: #f7f9fc;
}

.about-section .container {
    max-width: 900px;
}

.about-section h2 {
    margin-bottom: 18px;

    color: #17213a;

    font-size: 30px;
}

.about-section p {
    margin-bottom: 15px;

    color: #64748b;

    line-height: 1.8;
}


/* =========================================================
   FOOTER
========================================================= */

footer {
    padding: 35px 0;

    background: white;

    border-top: 1px solid #e6e9ef;
}

footer .container {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

footer p {
    color: #64748b;

    font-size: 13px;
}

.footer-links {
    display: flex;

    gap: 22px;
}

.footer-links a {
    color: #64748b;

    font-size: 13px;
}

.footer-links a:hover {
    color: #2563eb;
}


/* =========================================================
   DARK MODE
========================================================= */

body.dark-mode {
    background: #0d1117;

    color: #e5e7eb;
}

body.dark-mode header {
    background: rgba(17,21,29,.96);

    border-color: #272d38;
}

body.dark-mode .logo {
    color: #f8fafc;
}

body.dark-mode nav a {
    color: #aeb7c6;
}

body.dark-mode nav a:hover {
    color: #60a5fa;
}


/* Hero */

body.dark-mode .hero {
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(37,99,235,.14),
            transparent 45%
        ),
        #11151d;
}

body.dark-mode .hero h1 {
    color: #f8fafc;
}

body.dark-mode .hero-text {
    color: #aeb7c6;
}

body.dark-mode .search-box input {
    background: #1a1f29;

    border-color: #343b48;

    color: #f8fafc;
}


/* Tools */

body.dark-mode .tools-section {
    background: #0d1117;
}

body.dark-mode .tools-section h2 {
    color: #f8fafc;
}

body.dark-mode .category-description {
    color: #929baa;
}


/* Cards */

body.dark-mode .tool-card {
    background: #171b23;

    border-color: #292f3a;
}

body.dark-mode .tool-card h3 {
    color: #f8fafc;
}

body.dark-mode .tool-card p {
    color: #9ca6b6;
}

body.dark-mode .tool-card::after {
    background: #242a34;

    color: #aeb7c6;
}

body.dark-mode .tool-card:hover {
    background: #1b2029;

    border-color: #3a4352;
}


/* Tool page */

body.dark-mode .tool-page {
    background:
        radial-gradient(
            circle at 50% 0%,
            rgba(37,99,235,.09),
            transparent 35%
        ),
        #0d1117;
}

body.dark-mode .tool-header h1 {
    color: #f8fafc;
}

body.dark-mode .tool-header > p:last-child {
    color: #9ca6b6;
}


/* Calculator */

body.dark-mode .calculator-box {
    background: #171b23;

    border-color: #2b323e;

    box-shadow:
        0 18px 50px rgba(0,0,0,.35);
}

body.dark-mode .calculator-box label {
    color: #f1f5f9;
}

body.dark-mode .calculator-box input,
body.dark-mode .calculator-box select,
body.dark-mode .calculator-box textarea {
    background: #1c212a;

    border-color: #363e4b;

    color: #f8fafc;
}


/* Result */

body.dark-mode .result {
    background:
        linear-gradient(
            135deg,
            #152235,
            #17273d
        );

    border-color: #2d4a73;
}

body.dark-mode .result p {
    color: #b8c1cf;
}

body.dark-mode .result strong,
body.dark-mode .result h3 {
    color: #f8fafc;
}

body.dark-mode .result hr {
    border-color: #30435c;
}


/* Content */

body.dark-mode .tool-content h2,
body.dark-mode .tool-content h3 {
    color: #f8fafc;
}

body.dark-mode .tool-content p {
    color: #aeb7c6;
}


/* About */

body.dark-mode .about-section {
    background: #13171f;
}

body.dark-mode .about-section h2 {
    color: #f8fafc;
}

body.dark-mode .about-section p {
    color: #aeb7c6;
}


/* Footer */

body.dark-mode footer {
    background: #11151d;

    border-color: #272d38;
}

body.dark-mode footer p,
body.dark-mode .footer-links a {
    color: #8f98a7;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 900px) {

    .tools-grid {
        grid-template-columns: repeat(2,1fr);
    }

    .calculator-box {
        padding: 32px;
    }

}


@media (max-width: 650px) {

    .container {
        width: calc(100% - 28px);
    }


    /* Header */

    header .container {
        min-height: 68px;
    }

    nav {
        gap: 14px;
    }

    nav a {
        font-size: 13px;
    }

    .logo {
        font-size: 21px;
    }


    /* Hero */

    .hero {
        padding: 65px 0;
    }

    .hero h1 {
        font-size: 38px;

        letter-spacing: -1.3px;
    }

    .hero-text {
        font-size: 16px;
    }

    .search-box input {
        height: 58px;

        font-size: 16px;
    }


    /* Tools */

    .tools-section {
        padding: 55px 0;
    }

    .tools-section h2 {
        font-size: 26px;
    }

    .category-title {
        margin-top: 48px !important;
    }

    .tools-grid {
        grid-template-columns: 1fr;

        gap: 14px;
    }


    /* Tool page */

    .tool-page {
        padding: 35px 0 65px;
    }

    .tool-header h1 {
        font-size: 34px;
    }


    /* Calculator */

    .calculator-box {
        padding: 24px 18px;

        border-radius: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;

        gap: 0;
    }

    .calculator-box input,
    .calculator-box select,
    .calculator-box textarea {
        min-height: 54px;
    }


    /* Result */

    .result {
        padding: 21px;
    }


    /* Footer */

    footer .container {
        flex-direction: column;

        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;

        justify-content: center;
    }

}


@media (max-width: 430px) {

    nav a {
        display: none;
    }

    .hero h1 {
        font-size: 32px;
    }

    .calculator-box {
        padding: 20px 15px;
    }

    .tool-card {
        min-height: 135px;

        padding:
            21px
            55px
            21px
            20px;
    }

}
/* =========================================================
   GST CALCULATOR - PREMIUM LAYOUT FIX
========================================================= */

.calculator-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 36px;
    row-gap: 0;
}


/* Amount label + input full width */

.calculator-box > label:nth-child(1) {
    grid-column: 1 / -1;
}

.calculator-box > input:nth-child(2) {
    grid-column: 1 / -1;
}


/* GST Rate */

.calculator-box > label:nth-child(3) {
    grid-column: 1;
    grid-row: 3;
}

.calculator-box > select:nth-child(4) {
    grid-column: 1;
    grid-row: 4;
}


/* Calculation Type */

.calculator-box > label:nth-child(5) {
    grid-column: 2;
    grid-row: 3;
}

.calculator-box > select:nth-child(6) {
    grid-column: 2;
    grid-row: 4;
}


/* Calculate button */

.calculator-box > button:nth-child(7) {
    grid-column: 1 / -1;

    margin-top: 28px;
}


/* Result */

.calculator-box > .result:nth-child(8) {
    grid-column: 1 / -1;

    margin-top: 28px;
}


/* Amount input */

.calculator-box > input:nth-child(2) {
    height: 66px;

    font-size: 18px;

    padding-left: 22px;

    margin-bottom: 28px;
}


/* Select boxes */

.calculator-box > select {
    height: 60px;

    font-size: 17px;

    padding: 0 18px;

    cursor: pointer;
}


/* Labels */

.calculator-box > label {
    font-size: 17px;

    margin-bottom: 10px;
}


/* Button */

.calculator-box > button {
    height: 64px;

    font-size: 18px;

    font-weight: 750;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #2864e8,
            #1557df
        );

    box-shadow:
        0 9px 22px rgba(37, 99, 235, .20);
}


/* Result */

.calculator-box > .result {
    min-height: 150px;

    padding: 28px 32px;

    border-radius: 15px;

    background:
        linear-gradient(
            135deg,
            #f4f8ff,
            #edf5ff
        );

    border: 1px solid #cfe1ff;
}


/* Result heading */

.calculator-box > .result h2 {
    margin-bottom: 20px;

    color: #2563eb;

    font-size: 23px;
}


/* Result rows */

.calculator-box > .result p {
    font-size: 16px;

    margin: 12px 0;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 650px) {

    .calculator-box {
        display: block;
    }

    .calculator-box > label,
    .calculator-box > input,
    .calculator-box > select {
        display: block;
        width: 100%;
    }

    .calculator-box > button {
        margin-top: 10px;
    }

}