
/*
Theme Name: CoinTera Premium
Theme URI: https://cointera.example
Author: Amed Ba and ChatGPT
Author URI: https://openai.com
Description: Premium crypto news theme inspired by Cointelegraph layout with Wall Street Journal color scheme for CoinTera, with dark mode.
Version: 1.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cointera
Tags: news, magazine, crypto, blog, responsive
*/

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

:root {
  --ct-bg: #f4f2e9;
  --ct-bg-alt: #ffffff;
  --ct-header-bg: #f1e8d5;
  --ct-header-border: #d2c3a3;
  --ct-primary: #101820;
  --ct-accent: #c29b40;
  --ct-accent-soft: #e0c88a;
  --ct-border: #ded5c3;
  --ct-muted: #7a7263;
  --ct-link: #0d3b66;
  --ct-badge: #253746;
  --ct-badge-text: #f7f3e8;
  --ct-ticker-bg: #101820;
  --ct-ticker-text: #f4f2e9;
  --ct-danger: #b43c3c;
  --ct-success: #2f7a4f;
  --ct-shadow-soft: 0 18px 40px rgba(0, 0, 0, 0.12);
}

/* Dark mode variables */

body.ct-dark {
  --ct-bg: #050608;
  --ct-bg-alt: #0f141c;
  --ct-header-bg: #10151e;
  --ct-header-border: #232a36;
  --ct-primary: #f5f7fb;
  --ct-accent: #e0b45c;
  --ct-accent-soft: #3b2e18;
  --ct-border: #343b46;
  --ct-muted: #9ba7bd;
  --ct-link: #9ac0ff;
  --ct-badge: #111827;
  --ct-badge-text: #f5f7fb;
  --ct-ticker-bg: #050608;
  --ct-ticker-text: #f4f2e9;
  --ct-danger: #ff6b6b;
  --ct-success: #4fd18b;
  --ct-shadow-soft: 0 20px 55px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  background: var(--ct-bg);
  color: var(--ct-primary);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  transition: background 0.35s ease, color 0.35s ease;
}

a {
  color: var(--ct-link);
  text-decoration: none;
  transition: color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

a:hover {
  text-decoration: underline;
}

/* Layout shell */

#page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ct-container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Top bar ticker */

.ct-topbar {
  background: var(--ct-ticker-bg);
  color: var(--ct-ticker-text);
  font-size: 13px;
  border-bottom: 1px solid #000;
}

body.ct-dark .ct-topbar {
  border-bottom-color: #000;
}

.ct-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  white-space: nowrap;
  overflow: hidden;
}

.ct-topbar-label {
  padding: 8px 12px;
  background: #000;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ct-ticker {
  flex: 1;
  overflow: hidden;
}

.ct-ticker-track {
  display: inline-flex;
  animation: ct-ticker-scroll 40s linear infinite;
}

.ct-ticker-item {
  padding: 8px 16px;
  border-right: 1px solid rgba(244, 242, 233, 0.24);
}

body.ct-dark .ct-ticker-item {
  border-right-color: rgba(255, 255, 255, 0.12);
}

.ct-ticker-symbol {
  font-weight: 600;
  margin-right: 6px;
}

.ct-ticker-change.neg {
  color: var(--ct-danger);
}

.ct-ticker-change.pos {
  color: var(--ct-success);
}

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

/* Header */

.ct-header-main {
  background: var(--ct-header-bg);
  border-bottom: 1px solid var(--ct-header-border);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.07);
}

body.ct-dark .ct-header-main {
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.75);
}

.ct-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}

.ct-branding {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ct-logo-mark {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  background: radial-gradient(circle at 30% 30%, #f7f3e8 0%, #f7f3e8 34%, #c29b40 36%, #101820 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #f7f3e8;
  font-weight: 700;
  font-size: 20px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

body.ct-dark .ct-logo-mark {
  background: radial-gradient(circle at 30% 30%, #1f2937 0%, #1f2937 34%, #e0b45c 36%, #020617 100%);
}

.ct-site-title {
  font-size: 24px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
}

.ct-site-title a {
  color: var(--ct-primary);
}

.ct-site-title a:hover {
  text-decoration: none;
}

.ct-site-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--ct-muted);
}

.ct-header-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ct-header-search {
  position: relative;
}

.ct-header-search input {
  padding: 7px 30px 7px 11px;
  border-radius: 999px;
  border: 1px solid var(--ct-border);
  background: rgba(247, 243, 232, 0.9);
  font-size: 13px;
}

body.ct-dark .ct-header-search input {
  background: rgba(15, 23, 42, 0.92);
}

.ct-header-search button {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  color: var(--ct-muted);
}

.ct-header-cta {
  padding: 7px 16px;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, var(--ct-accent), var(--ct-accent-soft));
  color: #101820;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.19);
}

body.ct-dark .ct-header-cta {
  color: #020617;
}

.ct-header-cta:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.25);
}

/* Theme toggle button */

.ct-header-toggle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--ct-border);
  background: rgba(247, 243, 232, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

body.ct-dark .ct-header-toggle {
  background: #020617;
  border-color: #334155;
}

.ct-header-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.28);
}

/* Navigation */

.ct-nav-bar {
  background: #f7f3e8;
  border-top: 1px solid var(--ct-header-border);
  border-bottom: 1px solid var(--ct-header-border);
}

body.ct-dark .ct-nav-bar {
  background: #020617;
}

.ct-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ct-primary-nav {
  display: flex;
  gap: 8px;
  position: relative;
}

.ct-primary-nav > li {
  list-style: none;
  position: relative;
  padding: 0 4px;
  border-radius: 16px 16px 0 0;
}

.ct-primary-nav > li > a {
  display: block;
  padding: 10px 12px 11px 12px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--ct-primary);
}

.ct-primary-nav > li:hover {
  background: var(--ct-accent);
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.14);
}

.ct-primary-nav > li:hover > a {
  color: #101820;
}

body.ct-dark .ct-primary-nav > li:hover > a {
  color: #020617;
}

.ct-primary-nav > li.menu-item-has-children > a::after {
  content: "▾";
  font-size: 10px;
  margin-left: 4px;
}

/* Mega dropdown for categories */

.ct-primary-nav > li .sub-menu {
  position: absolute;
  left: 0;
  top: 100%;
  padding: 10px 14px 12px 14px;
  background: #ffffff;
  border-radius: 0 0 16px 16px;
  border: 1px solid var(--ct-border);
  box-shadow: var(--ct-shadow-soft);
  min-width: 220px;
  display: none;
  z-index: 50;
  max-height: 420px;
  overflow-y: auto;
}

body.ct-dark .ct-primary-nav > li .sub-menu {
  background: #020617;
}

.ct-primary-nav > li:hover > .sub-menu {
  display: block;
}

.ct-primary-nav > li .sub-menu li {
  list-style: none;
}

.ct-primary-nav > li .sub-menu a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--ct-primary);
  border-radius: 12px;
}

.ct-primary-nav > li .sub-menu a:hover {
  background: var(--ct-accent);
  color: #101820;
  text-decoration: none;
}

body.ct-dark .ct-primary-nav > li .sub-menu a:hover {
  color: #020617;
}

.ct-nav-mobile-toggle {
  display: none;
}

/* Main content */

.ct-main {
  flex: 1;
  padding: 28px 0 40px 0;
}

/* Hero layout */

.ct-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 2.1fr) minmax(0, 1.25fr);
  gap: 24px;
}

.ct-hero-main {
  background: var(--ct-bg-alt);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--ct-shadow-soft);
  display: flex;
  flex-direction: column;
  border-top: 3px solid var(--ct-accent);
}

.ct-hero-thumb {
  position: relative;
  padding-top: 56%;
  overflow: hidden;
}

.ct-hero-thumb img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.35s ease;
}

.ct-hero-main:hover .ct-hero-thumb img {
  transform: scale(1.06);
}

.ct-hero-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 0, rgba(0, 0, 0, 0.45), transparent 55%);
  mix-blend-mode: multiply;
}

.ct-hero-badge {
  position: absolute;
  left: 18px;
  bottom: 16px;
  background: rgba(16, 24, 32, 0.88);
  color: #f7f3e8;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

body.ct-dark .ct-hero-badge {
  background: rgba(15, 23, 42, 0.88);
}

.ct-hero-content {
  padding: 18px 20px 20px 20px;
}

.ct-hero-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ct-muted);
  margin-bottom: 6px;
}

.ct-hero-title {
  font-size: 28px;
  line-height: 1.25;
  margin-bottom: 10px;
  font-weight: 600;
  color: var(--ct-primary);
}

.ct-hero-meta {
  font-size: 12px;
  color: var(--ct-muted);
}

.ct-hero-meta span + span {
  margin-left: 10px;
}

/* Hero side list */

.ct-hero-side {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ct-hero-side-tabs {
  display: flex;
  border-radius: 999px;
  overflow: hidden;
  border: 1px solid var(--ct-border);
  background: rgba(247, 243, 232, 0.96);
  margin-bottom: 8px;
}

body.ct-dark .ct-hero-side-tabs {
  background: rgba(15, 23, 42, 0.96);
}

.ct-hero-side-tab {
  flex: 1;
  padding: 6px 10px;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  border: 0;
  background: transparent;
  color: var(--ct-muted);
}

.ct-hero-side-tab.active {
  background: var(--ct-primary);
  color: #f7f3e8;
}

body.ct-dark .ct-hero-side-tab.active {
  background: #f1f5f9;
  color: #020617;
}

.ct-hero-side-list {
  background: var(--ct-bg-alt);
  border-radius: 18px;
  box-shadow: var(--ct-shadow-soft);
  padding: 10px 4px;
}

.ct-hero-side-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(210, 195, 163, 0.4);
}

body.ct-dark .ct-hero-side-item {
  border-bottom-color: rgba(51, 65, 85, 0.7);
}

.ct-hero-side-item:last-child {
  border-bottom: none;
}

.ct-hero-side-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ct-muted);
}

.ct-hero-side-title {
  font-size: 14px;
}

.ct-hero-side-meta {
  font-size: 11px;
  color: var(--ct-muted);
}

/* Sections / grid */

.ct-section {
  margin-top: 32px;
}

.ct-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--ct-border);
  padding-bottom: 6px;
}

.ct-section-title {
  font-size: 18px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 600;
}

.ct-section-more a {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ct-muted);
}

.ct-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.ct-card {
  background: var(--ct-bg-alt);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(210, 195, 163, 0.6);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.06);
}

body.ct-dark .ct-card {
  border-color: rgba(51, 65, 85, 0.9);
}

.ct-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.ct-card-thumb {
  position: relative;
  padding-top: 60%;
  overflow: hidden;
}

.ct-card-thumb img {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.32s ease;
}

.ct-card:hover .ct-card-thumb img {
  transform: scale(1.06);
}

.ct-card-body {
  padding: 12px 14px 14px 14px;
}

.ct-card-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ct-muted);
  margin-bottom: 4px;
}

.ct-card-title {
  font-size: 16px;
  line-height: 1.3;
  margin-bottom: 6px;
  color: var(--ct-primary);
}

.ct-card-meta {
  font-size: 11px;
  color: var(--ct-muted);
}

/* Article content */

.ct-article {
  background: var(--ct-bg-alt);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: var(--ct-shadow-soft);
}

.ct-article-header {
  margin-bottom: 10px;
}

.ct-article-title {
  font-size: 32px;
  line-height: 1.2;
  margin-bottom: 4px;
  font-weight: 600;
}

.ct-article-meta {
  font-size: 12px;
  color: var(--ct-muted);
}

.ct-article-content {
  margin-top: 16px;
  font-size: 16px;
  line-height: 1.7;
}

.ct-article-content p {
  margin-bottom: 1.1em;
}

/* Footer */

.ct-footer {
  background: #101820;
  color: #f4f2e9;
  padding: 32px 0 20px 0;
  margin-top: 40px;
}

body.ct-dark .ct-footer {
  background: #020617;
}

.ct-footer-top {
  display: grid;
  grid-template-columns: 2.2fr 1.3fr;
  gap: 24px;
  margin-bottom: 20px;
}

.ct-footer-title {
  font-size: 18px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.ct-footer-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
}

.ct-footer-menu li {
  margin-bottom: 6px;
}

.ct-footer-menu a {
  color: #f4f2e9;
  font-size: 13px;
}

.ct-footer-menu a:hover {
  text-decoration: underline;
}

.ct-footer-bottom {
  border-top: 1px solid rgba(244, 242, 233, 0.2);
  padding-top: 10px;
  font-size: 12px;
  color: rgba(244, 242, 233, 0.7);
}

/* Responsive */

@media (max-width: 960px) {
  .ct-header-inner {
    flex-wrap: wrap;
    gap: 10px 16px;
  }

  .ct-hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .ct-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ct-footer-top {
    grid-template-columns: minmax(0, 1fr);
  }

  .ct-nav-inner {
    padding: 0;
  }

  .ct-primary-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: #f7f3e8;
    flex-direction: column;
    padding: 8px 24px 18px 24px;
    display: none;
  }

  body.ct-dark .ct-primary-nav {
    background: #020617;
  }

  .ct-primary-nav.open {
    display: flex;
  }

  .ct-nav-mobile-toggle {
    display: block;
    padding: 10px 0;
    cursor: pointer;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
  }

  .ct-primary-nav > li {
    border-radius: 0;
  }

  .ct-primary-nav > li > a {
    padding: 8px 0;
  }

  .ct-primary-nav > li .sub-menu {
    position: static;
    border-radius: 0;
    border: none;
    box-shadow: none;
    display: none;
    padding: 0 0 8px 0;
    margin-left: 12px;
    background: transparent;
  }

  .ct-primary-nav > li.show-sub > .sub-menu {
    display: block;
  }
}

@media (max-width: 680px) {
  .ct-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
