:root {
    --primary: #008ddf;
    --secondary: #f1f4f9;
    --accent: #4b8a08;
    --primary-orange: #ff6700;
    --primary-green: #4b8a08;
    --text-main: #2c3e50;
    --text-muted: #6c757d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --header-height: 70px;
}

.p-0 {
    padding: 0 !important;
}

.p-10 {
    padding: 10px !important;
}

.p-20 {
    padding: 20px !important;
}

.p-30 {
    padding: 30px !important;
}

.p-40 {
    padding: 40px !important;
}

.pl-0 {
    padding-left: 0 !important;
}

.pl-10 {
    padding-left: 10px !important;
}

.pl-20 {
    padding-left: 20px !important;
}

.pl-30 {
    padding-left: 30px !important;
}

.pl-40 {
    padding-left: 40px !important;
}

.pr-0 {
    padding-right: 0 !important;
}

.pr-10 {
    padding-right: 10px !important;
}

.pr-20 {
    padding-right: 20px !important;
}

.pr-30 {
    padding-right: 30px !important;
}

.pr-40 {
    padding-right: 40px !important;
}

.pt-0 {
    padding-top: 0 !important;
}

.pt-10 {
    padding-top: 10px !important;
}

.pt-20 {
    padding-top: 20px !important;
}

.pt-30 {
    padding-top: 30px !important;
}

.pt-40 {
    padding-top: 40px !important;
}

.pb-0 {
    padding-bottom: 0 !important;
}

.pb-10 {
    padding-bottom: 10px !important;
}

.pb-20 {
    padding-bottom: 20px !important;
}

.pb-30 {
    padding-bottom: 30px !important;
}

.pb-40 {
    padding-bottom: 40px !important;
}

/* Breadcrumbs */
.breadcrumb {
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 0 20px;
    font-size: 13px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb span {
    margin: 0 8px;
    color: #ccc;
}

/* Two-Column Professional Layout */
.calc-layout {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
}

.left-panel {
    flex: 0 0 450px;
    background: #f1f4f9;
    border: 1px solid #d1d9e6;
    border-radius: 8px;
    padding: 25px;
}

.right-panel {
    flex: 1;
}

.panel-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 1px solid #bdc3c7;
    padding-bottom: 10px;
}

/* Refined Form Row (Mortgage Style) */
.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    justify-content: space-between;
}

.form-row label {
    font-weight: 600;
    color: #444;
    flex: 1;
}

.form-row .input-wrapper {
    display: flex;
    align-items: center;
    width: 220px;
    position: relative;
}

.form-row input,
.form-row select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #999;
    border-radius: 4px;
    font-size: 15px;
    text-align: right;
}

.form-row .unit {
    position: absolute;
    right: 10px;
    color: #666;
    font-size: 13px;
    pointer-events: none;
}

.form-row input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 5px rgba(59, 113, 202, 0.2);
}

/* Summary Row (Mortgage Style Result) */
.summary-banner {
    background: #4b8a08;
    color: white;
    padding: 15px 25px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.summary-banner .label {
    font-size: 18px;
    font-weight: 600;
}

.summary-banner .value {
    font-size: 28px;
    font-weight: 800;
}

.result-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.result-table th {
    text-align: left;
    padding: 12px;
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    font-weight: 700;
}

.result-table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.result-table tr:last-child {
    border-bottom: 2px solid #333;
    font-weight: 800;
}

.result-table .highlight {
    background: #f0f7ff;
}

/* Visualization */
.visual-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.chart-box {
    background: white;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    height: 300px;
}

/* SEO Content Section */
.seo-content {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 2px solid #eee;
}

.seo-content h2 {
    font-size: 28px;
    color: #2c3e50;
    margin-bottom: 20px;
}

.seo-content h3 {
    font-size: 22px;
    color: #34495e;
    margin: 30px 0 15px;
}

.seo-content p {
    font-size: 16px;
    margin-bottom: 20px;
    color: #555;
    line-height: 1.8;
}

.seo-content ul {
    margin: 0 0 20px 25px;
}

.seo-content li {
    margin-bottom: 10px;
    color: #555;
}

/* Mobile Adjustments for New Layout */
@media (max-width: 992px) {
    .calc-layout {
        flex-direction: column;
    }

    .left-panel {
        flex: none;
        width: 100%;
    }

    .visual-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .form-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-row .input-wrapper {
        width: 100%;
        margin-top: 8px;
    }

    .summary-banner {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 14px;
}

/* Header & Navbar */
header {
    background: var(--bg-white);
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-container img {
    height: 45px;
    margin-right: 10px;
}

.logo-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: -0.5px;
}

nav.navbar {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-item {
    position: relative;
    padding: 0 15px;
}

.nav-item>a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.nav-item:hover>a,
.nav-item.active>a {
    color: var(--primary);
}

/* Dropdown */
.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-white);
    min-width: 200px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    list-style: none;
    border-radius: 0 0 8px 8px;
    border: 1px solid var(--border-color);
}

.nav-item:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    padding: 12px 20px;
    display: block;
    text-decoration: none;
    color: var(--text-main);
    transition: background 0.2s;
}

.dropdown-menu li a:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    height: 3px;
    width: 25px;
    background: var(--text-main);
    margin: 2px 0;
    transition: 0.4s;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.header-meta {
    text-align: center;
    margin-bottom: 40px;
}

.header-meta h1 {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 10px;
}

.header-meta p {
    color: var(--text-muted);
    font-size: 16px;
}

.calculator-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
    align-items: start;
}

/* Tool Grid - Dashboard */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.tool-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: var(--text-main);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tool-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.tool-card .icon {
    font-size: 40px;
    margin-bottom: 20px;
    color: var(--primary);
    background: var(--bg-light);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.tool-card:hover .icon {
    background: var(--primary);
    color: white;
}

.tool-card h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: var(--text-main);
}

.tool-card p {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.5;
}

.forms-wrapper {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.calc-form-box {
    display: none;
}

.calc-form-box.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
    background: var(--bg-white);
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--primary);
    outline: none;
}

.range-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
}

.range-wrap input[type="range"] {
    flex: 1;
    padding: 0;
    border: none;
}

.range-val {
    min-width: 80px;
    font-weight: 700;
    color: var(--primary);
    text-align: right;
}

button.btn-calc,
a.btn-calc {
    width: 100%;
    background: #ff6700;
    color: white;
    border: none;
    padding: 15px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s, opacity 0.3s;
    margin-top: 10px;
}

button.btn-calc:hover {
    opacity: 0.9;
}

button.btn-calc:active {
    transform: scale(0.98);
}

/* Output Panel */
.output-panel {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.output-banner {
    background: var(--primary);
    color: white;
    padding: 15px 20px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
}

.output-content {
    padding: 25px;
}

#output table {
    width: 100%;
    border-collapse: collapse;
}

#output th,
#output td {
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

#output td:last-child {
    text-align: right;
    font-weight: 700;
}

.chart-section {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: none;
}

/* Footer Rendering */
footer {
    margin-top: 80px;
}

.footer-top {
    background: #1a1a1a;
    color: #ffffff;
    padding: 60px 5%;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-col h4 {
    color: var(--primary);
    font-size: 18px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s, padding-left 0.3s;
    cursor: pointer;
}

.footer-col ul li a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-bottom {
    background: #000000;
    color: #777;
    padding: 20px 5%;
    text-align: center;
    border-top: 1px solid #333;
}

/* Promo Box */
.image-tools-promo {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #fff9c4 0%, #fffde7 100%);
    border: 1px solid var(--accent);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.image-tools-promo strong {
    font-size: 20px;
    color: var(--primary);
}

.image-tools-promo a {
    background: var(--primary);
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 8px;
    transition: background 0.3s;
}

.image-tools-promo a:hover {
    background: var(--primary-dark);
}

/* GST Breakdown Styles */
.gst-breakdown-container {
    background: #f8fafd;
    border: 1px solid #e1e8f0;
    border-radius: 12px;
    padding: 25px;
    margin: 30px 0;
}

.gst-breakdown-title {
    font-size: 16px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 20px;
}

.gst-card {
    background: #ffffff;
    border: 1px solid #e1e8f0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.gst-card .label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 600;
    margin-bottom: 8px;
    display: block;
}

.gst-card .value {
    font-size: 24px;
    font-weight: 700;
    color: #1a1a1a;
    display: block;
}

.gst-or-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 15px 0;
    position: relative;
}

.gst-or-pill::before {
    content: "OR";
    background: #ffffff;
    border: 1px solid #e1e8f0;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    color: #6c757d;
    z-index: 2;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--bg-white);
        flex-direction: column;
        align-items: center;
        transition: 0.3s;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 40px 0;
        overflow-y: auto;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-item {
        width: 100%;
        padding: 0;
    }

    .nav-item>a {
        height: auto;
        padding: 20px;
        justify-content: space-between;
        border-bottom: 1px solid var(--border-color);
    }

    .has-dropdown>a::after {
        content: '▼';
        font-size: 10px;
        margin-left: 10px;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        display: none;
        border: none;
        background: var(--bg-light);
        width: 100%;
    }

    .nav-item.open .dropdown-menu {
        display: block;
    }

    .calculator-container {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 576px) {
    .header-meta h1 {
        font-size: 24px;
    }

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

    .image-tools-promo {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .logo-text {
        font-size: 16px;
    }
}