/**
 * Layout Styles
 * n8n Orchestrator
 */

/* ============================================
   CONTAINER
   ============================================ */

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.container-fluid {
    width: 100%;
    padding: 0 var(--container-padding);
}

/* ============================================
   HEADER / NAVBAR
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: var(--z-sticky);
    transition: background var(--transition-base);
}

.navbar.scrolled {
    background: var(--color-bg-primary);
    box-shadow: var(--shadow-md);
}

.navbar-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-lg);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-primary);
    text-decoration: none;
}

.navbar-brand svg,
.navbar-brand img {
    height: 32px;
    width: auto;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-nav a {
    color: var(--color-text-secondary);
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    transition: color var(--transition-fast);
}

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

.navbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: var(--space-3xl) 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 50% 0%, rgba(229, 9, 20, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: var(--font-size-hero);
    font-weight: var(--font-weight-bold);
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    background: linear-gradient(135deg, #fff 0%, #e50914 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

/* ============================================
   MAIN CONTENT
   ============================================ */

.main {
    padding: calc(68px + var(--space-xl)) 0 var(--space-3xl);
    min-height: 100vh;
}

.page-header {
    margin-bottom: var(--space-xl);
}

.page-title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-sm);
}

.page-subtitle {
    color: var(--color-text-muted);
    font-size: var(--font-size-base);
}

/* ============================================
   GRID SYSTEM
   ============================================ */

.grid {
    display: grid;
    gap: var(--space-lg);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

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

/* ============================================
   FLEX UTILITIES
   ============================================ */

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-col {
    flex-direction: column;
}

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

.flex-between {
    justify-content: space-between;
}

.flex-end {
    justify-content: flex-end;
}

.items-center {
    align-items: center;
}

.items-start {
    align-items: flex-start;
}

.items-end {
    align-items: flex-end;
}

.gap-xs {
    gap: var(--space-xs);
}

.gap-sm {
    gap: var(--space-sm);
}

.gap-md {
    gap: var(--space-md);
}

.gap-lg {
    gap: var(--space-lg);
}

.gap-xl {
    gap: var(--space-xl);
}

/* ============================================
   SECTION
   ============================================ */

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

.section-header {
    margin-bottom: var(--space-xl);
}

.section-title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-sm);
}

.section-subtitle {
    color: var(--color-text-muted);
}

/* ============================================
   STATS ROW
   ============================================ */

.stats-row {
    display: flex;
    gap: var(--space-xl);
    padding: var(--space-lg) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    margin: var(--space-xl) 0;
}

.stat-item {
    text-align: center;
    flex: 1;
}

.stat-value {
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text-primary);
    line-height: 1;
}

.stat-value.highlight {
    color: var(--color-primary);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-xs);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1200px) {
    .grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-title {
        font-size: var(--font-size-4xl);
    }
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

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

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

    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .hero-subtitle {
        font-size: var(--font-size-lg);
    }

    .stats-row {
        flex-wrap: wrap;
    }

    .stat-item {
        flex: 0 0 50%;
        margin-bottom: var(--space-md);
    }

    .navbar-nav {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
    }

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

/* ============================================
   VISIBILITY UTILITIES
   ============================================ */

.hidden {
    display: none !important;
}