/* ================================================================
   MICHAEL SOIS BASKETBALL BLOG — Theme overrides
   ================================================================ */

/* ── Variables ─────────────────────────────────────────────────── */
:root {
  --ms-orange:    #F97316;
  --ms-orange-dk: #EA580C;
  --ms-dark:      #0F172A;
  --ms-dark2:     #1E293B;
  --ms-dark3:     #334155;
  --ms-slate:     #64748B;
  --ms-light:     #F8FAFC;
  --ms-white:     #FFFFFF;
}

/* ── Base ───────────────────────────────────────────────────────── */
body { font-family: 'Montserrat', 'PT Sans', sans-serif; }

/* ── Navbar override ────────────────────────────────────────────── */
.rd-navbar-top-panel { background: var(--ms-dark) !important; }
.rd-navbar-top-panel a,
.rd-navbar-top-panel .text-alto { color: #CBD5E1 !important; }

.rd-navbar-default { background: var(--ms-dark2) !important; box-shadow: 0 2px 20px rgba(0,0,0,.5); }
.rd-navbar-static .rd-navbar-nav > li > a { color: #E2E8F0 !important; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; font-size: .82rem; }
.rd-navbar-static .rd-navbar-nav > li > a:hover,
.rd-navbar-static .rd-navbar-nav > li.active > a { color: var(--ms-orange) !important; }

.rd-navbar-brand img { filter: brightness(0) invert(1); }

/* ── Header transparent (pàgina d'inici) ───────────────────────── */
.ms-transparent-header {
  position: relative;
}
.ms-transparent-header .rd-navbar-wrap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}
.ms-transparent-header .rd-navbar-default {
  background: transparent !important;
  box-shadow: none !important;
  border-bottom: 1px solid rgba(255,255,255,0.13) !important;
}
/* Quan l'usuari fa scroll i el navbar es fixa, recupera el fons fosc */
.ms-transparent-header .rd-navbar--is-stuck {
  background: rgba(15,23,42,0.95) !important;
  box-shadow: 0 2px 20px rgba(0,0,0,.5) !important;
  border-bottom: none !important;
  backdrop-filter: blur(8px);
}

/* ── Hero ───────────────────────────────────────────────────────── */
.ms-hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, var(--ms-dark) 0%, #1a0a00 50%, var(--ms-dark2) 100%);
  overflow: hidden;
}
.ms-hero::before {
  content: '';
  position: absolute;
  top: -80px; left: 0; right: 0; bottom: -80px;
  background: url('../images/backgrounds/nashmit.png') center/cover no-repeat;
  opacity: .3;
  will-change: transform;
  transform: translateY(var(--hero-parallax, 0px));
}
.ms-hero-content { position: relative; z-index: 2; }
.ms-hero-tag {
  display: inline-block;
  background: var(--ms-orange);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: .3rem .9rem;
  border-radius: 2px;
  margin-bottom: 1.2rem;
}
.ms-hero h1 {
  font-size: clamp(2.4rem, 6vw, 5rem);
  font-weight: 900;
  line-height: 1.08;
  color: #fff;
  letter-spacing: -.02em;
}
.ms-hero h1 em { color: var(--ms-orange); font-style: normal; }
.ms-hero .ms-hero-excerpt {
  font-size: 1.15rem;
  color: #94A3B8;
  max-width: 560px;
  line-height: 1.7;
  margin: 1.4rem 0 2rem;
}
.ms-hero-btn {
  display: inline-block;
  background: var(--ms-orange);
  color: #fff;
  font-weight: 700;
  font-size: .88rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .85rem 2.2rem;
  border-radius: 3px;
  text-decoration: none;
  transition: background .2s;
}
.ms-hero-btn:hover { background: var(--ms-orange-dk); color: #fff; }
.ms-hero-btn-ghost {
  display: inline-block;
  border: 2px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.8);
  font-weight: 600;
  font-size: .88rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .8rem 2rem;
  border-radius: 3px;
  text-decoration: none;
  transition: all .2s;
  margin-left: 1rem;
}
.ms-hero-btn-ghost:hover { border-color: var(--ms-orange); color: var(--ms-orange); }
.ms-hero-meta {
  display: flex; align-items: center; gap: 1rem;
  margin-top: 2rem; font-size: .82rem; color: #64748B;
}
.ms-hero-meta span { display: flex; align-items: center; gap: .3rem; }
.ms-hero-meta i { color: var(--ms-orange); }

.ms-hero-side {
  position: relative;
  display: none;
}
@media (min-width: 992px) { .ms-hero-side { display: block; } }
.ms-hero-ball {
  width: 420px; height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #F97316, #7c2d12);
  opacity: .15;
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
}

/* ── Category badge ─────────────────────────────────────────────── */
.ms-cat-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .2rem .65rem;
  border-radius: 2px;
  color: #fff;
  background: var(--ms-orange);
}

/* ── Article cards ──────────────────────────────────────────────── */
.ms-article-card {
  display: flex; flex-direction: column;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 1px 6px rgba(0,0,0,.07);
  transition: transform .22s, box-shadow .22s;
  height: 100%;
  text-decoration: none;
}
.ms-article-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(0,0,0,.13); }
.ms-article-card-img {
  position: relative; overflow: hidden;
  padding-top: 62%;
}
.ms-article-card-img img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .4s;
}
.ms-article-card:hover .ms-article-card-img img { transform: scale(1.05); }
.ms-article-card-badge {
  position: absolute; top: .8rem; left: .8rem;
}
.ms-article-card-body { flex: 1; padding: 1.3rem 1.4rem; }
.ms-article-card-meta { font-size: .75rem; color: #94A3B8; margin-bottom: .5rem; }
.ms-article-card-title {
  font-size: 1.05rem; font-weight: 800; color: #0F172A;
  line-height: 1.35; margin: 0 0 .6rem;
  text-decoration: none;
}
.ms-article-card-title:hover { color: var(--ms-orange); }
.ms-article-card-excerpt { font-size: .88rem; color: #64748B; line-height: 1.6; }
.ms-article-card-footer {
  padding: .8rem 1.4rem;
  border-top: 1px solid #F1F5F9;
  display: flex; justify-content: space-between; align-items: center;
  font-size: .78rem; color: #94A3B8;
}
.ms-article-card-footer a { color: var(--ms-orange); font-weight: 700; text-decoration: none; font-size: .8rem; }

/* ── Featured article ───────────────────────────────────────────── */
.ms-featured {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  min-height: 480px;
  display: flex; align-items: flex-end;
  text-decoration: none;
}
.ms-featured-img {
  position: absolute; inset: 0;
}
.ms-featured-img img { width: 100%; height: 100%; object-fit: cover; }
.ms-featured-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.4) 50%, transparent 100%);
}
.ms-featured-body {
  position: relative; z-index: 2;
  padding: 2.5rem;
  color: #fff;
}
.ms-featured-body h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.4rem);
  font-weight: 900; line-height: 1.15;
  color: #fff; margin: .6rem 0 .8rem;
}
.ms-featured-body p { color: rgba(255,255,255,.75); font-size: .95rem; max-width: 600px; }
.ms-featured-body .ms-featured-cta {
  display: inline-flex; align-items: center; gap: .4rem;
  color: var(--ms-orange); font-weight: 700; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .06em;
  margin-top: 1rem; text-decoration: none;
}
.ms-featured-body .ms-featured-cta i { font-size: 1.1rem; }

/* ── Section titles ─────────────────────────────────────────────── */
.ms-section-title {
  font-size: 1.65rem; font-weight: 900;
  color: #0F172A; letter-spacing: -.02em;
  position: relative; padding-bottom: .8rem; margin-bottom: 2rem;
}
.ms-section-title::after {
  content: '';
  position: absolute; bottom: 0; left: 0;
  width: 48px; height: 4px;
  background: var(--ms-orange); border-radius: 2px;
}
.ms-section-title.center { text-align: center; }
.ms-section-title.center::after { left: 50%; transform: translateX(-50%); }
.ms-section-title.white { color: #fff; }
.ms-section-title.white::after { background: var(--ms-orange); }

/* ── Dark section (videos, about) ───────────────────────────────── */
.ms-dark-section {
  background: var(--ms-dark);
  color: #E2E8F0;
}
.ms-dark-section p { color: #94A3B8; }

/* ── Social links bar ───────────────────────────────────────────── */
.ms-social-bar {
  display: flex; gap: 1rem; flex-wrap: wrap;
}
.ms-social-link {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .6rem 1.2rem;
  border-radius: 4px;
  font-size: .85rem; font-weight: 700;
  text-decoration: none; color: #fff;
  transition: opacity .2s, transform .15s;
}
.ms-social-link:hover { opacity: .88; transform: translateY(-2px); color: #fff; }
.ms-social-link i { font-size: 1.2rem; }

/* ── About strip ────────────────────────────────────────────────── */
.ms-about-avatar {
  width: 140px; height: 140px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ms-orange), #7c2d12);
  display: flex; align-items: center; justify-content: center;
  font-size: 4rem; color: #fff;
  flex-shrink: 0;
}

/* ── Pagination ─────────────────────────────────────────────────── */
.ms-pagination { display: flex; gap: .4rem; justify-content: center; margin-top: 3rem; }
.ms-pagination a, .ms-pagination span {
  width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px; font-size: .88rem; font-weight: 600;
  text-decoration: none;
}
.ms-pagination a { background: #F1F5F9; color: #334155; }
.ms-pagination a:hover { background: var(--ms-orange); color: #fff; }
.ms-pagination span { background: var(--ms-orange); color: #fff; }

/* ── Single article ─────────────────────────────────────────────── */
.ms-article-hero { position: relative; min-height: 420px; overflow: hidden; }
.ms-article-hero img { width: 100%; height: 420px; object-fit: cover; }
.ms-article-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,.8) 100%);
}
.ms-article-header { position: relative; z-index: 2; padding: 2rem; color: #fff; }
.ms-article-header h1 {
  font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 900;
  line-height: 1.15; color: #fff; margin: .5rem 0;
}
.ms-article-content {
  max-width: 780px; margin: 0 auto;
  font-size: 1.05rem; line-height: 1.85; color: #1E293B;
}
.ms-article-content h2 { font-size: 1.55rem; font-weight: 800; color: #0F172A; margin: 2rem 0 1rem; }
.ms-article-content h3 { font-size: 1.25rem; font-weight: 700; color: #0F172A; margin: 1.5rem 0 .7rem; }
.ms-article-content p  { margin-bottom: 0.65rem; }
.ms-article-content blockquote {
  border-left: 4px solid var(--ms-orange);
  margin: 2rem 0; padding: 1rem 1.5rem;
  background: #FFF7ED;
  font-style: italic; font-size: 1.1rem; color: #7C3AED;
}
.ms-article-content img { max-width: 100%; border-radius: 6px; margin: 1.5rem 0; }
.ms-article-content a { color: var(--ms-orange); }

/* ── Footer ─────────────────────────────────────────────────────── */
.ms-footer {
  background: var(--ms-dark); color: #94A3B8;
  padding: 4rem 0 2rem;
}
.ms-footer h5 { color: #fff; font-weight: 800; font-size: 1rem; margin-bottom: 1.2rem; }
.ms-footer a { color: #94A3B8; text-decoration: none; }
.ms-footer a:hover { color: var(--ms-orange); }
.ms-footer-logo { font-size: 1.5rem; font-weight: 900; color: #fff; letter-spacing: -.02em; }
.ms-footer-logo span { color: var(--ms-orange); }
.ms-footer-divider { border-color: #334155; margin: 2rem 0 1.5rem; }
.ms-footer-copy { font-size: .82rem; }

/* ── MDI icon aliases (v1.4.57 missing icons) ──────────────────── */
.mdi-youtube:before { content: "\f6b0"; } /* same glyph as mdi-youtube-play */

/* ── Scrollbar ─────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #F1F5F9; }
::-webkit-scrollbar-thumb { background: var(--ms-orange); border-radius: 4px; }

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .ms-hero { min-height: 70vh; }
  .ms-hero h1 { font-size: 2.2rem; }
  .ms-hero-btn-ghost { margin-left: 0; margin-top: .5rem; display: block; text-align: center; }
  .ms-featured { min-height: 340px; }
  .ms-featured-body { padding: 1.5rem; }
}

/* ── Botó admin (icona llapis) ──────────────────────────────────── */
.ms-admin-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--ms-orange);
  color: #fff !important;
  font-size: 1rem;
  text-decoration: none !important;
  transition: background .2s, transform .15s;
  flex-shrink: 0;
}
.ms-admin-icon:hover { background: var(--ms-orange-dk); color: #fff !important; transform: scale(1.08); }

/* PC: posicionat a la dreta del navbar, fora del flux dels floats */
@media (min-width: 992px) {
  .ms-admin-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
  }
  .ms-admin-icon:hover { transform: translateY(-50%) scale(1.08); }
}

/* ── Mòbil: header transparent a la pàgina d'inici ─────────────── */
@media (max-width: 991px) {
  /* Fons transparent — sobreescriu rd-navbar-white i rd-navbar-fixed */
  .ms-transparent-header .rd-navbar.rd-navbar-fixed,
  .ms-transparent-header .rd-navbar.rd-navbar-fixed .rd-navbar-panel,
  .ms-transparent-header .rd-navbar.rd-navbar-fixed .rd-navbar-inner {
    background: transparent !important;
    box-shadow: none !important;
  }
  /* Línia separadora inferior al panel */
  .ms-transparent-header .rd-navbar.rd-navbar-fixed .rd-navbar-panel {
    border-bottom: 1px solid rgba(255,255,255,0.13) !important;
  }
  /* Icona hamburger en blanc */
  .ms-transparent-header .rd-navbar-toggle span,
  .ms-transparent-header .rd-navbar-toggle span::before,
  .ms-transparent-header .rd-navbar-toggle span::after {
    background: #fff !important;
  }
  /* Brand visible en tots els mòbils (framework l'amaga en < 480px) */
  .rd-navbar.rd-navbar-fixed .rd-navbar-brand {
    display: block !important;
    position: fixed !important;
    top: 4px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 17 !important;
    white-space: nowrap;
  }
  /* Admin icon: fixat a la dreta del panel */
  .ms-admin-icon {
    position: fixed;
    top: 7px;
    right: 10px;
    z-index: 18;
    margin-right: 0;
  }
}
