:root {
    --primary-color: #1a365d;
    --primary-dark: #2d3748;
    --primary-light: #2b6cb0;
    --secondary-color: #2d3748;
    --accent-color: #d69e2e;
    --background: #f7fafc;
    --card-bg: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --border-color: #e2e8f0;
    --success-color: #38a169;
    --error-color: #e53e3e;
    --warning-color: #dd6b20;
}

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

body {
    font-family: 'Onest', 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
    word-wrap: break-word;
}

h1 { font-size: clamp(2rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2rem); }
h3 { font-size: clamp(1.5rem, 3.5vw, 1.75rem); }
h4 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

p {
    margin-bottom: 1rem;
    word-wrap: break-word;
}

input, select, button {
    font-family: 'Onest', 'Arial', sans-serif;
}

select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url(/images/down.svg) !important;
    background-color: white;
    background-position: 96% 55%;
    background-repeat: no-repeat;
    background-size: 16px;
}

.page-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 1rem;
    background: var(--primary-dark) url(/images/pat.jpg);
    color: white;
    border-radius: 8px;
    margin: 2rem 0;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.95;
    position: relative;
    z-index: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    gap: 0.5rem;
    white-space: nowrap;
    min-height: 44px;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.3);
}

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

.btn-secondary:hover {
    background: #4a5568;
}

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

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

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    min-height: 36px;
}

.btn-block {
    width: 100%;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    max-width: 100%;
}

/* Header */
.header {
    background: var(--card-bg);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: clamp(0.9rem, 4vw, 1rem);
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.logo img {
    max-width: 50px;
    height: auto;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-logo {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin: 0 0 0.5rem 0;
}

.footer-logo small {
    display: block;
}

.footer-logo img {
    filter: brightness(0) invert(1);
}

.footer-logo h3 {
    margin-bottom: 0!important;
}

.footer .footer-contact small {
    display: block;
    margin-bottom: 0.5rem!important;
}

.main-footer {
    padding-right: 40px;
}

.footer-section h3, .footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-section p {
    margin: 0;
    padding: 0;
}

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

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

.footer-section ul li a, .footer-section a {
    color: white;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.footer-section ul li a:hover, .footer-section a:hover {
    opacity: 1;
}

.footer-contact p {
    font-size: 1.3rem;
    font-weight: bold;
    display: flex;
    gap: 10px;
    align-items: center;
}

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

.footer-bottom a {
    color: white;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: white;
    opacity: 0.9;
    text-decoration: none;
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 200px);
    width: 100%;
    overflow-x: hidden;
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }

.w-100 { width: 100%; }
.max-w-100 { max-width: 100%; }

/* Alerts */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    max-width: 100%;
}

.alert-success {
    background: #f0fff4;
    color: #22543d;
    border-color: #c6f6d5;
}

.alert-error {
    background: #fed7d7;
    color: #742a2a;
    border-color: #feb2b2;
}

.alert-warning {
    background: #fffaf0;
    color: #744210;
    border-color: #feebc8;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--primary-color);
}

/* Responsive utilities */
.mobile-hidden {
    display: block;
}

.desktop-hidden {
    display: none;
}

@media (max-width: 768px) {
    .mobile-hidden {
        display: none !important;
    }
    
    .desktop-hidden {
        display: block !important;
    }
}

/* Стили для мобильного меню */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    margin-right: 1rem;
}

.menu-toggle span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: var(--primary-color);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Компактная шапка */
.header {
    background: var(--card-bg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    gap: 1rem;
    min-height: 50px;
}

.header-left {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: space-between;
    width: 100%;
}

.logo img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.logo-text {
    white-space: nowrap;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.4rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
    background: rgba(26, 54, 93, 0.05);
}

.auth-buttons {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

.auth-buttons .btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    min-height: 32px;
    white-space: nowrap;
}

/* Мобильные стили */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .header-left {
        flex: 0 1 auto;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--card-bg);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        border-top: 1px solid var(--border-color);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
        z-index: 999;
    }

    .nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
        padding: 0.5rem 0;
    }

    .nav-link {
        display: block;
        padding: 0.75rem 1rem;
        width: 100%;
        text-align: left;
        border-radius: 0;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .auth-buttons {
        margin-left: auto;
        display: flex;
        flex-wrap: nowrap;
        gap: 0.5rem;
    }

    .auth-buttons .btn {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex-shrink: 1;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0.4rem 0;
        gap: 0.75rem;
    }

    .logo {
        display: flex;
        align-items: center;
    }

    .logo-text {
        font-size: 1.1rem;
        margin: 0.3rem 0 0 0;
    }

    .logo img {
        width: 24px;
        height: 24px;
    }

    .menu-toggle {
        margin-right: 0.75rem;
    }

    .auth-buttons {
        justify-content: space-between;
        gap: 0.25rem;
    }

    .auth-buttons .btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    .auth-buttons .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .auth-buttons {
        flex-direction: row;
        gap: 0.2rem;
    }

    .auth-buttons .btn {
        width: auto;
        text-align: center;
        padding: 0.25rem 0.4rem;
        font-size: 0.75rem;
        flex-shrink: 1;
    }

    .menu-toggle {
        margin-right: 0.5rem;
    }
}

/* Анимации */
@media (prefers-reduced-motion: reduce) {
    .menu-toggle span,
    .nav {
        transition: none;
    }
}

/* Стили для плашки поддержки */
.support-badge {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 0.75rem;
    margin-top: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.support-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.support-logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    object-fit: contain;
}

.support-content span {
    font-size: 0.85rem;
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.9);
}

/* Адаптивность для плашки */
@media (max-width: 768px) {
    .support-content {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .support-content span {
        font-size: 0.8rem;
    }
}

.ic_size_small {
    width: 16px;
    height: 16px;
    vertical-align: text-top;
}

.ic_size {
    width: 18px;
    height: 18px;
    vertical-align: text-top;
}

.ic_size_big {
    width: 24px;
    height: 24px;
    vertical-align: text-top;
}

.small-text {
    font-size: 0.8rem;
}

/* Table Styles */
.table-container {
    width: 100%;
    overflow-x: auto;
    margin: 2rem 0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--border-color);
    background: var(--card-bg);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px;
    font-size: 0.95rem;
}

.comparison-table th {
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    text-align: center;
    padding: 1.25rem 1rem;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
}

.comparison-table th:last-child {
    border-right: none;
}

.comparison-table th:first-child {
    background: var(--secondary-color);
    text-align: left;
    border-radius: 12px 0 0 0;
}

.comparison-table th:last-child {
    border-radius: 0 12px 0 0;
}

.comparison-table td {
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    vertical-align: top;
    line-height: 1.5;
}

.comparison-table td:last-child {
    border-right: none;
}

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

/* Column-specific styles */
.comparison-table td:first-child {
    background: rgba(45, 55, 72, 0.03);
    font-weight: 600;
    color: var(--text-primary);
    width: 200px;
}

.comparison-table tr:nth-child(even) td:not(:first-child) {
    background: rgba(247, 250, 252, 0.5);
}

.comparison-table tr:hover td:not(:first-child) {
    background: rgba(43, 108, 176, 0.05);
    transition: background-color 0.2s ease;
}

/* Status badges in table */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-align: center;
    margin: 0.125rem 0;
}

.status-badge.primary {
    background: rgba(26, 54, 93, 0.1);
    color: var(--primary-color);
    border: 1px solid rgba(26, 54, 93, 0.2);
}

.status-badge.success {
    background: rgba(56, 161, 105, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(56, 161, 105, 0.2);
}

.status-badge.warning {
    background: rgba(221, 107, 32, 0.1);
    color: var(--warning-color);
    border: 1px solid rgba(221, 107, 32, 0.2);
}

.status-badge.error {
    background: rgba(229, 62, 62, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(229, 62, 62, 0.2);
}

/* Feature highlights */
.feature-highlight {
    background: linear-gradient(120deg, var(--accent-color) 0%, var(--accent-color) 100%) no-repeat;
    background-size: 100% 2px;
    background-position: 0 100%;
    font-weight: 500;
}

/* Responsive table styles */
@media (max-width: 1024px) {
    .comparison-table {
        font-size: 0.9rem;
        min-width: 700px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 1rem 0.75rem;
    }
}

@media (max-width: 768px) {
    .table-container {
        margin: 1.5rem 0;
        border-radius: 8px;
    }
    
    .comparison-table {
        font-size: 0.85rem;
        min-width: 600px;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.875rem 0.625rem;
    }
    
    .comparison-table td:first-child {
        width: 180px;
    }
    
    .status-badge {
        font-size: 0.75rem;
        padding: 0.2rem 0.6rem;
    }
}

@media (max-width: 480px) {
    .table-container {
        margin: 1rem 0;
        border-radius: 6px;
        border: 1px solid var(--border-color);
    }
    
    .comparison-table {
        min-width: 500px;
        font-size: 0.8rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
    }
    
    .comparison-table td:first-child {
        width: 150px;
    }
    
    .status-badge {
        font-size: 0.7rem;
        padding: 0.15rem 0.5rem;
    }
}

/* Mobile card layout as fallback */
@media (max-width: 360px) {
    .table-container {
        background: transparent;
        box-shadow: none;
        border: none;
        overflow-x: visible;
    }
    
    .comparison-table-mobile {
        display: block;
        width: 100%;
    }
    
    .comparison-table-mobile .mobile-card {
        background: var(--card-bg);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 1.5rem;
        margin-bottom: 1rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }
    
    .comparison-table-mobile .card-header {
        border-bottom: 2px solid var(--primary-color);
        padding-bottom: 0.75rem;
        margin-bottom: 1rem;
    }
    
    .comparison-table-mobile .card-feature {
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--border-color);
    }
    
    .comparison-table-mobile .card-feature:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }
    
    .comparison-table-mobile .feature-name {
        font-weight: 600;
        color: var(--text-primary);
        margin-bottom: 0.25rem;
    }
    
    .comparison-table-mobile .feature-value {
        color: var(--text-secondary);
        line-height: 1.4;
    }
}

/* Print styles */
@media print {
    .table-container {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    .comparison-table {
        min-width: auto;
    }
    
    .comparison-table th {
        background: #f0f0f0 !important;
        color: #000 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}

.cookie-notification {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a365d;
    color: white;
    padding: 1.5rem;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    border-top: 2px solid #2d3748;
    opacity: 0;
    transform: translateY(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-content p {
    margin: 0;
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.cookie-accept {
    background: #28a745;
    color: white;
}

.cookie-accept:hover {
    background: #218838;
}

.cookie-reject {
    background: #6c757d;
    color: white;
}

.cookie-reject:hover {
    background: #5a6268;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-btn {
        flex: 1;
        max-width: 150px;
    }
}