/* OperdirWB - Physarum Style CSS */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Physarum Colors - Желто-оранжевая органическая палитра */
    --primary: #F59E0B;
    --primary-light: #FCD34D;
    --primary-dark: #D97706;
    --secondary: #FBBF24;
    --accent: #FDE047;
    --success: #84CC16;
    --warning: #FB923C;
    --danger: #EF4444;
    
    /* Neutrals */
    --dark: #1C1917;
    --dark-light: #292524;
    --gray: #78716C;
    --gray-light: #D6D3D1;
    --light: #FAF9F8;
    --white: #FFFFFF;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(245, 158, 11, 0.1);
    --shadow-md: 0 4px 16px rgba(245, 158, 11, 0.15);
    --shadow-lg: 0 8px 32px rgba(245, 158, 11, 0.2);
    --shadow-organic: 0 12px 40px rgba(245, 158, 11, 0.25);
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

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

/* Physarum Canvas Background */
#physarum-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
    pointer-events: none;
}

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

.highlight {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    box-shadow: var(--shadow-md);
}

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

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

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

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

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

/* Header */
.header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(245, 158, 11, 0.1);
    z-index: 1000;
    padding: 1rem 0;
    box-shadow: var(--shadow-sm);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: 12px;
    padding: 0.75rem 0;
    margin-top: 0.5rem;
    list-style: none;
    transition: opacity 0.3s ease;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 1000;
}

.dropdown-menu.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.dropdown-menu li a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--dark);
}

.dropdown-menu li a:hover {
    background: rgba(245, 158, 11, 0.1);
}

/* Hero */
.hero {
    padding: 6rem 0 4rem;
    background: linear-gradient(135deg, rgba(252, 211, 77, 0.1), rgba(251, 191, 36, 0.05));
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray);
    margin-bottom: 2rem;
    max-width: 800px;
}

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

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 800px;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--white);
    border-radius: 12px;
    border: 2px solid rgba(245, 158, 11, 0.2);
    transition: var(--transition);
}

.stat-item:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--gray);
}

/* Sections */
.section {
    padding: 5rem 0;
}

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

.section-title {
    text-align: center;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    font-size: 1.2rem;
    margin-bottom: 4rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Breadcrumbs */
.breadcrumb {
    margin-bottom: 2rem;
    color: var(--gray);
    font-size: 0.95rem;
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

/* Content Layout для страниц */
.content-page {
    max-width: 900px;
    margin: 0 auto;
}

.content-section {
    margin-bottom: 4rem;
}

.content-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.content-section h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--dark);
}

.content-section p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--gray);
}

.content-section ul, .content-section ol {
    margin: 1.5rem 0 1.5rem 2rem;
    color: var(--gray);
}

.content-section li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

/* Info Boxes */
.info-box {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(251, 191, 36, 0.05));
    border-left: 4px solid var(--primary);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.warning-box {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(251, 146, 60, 0.05));
    border-left: 4px solid var(--danger);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

.success-box {
    background: linear-gradient(135deg, rgba(132, 204, 22, 0.05), rgba(101, 163, 13, 0.05));
    border-left: 4px solid var(--success);
    padding: 2rem;
    border-radius: 12px;
    margin: 2rem 0;
}

/* Tables */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.info-table th {
    background: var(--primary);
    color: var(--white);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.info-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-light);
}

.info-table tr:last-child td {
    border-bottom: none;
}

/* Calculation Examples */
.calc-example {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid rgba(245, 158, 11, 0.2);
    margin: 2rem 0;
}

.calc-example h4 {
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-light);
    font-family: 'JetBrains Mono', monospace;
}

.calc-row:last-child {
    border-bottom: none;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid var(--primary);
}

/* Step-by-Step */
.steps-list {
    counter-reset: step-counter;
    list-style: none;
    margin: 2rem 0;
    padding: 0;
}

.steps-list li {
    counter-increment: step-counter;
    position: relative;
    padding-left: 4rem;
    margin-bottom: 2rem;
}

.steps-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

/* CTA Section */
.cta-page {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 4rem;
    border-radius: 20px;
    text-align: center;
    margin: 4rem 0;
}

.cta-page h2 {
    color: var(--white);
    margin-bottom: 1rem;
}

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

/* Footer */
.footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 4rem 0 2rem;
}

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

.footer-section h4 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

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

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

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}


/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .hero {
        padding: 4rem 0 3rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .section {
        padding: 3rem 0;
    }
}
