/*
Theme Name: Astra Child
Template: astra
Version: 1.0.0
Description: Custom child theme for RugbyGrit.
Author: RugbyGrit
*/

/* ============================================================
   RUGBYGRIT — Team Profile Styles
   ============================================================ */

.rg-team-profile {
  max-width: 900px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  color: #2B2B2B;
  font-family: inherit;
  background-color: #FFFFFF;
}

/* Hero */
.rg-team-hero {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 32px 0 28px;
  border-bottom: 3px solid #FF6B1A;
  margin-bottom: 32px;
}
.rg-team-crest { flex-shrink: 0; }
.rg-crest-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 8px;
}
.rg-crest-placeholder {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 56px;
  background: #f3f3f3;
  border-radius: 8px;
}
.rg-team-title {
  font-size: 2rem;
  font-weight: 700;
  color: #2B2B2B;
  margin: 0 0 4px;
}
.rg-team-official-name {
  font-size: 0.95rem;
  color: #666;
  margin: 0 0 12px;
}
.rg-hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

/* Sections */
.rg-section { margin-bottom: 36px; }
.rg-section-title {
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #FF6B1A;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 6px;
  margin-bottom: 16px;
}

/* Meta grid */
.rg-meta-grid { display: grid; gap: 8px; }
.rg-meta-row {
  display: flex !important;
  gap: 0 !important;
  align-items: baseline !important;
  font-size: 0.95rem !important;
  margin-bottom: 6px !important;
}
.rg-meta-label {
  font-weight: 600 !important;
  min-width: 160px !important;
  color: #555 !important;
  flex-shrink: 0 !important;
}
.rg-meta-label::after {
  content: ": " !important;
  white-space: pre !important;
}
.rg-meta-value { color: #2B2B2B !important; }

/* Badges */
.rg-badge {
  display: inline-block;
  background: #FF6B1A;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  text-decoration: none;
  transition: background 0.2s;
}
.rg-badge:hover { background: #e05500; }
.rg-badge--competition { background: #2B2B2B; }
.rg-badge--competition:hover { background: #444; }
.rg-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.rg-badges-block { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }

/* Prose */
.rg-prose {
  font-size: 0.97rem !important;
  line-height: 1.4 !important;
  color: #2B2B2B !important;
}
.rg-prose p { margin-bottom: 16px !important; }
.rg-prose br {
  margin-bottom: 6px;
  display: block;
  content: "";
}

/* External links */
.rg-link-list { display: flex; flex-wrap: wrap; gap: 10px; }
.rg-link-btn {
  display: inline-block;
  border: 2px solid #FF6B1A;
  color: #FF6B1A;
  padding: 7px 18px;
  border-radius: 4px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.rg-link-btn:hover { background: #FF6B1A; color: #fff; }

/* Trophies */
.rg-trophy-list { display: flex; flex-direction: column; gap: 12px; }
.rg-trophy-item {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
}
.rg-trophy-item .rg-badge--competition {
  flex-shrink: 0 !important;
  white-space: nowrap !important;
}
.rg-trophy-desc { font-size: 0.85rem; color: #666; }

/* Profile responsive */
@media (max-width: 600px) {
  .rg-team-hero { flex-direction: column; text-align: center; }
  .rg-hero-badges { justify-content: center; }
  .rg-meta-row { flex-direction: column; gap: 2px; }
  .rg-meta-label { min-width: unset; }
}

/* ============================================================
   RUGBYGRIT — Team Archive Page
   ============================================================ */

.rg-archive-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 20px 60px;
}

.rg-archive-header {
  margin-bottom: 40px;
  }

.rg-archive-title {
  font-size: 2rem;
  font-weight: 700;
  color: #2B2B2B;
  margin: 0 0 6px;
}

.rg-archive-intro {
  color: #666;
  font-size: 1rem;
  margin: 0;
}

/* Section wrapper */
.rg-archive-section { margin-bottom: 52px; }

/* Section header row */
.rg-section-header {
  display: flex !important;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 3px solid #FF6B1A;
  padding-bottom: 10px;
  margin-bottom: 28px;
}
.rg-archive-section-title {
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  color: #2B2B2B !important;
  margin: 0 !important;
}

.rg-view-all-link {
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: #FF6B1A !important;
  text-decoration: none !important;
  white-space: nowrap;
}
.rg-view-all-link:hover { text-decoration: underline !important; }

/* ── SA Category Cards & Competition Cards ──────────────────── */
.rg-category-card-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 16px !important;
}

.rg-archive-section a.rg-category-card {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 28px 16px !important;
  background: #fff !important;
  border: 2px solid #FF6B1A !important;
  border-radius: 8px !important;
  color: #2B2B2B !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  text-decoration: none !important;
  min-height: 80px !important;
  transition: background 0.2s, color 0.2s;
}
.rg-archive-section a.rg-category-card:hover {
  background: #FF6B1A !important;
  color: #fff !important;
}
.rg-archive-section a.rg-category-card--dark {
  background: #2B2B2B !important;
  border-color: #2B2B2B !important;
  color: #fff !important;
}
.rg-archive-section a.rg-category-card--dark:hover {
  background: #FF6B1A !important;
  border-color: #FF6B1A !important;
  color: #fff !important;
}

/* ── World: Country cards with flags ────────────────────────── */
.rg-country-grid {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 16px !important;
}

.rg-archive-section a.rg-country-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  background: #fff !important;
  border: 1px solid #e8e8e8 !important;
  border-radius: 8px !important;
  padding: 16px 12px !important;
  text-decoration: none !important;
  color: #2B2B2B !important;
  gap: 10px !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.rg-archive-section a.rg-country-card:hover {
  border-color: #FF6B1A !important;
  box-shadow: 0 2px 8px rgba(255,107,26,0.15) !important;
}
.rg-country-flag {
  width: 64px !important;
  height: auto !important;
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  display: block !important;
}
.rg-country-name {
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: #FF6B1A !important;
  line-height: 1.3;
  display: block !important;
}

/* ── Team card grid ─────────────────────────────────────────── */
.rg-category-group { margin-bottom: 40px; }

.rg-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 8px;
  margin-bottom: 20px;
}

.rg-category-title {
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: #FF6B1A !important;
  margin: 0 !important;
}

.rg-team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.rg-team-grid--compact {
  grid-template-columns: repeat(auto-fill, minmax(140px, 180px)) !important;
  justify-content: start;
}

.rg-archive-section a.rg-team-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
  background: #fff !important;
  border: 1px solid #e8e8e8 !important;
  border-radius: 8px !important;
  padding: 16px 12px !important;
  text-decoration: none !important;
  color: #2B2B2B !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.rg-archive-section a.rg-team-card:hover {
  border-color: #FF6B1A !important;
  box-shadow: 0 2px 8px rgba(255,107,26,0.15) !important;
}

.rg-card-crest {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.rg-card-crest-img {
  width: 72px;
  height: 72px;
  object-fit: contain;
}
.rg-card-crest-placeholder { font-size: 40px; line-height: 1; }
.rg-card-name {
  font-size: 0.88rem !important;
  font-weight: 600 !important;
  color: #2B2B2B !important;
  line-height: 1.3;
}

/* Back link / no teams */
.rg-back-link {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #FF6B1A;
  text-decoration: none;
  margin-top: 10px;
}
.rg-back-link:hover { text-decoration: underline; }
.rg-no-teams { color: #666; font-style: italic; }

/* ── Archive Responsive ─────────────────────────────────────── */
@media (max-width: 900px) {
  .rg-team-grid { grid-template-columns: repeat(3, 1fr); }
  .rg-country-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 768px) {
  .rg-category-card-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .rg-country-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

@media (max-width: 600px) {
  .rg-team-grid { grid-template-columns: repeat(2, 1fr); }
  .rg-category-header { flex-direction: column; align-items: flex-start; gap: 6px; }
  .rg-section-header { flex-direction: column; gap: 6px; }
  .rg-archive-section-title { font-size: 1.25rem !important; }
}

@media (max-width: 480px) {
  .rg-category-card-grid { grid-template-columns: 1fr !important; }
}
/* ── Hide author meta site-wide ─────────────────────────────── */
.posted-by,
.ast-author-meta,
.entry-meta .posted-by {
  display: none !important;
}
/* ── Profile back button ─────────────────────────────────────── */
.rg-profile-nav {
  margin-bottom: 16px;
}
/* ── Country team list view ──────────────────────────────────── */
.rg-team-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rg-team-list-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 16px !important;
  border-bottom: 1px solid #e8e8e8 !important;
  text-decoration: none !important;
  color: #2B2B2B !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  transition: background 0.15s, color 0.15s;
}

.rg-team-list-item:first-child {
  border-top: 1px solid #e8e8e8;
}

.rg-team-list-item:hover {
  background: #fff8f5 !important;
  color: #FF6B1A !important;
}

.rg-team-list-arrow {
  color: #FF6B1A;
  font-size: 0.9rem;
}
/* ── Country team list — force stacked layout ────────────────── */
.rg-archive-wrap .rg-team-list {
  display: block !important;
  width: 100%;
}

.rg-archive-wrap .rg-team-list-item {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 14px 4px !important;
  border-bottom: 1px solid #e8e8e8 !important;
  text-decoration: none !important;
  color: #2B2B2B !important;
  font-size: 1rem !important;
  font-weight: 600 !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.rg-archive-wrap .rg-team-list-item:first-child {
  border-top: 1px solid #e8e8e8 !important;
}

.rg-archive-wrap .rg-team-list-item:hover {
  color: #FF6B1A !important;
  background: #fff8f5 !important;
}

.rg-archive-wrap .rg-team-list-arrow {
  color: #FF6B1A !important;
  flex-shrink: 0;
}
/* ── Country list group heading ──────────────────────────────── */
.rg-list-group-heading {
  font-size: 0.85rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.08em !important;
  color: #FF6B1A !important;
  margin: 32px 0 4px !important;
  padding-bottom: 6px !important;
  border-bottom: 1px solid #e0e0e0 !important;
}

.rg-team-list:last-child {
  margin-bottom: 8px;
}
/* ── Honours Roll table ──────────────────────────────────────── */
.rg-honours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  margin-top: 8px;
}

.rg-honours-table th {
  text-align: left;
  padding: 8px 12px;
  background: #2B2B2B;
  color: #fff;
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.rg-honours-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #e8e8e8;
  color: #2B2B2B;
}

.rg-honours-table tr:last-child td {
  border-bottom: none;
}

.rg-honours-table tr:nth-child(even) td {
  background: #f9f9f9;
}
.rg-honours-table th:first-child,
.rg-honours-table td:first-child {
  text-align: left !important;
  width: 60%;
}

.rg-honours-table th:nth-child(2),
.rg-honours-table th:nth-child(3) {
  text-align: center !important;
  width: 20%;
}

.rg-honours-table td:nth-child(2),
.rg-honours-table td:nth-child(3) {
  text-align: center !important;
  font-weight: 600;
  color: #FF6B1A;
}
