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

html {
    width: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0d0119 url('../images/Background4.png');
    background-size: 50%;
    background-position: left top;
    background-repeat: no-repeat;
    min-height: auto !important;
    height: auto !important;
    position: relative;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    width: 100%;
}

.wave-pattern {
    position: absolute;
    top: 0;
    left: -100px;
    width: 300px;
    height: 100%;
    opacity: 0.15;
    pointer-events: none;
    z-index: 0;
}

.background-accent {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 50vw;
    max-width: 700px;
    aspect-ratio: 1 / 1;
    background: url('../images/Background5.png') no-repeat center;
    background-size: contain;
    pointer-events: none;
    z-index: 0 !important;
}

.wave {
    position: absolute;
    width: 200%;
    height: 200px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
}

.wave1 {
    top: 10%;
    left: -50%;
}

.wave2 {
    top: 30%;
    left: -60%;
}

.wave3 {
    top: 50%;
    left: -55%;
}

.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
    box-sizing: border-box;
}

header {
    text-align: center;
    margin-bottom: 50px;
    position: relative;
    padding-top: 20px;
}

.header-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    height: 20px;
    width: auto;
}

.header-logo a {
    display: block;
    text-decoration: none;
}

.header-logo img {
    height: 100%;
    width: auto;
    transition: opacity 0.3s ease;
}

.header-logo a:hover img {
    opacity: 0.7;
}

h1 {
    background: linear-gradient(to right, #FFFFFF, #4ba6d9);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.8em;
    margin-bottom: 10px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}

.subtitle {
    color: #FFFFFF;
    font-size: 1.4em;
    font-weight: 400;
    margin-bottom: 60px;
}

.cta-button {
    display: inline-block;
    background: #2d0457;
    color: white;
    border: none;
    padding: 14px 32px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.05em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 30px;
}

.cta-button:hover {
    background: #240442;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 4, 87, 0.3);
}

.main-content {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 30px;
    margin-top: 10px;
}

.pop-image {
    width: 100%;
    max-width: 220px;
    height: auto;
    margin-top: 0;
    margin-bottom: 0;
    display: block;
}

.pop-image-container {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 30px;
    margin-top: 10px;
    margin-bottom: 0;
    align-items: start;
}

.left-panel {
    background: #C9E5EE;
    backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 16px;
    height: fit-content;
    position: relative;
    z-index: 1;
}

.section {
    margin-bottom: 80px;
}

.section:last-child {
    margin-bottom: 0;
}

.section.highlighted {
    background: rgba(38, 103, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin: -20px;
    margin-bottom: 60px;
    transition: background 0.3s ease;
    animation: highlightPulse 2s ease-in-out;
}

@keyframes highlightPulse {

    0%,
    100% {
        background: rgba(38, 103, 255, 0.1);
    }

    50% {
        background: rgba(38, 103, 255, 0.2);
    }
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #2d0457;
    font-size: 1.1em;
    font-weight: 600;
    margin-bottom: 20px;
}

.section-icon {
    /* make icon a fixed-size square and center its contents */
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    /* avoid emoji baseline size interfering when image is present */
}

.section-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

/* Larger variant for selected section icons (1.5x larger) */
.section-icon.large-icon {
    width: 64px;
    height: 64px;
}

.section-icon.large-icon img {
    width: 50px;
    height: 50px;
    display: block;
}

.section-icon.large-icon img.large-size {
    width: 60px;
    height: 60px;
}

.input-group.margin-bottom-large {
    margin-bottom: 32px;
}

.radio-group.margin-bottom-large {
    margin-bottom: 32px;
}

.info-icon-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    margin-left: 3px;
}

.label-with-info {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-bottom: 8px;
}

.info-icon {
    width: 20px;
    height: 20px;
    display: block;
}

.hidden {
    display: none;
}

.battery-note {
    display: none;
    margin-top: 5px;
    font-size: 0.85em;
    color: #0B1220;
}

.battery-note.visible {
    display: block;
}

.system-size-info {
    line-height: 1.6;
    margin-top: 5px;
}

.system-size-info p {
    margin-bottom: 8px;
}

.system-size-info p:last-child {
    margin-bottom: 0;
}

/* Info pop-up explanations color */
#systemSizeInfo,
#batterySizeInfo,
#homeTimeInfo,
#selfSufficientInfo {
    color: #0c0018 !important;
}

#systemSizeInfo p,
#batterySizeInfo p {
    color: #0c0018 !important;
}

.co2-image {
    display: block;
    margin: 10px auto;
    max-width: 200px;
    height: auto;
}

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

label {
    display: block;
    color: #2d0457;
    font-weight: 500;
    margin-bottom: 8px;
    font-size: 0.95em;
}

select,
input {
    width: 100%;
    padding: 12px;
    border: 2px solid #b8d9e8;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif !important;
    font-size: 1em;
    background: white;
    color: #0B1220;
    transition: border-color 0.3s ease;
}

select option {
    font-family: 'Montserrat', sans-serif !important;
    color: #0B1220;
}

select optgroup {
    font-family: 'Montserrat', sans-serif !important;
}

select:focus,
input:focus {
    outline: none;
    border-color: #4a90c0;
}

.toggle-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.toggle-label {
    color: #2d0457;
    font-weight: 500;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: #0052CC;
    border-radius: 30px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.3s ease;
}

.toggle-switch.active {
    background: #2d0457;
}

.toggle-slider {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-switch.active .toggle-slider {
    transform: translateX(30px);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
}

.radio-option input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.radio-option label {
    margin: 0;
    cursor: pointer;
    color: #0B1220;
}

.small-text {
    font-size: 0.85em;
    color: #0d0119;
    margin-top: 8px;
    line-height: 1.4;
}

.link {
    color: #4a90c0;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

.calculate-btn {
    width: 100%;
    background: #2d0457;
    color: white;
    border: none;
    padding: 14px;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1em;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
    transition: all 0.3s ease;
    margin-top: 25px;
}

.calculate-btn:hover {
    background: #240442;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(45, 4, 87, 0.3);
}

.right-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.cards-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.result-card {
    background: white;
    border: 10px solid #b7d155;
    border-radius: 16px;
    padding: 25px;
    position: relative;
}

.card-icon {
    position: absolute;
    /* align the badge to the top-left corner inside the card */
    top: 12px;
    left: 12px;
    width: auto;
    height: auto;
    background: none;
    /* remove circular background */
    border: none;
    /* remove border */
    border-radius: 0;
    padding: 0;
    display: block;
}

.card-icon img {
    display: block;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.card-title {
    color: #2d0457;
    font-size: 1.8em;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
    margin-top: 20px;
}

.summary-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.summary-item {
    text-align: center;
}

.summary-item:not(:first-child) {
    border-left: 1px solid #e0f0f5;
    padding-left: 15px;
}

.summary-label {
    font-size: 1.1em;
    color: #0B1220;
    margin-bottom: 5px;
}

.summary-value {
    font-size: 1.3em;
    font-weight: 600;
    color: #2d0457;
}

.payback-content {
    text-align: center;
    margin-top: 20px;
}

.payback-years {
    font-size: 3em;
    font-weight: bold;
    color: #2d0457;
    margin: 20px 0;
}

.payback-subtitle {
    font-size: 0.9em;
    color: #0d0119;
    margin-bottom: 20px;
}

.payback-details {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: center;
    margin-bottom: 20px;
}

.payback-details p {
    color: #2d0457;
}

.payback-detail-item {
    background: #f8fcfd;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e0f0f5;
}

.payback-detail-label {
    font-size: 0.85em;
    color: #5a7f9c;
    margin-bottom: 8px;
}

.payback-detail-value {
    font-size: 1.5em;
    font-weight: 600;
    color: #2d0457;
}

.chart-container {
    width: 100%;
    height: 250px;
    margin-top: 20px;
}

.solar-generation-content {
    margin-top: 20px;
}

.annual-generation-top {
    text-align: center;
    margin-bottom: 35px;
    padding-bottom: 0;
}

.annual-generation-top .solar-gen-label {
    font-size: 1.1em;
    color: #0B1220;
    margin-bottom: 8px;
}

.annual-generation-top .solar-gen-value {
    font-size: 1.8em;
    font-weight: 600;
    color: #2d0457;
}

.solar-used-directly-top {
    margin-top: 30px;
    padding-top: 25px;
    padding-bottom: 25px;
    border-top: 1px solid #e0f0f5;
}

.solar-used-directly-top .solar-gen-label {
    font-size: 1.1em;
    color: #0B1220;
    margin-bottom: 5px;
}

.solar-used-directly-top .solar-gen-detail {
    font-size: 1.1em;
    color: #2d0457;
}

.solar-export-top {
    margin-top: 10px;
    padding-top: 25px;
    padding-bottom: 25px;
    border-top: 1px solid #e0f0f5;
    border-bottom: 2px solid #e0f0f5;
}

.solar-export-top .solar-gen-label {
    font-size: 1.1em;
    color: #0B1220;
    margin-bottom: 5px;
}

.solar-export-top .solar-gen-detail {
    font-size: 1.1em;
    color: #2d0457;
}

.solar-gen-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.solar-gen-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.solar-gen-label {
    font-size: 0.9em;
    color: #0B1220;
    font-weight: 500;
}

.solar-gen-detail {
    font-size: 1em;
    color: #2d0457;
}

.saving-amount {
    font-weight: 600;
    color: #2d0457;
}

.pie-chart-container {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.pie-chart {
    width: 200px;
    height: 200px;
    position: relative;
}

.percentage-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.5em;
    font-weight: bold;
    color: #2d0457;
}

.percentage-label {
    text-align: center;
    margin-top: 15px;
    color: #5a7f9c;
    font-size: 0.95em;
}

.co2-content {
    text-align: center;
    margin-top: 20px;
}

.co2-content .small-text {
    color: #0B1220;
}

.co2-value {
    font-size: 1.1em;
    color: #0B1220;
    margin-bottom: 10px;
}

.trees-text {
    font-size: 1.8em;
    font-weight: 600;
    color: #2d0457;
    margin: 15px 0;
}

.trees-illustration {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 15px 0;
    min-height: 60px;
    flex-wrap: wrap;
}

.tree {
    font-size: 2.5em;
    line-height: 1;
    animation: fadeIn 0.5s ease-in-out;
}

.tree-image {
    width: 35px;
    height: auto;
    animation: fadeIn 0.5s ease-in-out;
}

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

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

footer {
    background: #FFFFFF;
    color: #0d0119;
    padding: 30px 20px;
    margin-top: 60px;
    margin-left: 0;
    margin-right: 0;
    text-align: center;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 10px;
}

.follow-us-text {
    color: #0d0119;
    font-size: 0.9em;
    font-weight: 500;
}

.social-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.social-icon:hover {
    opacity: 0.7;
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex: 1;
}

.footer-logo {
    height: 32px;
    width: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.made-by-text {
    color: #0d0119;
    font-size: 0.9em;
    font-weight: 400;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.made-by-text:hover {
    opacity: 0.7;
}

.footer-logo img {
    height: 100%;
    width: auto;
}

.footer-links a {
    color: #0d0119;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 0.7;
}

.disclaimer {
    font-size: 0.85em;
    color: #FFFFFF;
    margin-top: 20px;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.6;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.placeholder-text {
    text-align: center;
    color: #0B1220;
    padding: 40px 20px;
    font-size: 0.95em;
    white-space: normal;
}

.battery-size-group {
    display: none;
    margin-top: 20px;
}

.battery-size-group.visible {
    display: block;
}

.rebate-section {
    margin-bottom: 12px;
    margin-top: 8px;
    text-align: left;
}

.rebate-section .small-text {
    color: #0B1220;
}

.battery-item-hidden {
    display: none;
}

.trees-default {
    color: #5a7f9c;
}

.driving-label {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0f0f5;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .left-panel {
        order: 1;
    }

    .right-panel {
        order: 2;
    }

    .cards-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    body {
        margin: 0;
        padding: 0;
        width: 100%;
    }

    .container {
        padding: 20px 15px;
        max-width: 100%;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }

    header {
        padding-top: 40px;
        padding-left: 0;
        padding-right: 0;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }

    .header-logo {
        height: 18px;
        margin-bottom: 15px;
    }

    h1 {
        font-size: 1.8em;
        margin-top: 10px;
    }

    .subtitle {
        font-size: 1.0em;
    }

    .cta-button {
        padding: 12px 24px;
        font-size: 0.95em;
    }

    .pop-image-container {
        grid-template-columns: 1fr;
        gap: 0;
        margin-top: 15px;
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        box-sizing: border-box;
    }

    .pop-image {
        width: 50%;
        max-width: 50%;
        margin-top: 0;
        margin-bottom: 15px;
    }

    .main-content {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }

    .left-panel {
        padding: 20px;
        width: 100%;
        box-sizing: border-box;
        margin: 0 auto;
    }

    .right-panel {
        width: 100%;
        box-sizing: border-box;
        margin: 0 auto;
    }

    .section {
        margin-bottom: 40px;
    }

    .result-card {
        width: 100%;
        box-sizing: border-box;
        margin: 0;
    }

    .cards-row {
        margin: 0;
    }

    .section-title {
        font-size: 1em;
    }

    .card-title {
        font-size: 1.4em;
    }

    .summary-items {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .summary-item:not(:first-child) {
        border-left: none;
        border-top: 1px solid #e0f0f5;
        padding-left: 0;
        padding-top: 15px;
        margin-left: 0;
    }

    .payback-details {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .cards-row {
        grid-template-columns: 1fr;
    }

    .result-card {
        padding: 20px;
        border: 10px solid #b7d155;
        border-radius: 12px;
    }

    .left-panel {
        border-radius: 12px;
    }

    select,
    input {
        border: 1px solid #b8d9e8;
        border-radius: 6px;
        font-family: 'Montserrat', sans-serif !important;
    }

    select option {
        font-family: 'Montserrat', sans-serif !important;
    }

    .payback-years {
        font-size: 2.5em;
    }

    .footer-links {
        order: 1;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }

    .footer-logo {
        order: 2;
        position: static;
        margin-top: 0;
        justify-content: center;
    }

    .footer-social {
        order: 3;
        justify-content: center;
        margin-bottom: 20px;
    }

    .follow-us-text {
        font-size: 1.1em;
    }

    .social-icon svg {
        width: 24px;
        height: 24px;
    }

    footer {
        flex-direction: column;
        padding: 25px 15px;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
    }

    .background-accent {
        width: 60vw;
        max-width: 500px;
        right: 0;
        bottom: 0;
    }
}

@media (max-width: 480px) {
    body {
        margin: 0;
        padding: 0;
        width: 100%;
    }

    .container {
        padding: 15px 10px;
        max-width: 100%;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }

    header {
        padding-top: 35px;
        padding-left: 0;
        padding-right: 0;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }

    .header-logo {
        height: 16px;
        margin-bottom: 12px;
    }

    h1 {
        font-size: 1.8em;
        padding: 0 10px;
    }

    .subtitle {
        font-size: 1.0em;
        padding: 0 10px;
    }

    .left-panel {
        padding: 15px;
        width: 100%;
        box-sizing: border-box;
        margin: 0 auto;
    }

    .right-panel {
        width: 100%;
        box-sizing: border-box;
        margin: 0 auto;
    }

    .result-card {
        width: 100%;
        box-sizing: border-box;
        margin: 0;
    }

    .cards-row {
        margin: 0;
    }

    select,
    input {
        width: 100%;
        box-sizing: border-box;
        font-family: 'Montserrat', sans-serif !important;
    }

    select option {
        font-family: 'Montserrat', sans-serif !important;
    }

    .card-title {
        font-size: 1.2em;
    }

    .summary-value {
        font-size: 1.1em;
    }

    .payback-years {
        font-size: 2em;
    }

    .trees-text {
        font-size: 1.5em;
    }

    .result-card {
        padding: 15px;
        border: 10px solid #b7d155;
        border-radius: 10px;
    }

    .left-panel {
        border-radius: 10px;
    }

    select,
    input {
        border: 1px solid #b8d9e8;
        border-radius: 6px;
        padding: 10px;
        font-family: 'Montserrat', sans-serif !important;
    }
    
    select option {
        font-family: 'Montserrat', sans-serif !important;
    }

    .toggle-switch {
        min-height: 30px;
        min-width: 60px;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }

    .calculate-btn {
        min-height: 44px;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
    }

    .background-accent {
        width: 70vw;
        max-width: 360px;
        right: 0;
        bottom: 0;
    }

}