/* SHARQ TURK POST — Global styles */
/* ticker-strip.css is loaded separately in layouts with ?v=filemtime (not @import) */

:root {
  --stp-navy: #061d3a;
  --stp-red: #c5161d;
  --stp-white: #ffffff;
  --stp-bg: #f5f7fa;
  --stp-muted: #6b7280;
  --stp-radius: 0.65rem;
  --stp-shadow: 0 0.35rem 1.25rem rgba(6, 29, 58, 0.08);
  --stp-shadow-hover: 0 0.65rem 2rem rgba(6, 29, 58, 0.14);
  --stp-font: "Cairo", "Tajawal", system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--stp-font);
  background-color: var(--stp-bg);
  color: var(--stp-navy);
  padding-top: 76px;
  overflow-x: clip;
}

.stp-site-main {
  min-width: 0;
  overflow-x: clip;
}

/* Navbar */
.navbar.stp-navbar {
  background-color: var(--stp-navy) !important;
  background-image: linear-gradient(
      rgba(6, 29, 58, 0.78),
      rgba(6, 29, 58, 0.88)
    ),
    url("../images/navbar-bg.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  overflow: visible;
}

.navbar.stp-navbar .container-fluid {
  overflow: visible;
}

.navbar.stp-navbar .navbar-collapse {
  background: transparent;
  overflow: visible;
}

@media (min-width: 992px) {
  .navbar.stp-navbar .navbar-collapse {
    overflow: visible;
  }
}

@media (max-width: 991.98px) {
  .navbar.stp-navbar .navbar-collapse.show,
  .navbar.stp-navbar .navbar-collapse.collapsing {
    background: rgba(6, 29, 58, 0.92);
    border-radius: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.25rem 0.75rem;
    overflow: visible;
    max-height: none;
  }

  .navbar.stp-navbar .navbar-nav {
    max-height: min(70vh, 28rem);
    overflow-y: auto;
    overflow-x: visible;
  }
}

.navbar.stp-navbar .nav-link {
  color: rgba(255, 255, 255, 0.88) !important;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.45rem 0.65rem !important;
  border-radius: 0.4rem;
  transition: background 0.2s ease, color 0.2s ease;
}

.navbar.stp-navbar .nav-link:hover,
.navbar.stp-navbar .nav-link:focus {
  color: #fff !important;
  background: rgba(197, 22, 29, 0.35);
}

.navbar.stp-navbar .nav-link.active {
  color: #fff !important;
  background: var(--stp-red);
}

.navbar.stp-navbar .dropdown-toggle::after {
  margin-inline-start: 0.35em;
}

.navbar.stp-navbar .dropdown-menu,
.navbar.stp-navbar .stp-nav-more-dropdown {
  background: #061d3a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  max-height: min(70vh, 22rem);
  overflow-y: auto;
  z-index: 1080;
  min-width: 12rem;
}

@media (max-width: 991.98px) {
  .navbar.stp-navbar .stp-nav-more-dropdown.show {
    margin-top: 0.35rem !important;
  }
}

@media (min-width: 992px) {
  .navbar.stp-navbar .stp-nav-more-cats--hover {
    position: relative !important;
  }

  .navbar.stp-navbar .stp-nav-more-cats--hover > .stp-nav-more-dropdown {
    position: absolute !important;
    top: 100% !important;
    inset-inline-start: 0 !important;
    inset-inline-end: auto !important;
    transform: none !important;
    margin-top: 0.35rem;
  }

  .navbar.stp-navbar .stp-nav-more-cats--hover:hover > .nav-link.dropdown-toggle,
  .navbar.stp-navbar .stp-nav-more-cats--hover.show > .nav-link.dropdown-toggle {
    color: #fff !important;
    background: rgba(197, 22, 29, 0.35);
  }
}

.navbar.stp-navbar .dropdown-item {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.5rem 1rem;
}

.navbar.stp-navbar .dropdown-item:hover,
.navbar.stp-navbar .dropdown-item:focus {
  color: #fff;
  background: rgba(197, 22, 29, 0.35);
}

.navbar.stp-navbar .dropdown-item.active {
  color: #fff;
  background: var(--stp-red);
}

.navbar-brand img {
  max-height: 44px;
}

.stp-search-wrap .form-control {
  border-radius: var(--stp-radius);
  border: none;
  min-width: 0;
}

@media (min-width: 992px) {
  .stp-search-wrap .form-control {
    min-width: 180px;
  }
}

.stp-search-wrap .btn {
  border-radius: var(--stp-radius);
  background: var(--stp-red);
  border-color: var(--stp-red);
  color: #fff;
}

.stp-search-wrap .btn:hover {
  background: #a31218;
  border-color: #a31218;
}

/* Cards */
.stp-card {
  border: none;
  border-radius: var(--stp-radius);
  box-shadow: var(--stp-shadow);
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  background: var(--stp-white);
}

.stp-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--stp-shadow-hover);
}

.stp-card .card-img-top {
  height: 200px;
  object-fit: cover;
}

.stp-card.stp-card-hero .card-img-top {
  height: 100%;
  min-height: clamp(200px, 42vh, 320px);
}

.stp-hero-cover-img {
  min-height: clamp(200px, 42vh, 340px);
  object-fit: cover;
  display: block;
}

.stp-card .card-title {
  font-weight: 800;
  line-height: 1.35;
}

.stp-meta {
  font-size: 0.8rem;
  color: var(--stp-muted);
}

.stp-badge-cat {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.35em 0.65em;
  border-radius: 0.35rem;
}

/* Section titles */
.stp-section-head {
  border-bottom: 3px solid var(--stp-navy);
  padding-bottom: 0.5rem;
  margin-bottom: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  justify-content: space-between;
}

.stp-section-head h2 {
  font-weight: 900;
  font-size: 1.35rem;
  margin: 0;
  min-width: 0;
}

.stp-section-head a {
  font-size: 0.9rem;
  font-weight: 700;
}

/* Hero */
.stp-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(6, 29, 58, 0.92) 0%,
    rgba(6, 29, 58, 0.35) 55%,
    transparent 100%
  );
}

.stp-hero-title {
  font-size: clamp(1.35rem, 3vw, 2rem);
  font-weight: 900;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* Sidebar widgets */
.stp-widget {
  background: var(--stp-white);
  border-radius: var(--stp-radius);
  box-shadow: var(--stp-shadow);
  padding: 1rem 1.15rem;
  margin-bottom: 1.25rem;
}

.stp-widget h5 {
  font-weight: 800;
  font-size: 1rem;
  border-bottom: 2px solid var(--stp-red);
  padding-bottom: 0.45rem;
  margin-bottom: 1rem;
}

.stp-side-item {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  text-decoration: none;
  color: inherit;
  transition: opacity 0.2s;
}

.stp-side-item:hover {
  opacity: 0.85;
}

.stp-side-item img {
  width: 88px;
  height: 64px;
  object-fit: cover;
  border-radius: 0.4rem;
  flex-shrink: 0;
}

.stp-side-thumb-fallback {
  width: 88px;
  height: 64px;
  border-radius: 0.4rem;
  flex-shrink: 0;
}

.stp-side-item h6 {
  font-size: 0.85rem;
  font-weight: 800;
  margin: 0;
  line-height: 1.35;
}

/* Category page */
.stp-cat-hero {
  background: var(--stp-navy);
  color: #fff;
  border-radius: var(--stp-radius);
  padding: clamp(1.15rem, 4vw, 2rem) clamp(1rem, 3vw, 1.5rem);
  margin-bottom: 1.5rem;
  box-shadow: var(--stp-shadow);
}

.stp-cat-hero.breaking-theme {
  background: linear-gradient(135deg, #5c0a0e 0%, var(--stp-red) 100%);
  border: 2px solid #fff3;
}

.stp-filter .btn-check:checked + .btn-outline-primary {
  background: var(--stp-navy);
  border-color: var(--stp-navy);
  color: #fff;
}

.stp-filter .btn-outline-primary {
  color: var(--stp-navy);
  border-color: var(--stp-navy);
  font-weight: 700;
}

/* Breaking list page */
.stp-breaking-list .list-group-item {
  border: none;
  border-radius: var(--stp-radius) !important;
  margin-bottom: 0.65rem;
  box-shadow: var(--stp-shadow);
  border-right: 4px solid var(--stp-red) !important;
}

.stp-flash {
  display: inline-block;
  animation: stp-flash 1.2s ease-in-out infinite;
}

@keyframes stp-flash {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.55;
  }
}

/* Articles / opinion layout */
.stp-articles-grid .stp-card .card-img-top {
  height: 160px;
}

.stp-articles-grid .stp-card .card-body {
  border-top: 3px solid var(--stp-navy);
}

.stp-opinion-tag {
  background: var(--stp-navy);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.2rem 0.5rem;
  border-radius: 0.25rem;
}

/* Article detail */
.stp-article-hero-img {
  border-radius: var(--stp-radius);
  max-height: 480px;
  width: 100%;
  object-fit: cover;
  box-shadow: var(--stp-shadow);
}

.stp-article-body {
  font-size: 1.05rem;
  line-height: 1.95;
  word-wrap: break-word;
  overflow-wrap: anywhere;
}

.stp-article-body img,
.stp-article-body video {
  max-width: 100%;
  height: auto;
}

.stp-article-body iframe {
  max-width: 100%;
}

.stp-article-body table {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.stp-article-body blockquote {
  border-right: 4px solid var(--stp-red);
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  background: #eef2f7;
  border-radius: 0 0.5rem 0.5rem 0;
  font-weight: 700;
  color: var(--stp-navy);
}

.stp-share .btn {
  border-radius: var(--stp-radius);
  font-weight: 700;
}

/* Article comments */
.stp-comment-form .form-control {
  border-radius: var(--stp-radius);
  resize: vertical;
  min-height: 6rem;
}

.stp-comment-form .form-control:focus {
  border-color: var(--stp-red);
  box-shadow: 0 0 0 0.2rem rgba(197, 22, 29, 0.15);
}

.stp-comments-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.stp-comment-item {
  background: var(--stp-white);
  border-radius: var(--stp-radius);
  box-shadow: var(--stp-shadow);
  padding: 1rem 1.15rem;
  border-right: 3px solid var(--stp-red);
}

.stp-comment-item p {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.65;
  margin: 0;
}

/* Newsletter */
.stp-newsletter {
  background: var(--stp-navy);
  color: #fff;
  border-radius: var(--stp-radius);
  padding: 2rem 1.5rem;
  box-shadow: var(--stp-shadow);
}

.stp-newsletter .form-control {
  border-radius: var(--stp-radius);
}

/* Footer */
footer.stp-footer {
  background: var(--stp-navy);
  color: rgba(255, 255, 255, 0.85);
  margin-top: 3rem;
  padding-top: 2.5rem;
  padding-bottom: 0;
}

footer.stp-footer .stp-footer-credits {
  background: rgba(0, 0, 0, 0.2);
}

footer.stp-footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.2s;
}

footer.stp-footer a:hover {
  color: #fff;
}

/* Contact */
.stp-contact-card {
  border-radius: var(--stp-radius);
  box-shadow: var(--stp-shadow);
  border: none;
}

/* Utilities */
.text-stp-muted {
  color: var(--stp-muted) !important;
}

.bg-stp-navy {
  background-color: var(--stp-navy) !important;
}

.bg-stp-red {
  background-color: var(--stp-red) !important;
}

/* Video badge on cards */
.stp-video-badge {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  background: rgba(197, 22, 29, 0.92);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/* Responsive tweaks */
@media (max-width: 991.98px) {
  body {
    padding-top: 70px;
  }

  .navbar.stp-navbar .navbar-nav {
    padding-top: 0.5rem;
  }

  .stp-navbar-brand-title,
  .stp-navbar-brand-tagline {
    max-width: min(72vw, 16rem);
  }
}

@media (min-width: 992px) {
  .stp-navbar-brand-title,
  .stp-navbar-brand-tagline {
    max-width: none;
  }
}

.stp-site-main .display-6 {
  font-size: clamp(1.25rem, 4.2vw, 2.2rem);
}

@media (max-width: 767.98px) {
  .stp-card:hover {
    transform: none;
  }
}

.fw-black {
  font-weight: 900;
}

/* --- TV ticker production overrides (must load after ticker-strip.css) --- */
.tv-ticker {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  width: 100% !important;
  height: 48px !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.tv-ticker-label {
  flex: 0 0 auto !important;
  white-space: nowrap !important;
}

.tv-ticker-viewport {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  height: 48px !important;
  overflow: hidden !important;
  position: relative !important;
  white-space: nowrap !important;
  direction: ltr !important;
}

.tv-ticker-track {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: auto !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  white-space: nowrap !important;
  width: auto !important;
  min-width: max-content !important;
  visibility: hidden;
  transition: none !important;
  animation: none !important;
  will-change: transform;
}

.tv-ticker-track.is-ready {
  visibility: visible !important;
}

.tv-ticker-track > *,
.tv-ticker-item {
  flex: 0 0 auto !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  white-space: nowrap !important;
  max-width: none !important;
  width: auto !important;
  direction: rtl !important;
  unicode-bidi: plaintext;
}

.tv-ticker-title {
  display: inline-block !important;
  white-space: nowrap !important;
  max-width: none !important;
  overflow: visible !important;
  text-overflow: clip !important;
}
