/*
======================================================================
AL JAZEERA STYLE REDESIGN
======================================================================
*/

/* --- Typography & Base --- */
body,
.page {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #1a1a1a;
  background-color: #f9fafb;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

/* --- Layout Containers --- */
.alj-container {
  display: flex;
  flex-direction: row;
  gap: 24px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}

.alj-main-content {
  flex: 1;
  min-width: 0;
  /* Prevents flex items from overflowing */
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.alj-sidebar-container {
  width: 320px;
  flex-shrink: 0;
}

/* --- Responsive Adjustments --- */
@media (max-width: 991px) {
  .alj-container {
    flex-direction: column;
  }

  .alj-sidebar-container {
    width: 100%;
  }
}

/* --- Live / Breaking News Strip --- */
.alj-livestrip {
  background-color: #1a1a1a;
  color: #ffffff;
  padding: 12px 20px;
  width: 100%;
}

.alj-livestrip-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 1280px;
  margin: 0 auto;
}

.alj-livestrip-badge {
  background-color: #e53e3e;
  /* Accent color: Red */
  color: #ffffff;
  font-weight: 700;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: alj-pulse-badge 2s infinite;
}

.alj-livestrip-badge::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  background-color: #ffffff;
  border-radius: 50%;
  animation: alj-blink-dot 1s infinite alternate;
}

@keyframes alj-pulse-badge {
  0% {
    box-shadow: 0 0 0 0 rgba(229, 62, 62, 0.7);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(229, 62, 62, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(229, 62, 62, 0);
  }
}

@keyframes alj-blink-dot {
  0% {
    opacity: 0.3;
  }

  100% {
    opacity: 1;
  }
}

.alj-livestrip-content {
  overflow: hidden;
  white-space: nowrap;
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
}

.alj-livestrip-ticker {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: alj-ticker 35s linear infinite;
}

.alj-livestrip-ticker:hover {
  animation-play-state: paused;
}

@keyframes alj-ticker {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-100%, 0, 0);
  }
}

.alj-livestrip-text {
  font-size: 14px;
  font-weight: 500;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.alj-livestrip-text:hover {
  color: #e53e3e;
}

.alj-livestrip-separator {
  color: #e53e3e;
  margin: 0 16px;
  font-weight: bold;
}

/* --- Hero Section --- */
.alj-hero-section {
  width: 100%;
}

.alj-hero-grid {
  display: flex;
  flex-direction: row;
  gap: 24px;
}

.alj-hero-featured {
  flex: 7;
  /* 70% */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  position: relative;
}

.alj-hero-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.alj-hero-image-wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-bottom: 56.25%;
  /* 16:9 Aspect Ratio */
}

.alj-fluid-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.alj-hero-link:hover .alj-fluid-image {
  transform: scale(1.02);
}

.alj-hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 32px 24px 24px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 60%, transparent 100%);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alj-badge {
  align-self: flex-start;
  background-color: #e53e3e;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  text-transform: uppercase;
}

.alj-hero-title {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  margin: 0;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.alj-hero-excerpt {
  font-size: 15px;
  font-weight: 400;
  opacity: 0.9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
  overflow-wrap: break-word;
}

.alj-hero-trending {
  flex: 3;
  /* 30% */
  display: flex;
  flex-direction: column;
  gap: 16px;
  background-color: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  min-width: 0;
}

.alj-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
  margin: 0;
  text-transform: uppercase;
}

.alj-trending-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.alj-trending-item {
  display: flex;
  flex-direction: row;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  align-items: center;
  min-width: 0;
}

.alj-trending-img {
  width: 80px;
  height: 60px;
  flex-shrink: 0;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

.alj-trending-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.alj-trending-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
  overflow-wrap: break-word;
}

.alj-trending-item:hover .alj-trending-title {
  color: #e53e3e;
}

.alj-meta {
  font-size: 12px;
  color: #718096;
}

.alj-trending-meta {
  font-size: 11px;
  color: #a0aec0;
}

@media (max-width: 991px) {
  .alj-hero-grid {
    flex-direction: column;
  }
}

/* --- Second Section --- */
.alj-second-section {
  width: 100%;
}

.alj-section-header {
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 20px;
}

.alj-section-header-title {
  display: inline-block;
  font-size: 20px;
  font-weight: 800;
  color: #1a1a1a;
  border-bottom: 3px solid #e53e3e;
  padding-bottom: 6px;
  margin-bottom: -2px;
  text-transform: uppercase;
}

.alj-second-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.alj-second-main {
  background-color: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.alj-card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  height: 100%;
}

.alj-second-main-img {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  overflow: hidden;
}

.alj-second-main-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.alj-second-main-title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
  transition: color 0.2s ease;
}

.alj-card-link:hover .alj-second-main-title {
  color: #e53e3e;
}

.alj-second-main-excerpt {
  font-size: 14px;
  color: #4a5568;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0;
}

.alj-second-side {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.alj-side-card {
  background-color: #ffffff;
  padding: 16px;
  border-radius: 8px;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  border: 1px solid #edf2f7;
}

.alj-side-card-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: inherit;
}

.alj-side-card-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  transition: color 0.2s ease;
}

.alj-side-card-link:hover .alj-side-card-title {
  color: #e53e3e;
}

@media (max-width: 767px) {
  .alj-second-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Content Feed (CategorySection overrides) --- */
.alj-content-feed .category-featured-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

/* --- Sidebar --- */
.alj-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: sticky;
  top: 20px;
}

.alj-widget {
  background-color: #ffffff;
  padding: 24px;
  border-radius: 12px;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.alj-widget-title {
  font-size: 16px;
  font-weight: 800;
  color: #1a1a1a;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.alj-latest-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.alj-latest-item {
  border-bottom: 1px solid #edf2f7;
  padding-bottom: 16px;
}

.alj-latest-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* --- Header --- */
.alj-header-container {
  background-color: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  position: relative;
  z-index: 1000;
}

.alj-sticky-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  animation: slideDown 0.3s ease-out forwards;
}

.alj-header-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  /* padding: 16px 20px 0; */
  /* gap: 16px; */
}

.alj-logo-container {
  flex-shrink: 0;
  display: flex;
  justify-content: center;
  width: 100%;
}

.alj-nav-container {
  width: 100%;
  display: flex;
  justify-content: center;
  position: relative;
}

.alj-nav-scroll {
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  padding: 0 16px 16px;
  text-align: center;
}

/* --- Main Layout Wrapper for Side Ads --- */
.alj-page-wrapper {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  max-width: 1640px;
  /* 1280px + 2*160px + gaps */
  margin: 0 auto;
  gap: 20px;
}

.alj-ad-sidebar-outer {
  width: 160px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.alj-ad-sticky {
  position: fixed;
  top: 150px;
  width: 160px;
  height: 600px;
  background-color: #f7fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
  z-index: 100;
}

.alj-ad-sticky.left {
  left: calc(50% - 820px);
}

.alj-ad-sticky.right {
  right: calc(50% - 820px);
}

@media (max-width: 1640px) {
  .alj-ad-sticky.left {
    left: 10px;
  }

  .alj-ad-sticky.right {
    right: 10px;
  }
}

@media (max-width: 1400px) {
  .alj-ad-sidebar-outer {
    display: none;
  }
}

.alj-ad-sticky img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.site_container {
  flex: 1;
  min-width: 0;
  max-width: 1280px;
}

@media (max-width: 1300px) {
  .alj-page-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .alj-ad-sidebar-outer {
    width: 100%;
    max-width: 728px;
    /* Leaderboard size on mobile/tablet */
    height: 90px;
  }

  .alj-ad-sticky {
    position: static;
    width: 100%;
    height: 90px;
  }

  .alj-ad-sticky img {
    object-fit: cover;
  }
}

.alj-nav-scroll::-webkit-scrollbar {
  display: none;
  /* Safari and Chrome */
}

.alj-nav-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #e2e8f0;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  color: #4a5568;
  font-size: 18px;
  transition: all 0.2s ease;
}

.alj-nav-arrow:hover {
  background: #f7fafc;
  color: #e53e3e;
}

.alj-nav-arrow.left {
  left: 0;
}

.alj-nav-arrow.right {
  right: 0;
}

.alj-nav-menu {
  display: inline-flex;
  justify-content: center;
  gap: 24px;
  list-style: none;
  padding: 0;
  margin: 0;
  min-width: 100%;
}

.alj-nav-menu li a {
  text-decoration: none;
  color: #4a5568;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  transition: color 0.2s ease;
  letter-spacing: 0.5px;
}

.alj-nav-menu li a:hover,
.alj-nav-menu li.active a {
  color: #e53e3e;
}

.alj-header-actions {
  flex-shrink: 0;
}

.alj-search-form {
  display: flex;
  align-items: center;
  background-color: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 4px 12px;
  transition: border-color 0.2s ease;
}

.alj-search-form:focus-within {
  border-color: #cbd5e0;
}

.alj-search-input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 14px;
  padding: 4px 8px;
  width: 180px;
  color: #1a1a1a;
}

.alj-search-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  color: #718096;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
}

.alj-search-btn:hover {
  color: #1a1a1a;
}

@media (max-width: 991px) {
  .alj-header-inner {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
  }

  .alj-logo-container {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .alj-nav-container {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  .alj-header-actions {
    display: none;
  }

  .alj-search-input {
    width: 120px;
  }

  .alj-nav-arrow {
    display: none !important;
  }

  .alj-nav-scroll {
    padding: 0;
  }

  .alj-hero-grid {
    flex-direction: column;
    gap: 16px;
  }

  .alj-hero-featured,
  .alj-hero-trending {
    flex: none;
    width: 100%;
  }

  .alj-hero-title {
    font-size: 20px;
  }

  .alj-hero-excerpt {
    font-size: 14px;
    -webkit-line-clamp: 2;
  }

  .alj-hero-overlay {
    padding: 16px;
  }

  .alj-badge {
    font-size: 10px;
    padding: 3px 6px;
  }

  .alj-trending-item {
    gap: 16px;
  }

  /* Category Grid Stacking */
  .category-featured-grid {
    grid-template-columns: 1fr !important;
    gap: 24px;
  }

  .category-column {
    width: 100% !important;
  }
}

@media (max-width: 600px) {
  .alj-hero-title {
    font-size: 18px;
  }
  
  .alj-section-title {
    font-size: 16px;
  }
  
  .alj-container {
    padding: 0 12px;
  }
  
  .alj-main-content {
    gap: 24px;
  }

  .alj-ad-sticky {
    display: none;
  }

  .alj-livestrip-inner {
    gap: 8px;
    padding: 0 10px;
  }

  .alj-livestrip-badge {
    font-size: 10px;
    padding: 3px 8px;
  }
}

.alj-latest-link {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: inherit;
}

.alj-latest-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  transition: color 0.2s ease;
}

.alj-latest-link:hover .alj-latest-title {
  color: #e53e3e;
}

.alj-newsletter-desc {
  font-size: 14px;
  color: #4a5568;
  margin-bottom: 16px;
}

.alj-newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alj-newsletter-input {
  padding: 10px 12px;
  border: 1px solid #cbd5e0;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

.alj-newsletter-input:focus {
  border-color: #e53e3e;
}

.alj-newsletter-btn {
  background-color: #e53e3e;
  color: #ffffff;
  padding: 10px 16px;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.alj-newsletter-btn:hover {
  background-color: #c53030;
}

/* --- Footer --- */
.alj-footer {
  background-color: #1a202c;
  /* Minimal Dark Theme */
  color: #e2e8f0;
  padding: 60px 20px 24px;
  margin-top: 60px;
}

.alj-footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.alj-footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.alj-footer-col {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.alj-footer-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.alj-footer-text {
  font-size: 14px;
  line-height: 1.6;
  color: #a0aec0;
  margin: 0;
}

.alj-footer-contact {
  font-size: 14px;
  color: #a0aec0;
  line-height: 1.6;
}

.alj-footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.alj-footer-links li a {
  text-decoration: none;
  color: #a0aec0;
  font-size: 14px;
  transition: color 0.2s ease;
}

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

.alj-social-icons {
  display: flex;
  gap: 16px;
}

.alj-social-icon {
  color: #a0aec0;
  transition: color 0.2s ease;
}
@media (max-width: 767px) {
  .horizontal-ads-wrapper {
    flex-direction: column;
    gap: 16px;
  }
  
  .horizontal-ads-wrapper .ad-fluid-contain-img {
    height: 90px;
  }
}
.alj-social-icon:hover {
  color: #ffffff;
}

.alj-footer-bottom {
  border-top: 1px solid #2d3748;
  padding-top: 24px;
  text-align: center;
}

.alj-copyright {
  font-size: 14px;
  color: #718096;
  margin: 0;
}

@media (max-width: 767px) {
  .alj-footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

.page_title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  text-transform: uppercase;
}

.alj-fade-in {
  animation: aljFadeIn 0.8s ease-out forwards;
}

@keyframes aljFadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alj-loader {
  text-align: center;
  padding: 40px;
  color: #718096;
  font-weight: 600;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
}