:root {
  --bg-color: #050608; /* Ultra deep space */
  --bg-panel: rgba(15, 18, 25, 0.4);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent-color: #00e5ff; /* Vibrant electric cyan */
  --accent-hover: #00b3cc;
  --accent-glow: rgba(0, 229, 255, 0.4);
  --danger-color: #ff3366;
  --border-color: rgba(255, 255, 255, 0.05);
  --font-sans: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  --radius-md: 16px;
  --radius-lg: 32px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  background-image: 
    radial-gradient(circle at 15% 50%, rgba(0, 229, 255, 0.04), transparent 25%),
    radial-gradient(circle at 85% 30%, rgba(255, 51, 102, 0.04), transparent 25%);
}

/* Typography */
h1, h2, h3, .logo {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent-color);
}

/* Glassmorphism Utilities */
.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* HEADER */
.mono-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.up { color: #3fb950; font-weight: bold; }
.down { color: #f85149; font-weight: bold; }

.site-header {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.header-top {
    display: flex !important; /* Força que es mostri malgrat el codi anterior */
    justify-content: space-between;
    padding: 0.5rem 2rem;
    background-color: #010409;
    border-bottom: 1px solid var(--border-color);
    overflow-x: auto;
}

.actions {
    display: flex;
    justify-content: space-between;
    width: 100%;
    flex-direction: row-reverse;
    align-items: center;
}

.market-ticker {
    display: none;
    gap: 2rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.date {
    color: var(--accent-color);
}

.branding {
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo .accent {
    color: var(--accent-color);
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--accent-color);
}

/* Layout */
main {
  max-width: 1300px;
  margin: 120px auto 60px;
  padding: 0 2rem;
}

/* Hero Section */
.hero {
  display: flex;
  align-items: center;
  gap: 5rem;
  margin-bottom: 6rem;
  min-height: 70vh;
}

.hero-content {
  flex: 1;
  position: relative;
  z-index: 2;
}

.tag {
  display: inline-block;
  background: rgba(255, 51, 102, 0.1);
  color: var(--danger-color);
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 51, 102, 0.2);
  box-shadow: 0 0 15px rgba(255, 51, 102, 0.2);
}

.hero-title {
  font-size: 4.5rem;
  margin-bottom: 1.5rem;
  background: linear-gradient(180deg, #ffffff 0%, #a0a5aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-wrap: balance;
}

.hero-excerpt {
  font-size: 1.25rem;
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  max-width: 90%;
  font-weight: 300;
}

.btn-read-more {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  color: var(--text-main);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1rem 2rem;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.05em;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.btn-read-more::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.5s ease;
}

.btn-read-more:hover::before {
  left: 100%;
}

.btn-read-more:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

.hero-image-placeholder {
  flex: 1;
  height: 550px;
  background: var(--bg-panel);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-image-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
  pointer-events: none;
}

.hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-image-placeholder:hover .hero-img {
  transform: scale(1.08);
}

/* Content Layout (Grid + Sidebar) */
.content-layout {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 4rem;
}

.section-title {
  font-size: 2.5rem;
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 4px;
  background: var(--accent-color);
  border-radius: 2px;
}

/* News Grid */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2.5rem;
}

.news-card {
  background: var(--bg-panel);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all var(--transition-smooth);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
}

.news-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: var(--radius-md);
  padding: 2px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity var(--transition-smooth);
  pointer-events: none;
}

.news-card:hover::before {
  opacity: 1;
}

.news-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.5), 0 0 20px rgba(0, 229, 255, 0.05);
}

.card-img {
  height: 220px;
  background: #15181e;
  width: 100%;
  object-fit: cover;
  transition: transform var(--transition-smooth);
}

.news-card:hover .card-img {
  transform: scale(1.05);
}

.card-img-wrapper {
  overflow: hidden;
  position: relative;
}

.card-content {
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: linear-gradient(180deg, rgba(15,18,25,0) 0%, rgba(15,18,25,0.8) 100%);
}

.card-category {
  font-family: var(--font-display);
  font-size: 0.75rem;
  color: var(--accent-color);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.1em;
  margin-bottom: 0.8rem;
}

.card-title {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  transition: color var(--transition-fast);
}

.news-card:hover .card-title {
  color: var(--accent-color);
}

.card-footer {
  margin-top: auto;
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 1rem;
}

/* Sidebar */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.widget {
  padding: 2rem;
}

.widget-title {
  font-size: 1.4rem;
  margin-bottom: 2rem;
  position: relative;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -0.8rem;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-color), transparent);
}

.trending-list {
  list-style: none;
  counter-reset: trending-counter;
}

.trending-item {
  position: relative;
  padding-left: 3rem;
  margin-bottom: 1.8rem;
}

.trending-item::before {
  counter-increment: trending-counter;
  content: "0" counter(trending-counter);
  position: absolute;
  left: 0;
  top: -0.2rem;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.05);
  line-height: 1;
  transition: color var(--transition-fast);
}

.trending-item:hover::before {
  color: rgba(0, 229, 255, 0.2);
}

.trending-item h4 {
  font-family: var(--font-sans);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  line-height: 1.4;
  transition: color var(--transition-fast);
  cursor: pointer;
}

.trending-item h4:hover {
  color: var(--accent-color);
}

.trending-item span {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.trending-item span::before {
  content: '';
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--danger-color);
}

/* Newsletter */
.newsletter-widget {
  background: linear-gradient(145deg, rgba(30,34,42,0.8) 0%, rgba(15,18,25,0.9) 100%);
  border: 1px solid rgba(0, 229, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.newsletter-widget::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%; width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(0,229,255,0.1) 0%, transparent 60%);
  z-index: 0;
  pointer-events: none;
}

.newsletter-widget > * {
  position: relative;
  z-index: 1;
}

.newsletter-widget p {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.newsletter-form input {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(255,255,255,0.1);
  color: #fff;
  padding: 1rem 1.2rem;
  border-radius: 8px;
  font-family: inherit;
  outline: none;
  transition: all var(--transition-fast);
}

.newsletter-form input:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(0, 229, 255, 0.2);
}

.btn-submit {
  background: var(--text-main);
  color: #000;
  border: none;
  padding: 1rem;
  border-radius: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-submit:hover {
  background: var(--accent-color);
  transform: translateY(-2px);
}

/* Footer */
.main-footer {
  margin-top: 6rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 6rem 2rem 2rem;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.8) 100%);
}

.footer-content {
  max-width: 1300px;
  margin: 0 auto;
  text-align: center;
  margin-bottom: 4rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
}

.footer-logo span {
  font-weight: 300;
  color: var(--accent-color);
}

.footer-content p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Responsive */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    gap: 3rem;
  }
  .hero-image-placeholder {
    width: 100%;
    height: 400px;
  }
  .hero-title {
    font-size: 3.5rem;
  }
  .content-layout {
    grid-template-columns: 1fr;
  }
}

/* Unified article layout */
.article-container {
  max-width: 900px;
  margin: 110px auto 50px;
  padding: 0 24px;
}
.article-header { margin-bottom: 24px; }
.article-title {
  font-size: clamp(2rem, 3.2vw, 2.8rem);
  color: var(--text-main);
  margin-bottom: 12px;
  line-height: 1.18;
}
.article-subtitle {
  color: var(--text-muted);
  font-size: 1.12rem;
  margin-bottom: 14px;
}
.article-meta {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 22px;
  font-weight: 500;
}
.article-image {
  width: 100%;
  border-radius: 14px;
  margin: 18px 0 30px;
  display: block;
}
.article-content {
  color: #d1d5db;
  line-height: 1.8;
  font-size: 1.08rem;
}
.article-content h2,
.article-content h3 {
  color: var(--text-main);
  margin-top: 30px;
  margin-bottom: 12px;
  line-height: 1.25;
}
.article-content p { margin-bottom: 14px; }
.article-content ul { margin: 10px 0 18px 22px; }
.article-content li { margin-bottom: 8px; }
.article-content strong { color: var(--text-main); }
.article-content blockquote,
.note-box {
  position: relative;
  margin: 24px 0;
  padding: 30px 28px 26px;
  border-radius: 14px;
  border: 1px solid rgba(0, 229, 255, 0.28);
  background:
    radial-gradient(circle at 80% 20%, rgba(0, 229, 255, 0.08), transparent 55%),
    linear-gradient(180deg, rgba(3, 40, 58, 0.95) 0%, rgba(2, 28, 42, 0.96) 100%);
  color: #11d7ef;
  font-family: var(--font-display);
  font-size: clamp(1.24rem, 1.9vw, 1.65rem);
  line-height: 1.52;
  letter-spacing: 0.01em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 14px 36px rgba(0, 0, 0, 0.28);
}

.article-content blockquote::before,
.note-box::before {
  content: "“";
  position: absolute;
  top: 10px;
  left: 18px;
  color: #e5f5ff;
  font-family: var(--font-display);
  font-size: 3.5rem;
  line-height: 1;
  opacity: 0.92;
}

.article-content blockquote > *:last-child,
.note-box > *:last-child {
  margin-bottom: 0;
}
.highlight-panel {
  position: relative;
  margin: 30px 0 34px;
  padding: 32px 34px 28px;
  border-radius: 20px;
  border: 1px solid rgba(0, 229, 255, 0.28);
  border-left: 8px solid var(--accent-color);
  background:
    radial-gradient(circle at 80% 20%, rgba(0, 229, 255, 0.09), transparent 42%),
    radial-gradient(circle at 18% 100%, rgba(255, 51, 102, 0.06), transparent 32%),
    linear-gradient(180deg, rgba(4, 34, 50, 0.98) 0%, rgba(2, 18, 31, 0.99) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 22px 52px rgba(0, 0, 0, 0.40);
  overflow: hidden;
}

.highlight-panel::before {
  content: "“";
  position: absolute;
  top: 10px;
  right: 18px;
  color: rgba(241, 251, 255, 0.18);
  font-family: var(--font-display);
  font-size: 5rem;
  line-height: 1;
  opacity: 1;
  pointer-events: none;
}

.highlight-kicker {
  display: none;
  align-items: center;
  gap: 8px;
  color: #02111b;
  background: linear-gradient(90deg, #9df3ff 0%, var(--accent-color) 100%);
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.74rem;
  font-weight: 800;
  margin-bottom: 16px;
  padding: 8px 14px;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(0, 229, 255, 0.18);
}

.highlight-intro {
  color: #f2fbff;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 2.4vw, 2.15rem);
  line-height: 1.32;
  margin: 0;
  max-width: 34ch;
  text-wrap: balance;
  text-shadow: 0 1px 0 rgba(0,0,0,0.18);
}

.highlight-panel > *:last-child {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .highlight-panel {
    padding: 26px 22px 22px;
    border-left-width: 6px;
  }

  .highlight-panel::before {
    font-size: 4rem;
    right: 10px;
    top: 8px;
  }

  .highlight-intro {
    max-width: none;
    font-size: 1.25rem;
    line-height: 1.38;
  }
}
.links-box {
  margin-top: 22px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  background: rgba(255,255,255,.03);
}
.links-box a {
  color: var(--accent-color);
  text-decoration: none;
}
.links-box a:hover { text-decoration: underline; }

.related-news {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.1);
}

.related-news h3 {
  margin: 0 0 12px;
  color: var(--text-main);
}

.related-news ul {
  margin: 0;
  padding-left: 20px;
}

.related-news li {
  margin-bottom: 8px;
}

.related-news a {
  color: var(--accent-color);
  text-decoration: none;
}

.related-news a:hover {
  text-decoration: underline;
}

/* Shared UI enhancements */
.glass-header {
  padding: 1rem 0;
  background: rgba(5, 6, 8, 0.78);
  transition: padding .22s ease, backdrop-filter .22s ease, background .22s ease;
}
.glass-header.is-compact {
  padding: 0.62rem 0;
  backdrop-filter: blur(14px);
  background: rgba(5, 6, 8, 0.88);
}

.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 0%;
  z-index: 120;
  background: linear-gradient(90deg, #00e5ff, #00b3cc);
  box-shadow: 0 0 12px rgba(0, 229, 255, .6);
}

.article-container {
  max-width: 980px;
}

.article-content {
  max-width: 76ch;
  margin-inline: auto;
  line-height: 1.86;
}

.article-title {
  max-width: none;
}

.article-title.article-title-wide {
  max-width: none;
  width: 100%;
}

.article-meta {
  font-weight: 600;
}

.article-image {
  margin-inline: auto;
}

.article-image-caption {
  color: #94a3b8;
  font-size: .88rem;
  margin: -18px auto 22px;
  max-width: 76ch;
}


/* Modern Footer */
.site-footer {
    background: #060a0f;
    border-top: 1px solid var(--border-color, #1f2937);
    padding: 4rem 2rem 1.5rem;
    margin-top: 4rem;
}
.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}
.footer-brand .footer-logo {
    font-family: var(--font-display, 'Outfit', sans-serif);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}
.footer-brand .footer-logo span {
    color: var(--accent-color, #00d2ff);
}
.footer-brand .footer-logo a {
    text-decoration: none;
    color: inherit;
}
.footer-desc {
    color: #8b949e;
    line-height: 1.6;
    font-size: 0.95rem;
    max-width: 400px;
}
.footer-links h4 {
    color: #fff;
    font-size: 0.85rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}
.footer-links nav {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.footer-links nav a {
    color: #8b949e;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s ease, transform 0.2s ease;
    display: inline-block;
}
.footer-links nav a:hover {
    color: var(--accent-color, #00d2ff);
    transform: translateX(4px);
}
.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
    color: #6e7681;
    font-size: 0.85rem;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}
