/* ═══════════════════════════════════════════════════
   RaketCup — Design System
   ═══════════════════════════════════════════════════ */

:root {
  --primary:       #0f172a;
  --primary-light: #1e3a5f;
  --accent:        #10b981;
  --accent-dark:   #059669;
  --accent-glow:   rgba(16,185,129,.15);
  --amber:         #f59e0b;
  --bg:            #f1f5f9;
  --surface:       #ffffff;
  --text:          #0f172a;
  --text-muted:    #64748b;
  --border:        #e2e8f0;
  --radius:        12px;
  --radius-sm:     8px;
  --radius-lg:     16px;
  --shadow:        0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
  --shadow-md:     0 4px 12px rgba(0,0,0,.10), 0 8px 32px rgba(0,0,0,.07);
  --shadow-hover:  0 8px 24px rgba(0,0,0,.13), 0 16px 48px rgba(0,0,0,.08);
  --transition:    all .22s cubic-bezier(.4,0,.2,1);
  --nav-h:         68px;
}

/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-top: var(--nav-h);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

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

/* ── Typography ───────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
}

/* ── Navbar ───────────────────────────────────────── */
.rc-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: var(--primary);
  box-shadow: 0 2px 16px rgba(0,0,0,.25);
  display: flex;
  align-items: center;
}

.rc-navbar .container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Logo */
.rc-logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: #fff !important;
  text-decoration: none;
  letter-spacing: -.5px;
  display: flex;
  align-items: center;
  gap: .4rem;
  white-space: nowrap;
}

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

.rc-logo:hover { opacity: .9; }

/* Nav links */
.rc-nav {
  display: flex;
  align-items: center;
  gap: .25rem;
  margin-left: auto;
  list-style: none;
  margin-bottom: 0;
  padding: 0;
}

.rc-nav .nav-link {
  color: rgba(255,255,255,.78) !important;
  font-size: .875rem;
  font-weight: 500;
  padding: .45rem .75rem !important;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  white-space: nowrap;
}

.rc-nav .nav-link:hover,
.rc-nav .nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,.1);
}

/* Dropdown */
.rc-nav .dropdown-menu {
  background: var(--primary-light);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: .4rem;
  min-width: 180px;
}

.rc-nav .dropdown-item {
  color: rgba(255,255,255,.85);
  border-radius: 6px;
  font-size: .875rem;
  padding: .5rem .75rem;
  transition: var(--transition);
}

.rc-nav .dropdown-item:hover {
  background: rgba(255,255,255,.12);
  color: #fff;
}

.rc-nav .dropdown-toggle::after {
  vertical-align: .15em;
}

/* Burger */
.rc-burger {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  margin-left: auto;
  padding: .25rem .5rem;
  cursor: pointer;
}

/* Mobile nav */
@media (max-width: 991px) {
  .rc-burger { display: block; }

  .rc-nav-wrap {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--primary);
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,.1);
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
  }

  .rc-nav-wrap.open { display: block; }

  .rc-nav {
    flex-direction: column;
    align-items: stretch;
    gap: .25rem;
  }

  .rc-nav .nav-link { padding: .65rem .75rem !important; }

  .rc-nav .dropdown-menu {
    position: static !important;
    transform: none !important;
    box-shadow: none;
    border: none;
    background: rgba(255,255,255,.05);
    margin-top: .25rem;
  }

  .rc-nav-messengers {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.1);
  }
}

@media (min-width: 992px) {
  .rc-nav-wrap { display: flex !important; align-items: center; margin-left: auto; }
  .rc-nav-messengers { display: none; }
}

/* ── Hero ─────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  background-image:
    linear-gradient(135deg, rgba(15,23,42,.88) 0%, rgba(30,58,95,.82) 100%),
    url('/storage/images/hero.jpg');
  background-size: cover;
  background-position: center;
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(16,185,129,.12) 0%, transparent 70%);
  pointer-events: none;
}

.hero-section .container { position: relative; }

.hero-section h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: .75rem;
  letter-spacing: -.5px;
}

.hero-section .lead {
  color: rgba(255,255,255,.72);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.hero-badge {
  display: inline-block;
  background: var(--accent-glow);
  color: var(--accent);
  border: 1px solid rgba(16,185,129,.3);
  border-radius: 100px;
  padding: .35rem 1rem;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 1.25rem;
}

/* ── Buttons ──────────────────────────────────────── */
.btn {
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  font-size: .875rem;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-primary:hover, .btn-primary:focus {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16,185,129,.35);
}

.btn-outline-primary {
  color: var(--accent);
  border-color: var(--accent);
}

.btn-outline-primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-outline-light:hover {
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--text-muted);
  border-color: var(--text-muted);
  color: #fff;
}

.btn-success {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.btn-success:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

/* ── Cards ────────────────────────────────────────── */
.rc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
}

.rc-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

/* Bootstrap card overrides */
.card {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  transition: var(--transition) !important;
}

.card:hover {
  box-shadow: var(--shadow-md) !important;
  transform: translateY(-2px);
}

.card-header {
  border-bottom: 1px solid var(--border) !important;
  border-radius: var(--radius) var(--radius) 0 0 !important;
  font-weight: 600;
  padding: .85rem 1.25rem;
}

.card-header.bg-primary {
  background: var(--accent) !important;
  color: #fff;
}

.card-header.bg-success {
  background: var(--primary-light) !important;
  color: #fff;
}

.card-header.bg-secondary {
  background: var(--text-muted) !important;
  color: #fff;
}

/* ── Tournament Cards ─────────────────────────────── */
.tournament-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tournament-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
  border-color: rgba(16,185,129,.3);
}

.tournament-card__img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.tournament-card__body {
  padding: 1.1rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.tournament-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .35rem;
  color: var(--text);
}

.tournament-card__desc {
  color: var(--text-muted);
  font-size: .875rem;
  flex: 1;
  margin-bottom: 1rem;
}

.tournament-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  flex-wrap: wrap;
}

/* ── News Cards ───────────────────────────────────── */
.news-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
  display: flex;
  gap: 0;
}

.news-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
  border-color: rgba(16,185,129,.25);
}

.news-card__img {
  width: 160px;
  min-height: 120px;
  object-fit: cover;
  flex-shrink: 0;
}

.news-card__body {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
}

.news-card__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: .35rem;
  color: var(--text);
}

.news-card__excerpt {
  color: var(--text-muted);
  font-size: .875rem;
  margin-bottom: .75rem;
}

@media (max-width: 575px) {
  .news-card { flex-direction: column; }
  .news-card__img { width: 100%; height: 160px; }
}

/* ── Player Cards ─────────────────────────────────── */
.player-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.player-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: rgba(16,185,129,.25);
}

.player-card__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
}

.player-card__name {
  font-weight: 700;
  font-size: .95rem;
  margin-bottom: .2rem;
}

.player-card__meta {
  font-size: .8rem;
  color: var(--text-muted);
}

/* ── Sidebar Widgets ──────────────────────────────── */
.widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 1.25rem;
}

.widget__header {
  padding: .85rem 1rem;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  gap: .5rem;
}

.widget__header--green {
  background: var(--accent);
  color: #fff;
}

.widget__header--navy {
  background: var(--primary-light);
  color: #fff;
}

.widget__body { padding: .75rem 1rem; }

/* Game items in widget */
.game-item {
  padding: .6rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .85rem;
}

.game-item:last-child { border-bottom: none; }

.game-item__date {
  font-size: .75rem;
  color: var(--text-muted);
  margin-bottom: .2rem;
}

.game-item__score {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  font-weight: 600;
}

.game-item__badge {
  font-size: .7rem;
  color: var(--text-muted);
  margin-top: .15rem;
}

.score-num {
  color: var(--accent-dark);
  font-weight: 800;
  font-size: .9rem;
}

/* ── Badges ───────────────────────────────────────── */
.badge {
  font-weight: 600;
  border-radius: 6px;
  font-size: .7rem;
  padding: .3em .6em;
}

.badge-type {
  background: rgba(16,185,129,.12);
  color: var(--accent-dark);
  border: 1px solid rgba(16,185,129,.25);
}

.badge-cat {
  background: rgba(245,158,11,.12);
  color: #b45309;
  border: 1px solid rgba(245,158,11,.25);
}

.badge-open {
  background: rgba(16,185,129,.12);
  color: var(--accent-dark);
  border: 1px solid rgba(16,185,129,.3);
  font-size: .75rem;
  padding: .25em .65em;
}

/* ── Tables ───────────────────────────────────────── */
.table { --bs-table-border-color: var(--border); }

.table-dark { --bs-table-bg: var(--primary); }

.table thead th {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
  padding: .75rem .75rem;
}

.table td { padding: .65rem .75rem; vertical-align: middle; }

.leader {
  background: rgba(16,185,129,.1) !important;
  font-weight: 700;
}

/* Group header */
.group-header {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: .6rem 1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: .9rem;
  margin-bottom: .75rem;
  letter-spacing: .04em;
}

/* ── List Group overrides ─────────────────────────── */
.list-group-item {
  border-color: var(--border);
  font-size: .9rem;
}

/* ── Forms ────────────────────────────────────────── */
.form-control, .form-select {
  border-color: var(--border);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  padding: .6rem .85rem;
  transition: var(--transition);
}

.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(16,185,129,.18);
}

.form-label {
  font-weight: 600;
  font-size: .875rem;
  margin-bottom: .4rem;
  color: var(--text);
}

.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.form-section__title {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--border);
}

/* ── Alerts ───────────────────────────────────────── */
.alert {
  border-radius: var(--radius-sm);
  border: none;
  font-size: .9rem;
}

.alert-success {
  background: rgba(16,185,129,.1);
  color: #065f46;
}

.alert-warning {
  background: rgba(245,158,11,.1);
  color: #92400e;
}

.alert-secondary {
  background: rgba(100,116,139,.1);
  color: var(--text-muted);
}

/* ── Pagination ───────────────────────────────────── */
.pagination .page-link {
  border-radius: var(--radius-sm) !important;
  border-color: var(--border);
  color: var(--text);
  font-size: .875rem;
  margin: 0 2px;
  transition: var(--transition);
}

.pagination .page-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.pagination .page-item.active .page-link {
  background: var(--accent);
  border-color: var(--accent);
}

/* ── Messengers ───────────────────────────────────── */
.messenger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 500;
  transition: var(--transition);
  padding: .35rem 0;
}

.telegram  { color: #229ED9; }
.viber     { color: #7360F2; }
.whatsapp  { color: #25D366; }
.phone     { color: var(--accent); }

.messenger:hover { opacity: .8; transform: translateX(3px); }

.messenger i { font-size: 1.25rem; }

.messengers-grid {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

/* ── Hero section (on show pages) ────────────────────*/
.hero-section {
  background:
    linear-gradient(135deg, rgba(15,23,42,.9) 0%, rgba(30,58,95,.85) 100%),
    url('/storage/images/hero.jpg') center/cover no-repeat;
}

/* ── Tournament Show page ─────────────────────────── */
.tournament-hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 3rem 0 2.5rem;
  color: #fff;
  margin-bottom: 2rem;
}

.tournament-hero h1 { color: #fff; font-size: clamp(1.5rem, 4vw, 2.5rem); }

.tournament-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.25rem;
  margin-top: .75rem;
  font-size: .875rem;
  color: rgba(255,255,255,.72);
}

.tournament-meta span { display: flex; align-items: center; gap: .35rem; }

/* ── Footer ───────────────────────────────────────── */
.rc-footer {
  background: var(--primary);
  color: rgba(255,255,255,.65);
  padding: 3rem 0 0;
  margin-top: 4rem;
  font-size: .875rem;
}

.rc-footer h6 {
  color: #fff;
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 1rem;
}

.rc-footer a {
  color: rgba(255,255,255,.65);
  text-decoration: none;
  transition: var(--transition);
  display: block;
  margin-bottom: .4rem;
}

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

.rc-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 1rem 0;
  margin-top: 2rem;
  text-align: center;
  font-size: .8rem;
  color: rgba(255,255,255,.4);
}

/* ── Article content ──────────────────────────────── */
.article-content {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text);
}

.article-content p { margin-bottom: 1rem; }
.article-content img { border-radius: var(--radius-sm); margin: 1rem 0; }

/* ── Contact page ─────────────────────────────────── */
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
}

/* ── Page header ──────────────────────────────────── */
.page-header {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 2rem;
}

.page-header h1 { margin-bottom: .35rem; }

/* ── Utility ──────────────────────────────────────── */
.text-accent { color: var(--accent) !important; }
.bg-accent { background: var(--accent) !important; }
.text-muted { color: var(--text-muted) !important; }
.fw-800 { font-weight: 800; }

.gap-btn { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── Animations ───────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp .4s ease both; }
