/* News Site - Bootstrap Minimal Styles */

/* Import Bootstrap from CDN */
@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.1/font/bootstrap-icons.css');

/* Import Inter font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');

/* Custom Variables */
:root {
  --bs-font-sans-serif: 'Inter', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --bs-primary: #2563eb;
  --bs-secondary: #6b7280;
  --bs-success: #10b981;
  --bs-info: #06b6d4;
  --bs-warning: #f59e0b;
  --bs-danger: #ef4444;
  --bs-light: #f8fafc;
  --bs-dark: #0f172a;
}

/* Base Styles */
body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #0f172a;
  background-color: #ffffff;
  margin: 0;
  padding: 0;
  width: 100%;
}

/* Top Bar Styles */
.top-bar {
  background-color: #1a1a1a !important;
  border-bottom: 1px solid #333;
  font-size: 0.875rem;
  width: 100%;
  margin: 0;
  padding: 0;
}

.top-bar .container-custom {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.top-bar .badge {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* News Ticker Styles */
.news-ticker {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
}

.ticker-content {
  display: inline-block;
  animation: ticker 30s linear infinite;
}

.ticker-item {
  display: inline-block;
  margin-right: 50px;
  color: #ffffff;
  font-size: 0.875rem;
}

.ticker-item:last-child {
  margin-right: 0;
}

@keyframes ticker {
  0% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
  }
}

/* Pause animation on hover */
.news-ticker:hover .ticker-content {
  animation-play-state: paused;
}

/* Mobile responsive for top bar */
@media (max-width: 768px) {
  .top-bar .col-md-6:first-child {
    display: none;
  }
  
  .top-bar .col-md-6:last-child {
    flex: 1;
  }
  
  .news-ticker {
    font-size: 0.75rem;
  }
  
  .ticker-item {
    margin-right: 30px;
  }
}

/* Header Styles */
header {
  background-color: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  width: 100%;
  margin: 0;
  padding: 0;
}

header .container-custom {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Header Logo Styles */
.header-logo a {
  color: inherit;
}

.header-logo a:hover {
  color: inherit;
}

/* Navigation Styles */
.navbar {
  background-color: transparent !important;
  border-bottom: none;
  box-shadow: none;
  padding: 0;
}

.navbar-nav {
  flex-direction: row;
}

.navbar-nav .nav-link {
  color: var(--bs-dark);
  font-weight: 500;
  padding: 0.5rem 1rem;
}

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

.navbar-brand {
  font-weight: 700;
  font-size: 1.5rem;
  color: #2563eb !important;
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: #374151 !important;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
  color: #2563eb !important;
  background-color: #eff6ff;
}

/* Layout Container */
.container-custom {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Main Content Layout */
.main-content {
  width: 100%;
}

.container-custom .content-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-direction: row;
}

.container-custom .content-area {
  flex: 1;
  min-width: 0; /* Prevents flex item from overflowing */
  order: 1;
}

/* Content Wrapper */
/*
.content-wrapper {
  width: 100%;
}
*/

/* News Grid */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

/* News Card */
.news-card {
  width: 100%;
  margin-bottom: 1.5rem;
}

.news-card:last-child {
  margin-bottom: 0;
}

/* Pagination Wrapper */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Bootstrap Pagination Styles */
.pagination {
  display: flex;
  padding-left: 0;
  list-style: none;
  border-radius: 0.375rem;
}

.pagination .page-link {
  position: relative;
  display: block;
  padding: 0.5rem 0.75rem;
  margin-left: -1px;
  line-height: 1.25;
  color: #0d6efd;
  text-decoration: none;
  background-color: #fff;
  border: 1px solid #dee2e6;
}

.pagination .page-link:hover {
  z-index: 2;
  color: #0a58ca;
  background-color: #e9ecef;
  border-color: #dee2e6;
}

.pagination .page-link:focus {
  z-index: 3;
  color: #0a58ca;
  background-color: #e9ecef;
  outline: 0;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.pagination .page-item.active .page-link {
  z-index: 3;
  color: #fff;
  background-color: #0d6efd;
  border-color: #0d6efd;
}

.pagination .page-item.disabled .page-link {
  color: #6c757d;
  pointer-events: none;
  background-color: #fff;
  border-color: #dee2e6;
}

/* Home Page Specific Styles */
.featured-post-content {
  display: flex;
  gap: 0;
}

.featured-post-text {
  flex: 2;
}

.featured-post-image {
  flex: 1;
  min-height: 200px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.hub-card {
  width: 100%;
}

.lead-magnet-form {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.lead-magnet-form .form-group {
  flex: 1;
  min-width: 200px;
}

/* Sidebar Styles */
.container-custom .sidebar {
  width: 320px;
  flex-shrink: 0;
  position: sticky;
  top: 2rem;
  order: 2;
}

.sidebar-sticky {
  position: sticky;
  top: 6rem;
}

.sidebar-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.sidebar-card h6 {
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Search Form */
.search-form {
  position: relative;
}

.search-form .form-control {
  border-radius: 0.75rem;
  border: 1px solid #d1d5db;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}

.search-form .btn {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #6b7280;
}

/* Tags */
.tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #374151;
  background-color: #f3f4f6;
  border-radius: 9999px;
  text-decoration: none;
  margin: 0.125rem;
  transition: all 0.2s ease;
}

.tag:hover {
  background-color: #e5e7eb;
  color: #111827;
}

/* Quick Links */
.quick-link {
  display: flex;
  align-items: center;
  padding: 0.75rem;
  color: #374151;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  margin-bottom: 0.5rem;
}

.quick-link:hover {
  background-color: #f3f4f6;
  color: #111827;
}

.quick-link i {
  width: 20px;
  margin-right: 0.75rem;
  color: #6b7280;
}

/* Newsletter Form */
.newsletter-form .form-control {
  border-radius: 0.5rem;
  border: 1px solid #d1d5db;
  margin-bottom: 0.75rem;
}

.newsletter-form .btn {
  width: 100%;
  border-radius: 0.5rem;
  font-weight: 500;
}

/* Service Banner */
.service-banner {
  background: linear-gradient(135deg, #9333ea 0%, #4338ca 100%);
  color: white;
  border-radius: 0.75rem;
  padding: 1.5rem;
  text-align: center;
}

.service-banner h6 {
  color: white;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.service-banner p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.service-banner .btn {
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
  border-radius: 0.5rem;
  font-weight: 500;
}

.service-banner .btn:hover {
  background-color: rgba(255, 255, 255, 0.3);
  color: white;
}

/* Footer */
.footer {
  background-color: #f8fafc;
  border-top: 1px solid #e5e7eb;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
}

.footer .container-custom {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.footer h6 {
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
}

.footer a {
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: #2563eb;
}

.footer-bottom {
  border-top: 1px solid #e5e7eb;
  padding-top: 1.5rem;
  margin-top: 2rem;
  color: #6b7280;
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 991.98px) {
  .sidebar {
    width: 100%;
    margin-top: 2rem;
  }
  
  .sidebar-sticky {
    position: static;
  }
  
  .container-custom {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Mobile Menu */
@media (max-width: 991.98px) {
  .navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
  }
  
  .navbar-collapse {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
  }
}

/* Tech Diagrams CSS */
.tech-diagram {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.tech-diagram::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
}

.tech-diagram h4 {
    margin: 0 0 20px 0;
    color: #495057;
    font-weight: 700;
    font-size: 18px;
}

/* Архитектурная схема GPT-4o + n8n */
.architecture-diagram {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 20px 0;
    align-items: center;
}

.arch-component {
    background: white;
    border: 3px solid;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    position: relative;
}

.arch-component:hover {
    transform: translateY(-5px);
}

.arch-component.telegram {
    border-color: #0088cc;
    background: linear-gradient(135deg, #0088cc, #ffffff);
}

.arch-component.n8n {
    border-color: #ff6b35;
    background: linear-gradient(135deg, #ff6b35, #ffffff);
}

.arch-component.qdrant {
    border-color: #28a745;
    background: linear-gradient(135deg, #28a745, #ffffff);
}

.arch-component.gpt4o {
    border-color: #6f42c1;
    background: linear-gradient(135deg, #6f42c1, #ffffff);
}

.arch-component h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 700;
    color: white;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.arch-component p {
    margin: 0;
    font-size: 12px;
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

/* Стрелки между компонентами */
.arch-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #6c757d;
    font-weight: bold;
}

/* Схема интеграции */
.integration-flow {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 20px 0;
    counter-reset: step-counter;
}

.integration-step {
    background: white;
    border-left: 5px solid #28a745;
    padding: 15px 20px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
}

.integration-step::before {
    content: counter(step-counter);
    counter-increment: step-counter;
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    background: #28a745;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
}

/* Адаптивность */
@media (max-width: 768px) {
    .architecture-diagram {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Hamburger Menu Styles */
.hamburger-menu {
  border: none;
  background: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1002;
}

.hamburger-line {
  width: 100%;
  height: 3px;
  background-color: #374151;
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger Animation */
.hamburger-menu.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.hamburger-menu.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation Styles */
@media (max-width: 991.98px) {
  /* Add top margin to container-custom */
  .container-custom {
    margin-top: 0.5rem !important;
  }
  
  /* Compact header-top on mobile */
  .header-top {
    gap: 0.25rem;
    margin-bottom: 0.5rem !important;
  }
  
  .header-top .hamburger-menu {
    margin-left: auto;
  }
  
  /* Compact logo on mobile */
  .header-logo .d-flex {
    flex: 1;
  }
  
  .header-logo .fw-bold {
    font-size: 1rem !important;
  }
  
  .header-logo .small {
    font-size: 0.7rem !important;
  }
  
  .navbar-collapse {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1rem 0;
    margin-top: 1rem;
  }
  
  .navbar-nav {
    flex-direction: column;
    width: 100%;
  }
  
  .navbar-nav .nav-item {
    width: 100%;
    margin: 0;
  }
  
  .navbar-nav .nav-link {
    padding: 0.75rem 1.5rem;
    border-radius: 0;
    border-bottom: 1px solid #f3f4f6;
    display: block;
    font-weight: 500;
    color: #374151 !important;
    transition: all 0.2s ease;
  }
  
  .navbar-nav .nav-link:hover {
    background-color: #f9fafb;
    color: #2563eb !important;
    padding-left: 2rem;
  }
  
  /* Hide default Bootstrap toggler */
  .navbar-toggler:not(.hamburger-menu) {
    display: none;
  }
}

/* Desktop Navigation Styles */
@media (min-width: 992px) {
  .hamburger-menu {
    display: none !important;
  }
}

