/*
Theme Name: Bournemouth Junior Chess
Theme URI: https://bournemouthjuniorchess.com
Description: A modern, dark-themed child theme for Hestia — built for Bournemouth Junior Chess Club. Features a premium dark navy background with gold accents, Playfair Display + Source Sans 3 typography, frosted glass navigation, animated card effects, and a fully responsive design.
Author: Bournemouth Junior Chess
Author URI: https://bournemouthjuniorchess.com
Template: hestia
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bjc-theme
*/

/* =========================
   CSS VARIABLES
   ========================= */
:root {
  --bg-dark: #0f1419;
  --bg-card: #1a2028;
  --bg-card-hover: #212a34;
  --accent-gold: #d4a843;
  --accent-gold-light: #e8c96a;
  --accent-gold-dark: #b8922e;
  --text-primary: #f0ece4;
  --text-secondary: #a8a299;
  --text-muted: #6b665e;
  --border-subtle: rgba(212, 168, 67, 0.12);
  --border-medium: rgba(212, 168, 67, 0.25);
  --glass: rgba(26, 32, 40, 0.85);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;
  --transition-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================
   GLOBAL / BODY
   ========================= */
body,
.page-header,
.section-image,
.main-raised {
  background-color: var(--bg-dark) !important;
  color: var(--text-primary) !important;
  font-family: var(--font-body) !important;
}

.main-raised {
  box-shadow: none !important;
  margin-top: 0 !important;
  border-radius: 0 !important;
}

body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.02'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* =========================
   TYPOGRAPHY
   ========================= */
h1, h2, h3, h4, h5, h6,
.hestia-title, .title, .card-title, .section-title {
  font-family: var(--font-display) !important;
  color: var(--text-primary) !important;
  letter-spacing: -0.01em;
}

p, li, span, td, th, label, input, textarea, select {
  font-family: var(--font-body) !important;
}

p, .card-description, .hestia-description {
  color: var(--text-secondary) !important;
  line-height: 1.7 !important;
}

a {
  color: var(--accent-gold) !important;
  transition: color 0.3s !important;
}

a:hover {
  color: var(--accent-gold-light) !important;
}

/* =========================
   NAVIGATION
   ========================= */
.navbar, .navbar-default, .navbar-ct-transparent {
  background: var(--glass) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  box-shadow: none !important;
  transition: all 0.4s var(--transition-smooth) !important;
}

.navbar.headroom--not-top {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3) !important;
}

.navbar-brand {
  font-family: var(--font-display) !important;
  color: var(--text-primary) !important;
  font-weight: 700 !important;
}

.navbar-default .navbar-nav > li > a,
.navbar-nav > li > a {
  color: var(--text-secondary) !important;
  font-family: var(--font-body) !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  transition: color 0.3s !important;
  position: relative !important;
}

.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus,
.navbar-default .navbar-nav > .active > a {
  color: var(--accent-gold) !important;
}

.navbar-default .navbar-nav > li > a::after {
  content: '' !important;
  position: absolute !important;
  bottom: 6px !important;
  left: 15px !important;
  right: 15px !important;
  height: 2px !important;
  background: var(--accent-gold) !important;
  transform: scaleX(0) !important;
  transform-origin: center !important;
  transition: transform 0.3s var(--transition-smooth) !important;
}

.navbar-default .navbar-nav > li > a:hover::after,
.navbar-default .navbar-nav > .active > a::after {
  transform: scaleX(1) !important;
}

/* Dropdowns */
.dropdown-menu {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 8px !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4) !important;
  padding: 0.5rem 0 !important;
}

.dropdown-menu > li > a {
  color: var(--text-secondary) !important;
  font-size: 0.85rem !important;
  padding: 8px 20px !important;
  transition: all 0.2s !important;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
  color: var(--accent-gold) !important;
  background: rgba(212, 168, 67, 0.06) !important;
  padding-left: 24px !important;
}

/* =========================
   HERO / BIG TITLE
   ========================= */
.header-filter::before,
#carousel-hestia-generic .item::before {
  background: linear-gradient(135deg,
    rgba(15, 20, 25, 0.85) 0%,
    rgba(15, 20, 25, 0.7) 50%,
    rgba(15, 20, 25, 0.85) 100%
  ) !important;
}

.page-header, .header-filter {
  background-color: var(--bg-dark) !important;
}

.page-header .hestia-title,
.page-header .title,
#carousel-hestia-generic .hestia-title {
  font-family: var(--font-display) !important;
  font-weight: 800 !important;
  font-size: clamp(2.5rem, 5vw, 4rem) !important;
  color: var(--text-primary) !important;
  text-shadow: none !important;
}

.page-header .sub-title,
.page-header h4,
#carousel-hestia-generic .sub-title {
  color: var(--text-secondary) !important;
  font-family: var(--font-body) !important;
  font-size: 1.1rem !important;
}

/* Hero buttons */
.page-header .btn,
#carousel-hestia-generic .btn {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark)) !important;
  color: var(--bg-dark) !important;
  border: none !important;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  border-radius: 6px !important;
  padding: 14px 32px !important;
  box-shadow: 0 4px 20px rgba(212, 168, 67, 0.3) !important;
  transition: all 0.3s var(--transition-smooth) !important;
}

.page-header .btn:hover,
#carousel-hestia-generic .btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 30px rgba(212, 168, 67, 0.4) !important;
}

/* =========================
   FEATURES SECTION
   ========================= */
.hestia-features, .features {
  background: var(--bg-dark) !important;
  padding: 4rem 0 !important;
}

.hestia-features .info {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 12px !important;
  padding: 2rem 1.5rem !important;
  margin-bottom: 1.5rem !important;
  transition: all 0.4s var(--transition-smooth) !important;
  position: relative;
  overflow: hidden;
}

.hestia-features .info::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-light));
  opacity: 0;
  transition: opacity 0.4s;
}

.hestia-features .info:hover {
  border-color: var(--border-medium) !important;
  transform: translateY(-4px) !important;
  box-shadow: 0 0 40px rgba(212, 168, 67, 0.08) !important;
}

.hestia-features .info:hover::before {
  opacity: 1;
}

.hestia-features .info .icon i,
.hestia-features .info-title i {
  color: var(--accent-gold) !important;
}

.hestia-features .info h4,
.hestia-features .info-title {
  color: var(--text-primary) !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
}

.hestia-features .info p {
  color: var(--text-secondary) !important;
}

/* =========================
   ABOUT SECTION
   ========================= */
.hestia-about, .about {
  background: var(--bg-dark) !important;
}

/* =========================
   TEAM SECTION
   ========================= */
.hestia-team, .team {
  background: var(--bg-dark) !important;
  padding: 4rem 0 !important;
}

.hestia-team .card, .team .card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  transition: all 0.4s var(--transition-smooth) !important;
  overflow: hidden;
}

.hestia-team .card:hover, .team .card:hover {
  border-color: var(--border-medium) !important;
  transform: translateY(-4px) !important;
  box-shadow: 0 0 40px rgba(212, 168, 67, 0.08) !important;
}

.hestia-team .card .card-title, .team .card .card-title {
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  color: var(--text-primary) !important;
}

.hestia-team .card .card-title + .category,
.team .card .category {
  color: var(--accent-gold) !important;
  text-transform: uppercase !important;
  font-size: 0.8rem !important;
  letter-spacing: 0.08em !important;
  font-weight: 600 !important;
}

.hestia-team .card .card-description, .team .card .card-description {
  color: var(--text-secondary) !important;
}

.hestia-team .card img, .team .card img {
  border-radius: 50% !important;
  border: 3px solid var(--border-medium) !important;
  transition: border-color 0.3s !important;
}

.hestia-team .card:hover img, .team .card:hover img {
  border-color: var(--accent-gold) !important;
}

/* =========================
   TESTIMONIALS
   ========================= */
.hestia-testimonials, .testimonials {
  background: var(--bg-card) !important;
}

.hestia-testimonials .card {
  background: rgba(15, 20, 25, 0.6) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 12px !important;
}

.hestia-testimonials .card-description {
  color: var(--text-secondary) !important;
  font-style: italic !important;
}

/* =========================
   BLOG / NEWS
   ========================= */
.hestia-blog, section.blogs {
  background: var(--bg-dark) !important;
  padding: 4rem 0 !important;
}

.hestia-blog .card, .blog-post .card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 12px !important;
  box-shadow: none !important;
  overflow: hidden !important;
  transition: all 0.4s var(--transition-smooth) !important;
}

.hestia-blog .card:hover, .blog-post .card:hover {
  border-color: var(--border-medium) !important;
  transform: translateY(-4px) !important;
  box-shadow: 0 0 40px rgba(212, 168, 67, 0.08) !important;
}

.hestia-blog .card .card-title a, .blog-post .card-title a {
  color: var(--text-primary) !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
}

.hestia-blog .card .card-title a:hover {
  color: var(--accent-gold) !important;
}

.hestia-blog .card .card-description, .blog-post .card-description {
  color: var(--text-secondary) !important;
}

.hestia-blog .card .author, .blog-post .author {
  color: var(--text-muted) !important;
}

.hestia-blog .card .author a, .blog-post .author a {
  color: var(--accent-gold) !important;
}

/* Read more buttons */
.hestia-blog .card .btn-primary, .blog-post .btn-primary {
  background: transparent !important;
  color: var(--accent-gold) !important;
  border: 1px solid var(--border-medium) !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  font-size: 0.82rem !important;
  letter-spacing: 0.04em !important;
  box-shadow: none !important;
}

.hestia-blog .card .btn-primary:hover, .blog-post .btn-primary:hover {
  background: var(--accent-gold) !important;
  color: var(--bg-dark) !important;
  border-color: var(--accent-gold) !important;
}

/* =========================
   CONTACT
   ========================= */
.hestia-contact, .contactus {
  background: var(--bg-card) !important;
}

.hestia-contact .hestia-title {
  color: var(--text-primary) !important;
}

.hestia-contact p {
  color: var(--text-secondary) !important;
}

.hestia-contact .form-group .form-control, .contactus .form-control {
  background: rgba(15, 20, 25, 0.5) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 6px !important;
  color: var(--text-primary) !important;
  padding: 12px 16px !important;
}

.hestia-contact .form-group .form-control:focus {
  border-color: var(--accent-gold) !important;
  box-shadow: 0 0 0 2px rgba(212, 168, 67, 0.15) !important;
}

.hestia-contact .btn, .contactus .btn {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark)) !important;
  color: var(--bg-dark) !important;
  border: none !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 20px rgba(212, 168, 67, 0.3) !important;
}

.hestia-contact .btn:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 30px rgba(212, 168, 67, 0.4) !important;
}

/* =========================
   SIDEBAR & WIDGETS
   ========================= */
.sidebar .widget {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle) !important;
  border-radius: 12px !important;
  padding: 1.5rem !important;
  margin-bottom: 1.5rem !important;
}

.sidebar .widget-title, .sidebar h5 {
  color: var(--text-primary) !important;
  font-family: var(--font-display) !important;
}

.sidebar a { color: var(--text-secondary) !important; }
.sidebar a:hover { color: var(--accent-gold) !important; }

/* =========================
   SINGLE POST / PAGE
   ========================= */
.single-post .main-raised, .page .main-raised {
  background: var(--bg-dark) !important;
}

.single-post .entry-title, .page-template-default .hestia-title {
  font-family: var(--font-display) !important;
  color: var(--text-primary) !important;
}

.entry-content, .entry-content p, .page-content p {
  color: var(--text-secondary) !important;
  font-size: 1rem !important;
  line-height: 1.8 !important;
}

.entry-content h2, .entry-content h3, .entry-content h4 {
  color: var(--text-primary) !important;
  font-family: var(--font-display) !important;
}

.entry-content img {
  border-radius: 8px !important;
  border: 1px solid var(--border-subtle) !important;
}

/* =========================
   BUTTONS GLOBAL
   ========================= */
.btn-primary, .btn.btn-primary {
  background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark)) !important;
  color: var(--bg-dark) !important;
  border: none !important;
  border-radius: 6px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  box-shadow: 0 4px 20px rgba(212, 168, 67, 0.3) !important;
  transition: all 0.3s var(--transition-smooth) !important;
}

.btn-primary:hover, .btn.btn-primary:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 8px 30px rgba(212, 168, 67, 0.4) !important;
  background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold)) !important;
}

.btn-default, .btn.btn-default {
  background: transparent !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-medium) !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
  transition: all 0.3s var(--transition-smooth) !important;
}

.btn-default:hover, .btn.btn-default:hover {
  border-color: var(--accent-gold) !important;
  color: var(--accent-gold) !important;
  transform: translateY(-2px) !important;
}

/* =========================
   FOOTER
   ========================= */
footer, .footer, .hestia-footer {
  background: var(--bg-card) !important;
  border-top: 1px solid var(--border-subtle) !important;
}

footer a, .footer a { color: var(--text-muted) !important; transition: color 0.3s !important; }
footer a:hover, .footer a:hover { color: var(--accent-gold) !important; }
footer .copyright, .footer .copyright { color: var(--text-muted) !important; }

/* =========================
   COOKIE NOTICE
   ========================= */
.cookie-notice-container {
  background: var(--bg-card) !important;
  border-top: 1px solid var(--border-subtle) !important;
  color: var(--text-secondary) !important;
}

.cookie-notice-container .button {
  background: var(--accent-gold) !important;
  color: var(--bg-dark) !important;
  border-radius: 4px !important;
}

/* =========================
   PAGINATION
   ========================= */
.pagination > li > a, .pagination > li > span {
  background: var(--bg-card) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-secondary) !important;
}

.pagination > li > a:hover {
  background: var(--accent-gold) !important;
  border-color: var(--accent-gold) !important;
  color: var(--bg-dark) !important;
}

.pagination > .active > a, .pagination > .active > span {
  background: var(--accent-gold) !important;
  border-color: var(--accent-gold) !important;
  color: var(--bg-dark) !important;
}

/* =========================
   ANIMATIONS
   ========================= */
.hestia-features .info,
.hestia-team .card,
.hestia-blog .card,
.hestia-testimonials .card {
  opacity: 0;
  transform: translateY(30px);
  animation: bjcReveal 0.8s var(--transition-smooth) forwards;
}

@keyframes bjcReveal {
  to { opacity: 1; transform: translateY(0); }
}

.hestia-features .info:nth-child(1) { animation-delay: 0.1s; }
.hestia-features .info:nth-child(2) { animation-delay: 0.2s; }
.hestia-features .info:nth-child(3) { animation-delay: 0.3s; }

.hestia-team .card:nth-child(1) { animation-delay: 0.1s; }
.hestia-team .card:nth-child(2) { animation-delay: 0.2s; }
.hestia-team .card:nth-child(3) { animation-delay: 0.3s; }
.hestia-team .card:nth-child(4) { animation-delay: 0.4s; }
.hestia-team .card:nth-child(5) { animation-delay: 0.5s; }

/* =========================
   MOBILE
   ========================= */
@media (max-width: 768px) {
  .navbar-default .navbar-toggle {
    border-color: var(--border-medium) !important;
  }

  .navbar-default .navbar-toggle .icon-bar {
    background-color: var(--accent-gold) !important;
  }

  .navbar-default .navbar-collapse {
    background: var(--bg-card) !important;
    border-color: var(--border-subtle) !important;
  }

  .page-header .hestia-title,
  #carousel-hestia-generic .hestia-title {
    font-size: 2.2rem !important;
  }
}

/* =========================
   MISC
   ========================= */
section[class*="hestia"] {
  background: var(--bg-dark) !important;
}

.entry-content table { border-color: var(--border-subtle) !important; }
.entry-content table th {
  background: var(--bg-card) !important;
  color: var(--accent-gold) !important;
  border-color: var(--border-subtle) !important;
}
.entry-content table td {
  background: transparent !important;
  color: var(--text-secondary) !important;
  border-color: var(--border-subtle) !important;
}

::selection {
  background: rgba(212, 168, 67, 0.3);
  color: var(--text-primary);
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: var(--border-medium); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-gold); }

/* =========================
   BJC CUSTOM HOMEPAGE SECTIONS
   ========================= */

/* --- Stats bar (added via widget/shortcode) --- */
.bjc-stats-bar {
  display: flex;
  justify-content: center;
  gap: 1px;
  background: var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  max-width: 500px;
  margin: -30px auto 2rem;
  position: relative;
  z-index: 10;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.bjc-stat {
  flex: 1;
  background: var(--bg-card);
  padding: 1.2rem 1rem;
  text-align: center;
}

.bjc-stat-number {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.bjc-stat-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 2px;
}

/* --- Hero badge --- */
.bjc-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(212, 168, 67, 0.1);
  border: 1px solid var(--border-medium);
  border-radius: 100px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-gold);
  margin-bottom: 1rem;
}

.bjc-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--accent-gold);
  border-radius: 50%;
  animation: bjcPulse 2s ease-in-out infinite;
}

@keyframes bjcPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* --- CTA Section --- */
.bjc-cta {
  background: linear-gradient(135deg, rgba(212, 168, 67, 0.08), rgba(212, 168, 67, 0.02));
  border: 1px solid var(--border-medium);
  border-radius: 20px;
  padding: 4rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  max-width: 900px;
  margin: 3rem auto;
}

.bjc-cta::before {
  content: '\265A';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 20rem;
  opacity: 0.02;
  color: var(--accent-gold);
  pointer-events: none;
}

.bjc-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 800;
  margin-bottom: 1rem;
  position: relative;
}

.bjc-cta p {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto 2rem;
  position: relative;
}

/* --- Learn Chess resource grid --- */
.bjc-learn-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.bjc-learn-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 2rem;
  transition: all 0.4s var(--transition-smooth);
}

.bjc-learn-card:hover {
  border-color: var(--border-medium);
  box-shadow: 0 0 40px rgba(212, 168, 67, 0.08);
}

.bjc-learn-card h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  color: var(--text-primary);
}

.bjc-learn-card ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.bjc-learn-card ul li a {
  display: block;
  padding: 0.6rem 0.8rem;
  color: var(--text-secondary) !important;
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.bjc-learn-card ul li a:hover {
  color: var(--accent-gold) !important;
  background: rgba(212, 168, 67, 0.06);
  padding-left: 1.2rem;
}

@media (max-width: 768px) {
  .bjc-learn-grid {
    grid-template-columns: 1fr;
  }
  .bjc-stats-bar {
    margin: 0 1rem 2rem;
  }
}

/* --- Decorative divider --- */
.bjc-divider {
  text-align: center;
  padding: 2rem 0;
  color: var(--text-muted);
  font-size: 1.2rem;
  letter-spacing: 1rem;
  opacity: 0.3;
}
