/**
 * Serokell OÜ Website Styles
 * Optimized for performance and accessibility
 */

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* Skip Link for Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    z-index: 100000;
    padding: 8px;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

.skip-link:focus {
    top: 6px;
}

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

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

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

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

a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover, a:focus {
    color: #2980b9;
    text-decoration: underline;
}

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

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #2980b9;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

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

.btn-secondary:hover, .btn-secondary:focus {
    background-color: #3498db;
    color: white;
    text-decoration: none;
}

.btn-outline {
    background-color: transparent;
    color: #2c3e50;
    border: 2px solid #2c3e50;
}

.btn-outline:hover, .btn-outline:focus {
    background-color: #2c3e50;
    color: white;
    text-decoration: none;
}

.btn-accept {
    background-color: #27ae60;
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-accept:hover, .btn-accept:focus {
    background-color: #229954;
    color: white;
    text-decoration: none;
}

.btn-decline {
    background-color: #e74c3c;
    color: white;
    padding: 8px 16px;
    font-size: 0.9rem;
}

.btn-decline:hover, .btn-decline:focus {
    background-color: #c0392b;
    color: white;
    text-decoration: none;
}

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

.navbar {
    padding: 1rem 0;
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

.nav-logo img {
    width: 32px;
    height: 32px;
}

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

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

.nav-link.active,
.nav-link:hover,
.nav-link:focus {
    color: #3498db;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #3498db;
}

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

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

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

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

.cookie-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.cookie-link {
    color: #3498db;
    text-decoration: underline;
    font-size: 0.9rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5rem 0;
    overflow: hidden;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

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

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

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

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.page-header h1 {
    color: white;
    margin-bottom: 0.5rem;
}

.page-header p {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.9);
}

/* Sections */
.features,
.about-preview,
.services-preview,
.company-overview,
.mission-vision,
.why-choose-us,
.company-info,
.services-overview,
.main-services,
.technologies,
.development-process,
.contact-section,
.faq-section {
    padding: 4rem 0;
}

.features {
    background-color: #f8f9fa;
}

.features h2,
.services-preview h2,
.technologies h2 {
    text-align: center;
    margin-bottom: 3rem;
}

/* Grid Layouts */
.features-grid,
.services-grid,
.advantages-grid,
.info-grid,
.tech-categories,
.faq-grid {
    display: grid;
    gap: 2rem;
    margin-top: 2rem;
}

.features-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.services-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.advantages-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.info-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.faq-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Cards */
.feature-card,
.service-card,
.service-detailed-card,
.advantage-card,
.info-card,
.mv-card,
.faq-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover,
.service-card:hover,
.service-detailed-card:hover,
.advantage-card:hover,
.mv-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.feature-icon,
.advantage-icon,
.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

.service-features {
    list-style: none;
    margin-top: 1rem;
}

.service-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 1.5rem;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

/* About Section */
.about-content,
.overview-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-image img,
.overview-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Mission & Vision */
.mv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.mv-card {
    text-align: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Technologies */
.technologies {
    background-color: #f8f9fa;
}

.tech-categories {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.tech-category {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tech-item {
    background-color: #3498db;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Process Steps */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.process-step {
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

/* Contact Section */
.contact-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

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

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.5rem;
}

.checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.5rem;
    margin-top: 0.25rem;
}

.success-message,
.error-message {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.field-error {
    color: #e74c3c;
    font-size: 14px;
    margin-top: 5px;
}

/* Contact Info */
.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

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

.contact-icon {
    font-size: 1.5rem;
    width: 40px;
    text-align: center;
    margin-top: 0.25rem;
}

.business-hours,
.contact-cta {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

/* CTA Section */
.cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 4rem 0;
}

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

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

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

/* Legal Content */
.legal-content {
    padding: 2rem 0 4rem;
}

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

.legal-document h2 {
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 0.5rem;
}

.legal-document h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #34495e;
}

.legal-document ul,
.legal-document ol {
    margin: 1rem 0 1rem 2rem;
}

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

.contact-details {
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.cookie-table th,
.cookie-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.cookie-table th {
    background-color: #3498db;
    color: white;
    font-weight: 600;
}

.cookie-table tr:hover {
    background-color: #f8f9fa;
}

.cookie-tools {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin-top: 2rem;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    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 h3,
.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

.footer-section p,
.footer-section li {
    color: #bdc3c7;
    line-height: 1.6;
}

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

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

.footer-section a {
    color: #bdc3c7;
    transition: color 0.3s ease;
}

.footer-section a:hover,
.footer-section a:focus {
    color: #3498db;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: white;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding-top: 2rem;
        transition: left 0.3s ease;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

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

    .nav-toggle {
        display: flex;
    }

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

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

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

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

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

    .about-content,
    .overview-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .form-row {
        grid-template-columns: 1fr;
    }

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

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

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

    .process-steps {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 3rem 0;
    }

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

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

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .cookie-banner {
        padding: 0.75rem;
    }

    .cookie-actions {
        width: 100%;
        justify-content: center;
    }

    .feature-card,
    .service-card,
    .advantage-card {
        padding: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .cookie-banner,
    .nav-toggle,
    .btn,
    .cta {
        display: none;
    }

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

    .container {
        max-width: none;
        padding: 0;
    }
}

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

/* Focus Styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn-primary {
        background-color: #000;
        border: 2px solid #000;
    }

    .btn-secondary,
    .btn-outline {
        border-width: 3px;
    }
}