/* AI-Input - Custom Styles */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --light-bg: #f9fafb;
    --border-color: #e5e7eb;
}

/* Global Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    color: #1f2937;
    background-color: #ffffff;
    margin: 0;
    padding: 0;
}

a {
    transition: all 0.3s ease;
}

/* Navbar */
.navbar {
    border-bottom: 1px solid var(--border-color);
    transition: transform 0.3s ease-in-out;
    z-index: 1030;
}

.navbar-hidden {
    transform: translateY(-100%);
}

/* Компенсация высоты фиксированного navbar */
main {
    padding-top: 52px;
}

@media (max-width: 991px) {
    main {
        padding-top: 40px;
    }
}

.navbar-brand {
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    font-size: 1.75rem;
}

.nav-link {
    font-weight: 500;
    color: #6b7280 !important;
    padding: 0.5rem 1rem !important;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    position: relative;
    overflow: hidden;
    min-height: 500px;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    background-repeat: repeat;
    opacity: 1;
    z-index: 0;
    animation: bgMove 60s linear infinite;
}

@keyframes bgMove {
    0% { background-position: 0 0; }
    100% { background-position: 60px 60px; }
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section .hero-image {
    position: relative;
    z-index: 1;
    font-size: 120px;
    opacity: 0.9;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Cards */
.card {
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    position: relative;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.hover-lift:hover::before {
    transform: scaleX(1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(102, 126, 234, 0.25);
    border-color: var(--primary-color);
}

/* Network Logos */
.network-logo,
.network-logo-placeholder {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.network-logo::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover .network-logo::before {
    opacity: 1;
}

.network-logo {
    object-fit: cover;
}

.network-logo-placeholder {
    background: linear-gradient(135deg, #f0f4ff 0%, #f8f4ff 100%);
}

.network-logo-placeholder i {
    font-size: 2rem;
    color: var(--primary-color);
}

.network-logo-large {
    width: 100px;
    height: 100px;
    border-radius: 1.25rem;
}

.network-logo-small {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
}

/* Article Images */
.article-image {
    height: 200px;
    object-fit: cover;
}

.article-placeholder-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.article-placeholder-image i {
    font-size: 4rem;
    color: white;
    opacity: 0.5;
}

/* Article Content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.article-content h2,
.article-content h3,
.article-content h4 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.article-content h2 {
    font-size: 2rem;
}

.article-content h3 {
    font-size: 1.5rem;
}

.article-content p {
    margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 2rem 0;
}

.article-meta {
    font-size: 0.95rem;
}

/* Page Header */
.page-header {
    border-bottom: 1px solid var(--border-color);
}

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    letter-spacing: 0.3px;
}

.bg-primary-subtle {
    background-color: #e0e7ff !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.bg-success {
    background-color: var(--success-color) !important;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.2);
}

.bg-warning {
    background-color: var(--warning-color) !important;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
}

.bg-warning-subtle {
    background-color: #fef3c7 !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: 0.75rem;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 20px -5px rgba(102, 126, 234, 0.4);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
    border-width: 2px;
    background: transparent;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(102, 126, 234, 0.3);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 1rem;
}

/* Footer */
footer {
    border-top: 1px solid var(--border-color);
}

footer a:hover {
    color: var(--primary-color) !important;
}

footer .btn {
    transition: all 0.3s ease;
}

footer .btn:hover {
    transform: translateX(5px);
}

footer .btn-outline-primary {
    border-color: var(--border-color);
}

footer .btn-outline-primary:hover {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

/* Stats */
.stat-item {
    transition: all 0.3s ease;
    padding: 1rem;
    border-radius: 0.75rem;
}

.stat-item:hover {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
    transform: translateY(-2px);
}

.stat-item h2 {
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pagination */
.pagination .page-link {
    color: var(--primary-color);
    border-color: var(--border-color);
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.pagination .page-link:hover {
    background-color: #f3f4f6;
}

/* Share Buttons */
.share-buttons .btn {
    min-width: 100px;
}

/* Error Pages */
.error-page {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }
    
    .network-logo-large {
        width: 80px;
        height: 80px;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.card {
    animation: fadeIn 0.5s ease;
}

/* Fade in on scroll */
.fade-in-up {
    animation: fadeIn 0.6s ease forwards;
}

.fade-in-left {
    animation: slideInLeft 0.6s ease forwards;
}

.fade-in-right {
    animation: slideInRight 0.6s ease forwards;
}

.scale-in {
    animation: scaleIn 0.4s ease forwards;
}

/* Utilities */
.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-sm {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.shadow {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-glow {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.3);
}

/* Forms */
.form-control,
.form-select {
    border-radius: 0.75rem;
    border: 2px solid var(--border-color);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Page Header */
.page-header {
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, #f9fafb 0%, #ffffff 100%);
}

.page-header h1 {
    position: relative;
    display: inline-block;
}

.page-header h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

/* Hover effects */
.hover-scale {
    transition: transform 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: transform 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* CTA Section Enhancement */
.bg-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%) !important;
}

.bg-primary .card {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

/* Icon enhancements */
.bi {
    vertical-align: -0.125em;
}

