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

:root {
    /* Color Palette */
    --primary-color: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --success: #10b981;
    --danger: #ef4444;

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-size-base: 16px;
    --line-height-base: 1.6;

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

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 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);
}

html {
    scroll-behavior: smooth;
    font-size: var(--font-size-base);
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: var(--line-height-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-base);
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ===========================
   Container & Layout
   =========================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===========================
   Language Selector
   =========================== */
.language-selector {
    display: flex;
    gap: var(--spacing-xs);
    align-items: center;
}

.lang-btn {
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-dark);
    background: transparent;
    border: 1px solid var(--border-color);
    transition: all var(--transition-base);
}

.lang-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
}

.lang-btn.active {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

/* ===========================
   Navigation
   =========================== */
.navbar {
    background: #2A3F54;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    margin: 0;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-sm);
    padding-bottom: var(--spacing-sm);
}

.nav-brand {
    display: flex;
    flex-direction: column;
}

.logo {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--bg-white);
    letter-spacing: -0.02em;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: -4px;
}

.nav-menu {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-menu a {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--bg-white);
    transition: width var(--transition-base);
}

.nav-menu a:hover {
    color: var(--bg-white);
}

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

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: var(--spacing-xs);
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-dark);
    transition: all var(--transition-base);
}

/* ===========================
   Hero Section
   =========================== */
.hero {
    background: linear-gradient(135deg, #5a7fa4 0%, #3a4f64 100%) !important;
    color: var(--bg-white);
    padding-top: var(--spacing-2xl);
    padding-bottom: var(--spacing-3xl);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.05)" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,138.7C960,139,1056,117,1152,101.3C1248,85,1344,75,1392,69.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.3;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--spacing-md);
}

.hero-description {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-2xl);
}

.hero-stats {
    display: flex;
    gap: var(--spacing-xl);
    padding-top: var(--spacing-xl);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat strong {
    font-size: 2rem;
    font-weight: 800;
    display: block;
}

.stat span {
    font-size: 0.875rem;
    opacity: 0.9;
}

.hero-image {
    max-width: 100%;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ===========================
   Buttons
   =========================== */
.btn {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-base);
    text-align: center;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--bg-white);
    border: 2px solid var(--bg-white);
}

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

.btn-large {
    padding: 1.125rem 2.25rem;
    font-size: 1.125rem;
}

/* ===========================
   Sections
   =========================== */
section {
    padding: var(--spacing-3xl) 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--text-dark);
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-light);
    margin-bottom: var(--spacing-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ===========================
   Features Section
   =========================== */
.features {
    background: var(--bg-light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-xl);
}

.feature-card {
    background: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

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

.feature-icon {
    margin-bottom: var(--spacing-md);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon svg {
    width: 48px;
    height: 48px;
    stroke: var(--primary-color);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

.feature-card p {
    color: var(--text-light);
    line-height: 1.7;
}

/* ===========================
   Benefits Section
   =========================== */
.benefits {
    padding: var(--spacing-2xl) 0;
    background: linear-gradient(to bottom, var(--bg-white) 0%, var(--bg-light) 100%);
}

.benefits .section-title {
    margin-bottom: var(--spacing-xl);
}

.benefits-grid {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-width: 900px;
    margin: 0 auto;
}

.benefit-item {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background: var(--bg-white);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    transition: all var(--transition-base);
    position: relative;
    max-width: 100%;
    overflow: hidden;
}

.benefit-item:hover {
    border-left-width: 6px;
    padding-left: calc(var(--spacing-lg) - 2px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.benefit-item:nth-child(2) {
    border-left-color: var(--secondary-color);
}

.benefit-item:nth-child(3) {
    border-left-color: var(--accent-color);
}

.benefit-item.reverse {
    direction: ltr;
}

.benefit-image {
    width: 180px;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    align-self: center;
    margin: 0 auto;
}

.benefit-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.benefit-content {
    min-width: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.benefit-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.375rem;
    color: var(--text-dark);
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.benefit-content p {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.625rem;
    line-height: 1.5;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.benefit-content ul {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.benefit-content ul li {
    padding-left: 1.25rem;
    position: relative;
    color: var(--text-light);
    font-size: 0.8125rem;
    flex: 0 0 auto;
}

.benefit-content ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success);
    font-weight: 700;
    font-size: 0.875rem;
}

/* ===========================
   How It Works Section
   =========================== */
.how-it-works {
    background: var(--bg-light);
}

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

.step {
    background: var(--bg-white);
    padding: var(--spacing-xl);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: var(--bg-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 auto var(--spacing-md);
}

.step-content h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

.step-content p {
    color: var(--text-light);
    line-height: 1.7;
}

/* ===========================
   Use Cases Section
   =========================== */
.use-cases {
    overflow: hidden;
}

.carousel-container {
    max-width: 1200px;
    margin: var(--spacing-xl) auto 0;
    overflow: hidden;
    padding: var(--spacing-lg) 0;
}

.carousel-track {
    display: flex;
    gap: var(--spacing-lg);
    animation: scroll-left 30s linear infinite;
    width: max-content;
}

.carousel-track:hover {
    animation-play-state: paused;
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

.use-case {
    padding: var(--spacing-xl);
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-width: 280px;
    max-width: 280px;
    flex-shrink: 0;
}

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

.use-case-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-md);
    background: var(--bg-light);
    border-radius: 8px;
    padding: var(--spacing-xs);
}

.use-case-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.use-case-icon svg {
    color: var(--primary-color);
}

.use-case-icon.custom-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
}

.use-case-icon .icon-emoji {
    font-size: 32px;
    line-height: 1;
}

/* Special styling for Custom Permits tile */
.use-case:has(.custom-icon) {
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
    border: 2px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.use-case:has(.custom-icon)::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.1) 0%, transparent 70%);
    animation: pulse-glow 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.1);
    }
}

.use-case:has(.custom-icon) h3 {
    color: var(--primary-color);
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.use-case:has(.custom-icon) p {
    position: relative;
    z-index: 1;
}

.use-case:has(.custom-icon) .use-case-icon {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
    position: relative;
    z-index: 1;
}

.use-case:has(.custom-icon):hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
    border-color: var(--primary-dark);
}

.use-case h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    color: var(--text-dark);
}

.use-case p {
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.9rem;
    flex-grow: 1;
}

/* ===========================
   CTA Section
   =========================== */
.cta-section {
    background: linear-gradient(135deg, #5a7fa4 0%, #3a4f64 100%);
    color: var(--bg-white);
    text-align: center;
    padding: var(--spacing-3xl) 0;
}

.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-md);
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
}

.cta-section .btn {
    background: var(--bg-white);
    color: var(--primary-color);
}

/* ===========================
   Contact Section
   =========================== */
.contact {
    background: var(--bg-light);
}

.contact-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-md);
    max-width: 700px;
    width: 100%;
    margin: 0 auto;
}

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

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    padding: 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-base);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.contact-form button {
    grid-column: 1 / -1;
    background: var(--primary-color);
    color: var(--bg-white);
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-base);
}

.contact-form button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xl);
}

.info-item h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    color: var(--text-dark);
}

.info-item p {
    color: var(--text-light);
}

.info-item a {
    color: var(--primary-color);
    font-weight: 600;
}

.info-item a:hover {
    text-decoration: underline;
}

/* ===========================
   Footer
   =========================== */
.footer {
    background: var(--text-dark);
    color: var(--bg-white);
    padding: var(--spacing-2xl) 0 var(--spacing-md);
}

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

.footer-brand h3 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: var(--spacing-xs);
}

.footer-brand p {
    color: var(--text-lighter);
    font-size: 0.875rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-xl);
}

.footer-column h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
}

.footer-column ul {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-column a {
    color: var(--text-lighter);
    font-size: 0.875rem;
}

.footer-column a:hover {
    color: var(--bg-white);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: var(--text-lighter);
    font-size: 0.875rem;
}

/* ===========================
   Mobile Responsiveness
   =========================== */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        max-width: 100%;
    }

    .hero-image {
        margin-top: var(--spacing-lg);
        max-width: 100%;
        width: 100%;
    }

    .hero-image img {
        max-width: 100%;
        width: 100%;
    }

    .benefit-item {
        padding: var(--spacing-md);
        max-width: 100%;
        overflow: hidden;
    }

    .benefit-image {
        width: 160px;
        height: 160px;
    }

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

@media (max-width: 768px) {
    :root {
        --font-size-base: 15px;
        --spacing-xl: 2rem;
        --spacing-2xl: 3rem;
        --spacing-3xl: 4rem;
    }

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

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

    .mobile-menu-toggle {
        display: flex;
    }

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

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

    .hero-cta {
        flex-direction: column;
    }

    .hero-stats {
        flex-direction: column;
        gap: var(--spacing-md);
    }

    .section-title {
        font-size: 1.75rem;
    }

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

    .features-grid,
    .steps-container {
        grid-template-columns: 1fr;
    }

    .use-case {
        min-width: 240px;
        max-width: 240px;
    }

    .carousel-track {
        animation-duration: 40s;
    }

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

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

    .language-selector {
        top: var(--spacing-sm);
        right: var(--spacing-sm);
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: var(--spacing-2xl);
        padding-bottom: var(--spacing-2xl);
    }

    .btn {
        width: 100%;
    }

    .benefit-item {
        padding: var(--spacing-md);
        gap: var(--spacing-sm);
    }

    .benefit-image {
        width: 140px;
        height: 140px;
    }

    .benefit-content h3 {
        font-size: 1.125rem;
    }

    .benefit-content p {
        font-size: 0.875rem;
    }

    .benefit-content ul li {
        font-size: 0.8125rem;
    }
}

/* ===========================
   Animations
   =========================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* ===========================
   Custom Development Section
   =========================== */
.custom-development {
    padding: var(--spacing-xl) 0;
}

.custom-dev-header {
    max-width: 1000px;
    margin: 0 auto;
}

.custom-dev-icon {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: var(--spacing-md);
}

.custom-dev-icon svg {
    color: #2A3F54;
    width: 64px;
    height: 64px;
}

.custom-dev-header .section-title {
    text-align: center;
    margin: 0 0 var(--spacing-xs) 0;
}

.custom-dev-header .section-subtitle {
    text-align: center;
    margin: 0 auto;
    max-width: 800px;
}

/* Responsive adjustments for custom development */
@media (max-width: 768px) {
    .custom-development {
        padding: var(--spacing-lg) 0;
    }

    .custom-dev-icon svg {
        width: 48px;
        height: 48px;
    }
}

/* ===========================
   Accessibility
   =========================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===========================
   Print Styles
   =========================== */
@media print {
    .language-selector,
    .navbar,
    .hero-cta,
    .cta-section,
    .contact-form,
    .footer {
        display: none;
    }
}
