/*
Theme Name: Canicross South Africa
Theme URI: https://www.canicross.co.za
Author: Canicross SA
Author URI: https://www.canicross.co.za
Description: A full theme for Canicross South Africa; includes CPTs, meta boxes, Gutenberg block, WooCommerce support and example content.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: canicross-sa-theme
Tags: sports, fitness, clubs, pets, woocommerce, accessibility, responsive
*/

/* ==========================================================
   GLOBAL STYLES
   ========================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

:root {
    --sa-red:    #e03c31;
    --sa-green:  #007a4d;
    --sa-blue:   #002395;
    --sa-yellow: #ffb612;
}

/* Share links */
.cc-share {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 18px 0 8px;
    padding: 10px 12px;
    border: 1px solid #e6e8ec;
    border-radius: 10px;
    background: #fafafa;
}
.cc-share__label {
    font-weight: 600;
    margin-right: 4px;
}
.cc-share__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid #d7dbe0;
    text-decoration: none;
    font-size: 0.92rem;
    line-height: 1.2;
    background: #fff;
    cursor: pointer;
    font-family: inherit;
}
.cc-share__link[hidden] { display: none; }
.cc-share__icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
}
.cc-share__icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
    display: block;
}
.cc-share__link:hover {
    border-color: #bfc6cf;
}
.cc-share__link--whatsapp { color: #1f7a1f; }
.cc-share__link--facebook { color: #1a4fb3; }
.cc-share__link--email { color: #5a5f66; }
.cc-share__link--copy { color: #374151; }
.cc-share__link--native { color: var(--sa-green); }
.cc-share__status {
    min-height: 1.2em;
    font-size: 0.86rem;
    color: #4b5563;
}

body {
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: #222;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 32px 16px;
}

.card {
    background: #fff;
    padding: 18px;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.06);
}

/* ==========================================================
   HEADER
   ========================================================== */
.site-header {
    background: #ffffff;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    color: #222;
}
.site-header .header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.site-header .site-logo { display: flex; align-items: center; }
.site-header .site-logo img {
    height: 64px;
    width: auto;
    display: block;
    border-radius: 50%;
    box-shadow: 0 0 0 3px #ffffff, 0 4px 12px rgba(0,0,0,0.18);
}
@media (max-width: 768px) { .site-header .site-logo img { height: 52px; } }
.site-header .site-name { font-size: 1.1rem; font-weight: 700; color: #222; }
.site-header .primary-menu { list-style:none; display:flex; gap:22px; margin:0; padding:0; }
.site-header .primary-menu a { text-decoration:none; font-weight:600; font-size:0.95rem; color:#333; }
.site-header .primary-menu a:hover { color: var(--sa-green); }

/* Dropdowns on hover */
.site-header .primary-menu li { position: relative; }
.site-header .primary-menu li ul {
    position: absolute;
    left: 0;
    top: 100%;
    min-width: 200px;
    background: #fff;
    padding: 10px 0;
    margin: 0;
    list-style: none;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    border: 1px solid #ecf2f7;
    display: none;
    z-index: 99;
}
.site-header .primary-menu li ul li { padding: 0; }
.site-header .primary-menu li ul li a {
    display: block;
    padding: 8px 14px;
    font-weight: 500;
    color: #333;
}
.site-header .primary-menu li ul li a:hover {
    background: #f5faf7;
    color: var(--sa-green);
}
.site-header .primary-menu li:hover > ul { display: block; }

.menu-toggle {
    display: none;
    background: none;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 1rem;
    cursor: pointer;
}
.primary-nav { position: relative; }

@media (max-width: 768px) {
    .menu-toggle { display: inline-block; }
    .site-header .primary-menu {
        display: none;
        flex-direction: column;
        gap: 10px;
        padding: 12px 0;
    }
    .primary-nav.is-open { display:block; }
    .primary-nav.is-open .primary-menu { display: flex !important; }
}

@media (max-width: 768px) {
    .site-header .header-inner { flex-wrap: wrap; }
    .site-header .primary-menu { flex-wrap: wrap; justify-content:flex-start; row-gap:8px; }
}



/* ==========================================================
   COURSE INTEREST CARD
   ========================================================== */
.canicross-interest-card { max-width:520px; margin:2rem auto; padding:1.75rem 2rem; }
.canicross-interest-form label { display:block; font-weight:600; margin:0.75rem 0 0.25rem; }
.canicross-interest-form input[type="text"],
.canicross-interest-form input[type="email"],
.canicross-interest-form textarea {
    width:100%; padding:0.55rem 0.7rem; border-radius:4px; border:1px solid #ddd; font: inherit; box-sizing:border-box;
}
.canicross-interest-form textarea { resize: vertical; min-height:90px; }
.canicross-confirm { margin-bottom:1rem; padding:0.75rem 1rem; border-radius:6px; background:#e6ffed; border:1px solid #2e7d32; font-weight:600; }

/* ==========================================================
   HERO
   ========================================================== */
.site-hero {
    padding:60px 0;
    text-align:center;
    color:#fff;
    background:
        linear-gradient(135deg, var(--sa-green), var(--sa-yellow)),
        url('https://canicross.co.za/wp-content/uploads/2026/01/CSEN.jpg') center/cover no-repeat;
}
.canicross-btn { display:inline-block; padding:10px 18px; background:var(--sa-red); color:#fff; border-radius:8px; text-decoration:none; font-weight:700; }
/* Hero is visible on home; remove previous hide rule to allow hero to show */

/* ==========================================================
   SINGLE CLUB PAGE
   ========================================================== */
.club-two-column { display:flex; align-items:flex-start; gap:2.5rem; margin:2rem 0 3rem; }
.club-main { flex:2; min-width:0; }
.club-featured-image img { width:100%; height:auto; border-radius:14px; box-shadow:0 16px 40px rgba(0,0,0,0.16); margin-bottom:1.75rem; object-fit:cover; }
.club-main .entry-title { font-size:2rem; font-weight:800; margin-bottom:1rem; }
.club-main .entry-content { line-height:1.6; font-size:0.98rem; }
.club-fast-facts { flex:1; background:#fff; border-radius:18px; padding:1.75rem 1.5rem; box-shadow:0 16px 40px rgba(0,0,0,0.08); border:1px solid #ecf2f7; position:sticky; top:110px; }
.club-fast-title { font-size:1.15rem; font-weight:800; color:var(--sa-green); text-transform:uppercase; letter-spacing:0.03em; margin:0 0 1.25rem; }
.club-fast-row + .club-fast-row { margin-top:1.25rem; padding-top:1.25rem; border-top:1px dashed #dde5ee; }
.club-fast-row h3 { font-size:0.8rem; font-weight:700; text-transform:uppercase; letter-spacing:0.08em; color:#718096; margin:0 0 0.4rem; }
.club-fast-row p { margin:0; font-size:0.95rem; color:#1a202c; }
.club-fast-row a[href^="tel:"] { font-weight:700; color:var(--sa-green); text-decoration:none; }
.club-fast-row a[href^="tel:"]:hover { text-decoration:underline; }
.club-fast-links a { font-size:0.9rem; font-weight:600; color:var(--sa-green); }
.club-fast-links a:hover { text-decoration:underline; }
.club-fast-map { width:100%; height:220px; border-radius:14px; overflow:hidden; margin-top:0.25rem; box-shadow:0 10px 24px rgba(0,0,0,0.12); border:2px solid #e6fff1; }
.club-fast-map .leaflet-pane,
.club-fast-map .leaflet-map-pane,
.club-fast-map .leaflet-tile,
.club-fast-map .leaflet-layer { border-radius:14px; }
/* Club membership CTA styles */
.club-membership-cta {
  background: linear-gradient(135deg, #e6fff1 0%, #f0f9ff 100%);
  border: 2px solid #d1fae5;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.club-membership-cta h3 {
  margin: 0 0 0.5rem 0;
  color: #065f46;
  font-size: 1.25rem;
  font-weight: 700;
}
.club-membership-cta__copy {
  margin: 0 0 1rem 0;
  color: #374151;
  font-size: 0.9rem;
  line-height: 1.4;
}
.club-membership-cta__note {
  margin: 0;
  color: #6b7280;
  font-size: 0.85rem;
  font-style: italic;
}
.club-membership-cta .cc-btn {
  background: #059669;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  transition: background-color 0.2s ease;
}
.club-membership-cta .cc-btn:hover {
  background: #047857;
}
/* WooCommerce membership thank-you page */
.canicross-membership-thankyou {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #e6fff1 0%, #f0f9ff 100%);
  border: 2px solid #d1fae5;
  border-radius: 12px;
}
.canicross-membership-thankyou h2 {
  margin: 0 0 1rem 0;
  color: #065f46;
  font-size: 1.5rem;
}
.canicross-membership-thankyou p {
  margin: 0 0 1.5rem 0;
  color: #374151;
  font-size: 1rem;
  line-height: 1.5;
}
.canicross-membership-thankyou__bank-details {
  background: #fff;
  border: 1px solid #d1fae5;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}
.canicross-membership-thankyou__bank-details h3 {
  margin: 0 0 0.75rem 0;
  color: #065f46;
  font-size: 1.1rem;
}
.canicross-membership-thankyou__bank-details p {
  margin: 0 0 0.5rem 0;
  color: #374151;
  font-size: 0.95rem;
}
.canicross-membership-thankyou__bank-table {
  width: 100%;
  max-width: 400px;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.canicross-membership-thankyou__bank-table td {
  padding: 4px 8px 4px 0;
}
.canicross-membership-thankyou__bank-table td:first-child {
  color: #6b7280;
}
.canicross-membership-thankyou__bank-table td:last-child {
  color: #111827;
  font-weight: 600;
}
.canicross-membership-thankyou__note {
  margin: 0.75rem 0 0 0;
  color: #6b7280;
  font-size: 0.85rem;
  font-style: italic;
}
.canicross-membership-thankyou .cc-btn {
  display: inline-block;
  background: #059669;
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: background-color 0.2s ease;
}
.canicross-membership-thankyou .cc-btn:hover {
  background: #047857;
}
/* WooCommerce membership product page - What Happens Next? */
.canicross-membership-product-info {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}

/* WooCommerce: Dynamic membership rates display */
.canicross-membership-rates {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1.25rem;
  margin-top: 1.5rem;
}
.canicross-membership-rates h3 {
  margin: 0 0 0.5rem 0;
  color: #111827;
  font-size: 1.1rem;
}
.canicross-membership-rates .rates-note {
  margin: 0 0 1rem 0;
  color: #6b7280;
  font-size: 0.9rem;
}
.membership-rates-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.membership-rates-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #e5e7eb;
}
.membership-rates-list li:last-child {
  border-bottom: none;
}
.membership-rates-list .rate-category {
  color: #374151;
  font-weight: 500;
}
.membership-rates-list .rate-price {
  font-weight: 700;
  color: #059669;
}

/* WooCommerce: No-sidebar commerce pages */
.woocommerce-product-no-sidebar #secondary,
.woocommerce-no-sidebar #secondary {
    display: none;
}
.woocommerce-product-no-sidebar #primary,
.woocommerce-no-sidebar #primary {
    max-width: 100%;
    flex: 1;
}
.canicross-membership-product-info h3 {
  margin: 0 0 0.75rem 0;
  color: #111827;
  font-size: 1.1rem;
}
.canicross-membership-product-info ol {
  margin: 0 0 1rem 0;
  padding-left: 1.25rem;
  color: #374151;
  font-size: 0.95rem;
  line-height: 1.5;
}
.canicross-membership-product-info li {
  margin-bottom: 0.5rem;
}
.canicross-membership-product-info p {
  margin: 0;
  color: #374151;
  font-size: 0.9rem;
}
.canicross-membership-product-info__payment {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: #6b7280;
}
.canicross-membership-product-info__payment strong {
  color: #374151;
}
/* Trust/value line under price */
.canicross-membership-price-note {
  margin: 0.5rem 0 0 0;
  font-size: 0.9rem;
  color: #6b7280;
  font-style: italic;
}
/* Mobile improvements for membership product page */
@media (max-width: 480px) {
  .canicross-membership-product-info {
    padding: 1rem;
    margin-top: 1rem;
  }
  .canicross-membership-product-info h3 {
    font-size: 1rem;
  }
  .canicross-membership-product-info ol {
    line-height: 1.7;
    padding-left: 1.1rem;
  }
  .canicross-membership-product-info li {
    margin-bottom: 0.75rem;
  }
  .canicross-membership-product-info p {
    font-size: 0.85rem;
  }
  .canicross-membership-price-note {
    font-size: 0.85rem;
  }
}
/* Featured image sizing on club pages */
.club-main .club-featured-thumb img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  border-radius: 12px;
}
@media (max-width: 960px) {
  .club-two-column { flex-direction:column; }
  .club-fast-facts { position:static; margin-top:0; order: 0; }
  .club-main { order: 1; }
}
@media (max-width: 640px) { .club-fast-facts { padding:1.25rem 1rem; } .club-main .entry-title { font-size:1.6rem; } }

/* ==========================================================
   CLUB CTA CARD
   ========================================================== */
.canicross-club-cta { background:#ffffff; border-radius:14px; box-shadow:0 6px 20px rgba(0,0,0,.08); }
.canicross-club-cta-media { background:linear-gradient(135deg, #007a4d, #0aa36a); color:#fff; border-radius:12px; }
.canicross-club-cta-media-inner { display:flex; align-items:center; gap:14px; padding:18px; }
.canicross-club-cta-icon { font-size:34px; line-height:1; flex-shrink:0; }
.canicross-club-cta-text h3 { margin:0 0 4px; font-size:1.1rem; }
.canicross-club-cta-text p { margin:0; font-size:0.95rem; opacity:0.9; }
@media (max-width: 480px) {
    .canicross-club-cta-media-inner { padding:14px; gap:10px; }
    .canicross-club-cta-icon { font-size:28px; }
}

.club-membership-cta {
    background:#ffffff;
    border:1px solid #e6f2ee;
    border-radius:18px;
    box-shadow:0 18px 40px rgba(0,0,0,0.08);
    padding:1.5rem;
}
.club-membership-cta h3 {
    margin:0 0 0.75rem;
    font-size:1.2rem;
    color:var(--sa-green);
}
.club-membership-cta__copy,
.club-membership-cta__note {
    margin:0;
    font-size:0.96rem;
    line-height:1.65;
    color:#1f2937;
}
.club-membership-cta__note {
    opacity:0.85;
}
.club-membership-cta .cc-btn {
    display:inline-flex;
    margin-top:0.75rem;
}

/* ==========================================================
   HOME / COURSE CARDS
   ========================================================== */
.container--wide { max-width: 1400px; }
.cc-home { display:block; max-width:1200px; margin:0 auto; padding:0 16px; }
.cc-home__map { margin-top:28px; }
.cc-home__header h2 { margin:0 0 12px; }
.cc-cards-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap:16px; margin:16px 0; }
.cc-card { background:#fff; border:1px solid rgba(0,0,0,0.06); border-radius:14px; overflow:hidden; box-shadow:0 10px 22px rgba(0,0,0,0.08); transition: transform .12s ease, box-shadow .12s ease; }
.cc-card:hover { transform:translateY(-2px); box-shadow:0 14px 30px rgba(0,0,0,0.12); }
.cc-card__media { position:relative; aspect-ratio:16/9; background:rgba(0,0,0,0.04); }
.cc-card__media img { width:100%; height:100%; object-fit:cover; display:block; }
.cc-badge { position:absolute; top:12px; left:12px; z-index:2; font-size:0.82rem; padding:4px 10px; border-radius:999px; background:rgba(255,255,255,0.92); border:1px solid rgba(0,0,0,0.10); }
.cc-card__body { padding:16px; }
.cc-card__title { margin:0 0 8px; font-size:1.08rem; line-height:1.25; }
.cc-card__title a { text-decoration:none; color:#111; }
.cc-card__title a:hover { color: var(--sa-green); }
.cc-card__meta { font-size:0.92rem; opacity:0.85; margin:0 0 10px; }
.cc-card__summary { margin:0 0 12px; font-size:0.96rem; line-height:1.45; }
.cc-card__chips { list-style:none; padding:0; margin:0 0 12px; display:flex; flex-wrap:wrap; gap:8px; }
.cc-card__chips li { font-size:0.82rem; padding:4px 10px; border-radius:999px; background:#f6f7f7; border:1px solid rgba(0,0,0,0.08); }
.cc-card__actions .cc-btn { display:inline-block; padding:10px 14px; border-radius:10px; background: var(--sa-green); color:#fff; text-decoration:none; font-weight:700; }
.cc-card__actions .cc-btn:hover { filter: brightness(1.05); }
.cc-news-card { display:flex; flex-direction:column; }
.cc-news-card .cc-card__body { display:block; }

/* Inline event card for news embeds */
.cc-event-card--inline {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: center;
  padding: 10px;
}
.cc-event-card--inline .cc-event-card__thumb {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  min-height: 140px;
  background: #e9eef2;
}
.cc-event-card--inline .cc-event-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.cc-event-card--inline .cc-event-card__body {
  padding: 8px 8px 8px 0;
}
.cc-event-card--inline .cc-card__title {
  margin: 4px 0 6px;
  font-size: 1.05rem;
}
.cc-event-card--inline .cc-card__summary {
  margin: 0 0 10px;
  color: #4b5563;
}
.cc-event-card--inline .cc-card__meta {
  margin: 0 0 6px;
  font-size: 0.85rem;
  color: #6b7280;
}
@media (max-width: 640px) {
  .cc-event-card--inline {
    grid-template-columns: 1fr;
    padding: 8px;
  }
  .cc-event-card--inline .cc-event-card__body {
    padding: 10px 10px 14px;
  }
}

/* Home forced single-column horizontal layout */
body.home .cc-cards-grid { display:grid !important; grid-template-columns:1fr !important; gap:20px; }
body.home .cc-card { display:flex; flex-direction:row; gap:16px; border:1px solid rgba(0,0,0,0.08); outline:none; }
body.home .cc-card__media { flex:0 0 320px; aspect-ratio:16/9; }
body.home .cc-card__body { flex:1; }
@media (max-width: 768px) {
    body.home .cc-card { flex-direction:column; }
    body.home .cc-card__media { flex:0 0 auto; width:100%; }
}
.cc-home__footer { margin-top: 10px; }
.cc-home__footer .cc-btn { display: inline-block; }
.cc-courses-footer { margin-top: 10px; }
.cc-courses-footer .cc-btn { display: inline-block; }

/* ==========================================================
   COURSE SINGLE LAYOUT
   ========================================================== */
.course-two-column { display:grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap:28px; align-items:start; }
@media (max-width: 960px) { .course-two-column { grid-template-columns:1fr; } }
.course-header { margin-bottom:16px; }
.course-subtitle { margin:4px 0 0; font-size:1rem; color:#555; }
.course-featured-image { margin:12px 0 18px; }
.course-featured { width:100%; height:auto; border-radius:14px; box-shadow:0 12px 28px rgba(0,0,0,0.12); object-fit:cover; }
.course-fast-facts { background:#fff; border-radius:16px; padding:16px 18px; box-shadow:0 10px 26px rgba(0,0,0,0.08); border:1px solid #ecf2f7; position:sticky; top:100px; }
.course-fast-title { margin:0 0 12px; font-size:1.1rem; font-weight:800; color:var(--sa-green); text-transform:uppercase; letter-spacing:0.03em; }
.course-fast-row + .course-fast-row { margin-top:14px; padding-top:12px; border-top:1px dashed #dde5ee; }
.course-fast-row h3 { margin:0 0 6px; font-size:0.85rem; text-transform:uppercase; letter-spacing:0.06em; color:#718096; }
.course-fast-row p { margin:0 0 4px; color:#1a202c; font-size:0.96rem; }
.course-fast-row a { color:var(--sa-green); font-weight:700; text-decoration:none; }
.course-fast-row a:hover { text-decoration:underline; }
.course-fast-map { width:100%; height:220px; border-radius:12px; overflow:hidden; border:2px solid #e6fff1; box-shadow:0 10px 24px rgba(0,0,0,0.12); }
.course-status-badge { display:inline-block; margin-left:10px; padding:4px 10px; border-radius:999px; font-size:0.85rem; border:1px solid rgba(0,0,0,0.1); background:#f6f7f7; }
.course-status--waiting-list { background:#fff7e6; border-color:#f0c36d; }
.course-status--full { background:#ffe6e6; border-color:#e08a8a; }
.course-status--coming-soon { background:#e6f0ff; border-color:#9bb8f0; }
.course-status--open { background:#e6fff1; border-color:#8fd19e; }
.course-apply { margin-top:32px; padding-top:20px; border-top:1px solid #eee; }
.course-message { padding:10px 14px; border-radius:6px; margin:0 0 14px; }
.course-message.success { background:#e6ffed; border:1px solid #8fd19e; }
.course-message.error { background:#ffe6e6; border:1px solid #e08a8a; }
.course-application-form p { margin-bottom:14px; }
.course-application-form input,
.course-application-form textarea { width:100%; max-width:520px; }
.canicross-single-course { padding: 0 18px 32px; }
.canicross-single-course .course-two-column { max-width: 1200px; margin: 0 auto; }
@media (max-width: 960px) {
  .course-two-column > .course-fast-facts,
  .course-two-column > .course-sidebar { order: -1; }
  .course-fast-facts { position: static; }
}

.canicross-single-event .course-two-column { max-width: 1200px; margin: 0 auto; }
.canicross-single-event { padding: 0 18px 32px; }

/* ==========================================================
   COLLAPSIBLE / FORM CARD
   ========================================================== */
.form-collapsible { margin-top:24px; padding:16px 18px; }
.form-collapsible .form-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.form-collapsible .form-body { display:none; }
.form-collapsible.is-open .form-body { display:block; }
.form-toggle { background:var(--sa-green); color:#fff; border:none; border-radius:10px; padding:10px 14px; font-weight:700; cursor:pointer; }
.form-toggle:hover { filter: brightness(1.05); }
.form-card { background:#fff; border:1px solid #ecf2f7; border-radius:14px; box-shadow:0 8px 22px rgba(0,0,0,0.08); padding:16px 18px; }
.form-card .form-header { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.form-card h2 { margin:0; font-size:1.1rem; }
.form-card label { font-weight:600; display:block; margin:0 0 6px; }
.form-card input,
.form-card textarea { width:100%; max-width:520px; padding:10px 12px; border:1px solid #d9e2ec; border-radius:10px; font: inherit; box-sizing:border-box; }
.form-card textarea { min-height:90px; }
.form-card .cc-btn { margin-top:8px; }
.canicross-single-course .course-intake-registration-cta,
.course-fast-row .course-intake-registration-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 10px 16px;
  background: var(--sa-green);
  color: #fff;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: anywhere;
  border: 2px solid var(--sa-green);
  border-radius: 10px;
}
.canicross-single-course .course-intake-registration-cta:hover,
.course-fast-row .course-intake-registration-cta:hover {
  background: #00643f;
  border-color: #00643f;
  color: #fff;
  filter: none;
  text-decoration: none;
}
.canicross-single-course .course-intake-registration-cta:focus,
.course-fast-row .course-intake-registration-cta:focus,
.canicross-single-course .course-intake-registration-cta:focus-visible,
.course-fast-row .course-intake-registration-cta:focus-visible {
  background: #00643f;
  border-color: #00643f;
  color: #fff;
  outline: 3px solid rgba(255, 182, 18, 0.7);
  outline-offset: 2px;
  text-decoration: none;
}
.course-registration-backlink { margin:16px 0 0; }
.course-registration-backlink a { font-weight:600; text-decoration:none; }

/* ==========================================================
   CLUBS PAGE (template + archive)
   ========================================================== */
.clubs-page .container { max-width:1100px; margin:0 auto; padding:32px 16px; }
.clubs-hero { padding:50px 0 30px; background:#f5faf7; border-bottom:1px solid #eee; }
.clubs-intro { padding:30px 0; }
.clubs-intro-card { background:#fff; border-radius:12px; padding:18px 20px; box-shadow:0 8px 20px rgba(0,0,0,0.06); border:1px solid #ecf2f7; }
.clubs-map-section { padding:20px 0 40px; }
#clubs-map { width:100%; min-height:480px; border-radius:12px; overflow:hidden; }
.clubs-list { padding:0 0 40px; }
.clubs-list h2 { margin:0 0 16px; }
.club-cards { display:grid; grid-template-columns: repeat(auto-fill, minmax(260px,1fr)); gap:16px; }
.club-card { display:flex; flex-direction:row; gap:14px; background:#fff; border:1px solid #ecf2f7; border-radius:12px; box-shadow:0 10px 22px rgba(0,0,0,0.08); overflow:hidden; padding:12px; }
.club-card__media { flex:0 0 120px; }
.club-card__media img { width:100%; height:100%; object-fit:cover; border-radius:10px; display:block; }
.club-card__body h3 { margin:0 0 6px; font-size:1rem; }
.club-card__location { margin:0 0 8px; color:#42615a; font-size:0.92rem; font-weight:700; }
.club-card__summary { margin:0 0 8px; font-size:0.95rem; line-height:1.45; }
.club-gallery { margin-top:32px; }
.club-gallery__grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:12px; }
.club-gallery__grid--single { grid-template-columns:minmax(0, 520px); }
.club-gallery__item { margin:0; }
.club-gallery__item img { display:block; width:100%; height:auto; border-radius:8px; }
.cc-btn { display:inline-block; padding:8px 12px; border-radius:10px; background:#007a4d; color:#fff; text-decoration:none; font-weight:700; }
.cc-btn:hover { filter: brightness(1.05); }
.cc-btn--whatsapp { display:inline-flex; align-items:center; gap:8px; background:#25d366; }
.cc-btn-icon { display:inline-block; width:18px; height:18px; background-size:contain; background-repeat:no-repeat; background-position:center; }

/* News: featured + in-content image styling */
.news-single__featured {
  margin: 0 0 24px;
  border-radius: 16px;
  overflow: hidden;
  background: #f2f2f2;
}
.news-single__featured img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}
.cc-news-card .cc-card__media img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: contain;
  object-position: center;
  background: #f2f4f7;
}
.news-single__content img {
  max-width: 100%;
  height: auto;
  border-radius: 14px;
}
.news-single__content figure {
  margin: 24px 0;
}
.news-single__content figcaption {
  font-size: 0.9rem;
  opacity: 0.8;
  margin-top: 6px;
}
.news-single__content .wp-block-gallery,
.news-single__content .wp-block-gallery.has-nested-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}
.news-single__content .wp-block-gallery .wp-block-image,
.news-single__content .wp-block-gallery.has-nested-images figure {
  margin: 0;
}
.news-single__content .wp-block-gallery img,
.news-single__content .wp-block-gallery.has-nested-images img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
/* News video sizing: 16:9, 720px desktop, full width mobile */
.news-single__content .wp-block-video {
  max-width: 720px;
  margin: 24px auto;
}
.news-single__content .wp-block-video video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  display: block;
}
/* News embeds (YouTube/Vimeo) sizing */
.news-single__content .wp-block-embed {
  max-width: 720px;
  margin: 24px auto;
}
.news-single__content .wp-block-embed__wrapper {
  aspect-ratio: 16 / 9;
}
.news-single__content .wp-block-embed__wrapper iframe {
  width: 100%;
  height: 100%;
  display: block;
}
/* Portrait video override: add class "video--portrait" to the block */
.news-single__content .wp-block-video.video--portrait {
  max-width: 420px;
}
.news-single__content .wp-block-video.video--portrait video {
  aspect-ratio: 9 / 16;
}
/* Portrait embed override: add class "video--portrait" to the embed block */
.news-single__content .wp-block-embed.video--portrait {
  max-width: 420px;
}
.news-single__content .wp-block-embed.video--portrait .wp-block-embed__wrapper {
  aspect-ratio: 9 / 16;
}
@media (max-width: 720px) {
  .news-single__content .wp-block-video {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .news-single__content .wp-block-embed {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}
.news-single__content .alignwide {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}
.news-single__content .alignfull {
  width: 100vw;
  margin-left: calc(50% - 50vw);
}
.news-single__content .cc-image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.news-single__content .cc-image-grid > * {
  margin: 0;
}
.news-single__content .cc-image-grid img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.cc-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.86);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
  touch-action: none;
}
.cc-lightbox__img {
  max-width: min(1200px, 92vw);
  max-height: 88vh;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  border-radius: 12px;
}
.cc-lightbox__close {
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 36px;
  line-height: 1;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.cc-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  width: 44px;
  height: 56px;
  font-size: 32px;
  cursor: pointer;
}
.cc-lightbox__prev { left: 12px; }
.cc-lightbox__next { right: 12px; }
.cc-lightbox-open {
  overflow: hidden;
  height: 100%;
}
/* Footer social links */
.footer {
  border-top: 1px solid #eee;
  background: #fff;
}
.footer .container {
  padding: 20px 16px 28px;
  text-align: center;
}
.footer-social {
  margin: 10px 0 0;
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}
.footer-social__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  color: #1a202c;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.footer-social__link::before {
  content: "";
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #6b7280;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.footer-social__link--facebook::before {
  content: "f";
  background: #1877f2;
  font-size: 13px;
}
.footer-social__link--instagram::before {
  content: "ig";
  background: #e1306c;
  font-size: 11px;
  letter-spacing: -0.5px;
}
.footer-social__link--youtube::before {
  content: "yt";
  background: #ff0000;
  font-size: 10px;
  letter-spacing: -0.2px;
}
.footer-social__link--tiktok::before {
  content: "tt";
  background: #111111;
  font-size: 10px;
  letter-spacing: -0.2px;
}
.footer-social__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  border-color: #d1d5db;
}
@media (max-width: 640px) {
  .cc-news-card .cc-card__media img { height: 180px; }
  .news-single__featured { border-radius: 12px; }
  .news-single__content img { border-radius: 10px; }
  .cc-lightbox { padding: 16px; }
  .news-single__content .cc-image-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cc-lightbox__nav {
    width: 54px;
    height: 64px;
    font-size: 34px;
  }
  .cc-lightbox__close {
    font-size: 44px;
    top: 10px;
    right: 12px;
  }
}
.cc-btn-icon--whatsapp { background-image: url("assets/img/whatsapp.png"); }
@media (max-width: 640px) { .club-card { flex-direction:column; } .club-card__media { flex:0 0 auto; width:100%; } }
.clubs-map-wrap [id^="canicross-clubs-map"],
#clubs-archive-map {
  min-height:480px;
  width:100%;
  border-radius:8px;
  overflow:hidden;
  margin-bottom:30px;
  background:#f4f4f4;
}

/* Courses archive shortcode */
.courses-archive__grid {
  grid-template-columns: 1fr;
  gap: 20px;
}
.courses-archive__grid .cc-card {
  display: flex;
  flex-direction: row;
  gap: 16px;
}
.courses-archive__grid .cc-card__media { flex:0 0 320px; aspect-ratio:16/9; }
.courses-archive__grid .cc-card__body { flex:1; }
@media (max-width: 768px) {
  .courses-archive__grid .cc-card { flex-direction: column; }
  .courses-archive__grid .cc-card__media { flex:0 0 auto; width:100%; }
}
#courses-archive-map {
  min-height: 480px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 30px;
  background: #f4f4f4;
}

/* Ensure courses page shows cards before map, regardless of markup order. */
.courses-archive { display: flex; flex-direction: column; gap: 24px; }
.courses-archive > .container { order: 1; }
.courses-archive > .container--wide { order: 2; }

/* ==========================================================
   CONTACT PAGE
   ========================================================== */
.contact-hero { padding: 48px 0 24px; background: #f5faf7; border-bottom: 1px solid #e8eef3; }
.contact-hero h1 { margin: 0 0 10px; font-size: 2rem; font-weight: 800; }
.contact-hero p { margin: 0; max-width: 840px; line-height: 1.6; color: #4b5563; }
.contact-grid { padding: 24px 0 48px; }
.contact-grid__inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.contact-card {
  background: #fff;
  border: 1px solid #ecf2f7;
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0,0,0,0.08);
  padding: 20px 22px;
}
.contact-card h2 { margin: 0 0 10px; font-size: 1.1rem; font-weight: 800; color: var(--sa-green); }
.contact-card p { margin: 0 0 12px; }
.contact-note { font-size: 0.95rem; color: #555; }
.contact-whatsapp-btn { margin-top: 6px; }
.contact-links { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.contact-links__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-weight: 700;
  color: #1a202c;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  transition: transform 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}
.contact-links__link:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  border-color: #d1d5db;
}
.contact-icon { margin-right: 6px; }

/* ============================================================
   EVENTS CALENDAR
   ========================================================== */
.cc-calendar__header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.cc-calendar__nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.cc-calendar__month {
  font-weight: 700;
  font-size: 1.1rem;
}
.cc-calendar__filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 18px;
}
.cc-filter {
  border: 1px solid #1f2a2e;
  background: #fff;
  color: #1f2a2e;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
}
.cc-filter.is-active {
  background: #1f2a2e;
  color: #fff;
}
.cc-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.cc-calendar__weekday {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  color: #667;
  padding: 6px 4px;
}
.cc-calendar__cell {
  min-height: 120px;
  border: 1px solid #e0e6ea;
  border-radius: 10px;
  padding: 8px;
  background: #fff;
}
.cc-calendar__cell--empty {
  border: none;
  background: transparent;
}
.cc-calendar__date {
  font-weight: 700;
  margin-bottom: 6px;
}
.cc-calendar__items {
  display: grid;
  gap: 6px;
}
.cc-calendar__item {
  display: grid;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f4f7f8;
  font-size: 0.88rem;
}
.cc-calendar__item a {
  color: #1f2a2e;
  text-decoration: none;
  font-weight: 600;
}
.cc-calendar__badge {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #3b5;
}
.cc-calendar__time {
  font-size: 0.78rem;
  color: #556;
}
.cc-calendar__note {
  margin-top: 16px;
  color: #556;
  font-size: 0.9rem;
}

.cc-calendar .container,
.cc-events-cards.container,
.cc-upcoming.container {
  max-width: 1200px;
  padding-left: 12px;
  padding-right: 12px;
}
@media (max-width: 640px) {
  .cc-calendar .container,
  .cc-events-cards.container,
  .cc-upcoming.container {
    padding-left: 10px;
    padding-right: 10px;
  }
}

.cc-upcoming__filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 12px 0 16px;
}
.cc-upcoming__list {
  display: grid;
  gap: 10px;
}
.cc-upcoming__item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #e0e6ea;
  border-radius: 12px;
  background: #fff;
}
.cc-upcoming__date {
  font-weight: 700;
  color: #1f2a2e;
}
.cc-upcoming__body a {
  color: #1f2a2e;
  font-weight: 700;
  text-decoration: none;
}
.cc-upcoming__meta {
  color: #556;
  font-size: 0.9rem;
}

@media (max-width: 700px) {
  .cc-upcoming__item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .cc-calendar__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cc-calendar__weekday {
    display: none;
  }
  .cc-calendar__cell {
    min-height: 140px;
  }
}
.news-single__featured {
    width: 100%;
    max-width: 1100px;
    margin: 0 0 16px;
    max-height: 520px;
    overflow: visible;
    border-radius: 12px;
    background: #f2f4f7;
}
.news-single__featured img {
    max-width: 100%;
    max-height: 520px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}
