/* Hebrew site styles - RTL design */
@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@400;600;700;900&family=Orbitron:wght@900&display=swap');

:root {
  --color-primary: #2196F3;
  --color-secondary: #4CAF50;
  --color-accent: #FFC107;
  --color-bg-main: #F8F9FA;
  --color-bg-card: #FFFFFF;
  --color-border: #E9ECEF;
  --color-text-dark: #1A1A2E;
  --color-text-body: #555;
  --font-heading: 'Heebo', sans-serif;
  --font-body: 'Heebo', sans-serif;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --shadow-soft: 0 2px 15px rgba(0,0,0,0.08);
  --transition-main: all 0.3s ease;
}

* { box-sizing: border-box; }

body {
  font-family: var(--font-body);
  direction: rtl;
  text-align: right;
  background: var(--color-bg-main);
  color: var(--color-text-body);
  line-height: 1.7;
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  background: var(--color-bg-card);
  box-shadow: var(--shadow-soft);
  padding: 0.5rem 0;
  z-index: 1050;
}

.navbar::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--color-secondary), var(--color-accent), var(--color-primary));
}

.navbar-brand {
  font-family: 'Orbitron', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--color-text-dark) !important;
  letter-spacing: -0.5px;
}

.navbar .navbar-nav {
  margin-right: auto;
  margin-left: 0;
}

.navbar .nav-link {
  font-weight: 600;
  color: var(--color-text-body) !important;
  padding: 0.5rem 0.75rem;
  white-space: nowrap;
}

.navbar .nav-link:hover {
  color: var(--color-primary) !important;
}

#nav-search-form {
  overflow: hidden;
  transition: all 0.3s ease;
  width: 0;
  opacity: 0;
}

#nav-search-form.active {
  width: 180px;
  opacity: 1;
  margin-left: 10px;
}

/* Article cards */
.article-card {
  background: var(--color-bg-card);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: var(--transition-main);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.article-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.article-card-body {
  padding: var(--spacing-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.article-card-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: var(--spacing-sm);
  line-height: 1.4;
}

.article-card-excerpt {
  color: var(--color-text-body);
  font-size: 0.9rem;
  flex: 1;
  margin-bottom: var(--spacing-sm);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.article-card-meta {
  font-size: 0.8rem;
  color: #888;
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.article-card-link:hover {
  color: inherit;
}

/* Featured article */
.featured-article {
  border-radius: 16px;
  overflow: hidden;
  background: var(--color-bg-card);
  box-shadow: var(--shadow-soft);
}

.featured-article-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}

.featured-article-body {
  padding: var(--spacing-xl);
}

.featured-article-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 900;
  color: var(--color-text-dark);
  line-height: 1.2;
}

.featured-badge {
  background: var(--color-primary);
  color: #fff;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Category badge */
.category-badge {
  background: var(--color-primary);
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

/* Section title */
.section-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text-dark);
  border-right: 4px solid var(--color-primary);
  padding-right: 0.75rem;
  border-left: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
}

/* Article grid */
.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* Sidebar */
.sidebar-section {
  background: var(--color-bg-card);
  border-radius: 12px;
  padding: var(--spacing-md);
  box-shadow: var(--shadow-soft);
}

.sidebar-section h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--color-text-dark);
}

.trending-topics-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.trending-topics-list li a {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text-body);
  text-decoration: none;
  font-weight: 600;
}

.trending-topics-list li a:hover {
  color: var(--color-primary);
}

/* Automation banner */
@keyframes ab-shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
@keyframes ab-pulse-ring {
  0%   { box-shadow: 0 0 0 0 rgba(99,102,241,0.45); }
  70%  { box-shadow: 0 0 0 10px rgba(99,102,241,0); }
  100% { box-shadow: 0 0 0 0 rgba(99,102,241,0); }
}
@keyframes ab-slide-up {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.automation-banner {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%) !important;
  border: 1px solid rgba(99,102,241,0.25);
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: ab-pulse-ring 2.8s ease-out infinite;
}

/* Shimmer sweep across the banner */
.automation-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255,255,255,0.06) 50%,
    transparent 70%
  );
  background-size: 200% 100%;
  animation: ab-shimmer 3.5s linear infinite;
  pointer-events: none;
  border-radius: inherit;
}

/* Accent line at the top */
.automation-banner::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #6366f1, #8b5cf6, #06b6d4);
  border-radius: 12px 12px 0 0;
}

.automation-banner:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(99,102,241,0.35);
}

.automation-banner-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.automation-banner h4 {
  color: #fff !important;
  animation: ab-slide-up 0.6s ease both;
  letter-spacing: 0.01em;
}

.automation-banner p {
  animation: ab-slide-up 0.6s 0.12s ease both;
  color: rgba(200,210,240,0.85) !important;
}

/* Article page content */
.article-content {
  line-height: 1.9;
  font-size: 1.05rem;
}

.article-content h3 {
  font-family: var(--font-heading);
  color: var(--color-text-dark);
  margin: 1.5rem 0 0.75rem;
}

.article-content img {
  max-width: 100%;
  border-radius: 8px;
  margin: 1rem auto;
  display: block;
}

.article-content blockquote {
  border-right: 4px solid var(--color-primary);
  border-left: none;
  padding-right: 1rem;
  padding-left: 0;
  margin: 1.5rem 0;
  color: #666;
  font-style: italic;
}

/* Footer */
.footer {
  background: #1A1A2E;
  color: #aaa;
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer h5 {
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 700;
  margin-bottom: 1rem;
}

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

.footer-links li a {
  color: #aaa;
  text-decoration: none;
  line-height: 2;
}

.footer-links li a:hover {
  color: #fff;
}

.footer .copyright {
  border-top: 1px solid #333;
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
  font-size: 0.85rem;
}

/* Language switcher */
.lang-switch {
  background: var(--color-accent);
  color: #000 !important;
  border-radius: 20px;
  padding: 0.25rem 0.75rem !important;
  font-weight: 700 !important;
  font-size: 0.85rem;
}

.lang-switch:hover {
  background: #e6ad00;
  color: #000 !important;
}

/* Spinner */
.spinner-container {
  padding: 3rem;
  text-align: center;
}

/* Welcome popup — display is controlled by JS only, no override here */

/* RTL Bootstrap overrides */
.me-2 {
  margin-left: 0.5rem !important;
  margin-right: 0 !important;
}

.ms-auto {
  margin-right: auto !important;
  margin-left: 0 !important;
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "\\";
  float: none;
  padding-right: 0;
  padding-left: 0.5rem;
}

/* Dropdown menus RTL */
.dropdown-menu {
  text-align: right;
}

/* Responsive */
@media (max-width: 991.98px) {
  .navbar .navbar-nav {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .navbar .nav-item {
    width: 100%;
  }

  .featured-article-title {
    font-size: 1.4rem;
  }

  .article-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .featured-article-img {
    height: 250px;
  }

  .featured-article-body {
    padding: var(--spacing-md);
  }
}
