/* LM Group Shared Design System */

/* CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* CSS Variables - LM Group Brand Colors */
:root {
    /* Primary Colors */
    --lm-orange: #E87722;
    --lm-orange-dark: #D16A1E;
    --lm-orange-light: #F5A05C;

    --lm-blue: #1A3A5C;
    --lm-blue-dark: #0F2840;
    --lm-blue-light: #2B5A8A;

    /* Neutrals */
    --white: #FFFFFF;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Semantic */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);

    /* Container */
    --container-max: 1200px;
    --container-padding: 1.5rem;
}

/* Base Styles */
html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--gray-800);
    line-height: 1.6;
    background: var(--white);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
}

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: var(--lm-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--lm-orange);
}

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

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--lm-orange-dark);
    color: var(--white);
}

.btn-secondary {
    background: var(--lm-blue);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--lm-blue-dark);
    color: var(--white);
}

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

.btn-outline:hover {
    background: var(--lm-blue);
    color: var(--white);
}

.btn-lg {
    padding: var(--space-lg) var(--space-2xl);
    font-size: 1.125rem;
}

/* Header / Navigation */
.header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--lm-blue);
}

.logo-icon {
    width: 40px;
    height: 40px;
}

.nav {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav a {
    font-weight: 500;
    color: var(--gray-700);
}

.nav a:hover {
    color: var(--lm-orange);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    transition: 0.2s;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--lm-blue) 0%, var(--lm-blue-dark) 100%);
    color: var(--white);
    padding: var(--space-4xl) 0;
    text-align: center;
}

.hero h1 {
    color: var(--white);
    margin-bottom: var(--space-lg);
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto var(--space-xl);
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
}

/* Section */
.section {
    padding: var(--space-4xl) 0;
}

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

.section-title {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title h2 {
    margin-bottom: var(--space-md);
}

.section-title p {
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card-icon {
    width: 48px;
    height: 48px;
    background: var(--lm-orange-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    color: var(--lm-orange-dark);
}

.card h3 {
    margin-bottom: var(--space-md);
}

.card p {
    color: var(--gray-600);
    margin-bottom: 0;
}

/* Company Cards (for group page) */
.company-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-2xl);
}

.company-card-logo {
    width: 80px;
    height: 80px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-lg);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--lm-blue);
}

/* Feature List */
.feature-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.feature-item {
    display: flex;
    gap: var(--space-lg);
    align-items: flex-start;
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: var(--lm-orange);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--white);
}

/* Two Column Layout */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.two-col-reverse {
    direction: rtl;
}

.two-col-reverse > * {
    direction: ltr;
}

/* CTA Section */
.cta {
    background: var(--lm-orange);
    color: var(--white);
    text-align: center;
    padding: var(--space-4xl) 0;
}

.cta h2 {
    color: var(--white);
    margin-bottom: var(--space-lg);
}

.cta p {
    opacity: 0.9;
    margin-bottom: var(--space-xl);
}

.cta .btn {
    background: var(--white);
    color: var(--lm-orange);
}

.cta .btn:hover {
    background: var(--gray-100);
}

/* Footer */
.footer {
    background: var(--lm-blue-dark);
    color: var(--white);
    padding: var(--space-3xl) 0 var(--space-xl);
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand p {
    opacity: 0.8;
    margin-top: var(--space-md);
}

.footer h4 {
    color: var(--white);
    margin-bottom: var(--space-lg);
    font-size: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--space-sm);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--lm-orange);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    opacity: 0.7;
}

/* Contact Info */
.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: var(--lm-orange);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

/* App Banner (for LM Bygg) */
.app-banner {
    background: linear-gradient(135deg, var(--lm-blue) 0%, var(--lm-blue-light) 100%);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-xl);
    color: var(--white);
}

.app-banner h3 {
    color: var(--white);
    margin-bottom: var(--space-sm);
}

.app-banner p {
    opacity: 0.9;
    margin: 0;
}

.app-banner .btn {
    flex-shrink: 0;
}

/* Icon SVGs (inline) */
.icon {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

/* Responsive */
@media (max-width: 992px) {
    .two-col {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .two-col-reverse {
        direction: ltr;
    }

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

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: var(--space-lg);
        box-shadow: var(--shadow-lg);
    }

    .nav.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .hero {
        padding: var(--space-3xl) 0;
    }

    .section {
        padding: var(--space-2xl) 0;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .app-banner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    :root {
        --container-padding: 1rem;
    }

    h1 { font-size: 1.75rem; }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

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