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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
    color: #1a365d;
}

h2 {
    font-size: 2rem;
    color: #2d3748;
}

h3 {
    font-size: 1.5rem;
    color: #2d3748;
}

p {
    margin-bottom: 1rem;
    color: #4a5568;
}

a {
    text-decoration: none;
    color: #3182ce;
    transition: color 0.3s ease;
}

a:hover {
    color: #2c5aa0;
}

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background-color: #3182ce;
    color: white;
}

.btn-primary:hover {
    background-color: #2c5aa0;
    color: white;
}

.btn-secondary {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.btn-secondary:hover {
    background-color: #3182ce;
    color: white;
}

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

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.nav-brand h1 {
    font-size: 1.8rem;
    color: #1a365d;
    margin-bottom: 0;
}

.nav-brand a {
    color: #1a365d;
    text-decoration: none;
}

.tagline {
    font-size: 0.9rem;
    color: #718096;
    font-weight: 400;
}

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

.nav-link {
    color: #4a5568;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #3182ce;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

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

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

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    margin-top: 80px;
}

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

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

.hero-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

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

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

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

/* Section Styles */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1rem;
    color: #3182ce;
}

/* Services Section */
.services {
    background-color: #f7fafc;
}

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

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

.service-card:hover {
    transform: translateY(-5px);
}

.service-icon {
    width: 80px;
    height: 80px;
    color: #3182ce;
    margin-bottom: 1.5rem;
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

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

.feature h4 {
    color: #3182ce;
    margin-bottom: 0.5rem;
}

/* Testimonials Section */
.testimonials {
    background-color: #f7fafc;
}

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

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

.testimonial-content {
    margin-bottom: 1.5rem;
}

.testimonial-content p {
    font-style: italic;
    color: #4a5568;
}

.testimonial-author h4 {
    color: #1a365d;
    margin-bottom: 0.25rem;
}

.testimonial-author span {
    color: #718096;
    font-size: 0.9rem;
}

/* Blog Section */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

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

.blog-card:hover {
    transform: translateY(-5px);
}

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

.blog-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.blog-date, .blog-category {
    font-size: 0.85rem;
    color: #718096;
}

.blog-category {
    background-color: #e2e8f0;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.read-more {
    color: #3182ce;
    font-weight: 600;
}

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

/* Contact Section */
.contact {
    background-color: #f7fafc;
}

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

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

.contact-item h4 {
    color: #1a365d;
    margin-bottom: 0.5rem;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2d3748;
}

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

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3182ce;
}

/* Footer */
.footer {
    background-color: #1a365d;
    color: white;
    padding: 4rem 0 2rem;
}

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

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

.footer-section p,
.footer-section a {
    color: #cbd5e0;
}

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

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

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

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

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: #2d3748;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: #3182ce;
}

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

.footer-bottom p {
    color: #fff;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1a365d;
    color: white;
    padding: 1.5rem;
    z-index: 10000;
    display: none;
}

.cookie-banner.show {
    display: block;
}

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

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

.cookie-buttons button {
    background: none;
    border: 2px solid white;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-buttons button:hover {
    background-color: white;
    color: #1a365d;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
}

.cookie-modal.show {
    display: flex;
}

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

.cookie-option {
    margin: 1rem 0;
}

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

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

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

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

.legal-content h1 {
    margin-bottom: 2rem;
}

.legal-content h2 {
    margin-top: 3rem;
    margin-bottom: 1rem;
    color: #1a365d;
}

.legal-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.legal-content ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

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

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

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

.thank-you-icon {
    color: #48bb78;
    margin-bottom: 2rem;
}

.next-steps {
    margin: 4rem 0;
    text-align: left;
}

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

.step {
    text-align: center;
    padding: 1.5rem;
    border-radius: 12px;
    background-color: #f7fafc;
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: #3182ce;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    margin: 0 auto 1rem;
}

.contact-emergency {
    background-color: #fed7d7;
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    text-align: left;
}

.emergency-contact {
    margin-top: 1rem;
}

.thank-you-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 3rem;
    flex-wrap: wrap;
}

/* Blog Page */
.blog-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 120px 0 80px;
    text-align: center;
}

.blog-hero-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
}

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

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

.blog-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

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

.category-list li {
    margin-bottom: 0.5rem;
}

.category-list a {
    color: #4a5568;
    padding: 0.5rem 0;
    display: block;
    border-bottom: 1px solid #e2e8f0;
}

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

.newsletter-form input {
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
}

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

.article-header {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
}

.breadcrumb {
    margin-bottom: 2rem;
    color: #718096;
}

.breadcrumb a {
    color: #3182ce;
}

.article-meta {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #718096;
    flex-wrap: wrap;
}

.article-category {
    background-color: #e2e8f0;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

.article-intro {
    font-size: 1.2rem;
    color: #4a5568;
    margin-bottom: 3rem;
    font-weight: 500;
}

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

.article-hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.article-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    max-width: 1200px;
    margin: 0 auto;
}

.article-body {
    max-width: 800px;
}

.article-body h2 {
    margin-top: 3rem;
    margin-bottom: 1rem;
}

.article-body h3 {
    margin-top: 2rem;
    margin-bottom: 0.5rem;
}

.article-body ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.article-body blockquote {
    background-color: #f7fafc;
    border-left: 4px solid #3182ce;
    padding: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
}

.article-body blockquote p {
    margin-bottom: 0.5rem;
}

.article-body cite {
    color: #718096;
    font-size: 0.9rem;
}

.article-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    margin: 3rem 0;
}

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

.article-cta p {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.article-sidebar {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.related-articles {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.related-article {
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.related-article:hover {
    background-color: #f7fafc;
}

.related-article h4 {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.related-article span {
    color: #718096;
    font-size: 0.85rem;
}

.contact-info {
    margin: 1rem 0;
}

/* Special Article Elements */
.example-box, .calculation-example, .checklist-box {
    background-color: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.example-box h4, .calculation-example h4, .checklist-box h3 {
    color: #1a365d;
    margin-bottom: 1rem;
}

.self-check {
    background-color: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.checklist {
    list-style: none;
    margin-left: 0;
}

.checklist li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.checklist li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #48bb78;
    font-weight: bold;
}

.error-list {
    background-color: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.cookie-settings-section {
    margin: 2rem 0;
    padding: 1.5rem;
    background-color: #f7fafc;
    border-radius: 8px;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-card.featured {
        grid-template-columns: 1fr;
    }
    
    .article-content {
        grid-template-columns: 1fr;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .thank-you-actions {
        flex-direction: column;
        align-items: center;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .navbar {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .hero-text h1 {
        font-size: 1.8rem;
    }
    
    .hero-text p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-modal-content {
        padding: 1.5rem;
    }
    
    .cookie-modal-buttons {
        flex-direction: column;
    }
}

/* Print Styles */
@media print {
    .header, .footer, .cookie-banner, .cookie-modal, .article-sidebar {
        display: none !important;
    }
    
    .article-page, .legal-page {
        padding-top: 0;
    }
    
    .article-content {
        grid-template-columns: 1fr;
    }
    
    * {
        color: black !important;
        background: white !important;
    }
    
    a::after {
        content: " (" attr(href) ")";
    }
}

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

/* Focus styles for keyboard navigation */
a:focus, button:focus, input:focus, textarea:focus {
    outline: 2px solid #3182ce;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero {
        background: #000;
        color: #fff;
    }
    
    .service-card, .testimonial-card, .blog-card {
        border: 2px solid #000;
    }
}
