:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --accent: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --white: #ffffff;
    --text: #334155;
    --text-light: #64748b;
    --border: #e2e8f0;
    --success: #22c55e;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: #ffffff;
}

a {
    text-decoration: none;
}
.container {
    width: 90%;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===== Header Styles ===== */
.header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    text-decoration: none;
}

.logo-icon {
    color: var(--primary);
}
.logo svg {
    width: 36px;
    height: 36px;
    color: var(--primary);
}

.nav-list {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-cta {
    background: var(--primary);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: transform 0.2s ease;
    margin-left: 1rem;
}

.nav-cta:hover {
    transform: translateY(-2px);
    background: var(--primary-dark);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    padding: 1rem;
    cursor: pointer;
    background: transparent;
    border: 0;
    z-index: 1001;
}

.hamburger-box {
    width: 30px;
    height: 24px;
    display: inline-block;
    position: relative;
}

.hamburger-inner {
    width: 100%;
    height: 2px;
    background: var(--dark);
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.2s ease;
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    width: 100%;
    height: 2px;
    background: inherit;
    position: absolute;
    left: 0;
    transition: transform 0.3s ease;
}

.hamburger-inner::before {
    top: -8px;
}

.hamburger-inner::after {
    top: 8px;
}

/* ===== Hero Section ===== */
.hero {
    padding: 160px 0 80px;
    background: linear-gradient(to bottom right, var(--light) 50%, #ffffff 50%);
    border-bottom: #ebeff5 1px solid;
}

.hero-content {
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    color: var(--dark);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 2.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 3rem;
}

.cta-button {
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 2px solid transparent;
}

.cta-button:not(.secondary) {
    background: var(--primary);
    color: white;
}

.cta-button:not(.secondary):hover {
    background: var(--primary-dark);
}

.cta-button.secondary {
    background: white;
    color: var(--primary);
    border-color: var(--primary);
}

.cta-button.secondary:hover {
    background: var(--primary);
    color: white;
}

/* ===== Calculator Categories ===== */
.calculator-categories {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--dark);
    margin-bottom: 1rem;
    text-align: center;
}

.section-subtitle {
    color: var(--text-light);
    font-size: 1.1rem;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.cards-container1 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card1 {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.4rem;
    padding: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: gap 0.3s;
}

.card-link:hover {
    gap: 1rem;
}

.card-link1 {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    transition: gap 0.3s;
    font-size: 1rem;
    font-weight: bold;
}

.card-link1:hover {
    gap: 1rem;
    color: var(--primary-dark);
}

/* ===== Stats Section ===== */
.stats {
    background: var(--dark);
    color: white;
    padding: 6rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
    text-align: center;
}

.stat h3 {
    font-size: 3rem;
    color: var(--accent);
    margin-bottom: 1rem;
}

.stat p {
    color: var(--white);
    font-size: 1.1rem;
}


/* ===== Footer ===== */
.footer {
    background: var(--dark);
    color: #cbd5e0;
}

.footer-top {
    padding: 4rem 0;
    border-bottom: 1px solid #4a5568;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.footer-brand .logo {
    color: white;
}

.footer-text {
    color: var(--white);
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
}

.social-links a {
    color: #cbd5e0;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--primary);
}

.footer-col h4 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-col a {
    color: var(--light);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding: 2rem 0;
}

.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    color: var(--light);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: #cbd5e0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary);
}

/* kW Calculator Specific Styles */
.calculator-detail {
    padding: 2rem 0;
}

.calculator-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 3rem;
}

.calculator-header {
    text-align: center;
    margin-bottom: 2rem;
}

.calculator-version {
    color: var(--text-light);
    font-size: 0.9rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
}

.input-group select {
    margin-top: 0.5rem;
    background: var(--light);
}

.calculator-results {
    background: var(--light);
    padding: 2rem;
    border-radius: 0.5rem;
}

.result-box {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    font-size: 1.2rem;
}

.result-box span {
    font-weight: 700;
    color: var(--primary);
}

.explanation-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin: 4rem 0;
}

.formula-section {
    background: var(--light);
    padding: 2rem;
    border-radius: 0.5rem;
}

.formula-box {
    background: white;
    padding: 1.5rem;
    margin: 1rem 0;
    border-radius: 0.5rem;
    font-family: monospace;
    font-size: 1.2rem;
}

.note {
    color: var(--text-light);
    font-size: 0.9rem;
}

.theory-section ul {
    list-style: none;
    padding-left: 1rem;
}

.theory-section li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.theory-section li::before {
    content: "•";
    color: var(--primary);
    position: absolute;
    left: 0;
}

#phaseGroup {
    transition: all 0.3s ease;
}

/* How to Use Section */
.guide-section {
    background: var(--light);
    padding: 1rem;
    border-radius: 1rem;
    margin: 3rem 0;
}

.guide-section h2 {
    font-size: 1.75rem;
    color: var(--dark);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.guide-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
}

.guide-card h3 {
    color: var(--primary);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.guide-card ol {
    padding-left: 1.5rem;
    color: var(--text-light);
}

.guide-card li {
    margin-bottom: 0.5rem;
}

/* Enhanced Theory Section */
.theory-section.enhanced {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid var(--border);
}

.theory-cards {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.theory-card {
    padding: 1.5rem;
    background: var(--light);
    border-radius: 0.75rem;
}

.theory-card h4 {
    color: var(--primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.formula-notes {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-top: 1.5rem;
}

.formula-notes p {
    margin-bottom: 0.75rem;
}

.formula {
    color: var(--primary);
    font-weight: 600;
    display: inline-block;
    margin-top: 0.5rem;
}

/* Formula Section Enhancements */
.formula-section .formula-box {
    background: var(--light);
    border: 1px dashed var(--primary);
}

/* Button Group Styling */
.button-group {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    margin: 0 auto;
    justify-content: center;
}

.cta-button.secondary {
    background: var(--light);
    color: var(--primary);
    border: 2px solid var(--primary);
}

.cta-button.secondary:hover {
    background: var(--primary);
    color: white;
}

/* Calculation Example */
.calculation-example {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-top: 1.5rem;
    border-left: 4px solid var(--accent);
}

.calculation-example h4 {
    color: var(--dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.example-steps {
    color: var(--text-light);
    line-height: 1.6;
}

.example-steps p {
    margin: 0.5rem 0;
}

/* Result Box Enhancements */
.result-box {
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.result-box p {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.result-box p:last-child {
    border-bottom: none;
}

/* Formula Display Enhancements */
.formula {
    font-family: monospace;
    font-size: 1.1rem;
    background: rgba(37, 99, 235, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* New Calculator Grid Styles */
.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
}

.calculator-form {
    width: 100%;
    margin: 0 auto 3rem;
    padding-right: 2rem;
    border-right: 2px solid var(--border);
}

/* ===== FAQ Section ===== */
.faq-container {
    display: grid;
    gap: 1rem;
}

.faq-item {
    background: white;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    overflow: hidden;
}

.faq-item summary { /* Changed from h3 */
    padding: 1.5rem;
    margin: 0;
    background: var(--light);
    color: var(--dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Added for arrow alignment */
    gap: 1rem;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
    list-style: none; /* Hide default marker */
}
.faq-item summary::-webkit-details-marker {
    display: none; /* Hide marker for Chrome/Safari */
}

.faq-item summary:hover {
    background: #e2e8f0;
}

.faq-item summary:after { /* Custom arrow */
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    transition: transform 0.3s ease;
    color: var(--primary);
}

.faq-item[open] > summary:after {
    transform: rotate(180deg);
}

.faq-answer { /* Changed from .faq-item p */
    padding: 1.5rem;
    color: var(--text);
    line-height: 1.6;
}

.faq-answer ul {
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}
    
    /* UI Improvements for Info Cards and Tables */
    .info-card-grid {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Two columns on desktop */
        gap: 2rem;
        margin-top: 3rem;
    }
    /* Media query for mobile screens */
    @media (max-width: 768px) {
        .info-card-grid {
            grid-template-columns: 1fr; /* One column on mobile */
        }
    }
    .info-card {
        background-color: #ffffff;
        border: 1px solid #e2e2e2;
        border-radius: 10px;
        padding: 25px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.05);
        display: flex;
        flex-direction: column;
    }
    .info-card h3 {
        font-size: 1.25rem;
        margin-top: 0;
        margin-bottom: 10px;
        color: #0056b3;
        display: flex;
        align-items: center;
    }
    .info-card h3 i {
        margin-right: 10px;
    }
    .info-card p {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 15px;
    }
    .table-responsive {
        width: 100%;
        overflow-x: auto;
    }
    .card-table {
        width: 100%;
        border-collapse: collapse;
    }
    .card-table th, .card-table td {
        padding: 12px 15px;
        text-align: left;
        border-bottom: 1px solid #e2e2e2;
    }
    .card-table thead th {
        background-color: #f8f9fa;
        font-weight: 600;
        color: #333;
        border-top: 1px solid #e2e2e2;
    }
    .card-table tbody tr:nth-child(even) {
        background-color: #f8f9fa;
    }
    .card-table tbody tr:hover {
        background-color: #e9ecef;
    }

    /* Styling for the FAQ section */
    .faq-section {
        margin-top: 3rem;
    }
     .faq-section h2 {
        text-align: center;
        margin-bottom: 2rem;
        font-size: 2rem;
        color: #333;
    }
    .faq-section details {
        background: #fff;
        border: 1px solid #e2e2e2;
        border-radius: 8px;
        margin-bottom: 10px;
        padding: 0; /* Remove padding from details */
        box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    }
    .faq-section summary {
        font-weight: 600;
        cursor: pointer;
        outline: none;
        list-style: none; /* Hide the default marker */
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px; /* Add padding to summary */
    }
     .faq-section summary::-webkit-details-marker {
        display: none; /* Hide marker for Chrome/Safari */
    }
    .faq-section summary:after {
        content: '\f078'; /* Font Awesome down arrow */
        font-family: 'Font Awesome 6 Free';
        font-weight: 900;
        transition: transform 0.2s ease-in-out;
    }
    .faq-section details[open] summary:after {
        transform: rotate(180deg);
    }
    .faq-section summary:hover {
        color: #0056b3;
    }
    .faq-section .faq-answer {
        margin-top: 0;
        line-height: 1.6;
        border-top: 1px solid #e2e2e2;
        padding: 15px 20px;
    }
    
/* ===== Related Tools Section ===== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--dark);
    margin-bottom: 1rem;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
}

.card-icon {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    transition: gap 0.3s;
}

.card-link:hover {
    gap: 1rem;
}

.calculation-details {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
    margin-top: 1rem;
}

.calculation-details h4 {
    color: var(--dark);
    margin-bottom: 1rem;
}

#stepByStep {
    color: var(--text);
    line-height: 1.6;
}

#stepByStep p {
    margin: 0.5rem 0;
}

#stepByStep ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

#stepByStep h5 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.sizing-guidelines {
    margin-top: 2rem;
}

.sizing-guidelines h4 {
    color: var(--dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.guidelines-grid {
    display: grid;
    gap: 1rem;
}

.guideline-item {
    background: white;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.guideline-item h5 {
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.guideline-item ul {
    padding-left: 1.5rem;
    color: var(--text-light);
}

.guideline-item li {
    margin-bottom: 0.25rem;
}


/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        row-gap: 4rem;
    }
}

@media (max-width: 768px) {

    .guide-steps-grid {
    display: grid;
    justify-content: center;
    grid-template-columns: 100%;
}

.logo {
    margin-left: 10px;
}

.guide-step-card {
    width: 100%;
    max-width: 450px;
}

    .footer {
        padding: 1rem;
    }
    .hamburger {
        display: block;
    }
    .nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: white;
        padding: 2rem;
        transition: left 0.3s ease;
    }

    .nav.active {
        left: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 1.5rem;
    }

    .hero {
        padding: 120px 0 60px;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .cards-container {
        grid-template-columns: 1fr;
    }

        .cards-container1 {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-bottom .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 3rem;
}

.nav-cta {
    background: var(--primary);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: transform 0.2s ease;
    margin-left: 0rem;
}

    .explanation-grid {
        grid-template-columns: 1fr;
    }
    
    .result-box {
        grid-template-columns: 1fr;
    }

        .guide-grid {
        grid-template-columns: 1fr;
    }
    
    .theory-cards {
        grid-template-columns: 1fr;
    }
    .calculator-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .calculator-form {
        padding-right: 0;
        border-right: none;
        border-bottom: 2px solid var(--border);
        padding-bottom: 2rem;
    }
    
    .calculator-results {
        padding: 1rem;
    }
    
    /* Ensure full width for all sections */
    .calculator-card,
    .guide-section,
    .explanation-grid,
    .section-header {
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

      .container {
    width: 100% !important;
    padding: 0 1rem !important;
  }
  

    .input-group input,
  .input-group select {
    width: 100%;
    max-width: 100%;
  }
    
}

@media (max-width: 480px) {

    .calculator-card {
    padding: 1rem;
}

      .container {
    width: 100% !important;
    padding: 0 0.5rem !important;
  }

    .calculator-detail {
    padding: 1rem 0;
}
    .hero h1 {
        font-size: 1.8rem;
        padding: 0 1rem;
    }

.hero-subtitle {
    font-size: 1rem;
}

    .hero-cta {
        flex-direction: column;
    }

    .cta-button {
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
    
        .button-group {
        flex-direction: column;
    }
    
    .cta-button {
        width: 100%;
    }

    .input-group input,
.input-group select {
    width: 100%;
    padding: 0.8rem;
    font-size: 1rem;
}

.guide-section {
    padding: 0.5rem;
    margin: 2rem 0;
}

.guide-grid {
    gap: 1rem;
    padding: 0.1rem;
}

    .guide-step-card {
        padding: 1rem;
    }

}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate {
    animation: fadeInUp 0.6s ease forwards;
}

/* ===== IEC Verification Styles ===== */
.iec-check-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--light);
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}

.iec-check-group label {
    font-weight: 600;
    color: var(--dark);
    cursor: pointer;
}

#iecCheckbox {
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

#iecInputsContainer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px dashed var(--primary);
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    background-color: #f8fafc;
}

.iec-verification-results {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border);
}

.iec-verification-results h4 {
    color: var(--dark);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.iec-check-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid var(--border);
}

.iec-check-item .status {
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

.iec-check-item .status.pass {
    color: #166534; /* Green */
    background-color: #dcfce7;
}

.iec-check-item .status.fail {
    color: #991b1b; /* Red */
    background-color: #fee2e2;
}

.iec-summary {
    margin-top: 1rem;
    font-weight: bold;
    text-align: center;
    padding: 1rem;
    border-radius: 0.5rem;
}

.iec-summary.pass {
    color: #166534;
    background-color: #dcfce7;
}

.iec-summary.fail {
    color: #991b1b;
    background-color: #fee2e2;
}

.result-alert {
    font-size: 0.9rem;
    color: #b91c1c; /* Red */
    font-weight: 600;
    margin-top: 8px;
    background-color: #fee2e2;
    padding: 8px;
    border-radius: 4px;
    text-align: center;
}

/* Responsive adjustments for IEC section */
@media (max-width: 768px) {
    #iecInputsContainer {
        grid-template-columns: 1fr;
    }
}

    /* New styles for the full-width IEC guide section */
    .iec-guide-section {
        background-color: var(--light);
        padding: 2.5rem 2rem;
        border-radius: 1rem;
        margin-top: 3rem;
    }
    .iec-guide-section h3 {
        text-align: center;
        font-size: 2rem;
        color: var(--dark);
        margin-bottom: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 1rem;
    }
    .guide-steps-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 1.5rem;
        margin-bottom: 2.5rem;
    }
    .guide-step-card {
        background-color: var(--white);
        padding: 1.5rem;
        border-radius: 0.75rem;
        border: 1px solid var(--border);
        box-shadow: 0 4px 6px rgba(0,0,0,0.05);
        transition: transform 0.3s, box-shadow 0.3s;
    }
    .guide-step-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 15px rgba(0,0,0,0.07);
    }
    .guide-step-card h4 {
        color: var(--primary);
        font-size: 1.25rem;
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }
    .guide-step-card p, .guide-step-card ul {
        color: var(--text-light);
        margin-bottom: 1rem;
    }
     .guide-step-card ul {
        padding-left: 20px;
     }
    .guide-step-card code {
        background-color: #eef2ff;
        color: var(--primary-dark);
        padding: 0.2rem 0.5rem;
        border-radius: 4px;
        font-family: 'Courier New', Courier, monospace;
        font-weight: bold;
    }
    .final-summary-card {
        background: var(--dark);
        color: var(--light);
        padding: 2.5rem;
        border-radius: 0.75rem;
        margin-top: 3rem;
    }
    .final-summary-card h4 {
        color: var(--white);
        margin-bottom: 2rem;
        font-size: 1.75rem;
        text-align: center;
    }
    .checklist-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
        text-align: left;
    }
    .checklist-item {
        background: rgba(255, 255, 255, 0.05);
        padding: 1.25rem;
        border-radius: 0.5rem;
        border: 1px solid #4a5568;
        display: flex;
        align-items: flex-start;
        gap: 1rem;
        transition: background-color 0.3s;
    }
    .checklist-item:hover {
        background: rgba(255, 255, 255, 0.1);
    }
    .checklist-icon i {
        font-size: 2rem;
        color: var(--success);
        margin-top: 5px;
    }
    .checklist-text h5 {
        color: var(--white);
        margin: 0 0 0.25rem 0;
        font-size: 1.1rem;
    }
    .checklist-text p {
        color: #cbd5e0;
        font-size: 0.9rem;
        line-height: 1.5;
        margin: 0;
    }
    /* --- Styles for Derating, Table, and Color Scheme --- */
    .info-section {
        margin-top: 3rem;
        padding: 2.5rem 2rem;
        border: 1px solid var(--border);
        border-radius: 1rem;
    }
    .info-section h3 {
        text-align: center;
        font-size: 2rem;
        color: var(--dark);
        margin-bottom: 2.5rem;
    }
    .derating-section-light {
        background: #f8fafc; /* New light background */
        border: 1px solid var(--border);
        padding: 2.5rem;
        border-radius: 1rem;
        margin-top: 3rem;
    }
    .derating-section-light > h4 {
        color: var(--dark);
        text-align: center;
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    .derating-section-light > p {
        color: var(--text-light);
        text-align: center;
        max-width: 700px;
        margin: 0 auto 2.5rem auto;
    }
    .tables-grid-3-col {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }
    .tables-grid-3-col h4 {
        text-align: center;
        color: var(--dark);
        margin-bottom: 1rem;
        font-size: 1.2rem;
    }

    /* Style for the derating factors section border */
.derating-section {
    border: 2px dotted var(--border);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: 0.5rem;
}

.derating-section legend {
    padding: 0 0.5rem;
    font-weight: 600;
    color: var(--dark);
    font-size: 1.1em;
}

/* Styles for side-by-side input and select */
.input-with-select {
    display: flex;
    align-items: center;
    gap: 0.5rem; /* Adjust space between input and select */
}

.input-with-select input {
    flex-grow: 1; /* Allows the input field to take up available space */
    width: auto;   /* Overrides the default width: 100% */
}

.input-with-select select {
    width: auto;   /* Allows the select to size to its content */
    margin-top: 0; /* Removes the default top margin for selects in a group */
}

/* Styles for the new Recommendation Summary Card */
.recommendation-summary-card {
    background-color: var(--light);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid var(--border);
}

.recommendation-summary-card h4 {
    text-align: center;
    margin: 0 0 1.5rem 0;
    color: var(--dark);
    font-size: 1.2rem;
}

.primary-recommendation {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.primary-recommendation small {
    display: block;
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.primary-recommendation span {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
}

.secondary-recommendations {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr; /* Two-column layout */
    gap: 1rem;
}

.secondary-recommendations li {
    text-align: center;
}

.secondary-recommendations li small {
    display: block;
    color: var(--text-light);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.secondary-recommendations li span {
    font-weight: 600;
    color: var(--dark);
    font-size: 1rem;
}

/* Responsive adjustment for the summary card on small screens */
@media (max-width: 480px) {
    .secondary-recommendations {
        grid-template-columns: 1fr; /* Single column on very small screens */
    }
}

/* New styles for the Further Recommendations Accordion */
.further-recommendations {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.further-recommendations h4 {
    text-align: center;
    margin-bottom: 1rem;
    color: var(--dark);
    font-size: 1.2rem;
}

.accordion-item {
    background-color: #ffffff;
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    overflow: hidden;
    transition: background-color 0.3s;
}

.accordion-item.active {
    background-color: var(--light);
}

.recommendation-accordion-header {
    padding: 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: var(--dark);
}

.recommendation-accordion-header span {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.recommendation-accordion-header span i {
    color: var(--primary);
    width: 20px; /* Aligns icons neatly */
    text-align: center;
}

.recommendation-accordion-header .fa-chevron-down {
    transition: transform 0.3s ease;
}

.accordion-item.active .recommendation-accordion-header .fa-chevron-down {
    transform: rotate(180deg);
}

.recommendation-accordion-content {
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
}
.recommendation-accordion-content p {
    margin-bottom: 1rem;
}
.recommendation-accordion-content p:last-child {
    margin-bottom: 0;
}
.recommendation-accordion-content p strong {
    color: var(--dark);
}

.accordion-item.active .recommendation-accordion-content {
    padding: 0 1rem 1rem 1rem; /* Add padding when open */
}

/* Styles for the IEC/NEC Standard Toggle Switch */
.standard-toggle {
    display: flex;
    justify-content: center;
    background-color: var(--border);
    border-radius: 0.5rem;
    padding: 0.25rem;
    margin: 1rem auto 0;
    max-width: 200px;
}

.toggle-label {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
    font-weight: 600;
    color: var(--text-light);
}

.toggle-label input[type="radio"] {
    display: none; /* Hide the actual radio button */
}

.toggle-label.active {
    background-color: #ffffff;
    color: var(--primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Style for NEC-specific inputs wrapper */
#nec-inputs-wrapper h4 {
    margin-bottom: 1rem;
    color: var(--dark);
    text-align: center;
}

/* Grid layout specifically for NEC main results */
.nec-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}