html {
  font-size: 14px;
}

h2{
    font-size:18px;
    font-weight:500;
    margin-bottom:15px;
}

h3 {
    font-size: 17px;
    font-weight: 600;
}

p{
    margin-bottom:0.5rem;
}

.btn-primary {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 9px;
    background: var(--accent);
    color: var(--text-strong);
    text-decoration: none;
    font-weight: 500;
    box-shadow: 0 4px 10px #ccc;
    transition: background 0.2s ease, transform 0.1s ease;
    
}

section{
    margin-top:20px;
}

section.grey-bg {
  padding:20px;
  background-color:#eee;
}

table{
    margin-bottom:20px;
}

tbody, td, tfoot, th, thead, tr {
    border-width: 1px;
    padding: 5px;
}

a:visited {
    color: #551A8B;
}

.tips-row{
    margin-top:15px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }

    .tips-row {
        margin-top: 0;
    }

}

    .btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
        box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
    }

    html {
        position: relative;
        min-height: 100%;
    }

    body {
        margin-bottom: 60px;
    }

    body {
        font-family: Arial, Helvetica, sans-serif;
        padding: 0;
        background: #ffffff;
        color: #000000;
        transition: background 0.3s, color 0.3s;
    }

        body.dark {
            background: #121212;
            color: #e6e6e6;
        }

    h1 {
        margin-bottom: 1rem;
        font-size: 1.4rem;
        font-weight: 500;
    }

    .toggle-container {
        text-align: right;
        margin-bottom: 10px;
    }

    .toggle-btn {
        padding: 8px 14px;
        cursor: pointer;
        border-radius: 6px;
        border: 1px solid #ccc;
        background: #f7f7f7;
    }

    body.dark .toggle-btn {
        background: #333;
        border-color: #555;
        color: #e6e6e6;
    }

    .panel-area {
        display: block;
        justify-content: left;
    }

    .tabs {
        display: none;
        border-bottom: 2px solid #ddd;
        margin-bottom: 0;
        flex-wrap: wrap;
        width: 120px;
    }

    .tab {
        padding: 0;
        cursor: pointer;
        border: 1px solid #ddd;
        border-bottom: none;
        background: #f7f7f7;
        margin-right: 4px;
        border-radius: 6px 6px 0 0;
        transition: background 0.3s;
    }

        .tab.active {
            background: white;
            font-weight: 600;
            border-bottom: 2px solid white;
        }

    body.dark .tab {
        background: #333;
        border-color: #555;
    }

        body.dark .tab.active {
            background: #222;
            border-bottom-color: #222;
        }

    .converter {
        border: 1px solid #ccc;
        padding: 16px;
        border-radius: 0 8px 8px 8px;
        background: white;
        transition: background 0.3s, border-color 0.3s;
        margin-bottom: 0;
        width: 100%;
    }

    body.dark .converter {
        background: #222;
        border-color: #555;
    }

.navbar {
    padding-bottom: 0.3rem;
    padding-top: 0.3rem;
    justify-content: space-between;
    width:100%;
}

.navbar-expand-sm .navbar-collapse{
    flex-grow:inherit;
}

.home-content > .section {
    padding: 18px;
}

    .home-content > .section:nth-of-type(odd) {
        background-color: #f5f5f5;
    }

/* Even sections: light grey */
.home-content > .section:nth-of-type(even) {
    background-color: #eee;
}

.tab a {
    text-decoration: none;
    color: #000000;
    padding: 6px 15px;
    display: block;
    width: 100%;
}

    .tab a:hover{
        background-color:#ddd;
    }

    body.dark .tab a {
        color: #e6e6e6;
    }


    .row {
        display: flex;
        margin-bottom: 12px;
        flex-wrap: wrap;
    }

    label {
        display: block;
        margin-bottom: 4px;
    }

    select, input {
        padding: 8px;
        width: 100%;
        background: white;
        color: black;
        border: 1px solid #ccc;
        transition: background 0.3s, color 0.3s, border-color 0.3s;
    }

    body.dark select,
    body.dark input {
        background: #333;
        color: #e6e6e6;
        border-color: #555;
    }

    .result-box {
        padding: 8px;
        border: 1px solid #ccc;
        background: #fafafa;
        border-radius: 6px;
        min-height: 40px;
        display: flex;
        align-items: center;
        font-size:12px;
    }

    body.dark .result-box {
        background: #333;
        border-color: #555;
        color: #e6e6e6;
    }

    button {
        padding: 10px 16px;
        cursor: pointer;
        background: #f7f7f7;
        border: 1px solid #ccc;
        border-radius: 6px;
        transition: background 0.3s, border-color 0.3s;
    }

    body.dark button {
        background: #333;
        border-color: #555;
        color: #e6e6e6;
    }

    .navbar-light .navbar-brand,
    .navbar-light .navbar-nav .nav-link {
        color: #000000;
    }

    .dark .navbar-light .navbar-brand,
    .dark .navbar-light .navbar-nav .nav-link {
        color: #e6e6e6;
    }

    .navbar-light .navbar-brand {
    }

    .hero-block {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .adv-img img {
        max-width: 500px;
        width: 100%;
    }

    .dropdown-block {
        display: block;
        margin-bottom: 15px;
    }

    .form-input {
        width: 100%;
        min-height: 40px;
    }

    .form-row label {
        display: block;
        margin-bottom: 5px;
    }

    .form-captcha {
        margin: 10px;
    }

    .form-row .drawrpallete-wrapper {
        display: flex !important;
    }

    .form-notes {
        color: orangered;
        margin: 10px 0;
    }

    .form-row {
        margin: 5px 0;
    }

    .form-notes, .field-validation-error {
        color: orangered;
        margin: 5px 0;
        display: block;
    }

    .form-text {
        width: 100%;
    }

    .form-input input {
        width: 100%;
        height: 36px;
    }

    .form-row textarea {
        width: 100%;
    }

    .email-message {
        font-size: 20px;
        margin: 20px 0;
    }

    .breadcrumb a {
        display: inline-block;
    }

    body a {
        color: #004C66;
    }


.breadcrumb{
    margin-bottom:6px;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: end;
    font-size: 14px;
}

    .breadcrumb li:not(:last-child)::after {
        display: inline-block;
        margin: 0 0.25rem;
        content: "/";
    }

    .btn-submit {
        border: none;
        cursor: pointer;
        overflow: visible;
        display: inline-block;
        padding: 0 15px 0 15px;
        text-align: center;
        font-size: 14px;
        height: 36px;
        min-width: 135px;
        background-color: #00ACEE;
        color: #FFFFFF;
        text-transform: uppercase;
        font-weight: bold;
        border-radius: 8px;
    }

    .data-ref {
        padding: 10px;
        background: #f1f8ff;
        border-left: 2px solid #0073e6;
        margin-bottom: 20px;
        margin-top: 20px;
        display: none;
        font-size: 13px;
    }



    .formula {
        font-size: 16px;
    }

        .formula li {
            padding: 5px 0;
        }


        .formula .power {
            font-size: 12px;
            vertical-align: top;
            display: inline-block;
        }

.cal-panel {
    background-color: #ffffff;
    max-width: 600px;
    margin-top:15px;
    margin-bottom: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-soft);
    padding: 22px;
}

        .cal-panel .box {
            flex: 1;
        }

        .cal-panel label {
            font-weight: 600;
            margin-bottom: 6px;
            display: block;            
            padding-left:10px;
        }

.list-panel label, .unit-list {
    margin-top:5px;
    height: 50px;
}

.list-panel label {
    line-height: 1.2;
    margin-top: 12px;
}

ul.base-links li{
    padding:5px 0;
}

.convert-title {
    font-weight: bold;
    font-size: 18px;
    padding: 10px 0;
}

.copy-btn {
    margin-top: 10px;
    font-size:14px;
}

.cal-panel input[type="number"] {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

    @media (min-width: 768px) {        

        .tabs {
            display: block;
        }


        .panel-area {
            display: flex;
        }
    }

.table-responsive {
    margin: 1.5rem 0;
    overflow-x: auto;
}

.conversion-table {
    min-width:320px;
    border-collapse: collapse;
    background-color: #fff;
    color: #222;
}

    .conversion-table th,
    .conversion-table td {
        padding: 0.5rem 0.75rem;
        border: 1px solid #dcdcdc;
        text-align: left;
        white-space: nowrap;
    }

    .conversion-table th {
        background-color: #2f5f8f;
        color: #fff;
        font-weight: 600;
    }

        .conversion-table th:first-child,
        .conversion-table td:first-child {
            padding-right: 0.75rem;
            text-align:right;
        }

        .conversion-table th:last-child,
        .conversion-table td:last-child {
            padding-left: 0.75rem;
        }

    .conversion-table tbody tr:nth-child(even) {
        background-color: #f5f7f9;
    }

.conversion-details{
    margin:10px;
}


:root {
    --bg: #f5f7fb;
    --bg-alt: #ffffff;
    --primary: #35b87f;
    --primary-soft: #e4f7ef;
    --accent-blue: #2f6fde;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-soft: #e5e7eb;
    --card-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    --radius-lg: 20px;
    --radius-md: 12px;
    --transition: 0.25s ease;
}

body {
    font-family: Inter, system-ui, sans-serif;
    background: #f5f7fb;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    font-size: 16px;
    line-height: 1.6;
}

.page {
    max-width: 1200px;
    margin: auto;
    padding: 28px 20px 50px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin:0 auto;
    margin-bottom: 34px;
}

@media (min-width: 768px) {
    header {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    header {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    header {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    header {
        max-width: 1320px;
    }
}

    .logo {
        display: flex;
        align-items: center;
        gap: 12px;
    }

.logo a{
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

    .logo-icon {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: conic-gradient(from 180deg, #35b87f, #2f6fde, #fbbf24, #35b87f);
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-weight: 700;
        font-size: 18px;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.22);
    }

    .logo-text-main {
        font-size: 20px;
        font-weight: 700;
    }

    .logo-text-sub {
        font-size: 12px;
        color: var(--text-muted);
    }

    nav {
        display: flex;
        gap: 18px;
        font-size: 15px;
        color: var(--text-muted);
    }

        nav a {
            padding: 6px 12px;
            border-radius: 999px;
            transition: var(--transition);
        }

        nav.breadcrumb a {
            padding: 0;
        }

        nav a:hover {
            background: rgba(148, 163, 184, 0.15);
            color: var(--text-main);
        }

    .hero {
        display: grid;
        grid-template-columns: 1.4fr 1fr;
        gap: 34px;
        align-items: center;
        margin-bottom: 46px;
    }

    .hero-text h1 {
        font-size: 36px;
        font-weight: 700;
        margin-bottom: 12px;
        line-height: 1.2;
    }

        .hero-text h1 span {
            color: var(--primary);
        }

    .hero-text p {
        font-size: 17px;
        color: var(--text-muted);
        max-width: 520px;
        margin-bottom: 22px;
    }

    .hero-actions {
        display: flex;
        gap: 14px;
    }

    .btn-primary {
        background: var(--primary);
        color: #fff;
        padding: 12px 24px;
        border-radius: 999px;
        font-size: 17px;
        font-weight: 600;
        border: none;
        cursor: pointer;
        box-shadow: 0 12px 24px rgba(34, 197, 94, 0.25);
        transition: var(--transition);
    }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 16px 32px rgba(34, 197, 94, 0.32);
        }

    .btn-secondary {
        background: #fff;
        border: 2px solid var(--border-soft);
        padding: 12px 24px;
        border-radius: 999px;
        font-size: 17px;
        cursor: pointer;
        transition: var(--transition);
        color: var(--text-main);
    }

        .btn-secondary:hover {
            border-color: rgba(148, 163, 184, 0.8);
            transform: translateY(-2px);
        }

    .hero-card {
        background: #fff;
        padding: 22px;
        border-radius: var(--radius-lg);
        box-shadow: var(--card-shadow);
        border: 1px solid var(--border-soft);
    }

    .hero-card-title {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 12px;
    }

    .converter-box {
        margin-bottom: 18px;
    }

        .converter-box label {
            font-size: 17px;
            font-weight: 600;
            margin-bottom: 6px;
            display: block;
        }

        .converter-box input,
        .converter-box select {
            width: 100%;
            padding: 12px;
            border-radius: var(--radius-md);
            border: 2px solid var(--border-soft);
            font-size: 17px;
            transition: var(--transition);
        }

            .converter-box input:focus,
            .converter-box select:focus {
                border-color: var(--primary);
                box-shadow: 0 0 0 3px rgba(53, 184, 127, 0.25);
            }

    .converter-result {
        margin-top: 10px;
        font-size: 18px;
        color: var(--primary);
        font-weight: 700;
    }

    .section {
        margin-bottom: 46px;
    }

    .section-title {
        font-size: 26px;
        font-weight: 700;
        margin-bottom: 10px;
    }

    .section-subtitle {
        font-size: 17px;
        color: var(--text-muted);
        margin-bottom: 22px;
    }

    .categories-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }

    .category-card {
        background: #fff;
        padding: 18px;
        border-radius: var(--radius-md);
        border: 1px solid var(--border-soft);
        box-shadow: var(--card-shadow);
        transition: var(--transition);
    }

        .category-card:hover {
            transform: translateY(-3px);
            box-shadow: 0 14px 28px rgba(15, 23, 42, 0.12);
        }

    .category-title {
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 6px;
    }

    .category-desc {
        font-size: 16px;
        color: var(--text-muted);
        margin-bottom: 10px;
    }

    .category-link {
        font-size: 16px;
        color: var(--accent-blue);
        font-weight: 600;
    }

    .content-block {
        background: #fff;
        padding: 22px;
        border-radius: var(--radius-md);
        border: 1px solid var(--border-soft);
        box-shadow: var(--card-shadow);
        font-size: 17px;
        color: var(--text-muted);
    }

        .content-block h3 {
            font-size: 20px;
            font-weight: 700;
            margin-bottom: 10px;
            color: var(--text-main);
        }

    footer {
        margin-top: 46px;
        padding-top: 22px;
        border-top: 1px solid var(--border-soft);
        font-size: 16px;
        color: var(--text-muted);
        display: flex;
        justify-content: space-between;
    }

    @media (max-width: 900px) {
        .hero {
            grid-template-columns: 1fr;
        }

        .categories-grid {
            grid-template-columns: repeat(2, 1fr);
        }
    }

    @media (max-width: 640px) {
        .categories-grid {
            grid-template-columns: 1fr;
        }
    }
    /* Make Quick converter wider */
    .hero-card {
        max-width: 480px; /* increased width */
        width: 100%;
    }
    /* Put From + To unit on same line */
    .converter-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
    }
        /* Ensure labels + inputs look good in two-column layout */
        .converter-row .converter-box {
            margin-bottom: 0;
        }