/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-green: #10b981;
    --dark-green: #059669;
    --light-green: #d1fae5;
    --primary-blue: #3b82f6;
    --dark-blue: #1e40af;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Navigation */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.3s;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-green);
}

.logo-icon {
    font-size: 1.5rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--gray-700);
    font-weight: 500;
    transition: color 0.3s;
    padding: 0.5rem 0;
}

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

.dropdown {
    position: relative;
}

.dropdown-toggle::after {
    content: ' ▾';
    font-size: 0.875rem;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: 0.5rem;
    min-width: 200px;
    padding: 0.5rem 0;
    list-style: none;
    margin-top: 0.5rem;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--gray-700);
}

.dropdown-menu a:hover {
    background-color: var(--gray-50);
    color: var(--primary-green);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 1.5rem;
    height: 2px;
    background-color: var(--gray-700);
    transition: all 0.3s;
}

/* Hero Section */
.hero {
    position: relative;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.85) 0%, rgba(59, 130, 246, 0.75) 100%);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--white);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.375rem;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    text-align: center;
}

.btn-primary {
    background-color: var(--white);
    color: var(--primary-green);
}

.btn-primary:hover {
    background-color: var(--gray-100);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-green);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-green);
    border: 2px solid var(--primary-green);
}

.btn-outline:hover {
    background-color: var(--primary-green);
    color: var(--white);
}

.btn-white {
    background-color: var(--white);
    color: var(--primary-green);
}

.btn-white:hover {
    background-color: var(--gray-100);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Sections */
.section {
    padding: 5rem 0;
}

.section-gray {
    background-color: var(--gray-50);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.section-intro {
    text-align: center;
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-cta {
    text-align: center;
    margin-top: 3rem;
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.benefit-card {
    text-align: center;
    padding: 2rem;
    background-color: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.benefit-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--gray-900);
}

.benefit-card p {
    color: var(--gray-600);
}

/* Energy Grid */
.energy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.energy-card {
    background-color: var(--white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
}

.energy-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.energy-image {
    width: 100%;
    height: 250px;
    background-size: cover;
    background-position: center;
    background-color: var(--gray-200);
    position: relative;
}

.energy-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}

.energy-content {
    padding: 2rem;
}

.energy-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--gray-900);
}

.energy-content > p {
    color: var(--gray-600);
    margin-bottom: 1rem;
}

.energy-highlights {
    list-style: none;
    margin-bottom: 1.5rem;
}

.energy-highlights li {
    padding: 0.5rem 0;
    color: var(--gray-700);
    position: relative;
    padding-left: 1.5rem;
}

.energy-highlights li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-green);
    font-weight: 700;
}

/* CTA Section */
.cta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.cta-card {
    padding: 3rem;
    border-radius: 1rem;
    color: var(--white);
    text-align: center;
}

.cta-subsidies {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
}

.cta-suppliers {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--dark-blue) 100%);
}

.cta-card h3 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-card p {
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

/* Stats Section */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background-color: var(--white);
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--gray-600);
}

/* Footer */
.footer {
    background-color: var(--gray-900);
    color: var(--gray-300);
    padding: 3rem 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h4 {
    color: var(--white);
    font-weight: 600;
    margin-bottom: 1rem;
}

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

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: var(--gray-300);
    transition: color 0.3s;
}

.footer-col a:hover {
    color: var(--primary-green);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-700);
    color: var(--gray-400);
}

/* Detail Page Styles */
.page-header {
    padding: 4rem 0 3rem;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-blue) 100%);
    color: var(--white);
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.25rem;
    opacity: 0.95;
}

.content-section {
    padding: 3rem 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.content-main h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 2rem 0 1rem;
    color: var(--gray-900);
}

.content-main h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1.5rem 0 0.75rem;
    color: var(--gray-800);
}

.content-main p {
    margin-bottom: 1rem;
    color: var(--gray-700);
    line-height: 1.8;
}

.content-main ul,
.content-main ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.content-main li {
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.pros-cons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.pros,
.cons {
    padding: 1.5rem;
    border-radius: 0.75rem;
}

.pros {
    background-color: var(--light-green);
    border: 2px solid var(--primary-green);
}

.cons {
    background-color: #fee;
    border: 2px solid #f87171;
}

.pros h3,
.cons h3 {
    margin-top: 0;
}

.sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.sidebar-card {
    background-color: var(--white);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
}

.sidebar-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

.info-list {
    list-style: none;
}

.info-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.info-list li:last-child {
    border-bottom: none;
}

/* Comparison Table */
.comparison-table {
    overflow-x: auto;
    margin: 2rem 0;
}

.comparison-table table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--white);
    box-shadow: var(--shadow-md);
    border-radius: 0.75rem;
}

.comparison-table th {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.comparison-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover {
    background-color: var(--gray-50);
}

.rating {
    display: flex;
    gap: 0.25rem;
}

.rating-star {
    color: #fbbf24;
}

.rating-star.empty {
    color: var(--gray-300);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--gray-700);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Card Styles */
.card {
    background-color: var(--white);
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--gray-900);
}

/* Responsive Design */
@media (max-width: 968px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .pros-cons {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 72px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 72px);
        background-color: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        gap: 0;
        transition: left 0.3s;
        box-shadow: var(--shadow-lg);
    }

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

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--gray-200);
    }

    .nav-menu a {
        display: block;
        padding: 1rem 0;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        background-color: var(--gray-50);
        border-radius: 0;
        padding-left: 1rem;
        margin-top: 0;
    }

    .dropdown:hover .dropdown-menu {
        display: none;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .section-title {
        font-size: 2rem;
    }

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

@media (max-width: 480px) {
    .hero {
        height: 500px;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* Loading & Lazy Loading */
.loading {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    .cta-section {
        display: none;
    }
}

/* Calculator & Wizard Styles */
.calculator-form,
.wizard-container {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.result-item {
    text-align: center;
    padding: 1.5rem;
    background-color: var(--gray-50);
    border-radius: 0.5rem;
    border: 2px solid var(--primary-green);
}

.result-label {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-green);
}

.result-note {
    background-color: var(--light-green);
    padding: 1rem;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    font-size: 0.875rem;
    color: var(--gray-700);
}

/* Wizard Styles */
.wizard-progress {
    margin-bottom: 2rem;
}

.wizard-progress-bar {
    height: 8px;
    background-color: var(--primary-green);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.wizard-progress-container {
    width: 100%;
    height: 8px;
    background-color: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
}

.wizard-buttons {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 2rem;
}

.recommendation-card {
    background-color: var(--gray-50);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary-green);
}

.recommendation-card h4 {
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.recommendation-score {
    display: inline-block;
    background-color: var(--primary-green);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

/* Supplier Filter Styles */
.filter-section {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 2rem;
}

.filter-group {
    margin-bottom: 1.5rem;
}

.filter-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--gray-700);
}

.filter-options {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-option input[type="radio"],
.filter-option input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.supplier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.supplier-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.supplier-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.supplier-card h3 {
    color: var(--primary-green);
    margin-bottom: 1rem;
}

.supplier-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag {
    background-color: var(--light-green);
    color: var(--dark-green);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Form Error Styles */
.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Checkbox and Radio Styles */
.checkbox-group,
.radio-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
    width: auto;
    margin: 0;
}

/* Image Attribution */
.image-attribution {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 0.25rem;
    border-left: 3px solid var(--primary-green);
    line-height: 1.4;
}

.image-attribution a {
    color: var(--primary-green);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.image-attribution a:hover {
    color: var(--dark-green);
    text-decoration: underline;
}

/* Attribution for energy cards */
.energy-card {
    position: relative;
}

.energy-card .image-attribution {
    margin: 0;
    padding: 0.5rem 0.75rem;
    border-radius: 0;
    border-left: none;
    border-top: 3px solid var(--primary-green);
}

/* Attribution for hero section */
.hero .image-attribution {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    background-color: rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.9);
    border-left: 3px solid var(--primary-green);
    z-index: 10;
}

.hero .image-attribution a {
    color: var(--light-green);
}

.hero .image-attribution a:hover {
    color: var(--white);
}

/* Additional Mobile Responsiveness */
@media (max-width: 768px) {
    .result-grid {
        grid-template-columns: 1fr;
    }

    .wizard-buttons {
        flex-direction: column;
    }

    .wizard-buttons .btn {
        width: 100%;
    }

    .filter-options {
        flex-direction: column;
    }

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