/* ================================
   kJ to kWh Calculator
   Main Stylesheet
================================ */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    color: #14231b;
    background: #ffffff;
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1180px, 92%);
    margin: 0 auto;
}


/* ================================
   Header
================================ */

.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e6ebe7;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.logo {
    color: #176b3a;
    font-size: 25px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.main-nav a {
    color: #425047;
    font-size: 16px;
    font-weight: 600;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: #176b3a;
}


/* ================================
   Hero
================================ */

.hero {
    padding: 75px 0 60px;
    background: #f7faf8;
}

.eyebrow {
    margin-bottom: 14px;
    color: #176b3a;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
}

.hero h1 {
    max-width: 850px;
    margin-bottom: 18px;
    font-size: clamp(42px, 6vw, 68px);
    line-height: 1.08;
    letter-spacing: -2.5px;
    color: #14231b;
}

.hero-text {
    max-width: 720px;
    color: #5d6d64;
    font-size: 20px;
    line-height: 1.7;
}


/* ================================
   Calculator
================================ */

.calculator-section {
    padding: 65px 0;
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    align-items: stretch;
}

.calculator-card,
.result-card {
    border: 1px solid #dce5df;
    border-radius: 18px;
    padding: 38px;
    background: #ffffff;
    box-shadow: 0 10px 35px rgba(23, 107, 58, 0.06);
}

.calculator-card h2,
.result-card h2 {
    margin-bottom: 28px;
    color: #14231b;
    font-size: 30px;
    line-height: 1.2;
}

.calculator-card label {
    display: block;
    margin-bottom: 10px;
    color: #17271e;
    font-size: 16px;
    font-weight: 700;
}

.calculator-card input {
    width: 100%;
    height: 58px;
    margin-bottom: 18px;
    padding: 0 17px;
    border: 1px solid #cfdad3;
    border-radius: 10px;
    outline: none;
    background: #ffffff;
    color: #14231b;
    font-size: 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.calculator-card input:focus {
    border-color: #176b3a;
    box-shadow: 0 0 0 3px rgba(23, 107, 58, 0.1);
}

.calculate-button,
.reset-button {
    width: 100%;
    min-height: 54px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calculate-button {
    border: none;
    background: #176b3a;
    color: #ffffff;
}

.calculate-button:hover {
    background: #11562e;
    transform: translateY(-1px);
}

.reset-button {
    margin-top: 12px;
    border: 1px solid #d3ded7;
    background: #f7faf8;
    color: #31513f;
}

.reset-button:hover {
    background: #edf4ef;
}


/* ================================
   Result
================================ */

.result-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #f8fbf9;
}

.result-label {
    margin-bottom: 12px;
    color: #176b3a;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 2px;
}

.result-card h2 {
    margin-bottom: 18px;
    font-size: clamp(38px, 5vw, 58px);
    color: #176b3a;
    overflow-wrap: anywhere;
}

.result-card p:last-child {
    max-width: 520px;
    color: #5d6d64;
    font-size: 17px;
}


/* ================================
   Content Sections
================================ */

.content-section {
    padding: 75px 0;
}

.alternate-section {
    background: #f7faf8;
}

.content-section h2 {
    margin-bottom: 18px;
    color: #14231b;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.2;
    letter-spacing: -1px;
}

.content-section > .container > p {
    max-width: 800px;
    margin-bottom: 28px;
    color: #5d6d64;
    font-size: 17px;
}


/* ================================
   Formula
================================ */

.formula-box {
    max-width: 700px;
    margin: 30px 0 40px;
    padding: 25px;
    border: 1px solid #cfe0d4;
    border-radius: 14px;
    background: #eef7f1;
    color: #176b3a;
    font-size: 25px;
    font-weight: 800;
    text-align: center;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}

.info-card {
    padding: 27px;
    border: 1px solid #dce5df;
    border-radius: 15px;
    background: #ffffff;
}

.info-card h3 {
    margin-bottom: 10px;
    color: #14231b;
    font-size: 20px;
}

.info-card p {
    color: #5d6d64;
    font-size: 16px;
}


/* ================================
   Examples
================================ */

.example-box {
    max-width: 800px;
    margin-top: 20px;
    padding: 25px;
    border-left: 4px solid #176b3a;
    border-radius: 8px;
    background: #ffffff;
}

.example-box h3 {
    margin-bottom: 10px;
    color: #14231b;
    font-size: 20px;
}

.example-box p {
    margin-top: 8px;
    color: #5d6d64;
    font-size: 16px;
}

.example-box strong {
    color: #176b3a;
}


/* ================================
   Conversion Table
================================ */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 25px;
    border: 1px solid #dce5df;
    border-radius: 14px;
    background: #ffffff;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 500px;
}

thead {
    background: #176b3a;
    color: #ffffff;
}

th,
td {
    padding: 16px 20px;
    border-bottom: 1px solid #e3e9e5;
    text-align: left;
}

th {
    font-size: 15px;
    font-weight: 700;
}

td {
    color: #425047;
    font-size: 16px;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: #f7faf8;
}


/* ================================
   FAQ
================================ */

.faq-list {
    max-width: 900px;
    margin-top: 30px;
}

.faq-list details {
    margin-bottom: 12px;
    border: 1px solid #dce5df;
    border-radius: 12px;
    background: #ffffff;
    overflow: hidden;
}

.faq-list summary {
    position: relative;
    padding: 20px 50px 20px 22px;
    color: #14231b;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}

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

.faq-list summary::after {
    content: "+";
    position: absolute;
    right: 22px;
    top: 16px;
    color: #176b3a;
    font-size: 25px;
    font-weight: 400;
}

.faq-list details[open] summary::after {
    content: "−";
}

.faq-list details p {
    padding: 0 22px 21px;
    color: #5d6d64;
    font-size: 16px;
}


/* ================================
   Footer
================================ */

.site-footer {
    padding: 30px 0;
    border-top: 1px solid #e0e7e2;
    background: #14231b;
    color: #dbe5df;
    text-align: center;
}

.site-footer p {
    font-size: 14px;
}


/* ================================
   Tablet
================================ */

@media (max-width: 900px) {

    .header-inner {
        min-height: 70px;
    }

    .main-nav {
        gap: 18px;
    }

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

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

    .hero {
        padding: 60px 0 50px;
    }

}


/* ================================
   Mobile
================================ */

@media (max-width: 650px) {

    .container {
        width: min(92%, 540px);
    }

    .header-inner {
        flex-direction: column;
        justify-content: center;
        gap: 8px;
        padding: 14px 0;
    }

    .logo {
        font-size: 22px;
    }

    .main-nav {
        width: 100%;
        justify-content: center;
        gap: 14px;
        flex-wrap: wrap;
    }

    .main-nav a {
        font-size: 14px;
    }

    .hero {
        padding: 48px 0 42px;
    }

    .hero h1 {
        font-size: 42px;
        letter-spacing: -1.5px;
    }

    .hero-text {
        font-size: 17px;
    }

    .calculator-section,
    .content-section {
        padding: 50px 0;
    }

    .calculator-card,
    .result-card {
        padding: 25px;
        border-radius: 14px;
    }

    .calculator-card h2,
    .result-card h2 {
        font-size: 27px;
    }

    .result-card h2 {
        font-size: 40px;
    }

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

    .formula-box {
        font-size: 21px;
        padding: 20px 15px;
    }

    .content-section h2 {
        font-size: 31px;
    }

    th,
    td {
        padding: 13px 14px;
    }

}


/* ================================
   Small Mobile
================================ */

@media (max-width: 400px) {

    .hero h1 {
        font-size: 35px;
    }

    .main-nav {
        gap: 10px;
    }

    .main-nav a {
        font-size: 13px;
    }

    .calculator-card,
    .result-card {
        padding: 20px;
    }

    .result-card h2 {
        font-size: 34px;
    }

}
