/* 
 * FIGMA SYSTEM CSS - Design System based on Figma files
 * Created by Genius Full-Stack Developer
 * Version: 3.0.0 (Complete restored)
 * Date: 2026-04-10
 */

/* ===== CSS VARIABLES (DESIGN TOKENS) ===== */
:root {
    /* COLORS */
    --color-primary: #282828;
    --color-secondary: #969696;
    --color-accent: #FFD900;
    --color-accent-alt: #FFC800;
    --color-category: #3D93E3;
    --color-background-main: #EFEAE2;
    --color-background-card: #FFFFFF;
    --color-border: #E4DACA;
    --color-dark: #282828;
    --color-white: #FFFFFF;
    --color-text-dark: #2E2925;
    
    /* SHADOWS */
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.1);
    
    /* BORDER RADIUS */
    --radius-card: 16px;
    --radius-button: 33px;
    --radius-badge: 99px;
    --radius-search: 99px;
    --radius-image: 8px;
    --radius-small: 7px;
    
    /* SPACING */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-xxl: 48px;
    
    /* TYPOGRAPHY */
    --font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 12px;
    --font-size-sm: 14px;
    --font-size-base: 16px;
    --font-size-lg: 20px;
    --font-size-xl: 24px;
    --font-size-xxl: 36px;
    
    /* LINE HEIGHTS */
    --line-height-tight: 1;
    --line-height-base: 1.5;
    --line-height-relaxed: 1.75;
    
    /* LETTER SPACING */
    --tracking-tight: -0.01em;
    --tracking-normal: 0;
    --tracking-wide: 0.01em;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-family);
    background-color: var(--color-background-main);
    color: var(--color-primary);
    line-height: var(--line-height-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

/* ===== MAIN CONTENT AREA ===== */
main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.1;
    color: var(--color-primary);
    margin-bottom: var(--space-md);
}

h1 {
    font-size: var(--font-size-xxl);
    line-height: 39.6px;
    letter-spacing: 0.72px;
}

h2 {
    font-size: var(--font-size-xl);
    line-height: 26.4px;
    letter-spacing: 0.48px;
}

h3 {
    font-size: var(--font-size-lg);
    letter-spacing: 0.4px;
}

p {
    margin-bottom: var(--space-md);
    font-size: var(--font-size-base);
    line-height: 22.4px;
    letter-spacing: 0.32px;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--color-accent);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    border-radius: var(--radius-button);
    font-size: var(--font-size-base);
    font-weight: 400;
    line-height: 16px;
    letter-spacing: 0.32px;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-align: center;
    white-space: nowrap;
}

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

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

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

.btn-outline:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

.btn-small {
    padding: 8px 16px;
    font-size: var(--font-size-sm);
}

/* ===== HEADER (ИСПРАВЛЕННЫЙ ПО FIGMA) ===== */
.header-global {
    background: var(--color-white);
    padding: 8px 24px;
    border-radius: var(--radius-small);
    margin: 0 auto 24px;
    max-width: 1440px;
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    box-shadow: var(--shadow-card);
    flex-wrap: wrap;
}

.header-logo {
    width: 92px;
    height: 24px;
    background: var(--color-primary);
    border-radius: 2px;
    flex-shrink: 0;
}

.nav-links {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-text-dark);
    font-size: var(--font-size-base);
    font-weight: 500;
    letter-spacing: 0.16px;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-icon {
    width: 16px;
    height: 16px;
    position: relative;
    flex-shrink: 0;
}

.search-container {
    max-width: 400px;
    padding: 4px 12px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-search);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    flex: 1;
    min-width: 0;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    color: var(--color-secondary);
    font-size: var(--font-size-base);
    font-weight: 400;
    letter-spacing: 0.16px;
    outline: none;
    min-width: 0;
}

.search-input::placeholder {
    color: var(--color-secondary);
}

.search-button {
    width: 32px;
    height: 32px;
    background: var(--color-accent);
    border: none;
    border-radius: var(--radius-badge);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.login-button {
    padding: 12px 20px;
    background: var(--color-background-main);
    border: none;
    border-radius: var(--radius-button);
    color: var(--color-primary);
    font-size: var(--font-size-base);
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 0.32px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: var(--color-background-card);
    border-radius: var(--radius-card);
    padding: var(--space-xl);
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: flex-end;
    gap: var(--space-lg);
    max-width: 1170px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: var(--shadow-card);
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: var(--font-size-xxl);
    font-weight: 600;
    line-height: 39.6px;
    letter-spacing: 0.72px;
    margin-bottom: var(--space-md);
    color: var(--color-primary);
}

.hero-description {
    font-size: var(--font-size-base);
    font-weight: 400;
    line-height: 22.4px;
    letter-spacing: 0.32px;
    margin-bottom: var(--space-lg);
    max-width: 632px;
    color: var(--color-primary);
}

/* ===== CARDS GRID ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-bottom: var(--space-xxl);
    max-width: 1170px;
    margin-left: auto;
    margin-right: auto;
}

.business-card {
    background: var(--color-background-card);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all 0.3s ease;
}

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

.card-image {
    height: 194px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: var(--color-background-main);
}

.growth-badge {
    position: absolute;
    top: var(--space-lg);
    left: var(--space-lg);
    padding: 7px 8px;
    background: rgba(39, 39, 39, 0.7);
    backdrop-filter: blur(2px);
    border-radius: var(--radius-badge);
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-white);
    font-size: var(--font-size-sm);
    font-weight: 500;
    line-height: 14px;
    letter-spacing: 0.28px;
}

.card-content {
    padding: var(--space-xl);
}

.card-category {
    color: var(--color-category);
    font-size: var(--font-size-sm);
    font-weight: 400;
    letter-spacing: 0.28px;
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
}

.card-title {
    font-size: var(--font-size-lg);
    font-weight: 600;
    letter-spacing: 0.4px;
    margin-bottom: var(--space-md);
    line-height: 1.2;
    color: var(--color-primary);
}

.card-title-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.card-title-link:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

.card-stats {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.stat-item {
    flex: 1;
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    min-width: 0;
}

.stat-icon {
    width: 32px;
    height: 32px;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-badge);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-value {
    font-size: var(--font-size-base);
    font-weight: 600;
    line-height: 16px;
    letter-spacing: 0.32px;
    color: var(--color-primary);
}

.stat-label {
    font-size: var(--font-size-xs);
    font-weight: 400;
    line-height: 12px;
    letter-spacing: 0.24px;
    color: var(--color-secondary);
    margin-top: var(--space-xs);
}

.card-link {
    display: inline-block;
    padding: 8px 16px;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-primary);
    text-decoration: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-button);
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    margin-top: var(--space-md);
}

.card-link:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

/* ===== POST PAGE STYLES ===== */
.post-container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 24px;
}

.post-main-content {
    display: flex;
    gap: 24px;
    margin-top: 24px;
}

.post-content-column {
    flex: 1;
    background: var(--color-background-card);
    border-radius: var(--radius-card);
    padding: 40px;
    box-shadow: var(--shadow-card);
}

.post-sidebar-column {
    width: 282px;
    flex-shrink: 0;
}

.post-header {
    margin-bottom: 24px;
}

.post-date {
    color: rgba(39, 39, 39, 0.5);
    font-size: var(--font-size-sm);
    font-weight: 400;
    line-height: 15.4px;
    letter-spacing: 0.28px;
    margin-bottom: 4px;
}

.post-title {
    color: var(--color-primary);
    font-size: var(--font-size-xxl);
    font-weight: 600;
    line-height: 39.6px;
    letter-spacing: 0.72px;
    margin-bottom: 4px;
}

.post-category {
    color: var(--color-category);
    font-size: var(--font-size-sm);
    font-weight: 400;
    letter-spacing: 0.28px;
}

.post-stats {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
}

.post-stat-item {
    flex: 1;
    background: var(--color-background-card);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--color-border);
}

.post-stat-icon {
    width: 44px;
    height: 44px;
    padding: 8px;
    background: linear-gradient(150deg, #E8F6C0 0%, #FFFDEA 45%, white 100%);
    border-radius: var(--radius-badge);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.post-stat-value {
    color: var(--color-primary);
    font-size: var(--font-size-lg);
    font-weight: 600;
    line-height: 20px;
    letter-spacing: 0.4px;
}

.post-stat-label {
    color: var(--color-secondary);
    font-size: var(--font-size-sm);
    font-weight: 400;
    line-height: 14px;
    letter-spacing: 0.28px;
    margin-top: 4px;
}

.post-image {
    width: 100%;
    height: 380px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 40px;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-content-section {
    margin-bottom: 40px;
}

.post-section-title {
    color: var(--color-primary);
    font-size: var(--font-size-xl);
    font-weight: 600;
    line-height: 26.4px;
    letter-spacing: 0.48px;
    margin-bottom: 16px;
}

.post-text {
    color: var(--color-primary);
    font-size: var(--font-size-base);
    font-weight: 400;
    line-height: 22.4px;
    letter-spacing: 0.32px;
    margin-bottom: 16px;
}

.post-text p {
    margin-bottom: 16px;
}

.post-text ul,
.post-text ol {
    margin-left: 24px;
    margin-bottom: 16px;
}

.post-text li {
    margin-bottom: 8px;
}

.post-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
}

.post-table thead {
    border-bottom: 2px solid var(--color-primary);
}

.post-table th {
    padding: 12px 8px;
    color: var(--color-primary);
    font-size: var(--font-size-base);
    font-weight: 600;
    line-height: 22.4px;
    letter-spacing: 0.32px;
    text-align: left;
}

.post-table tbody tr {
    border-bottom: 1px solid var(--color-primary);
}

.post-table td {
    padding: 12px 8px;
    color: var(--color-primary);
    font-size: var(--font-size-base);
    font-weight: 400;
    line-height: 22.4px;
    letter-spacing: 0.32px;
    vertical-align: top;
}

.post-summary {
    background: linear-gradient(150deg, #E8F6C0 0%, #FFFDEA 45%, white 100%);
    border-radius: var(--radius-card);
    padding: 16px;
    margin-top: 40px;
}

.post-summary strong {
    font-weight: 600;
}

/* ===== SIDEBAR ===== */
.post-premium-sidebar {
    background: var(--color-background-card);
    border-radius: var(--radius-card);
    padding: 12px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.premium-content {
    position: relative;
    z-index: 2;
    padding: 12px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    backdrop-filter: blur(2px);
}

.premium-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 8px;
    position: relative;
}

.premium-title {
    color: var(--color-primary);
    font-size: var(--font-size-lg);
    font-weight: 600;
    line-height: 24px;
    letter-spacing: 0.4px;
    text-align: center;
    margin-bottom: 8px;
}

.premium-subtitle {
    color: rgba(39, 39, 39, 0.7);
    font-size: var(--font-size-sm);
    font-weight: 400;
    line-height: 18.2px;
    letter-spacing: 0.28px;
    text-align: center;
    margin-bottom: 14px;
}

.premium-price-button {
    width: 100%;
    padding: 12px 20px;
    background: var(--color-accent);
    border: none;
    border-radius: var(--radius-badge);
    color: var(--color-primary);
    font-size: var(--font-size-base);
    font-weight: 500;
    line-height: 16px;
    letter-spacing: 0.32px;
    cursor: pointer;
    margin-bottom: 8px;
}

.premium-example-link {
    width: 100%;
    padding: 12px 20px;
    border-radius: var(--radius-badge);
    text-align: center;
    color: var(--color-category);
    font-size: var(--font-size-sm);
    font-weight: 400;
    line-height: 14px;
    letter-spacing: 0.28px;
    text-decoration: none;
    display: block;
}

.premium-example-link:hover {
    background: rgba(61, 147, 227, 0.1);
}

/* ===== FOOTER ===== */
.footer-global {
    background: var(--color-dark);
    padding: 24px;
    margin-top: 48px;
}

.footer-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    color: var(--color-secondary);
    font-size: var(--font-size-base);
    font-weight: 400;
    line-height: 22.4px;
    letter-spacing: 0.32px;
}

.footer-social {
    width: 36px;
    height: 36px;
    background: var(--color-primary);
    border-radius: 50%;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1200px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .post-main-content {
        flex-direction: column;
    }
    
    .post-sidebar-column {
        width: 100%;
    }
    
    .post-premium-sidebar {
        max-width: 282px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .header-global {
        flex-direction: column;
        gap: 16px;
        padding: 16px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }
    
    .search-container {
        max-width: 100%;
        order: 3;
        width: 100%;
    }
    
    .login-button {
        order: 4;
    }
    
    .hero-section {
        flex-direction: column;
        padding: 24px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .post-content-column {
        padding: 24px;
    }
    
    .post-title {
        font-size: 28px;
        line-height: 30.8px;
    }
    
    .post-stats {
        flex-direction: column;
    }
    
    .post-image {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .post-container {
        padding: 0 16px;
    }
    
    .post-content-column {
        padding: 16px;
    }
    
    .post-title {
        font-size: 24px;
        line-height: 26.4px;
    }
    
    .hero-title {
        font-size: 28px;
        line-height: 30.8px;
    }
    
    .hero-description {
        font-size: 14px;
        line-height: 19.6px;
    }
    
    .header-global {
        padding: 12px;
    }
    
    .nav-link {
        font-size: 14px;
    }
    
    .nav-links {
        gap: 8px;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space-md); }
.p-4 { padding: var(--space-lg); }
.p-5 { padding: var(--space-xl); }

.container {
    max-width: 1170px;
    margin: 0 auto;
}

/* ===== 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: 0;
}

/* ===== FOCUS STATES ===== */
:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ===== PRINT STYLES ===== */
@media print {
    .header-global,
    .footer-global,
    .post-premium-sidebar,
    .search-container,
    .login-button {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .post-content-column {
        box-shadow: none;
        padding: 0;
    }
}