/* 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;
}

/* CSS Custom Properties */
:root {
    --primary-color: 210 85% 45%; /* #1976D2 */
    --primary-hover: 210 85% 35%; /* #1565C0 */
    --secondary-color: 45 100% 51%; /* #FF9800 */
    --accent-color: 120 61% 50%; /* #4CAF50 */
    --background: 210 11% 98%; /* #F5F7FA */
    --surface: 0 0% 100%; /* #FFFFFF */
    --text-primary: 0 0% 13%; /* #212121 */
    --text-secondary: 0 0% 38%; /* #616161 */
    --border-color: 0 0% 88%; /* #E0E0E0 */
    --shadow: 0 0% 0%; /* #000000 */
    --success: 120 61% 50%; /* #4CAF50 */
    --warning: 45 100% 51%; /* #FF9800 */
    --error: 4 90% 58%; /* #F44336 */
    
    --container-max-width: 1200px;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 4px hsla(var(--shadow), 0.1);
    --shadow-md: 0 4px 6px hsla(var(--shadow), 0.1);
    --shadow-lg: 0 10px 15px hsla(var(--shadow), 0.1);
}

/* Container */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

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

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: hsl(var(--primary-color));
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: hsl(var(--primary-hover));
}

/* Buttons */
.btn-primary,
.btn-secondary,
.btn-outline {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: hsl(var(--primary-hover));
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: hsl(var(--text-secondary));
    color: white;
}

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

.btn-outline {
    background-color: transparent;
    color: hsl(var(--primary-color));
    border-color: hsl(var(--primary-color));
}

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

/* Header and Navigation */
.header {
    background-color: hsl(var(--surface));
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    height: 40px;
    width: auto;
}

.brand-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: hsl(var(--text-primary));
}

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

.nav-menu a {
    font-weight: 500;
    color: hsl(var(--text-secondary));
    transition: var(--transition);
}

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

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

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: hsl(var(--text-primary));
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(135deg, hsl(var(--primary-color)), hsl(var(--secondary-color)));
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    z-index: 1;
}

.banner-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 800px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px hsla(var(--shadow), 0.3);
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

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

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    color: hsl(var(--text-primary));
}

.section-subtitle {
    text-align: center;
    margin-bottom: 2rem;
    color: hsl(var(--text-secondary));
    font-size: 1.125rem;
}

/* Services Section */
.services {
    background-color: hsl(var(--background));
}

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

.service-card {
    background: hsl(var(--surface));
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.service-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 1.5rem;
    color: hsl(var(--primary-color));
}

.service-card h3 {
    color: hsl(var(--text-primary));
    margin-bottom: 1rem;
}

.service-card p {
    color: hsl(var(--text-secondary));
}

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

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

.about p {
    font-size: 1.125rem;
    color: hsl(var(--text-secondary));
    margin-bottom: 1.5rem;
}

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

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: hsl(var(--primary-color));
}

.stat-label {
    color: hsl(var(--text-secondary));
    font-size: 0.9rem;
}

/* Technologies Section */
.technologies {
    background-color: hsl(var(--background));
}

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

.tech-item {
    background: hsl(var(--surface));
    padding: 1rem;
    text-align: center;
    border-radius: var(--border-radius);
    font-weight: 500;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.tech-item:hover {
    background-color: hsl(var(--primary-color));
    color: white;
    transform: translateY(-2px);
}

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

.testimonial {
    background: hsl(var(--surface));
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    border-left: 4px solid hsl(var(--primary-color));
}

.testimonial p {
    font-style: italic;
    margin-bottom: 1rem;
    color: hsl(var(--text-secondary));
}

.testimonial cite {
    font-weight: 600;
    color: hsl(var(--text-primary));
}

/* Newsletter Section */
.newsletter {
    background: linear-gradient(135deg, hsl(var(--primary-color)), hsl(var(--primary-hover)));
    color: white;
    text-align: center;
}

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

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

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

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

.newsletter-form button {
    background-color: hsl(var(--secondary-color));
    border: none;
}

.newsletter-form button:hover {
    background-color: hsl(45 100% 41%);
}

/* Contact Section */
.contact {
    background-color: hsl(var(--background));
}

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

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-icon {
    width: 24px;
    height: 24px;
    color: hsl(var(--primary-color));
    flex-shrink: 0;
    margin-top: 4px;
}

.contact-item div strong {
    display: block;
    color: hsl(var(--text-primary));
    margin-bottom: 0.5rem;
}

.contact-item div p {
    color: hsl(var(--text-secondary));
    margin: 0;
}

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

.social-links a {
    padding: 8px 16px;
    background-color: hsl(var(--primary-color));
    color: white;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: hsl(var(--primary-hover));
    transform: translateY(-2px);
}

/* Forms */
.contact-form,
.newsletter-form {
    background: hsl(var(--surface));
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}

.contact-form h3 {
    margin-bottom: 1.5rem;
    color: hsl(var(--text-primary));
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid hsl(var(--border-color));
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: hsl(var(--primary-color));
    box-shadow: 0 0 0 3px hsla(var(--primary-color), 0.1);
}

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

/* Footer */
.footer {
    background-color: hsl(var(--text-primary));
    color: white;
    padding: 3rem 0 1rem;
}

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

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

.footer-section p {
    color: hsla(0, 0%, 100%, 0.8);
    margin-bottom: 0;
}

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

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

.footer-section ul li a {
    color: hsla(0, 0%, 100%, 0.8);
    transition: var(--transition);
}

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

.footer-bottom {
    border-top: 1px solid hsla(0, 0%, 100%, 0.2);
    padding-top: 1rem;
    text-align: center;
    color: hsla(0, 0%, 100%, 0.6);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: hsl(var(--text-primary));
    color: white;
    padding: 1.5rem;
    z-index: 2000;
    transform: translateY(100%);
    transition: var(--transition);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: var(--container-max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

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

.cookie-buttons button {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: hsla(var(--shadow), 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
}

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

.cookie-modal-content {
    background: hsl(var(--surface));
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

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

.cookie-category {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid hsl(var(--border-color));
    border-radius: var(--border-radius);
}

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

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

.cookie-category span {
    font-size: 0.9rem;
    color: hsl(var(--text-secondary));
}

/* Blog Styles */
.blog-hero {
    background: linear-gradient(135deg, hsl(var(--primary-color)), hsl(var(--primary-hover)));
    color: white;
    text-align: center;
    padding: 6rem 0 4rem;
    margin-top: 70px;
}

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

.blog-articles {
    padding: 4rem 0;
}

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

.article-card {
    background: hsl(var(--surface));
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.article-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    background: linear-gradient(135deg, hsl(var(--primary-color)), hsl(var(--secondary-color)));
}

.article-icon-img {
    width: 40px;
    height: 40px;
    color: white;
}

.article-content {
    padding: 2rem;
}

.article-content h2 {
    margin-bottom: 0.5rem;
}

.article-content h2 a {
    color: hsl(var(--text-primary));
    text-decoration: none;
}

.article-content h2 a:hover {
    color: hsl(var(--primary-color));
}

.article-meta {
    color: hsl(var(--text-secondary));
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.read-more {
    color: hsl(var(--primary-color));
    font-weight: 500;
    text-decoration: none;
}

.read-more:hover {
    color: hsl(var(--primary-hover));
}

/* Article Page */
.article-page {
    padding: 6rem 0 4rem;
    margin-top: 70px;
}

.article-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid hsl(var(--border-color));
}

.article-header .article-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    background: linear-gradient(135deg, hsl(var(--primary-color)), hsl(var(--secondary-color)));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-header .article-icon-img {
    width: 40px;
    height: 40px;
    color: white;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

.article-intro {
    font-size: 1.125rem;
    color: hsl(var(--text-secondary));
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: hsl(var(--background));
    border-radius: var(--border-radius);
    border-left: 4px solid hsl(var(--primary-color));
}

.article-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: hsl(var(--text-primary));
}

.article-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: hsl(var(--text-primary));
}

.article-content ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content li {
    margin-bottom: 0.5rem;
    color: hsl(var(--text-secondary));
}

.article-cta {
    background: linear-gradient(135deg, hsl(var(--primary-color)), hsl(var(--secondary-color)));
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    margin: 3rem 0;
}

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

.article-cta p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.article-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid hsl(var(--border-color));
}

/* Legal Pages */
.legal-page {
    padding: 6rem 0 4rem;
    margin-top: 70px;
}

.legal-page h1 {
    margin-bottom: 1rem;
    color: hsl(var(--text-primary));
}

.last-updated {
    color: hsl(var(--text-secondary));
    font-style: italic;
    margin-bottom: 2rem;
}

.legal-page h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: hsl(var(--text-primary));
}

.legal-page h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: hsl(var(--text-primary));
}

.legal-page ul {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

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

.company-info,
.contact-info {
    background-color: hsl(var(--background));
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin: 1.5rem 0;
}

.cookie-table {
    overflow-x: auto;
    margin: 1rem 0;
}

.cookie-table table {
    width: 100%;
    border-collapse: collapse;
    background: hsl(var(--surface));
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.cookie-table th,
.cookie-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid hsl(var(--border-color));
}

.cookie-table th {
    background-color: hsl(var(--background));
    font-weight: 600;
    color: hsl(var(--text-primary));
}

.cookie-table td {
    color: hsl(var(--text-secondary));
}

/* Thanks Page */
.thanks-page {
    padding: 6rem 0;
    margin-top: 70px;
    text-align: center;
}

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

.thanks-icon {
    margin-bottom: 2rem;
}

.thanks-message {
    font-size: 1.125rem;
    color: hsl(var(--text-secondary));
    margin-bottom: 2rem;
}

.thanks-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: hsl(var(--surface));
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow-md);
    }

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

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

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

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

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

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

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

    .article-navigation {
        flex-direction: column;
    }

    .thanks-actions {
        flex-direction: column;
        align-items: center;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .blog-hero h1 {
        font-size: 2.5rem;
    }
}

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

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

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

    .service-card,
    .contact-form {
        padding: 1.5rem;
    }

    .cookie-modal-content {
        padding: 1.5rem;
    }

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

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

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

    .hero {
        min-height: auto;
        padding: 2rem 0;
        background: none;
        color: black;
    }

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

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

/* Accessibility Improvements */
@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 */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid hsl(var(--primary-color));
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --border-color: 0 0% 0%;
        --shadow-sm: 0 2px 4px hsla(var(--shadow), 0.3);
        --shadow-md: 0 4px 6px hsla(var(--shadow), 0.3);
        --shadow-lg: 0 10px 15px hsla(var(--shadow), 0.3);
    }
}
