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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #374151;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #1f2937;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: #1e40af;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #1e3a8a;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background-color: #1e40af;
    color: white;
    border-color: #1e40af;
}

.btn-primary:hover {
    background-color: #1e3a8a;
    border-color: #1e3a8a;
    color: white;
}

.btn-secondary {
    background-color: #6b7280;
    color: white;
    border-color: #6b7280;
}

.btn-secondary:hover {
    background-color: #4b5563;
    border-color: #4b5563;
    color: white;
}

.btn-outline {
    background-color: transparent;
    color: #1e40af;
    border-color: #1e40af;
}

.btn-outline:hover {
    background-color: #1e40af;
    color: white;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

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

.lead {
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 2rem;
    color: #4b5563;
}

/* Header and Navigation */
.header {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

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

.nav-brand .logo {
    height: 40px;
}

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

.nav-menu a {
    font-weight: 500;
    color: #374151;
    transition: color 0.3s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #1e40af;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: #374151;
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.hero-text p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: #6b7280;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image svg {
    width: 100%;
    height: auto;
}

/* Services Section */
.services {
    padding: 80px 0;
    background-color: #f8fafc;
}

.services h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.service-icon {
    margin-bottom: 1.5rem;
}

.service-card h3 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.service-card p {
    color: #6b7280;
}

/* About Section */
.about {
    padding: 80px 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.about-features {
    list-style: none;
    margin: 2rem 0;
}

.about-features li {
    padding: 0.5rem 0;
    color: #059669;
    font-weight: 500;
}

.about-image svg {
    width: 100%;
    height: auto;
}

/* Reviews Section */
.reviews {
    padding: 80px 0;
    background-color: #f8fafc;
}

.reviews h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

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

.review-card {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.review-stars {
    color: #fbbf24;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.review-card p {
    font-style: italic;
    margin-bottom: 1rem;
    color: #4b5563;
}

.review-author {
    font-weight: 600;
    color: #1f2937;
}

/* Newsletter Section */
.newsletter {
    padding: 60px 0;
    background-color: #1e40af;
    color: white;
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter h2 {
    color: white;
    margin-bottom: 1rem;
}

.newsletter p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 12px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
}

.newsletter-form input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
}

/* Contact Section */
.contact {
    padding: 80px 0;
}

.contact h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2.5rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact-item {
    margin-bottom: 2rem;
}

.contact-item h3 {
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.contact-item p {
    color: #6b7280;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #1e40af;
}

/* Footer */
.footer {
    background-color: #1f2937;
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #d1d5db;
    margin-bottom: 1rem;
}

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

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

.footer-section ul li a {
    color: #d1d5db;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    color: #d1d5db;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
    color: #9ca3af;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1f2937;
    color: white;
    padding: 1rem 0;
    z-index: 1001;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 2rem;
}

.cookie-content p {
    margin: 0;
    flex: 1;
}

.cookie-content a {
    color: #60a5fa;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-buttons .btn {
    padding: 8px 16px;
    font-size: 0.875rem;
}

/* Cookie Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1002;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content h3 {
    margin-bottom: 1.5rem;
}

.cookie-category {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
}

.cookie-category label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

.cookie-category input[type="checkbox"] {
    margin-top: 0.25rem;
}

.cookie-category span {
    font-size: 0.875rem;
    color: #6b7280;
}

.modal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.modal-buttons .btn {
    flex: 1;
}

/* Thank You Page */
.thank-you {
    padding: 120px 0 80px;
    text-align: center;
}

.thank-you-content {
    max-width: 600px;
    margin: 0 auto;
}

.thank-you-icon {
    margin-bottom: 2rem;
}

.thank-you h1 {
    color: #10b981;
    margin-bottom: 1rem;
}

.thank-you-list {
    list-style: none;
    text-align: left;
    margin: 2rem 0;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.thank-you-list li {
    padding: 0.5rem 0;
    color: #059669;
}

.thank-you-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 2rem;
}

/* Legal Pages */
.legal-page {
    padding: 120px 0 80px;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.breadcrumb {
    margin-bottom: 2rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.breadcrumb a {
    color: #1e40af;
}

.last-updated {
    font-style: italic;
    color: #6b7280;
    margin-bottom: 2rem;
}

.legal-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1f2937;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.legal-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #374151;
}

.legal-content ul,
.legal-content ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.legal-content li {
    margin-bottom: 0.5rem;
}

.legal-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 3rem;
    justify-content: center;
}

.cookies-table,
.cost-table,
.insulation-table,
.cost-comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cookies-table th,
.cookies-table td,
.cost-table th,
.cost-table td,
.insulation-table th,
.insulation-table td,
.cost-comparison-table th,
.cost-comparison-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.cookies-table th,
.cost-table th,
.insulation-table th,
.cost-comparison-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #374151;
}

/* Blog Styles */
.blog-header {
    padding: 120px 0 60px;
    background-color: #f8fafc;
    text-align: center;
}

.blog-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.blog-articles {
    padding: 80px 0;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.article-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.article-image {
    height: 200px;
    overflow: hidden;
}

.article-image svg {
    width: 100%;
    height: 100%;
}

.article-content {
    padding: 1.5rem;
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.article-category {
    background-color: #1e40af;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

.article-card h2 {
    margin-bottom: 1rem;
}

.article-card h2 a {
    color: #1f2937;
    text-decoration: none;
}

.article-card h2 a:hover {
    color: #1e40af;
}

.read-more {
    color: #1e40af;
    font-weight: 600;
    text-decoration: none;
}

.read-more:hover {
    text-decoration: underline;
}

/* Article Page */
.article-page {
    padding: 120px 0 80px;
}

.article-header {
    margin-bottom: 3rem;
}

.article-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.article-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-text h2 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.article-text h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.article-text h4 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.article-text ul,
.article-text ol {
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-text li {
    margin-bottom: 0.5rem;
}

.article-cta {
    background-color: #f8fafc;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin: 3rem 0;
    border-left: 4px solid #1e40af;
}

.article-cta h3 {
    color: #1e40af;
    margin-bottom: 1rem;
}

.article-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.share-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.share-buttons span {
    font-weight: 600;
    color: #6b7280;
}

.share-buttons a {
    color: #1e40af;
    font-weight: 500;
}

.calculation-box {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.calculation-box h4 {
    color: #1e40af;
    margin-bottom: 1rem;
}

.decision-matrix {
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 2rem;
    margin: 2rem 0;
}

.decision-matrix h3 {
    color: #059669;
    margin-bottom: 1rem;
}

.test-questions ol {
    margin-top: 1rem;
}

.test-questions li {
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: white;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-toggle {
        display: flex;
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
    }

    .cookie-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .hero-buttons {
        justify-content: center;
    }

    .thank-you-buttons {
        flex-direction: column;
        align-items: center;
    }

    .legal-buttons {
        flex-direction: column;
        align-items: center;
    }

    .article-navigation {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .share-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

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

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

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

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

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

    .hero-text h1 {
        font-size: 1.75rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .services, .about, .reviews, .contact {
        padding: 60px 0;
    }

    .blog-header {
        padding: 100px 0 40px;
    }

    .blog-header h1 {
        font-size: 2rem;
    }

    .article-page {
        padding: 100px 0 60px;
    }

    .article-header h1 {
        font-size: 2rem;
    }

    .article-text {
        font-size: 1rem;
    }

    .modal-content {
        margin: 10px;
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .cookie-banner,
    .modal,
    .footer,
    .article-navigation {
        display: none !important;
    }

    .article-page {
        padding: 0;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    h1, h2, h3 {
        page-break-after: avoid;
    }

    .article-cta {
        page-break-inside: avoid;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    /* This can be implemented later if needed */
}

/* Focus styles for accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-outline {
        border-width: 3px;
    }
    
    .service-card,
    .review-card,
    .article-card {
        border: 2px solid #374151;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
