/*
Theme Name: The Great Candy Run
Theme URI: https://thegreatcandyrun.com/
Author: Race Space
Author URI: https://race-space.com/
Description: Custom theme for The Great Candy Run — Denver's Sweetest 5K. Built from the approved prototype. Brand fonts (Baloo 2, Fredoka, Poppins) and candy palette baked in.
Version: 0.6.3
Requires at least: 6.4
Tested up to: 6.6
Requires PHP: 8.0
License: GPL-2.0-or-later
Text Domain: great-candy-run
*/

/* Base reset + brand tokens. Section-level styling is inline in templates
   to stay 1:1 with the approved prototype. */
:root{
  --candy-pink:#F52D8D;
  --candy-purple:#7B3AF4;
  --lollipop-blue:#00C5FF;
  --golden-honey:#FFC107;
  --mint-green:#30D6A7;
  --soft-pink:#FF7AA2;
  --cotton-candy:#FFB8D9;
  --lavender:#B28AFB;
  --cream:#FFF8F1;
  --midnight-navy:#1B1333;
  --charcoal:#4B3F72;
  --warm-grey:#7A728C;
  --light-cream:#F4F1F8;
}
*{box-sizing:border-box;}
body{margin:0;background:#FFF8F1;font-family:'Poppins',sans-serif;color:#4B3F72;overflow-x:hidden;}
a{color:#00C5FF;}
a:hover{color:#0098c4;}
img{max-width:100%;}
html{scroll-behavior:smooth;}
@keyframes floaty{0%,100%{transform:translateY(0)}50%{transform:translateY(-14px)}}
@keyframes floaty2{0%,100%{transform:translateY(0) rotate(-8deg)}50%{transform:translateY(-18px) rotate(6deg)}}
/* Floating candy decorations hidden site-wide (per client request) */
img[style*="animation:floaty"]{display:none !important;}
svg.lucide{width:1.05em;height:1.05em;stroke-width:2.1;vertical-align:-0.15em;}
/* Nav frosted state on scroll (ported from prototype) */
.gcr-nav.is-scrolled{
  background:rgba(255,255,255,0.8);
  -webkit-backdrop-filter:blur(14px);
  backdrop-filter:blur(14px);
  box-shadow:0 6px 24px rgba(123,58,244,0.12);
}
/* ---- Buttons ---- */
/* Base: keep label vertically + horizontally centred (fixes misaligned CTAs like hero LEARN MORE) */
a[style*="border-radius:999px"],button[style*="border-radius:999px"]{
  display:inline-flex;align-items:center;justify-content:center;line-height:1;text-align:center;
  transition:background .18s,color .18s,border-color .18s,box-shadow .18s,transform .18s;
}
/* Pink (#F52D8D) buttons on light backgrounds: soft-pink (#FF7AA2) text + border, transparent bg */
a[style*="background:#F52D8D"][style*="border-radius:999px"]:hover,
button[style*="background:#F52D8D"][style*="border-radius:999px"]:hover{
  background:transparent !important;color:#FF7AA2 !important;border-color:#FF7AA2 !important;
}
/* Pink buttons on dark sections (hero, countdown): white text + border */
a.gcr-on-dark[style*="border-radius:999px"]:hover,
button.gcr-on-dark[style*="border-radius:999px"]:hover{
  background:transparent !important;color:#fff !important;border-color:#fff !important;
}
/* White buttons: purple bg, white text */
a[style*="background:#fff"][style*="border-radius:999px"]:hover,
button[style*="background:#fff"][style*="border-radius:999px"]:hover{
  background:#7B3AF4 !important;color:#fff !important;border-color:#7B3AF4 !important;
}

/* ---- Nav base (moved off the inline style so .is-scrolled bg can win) ---- */
.gcr-nav{position:fixed;top:0;left:0;right:0;z-index:100;font-family:'Poppins',sans-serif;background:transparent;transition:background .3s ease, box-shadow .3s ease;}

/* ---- Navigation (responsive + dynamic) ---- */
.gcr-nav__inner{max-width:1280px;margin:0 auto;padding:14px clamp(16px,3vw,28px);display:flex;align-items:center;justify-content:space-between;gap:24px;}
.gcr-nav__logo{display:flex;align-items:center;text-decoration:none;flex-shrink:0;}
.gcr-nav__logo img{height:clamp(58px,6.2vw,78px);width:auto;display:block;}
.gcr-nav__right{display:flex;align-items:center;gap:6px;}
.gcr-menu{list-style:none;margin:0;padding:0;display:flex;align-items:center;gap:2px;}
.gcr-menu li{margin:0;}
.gcr-menu a{font-family:'Poppins',sans-serif;font-weight:600;font-size:clamp(13px,1.4vw,15px);text-decoration:none;padding:9px 13px;border-radius:999px;white-space:nowrap;color:#fff;text-shadow:0 1px 6px rgba(27,19,51,0.35);transition:color .15s;}
.gcr-nav.is-scrolled .gcr-menu a{color:#4B3F72;text-shadow:none;}
.gcr-menu a:hover{color:#FF7AA2 !important;}
.gcr-menu .current-menu-item>a,.gcr-menu .current_page_item>a,.gcr-menu .current-menu-parent>a{color:#FF7AA2 !important;}
.gcr-nav__cta{margin-left:10px;font-family:'Baloo 2',cursive;font-weight:700;font-size:clamp(14px,1.4vw,15px);color:#fff;background:#F52D8D;padding:10px 24px;border-radius:999px;text-decoration:none;box-shadow:0 6px 16px rgba(245,45,141,0.4);white-space:nowrap;border:2px solid transparent;text-transform:uppercase;letter-spacing:0.5px;transition:all .18s;}
.gcr-nav__cta:hover{background:transparent;color:#FF7AA2;border-color:#FF7AA2;}

/* Burger */
.gcr-burger{display:none;flex-direction:column;justify-content:center;gap:5px;width:46px;height:46px;background:none;border:none;cursor:pointer;padding:10px;margin-left:4px;}
.gcr-burger span{display:block;height:3px;width:100%;border-radius:3px;background:#fff;transition:background .3s;}
.gcr-nav.is-scrolled .gcr-burger span{background:#4B3F72;}

/* Right-slide mobile drawer */
.gcr-overlay{position:fixed;inset:0;z-index:110;background:rgba(27,19,51,0.5);opacity:0;visibility:hidden;transition:opacity .3s;}
.gcr-overlay.is-open{opacity:1;visibility:visible;}
.gcr-drawer{position:fixed;top:0;right:0;bottom:0;z-index:120;width:min(82vw,320px);background:#fff;box-shadow:-8px 0 30px rgba(27,19,51,0.2);transform:translateX(100%);transition:transform .3s ease;padding:70px 22px 24px;display:flex;flex-direction:column;gap:6px;overflow-y:auto;}
.gcr-drawer.is-open{transform:translateX(0);}
.gcr-drawer__close{position:absolute;top:16px;right:16px;width:42px;height:42px;border:none;background:#F4F1F8;border-radius:50%;font-size:22px;line-height:1;color:#4B3F72;cursor:pointer;display:flex;align-items:center;justify-content:center;}
.gcr-drawer__close:hover{background:#FFB8D9;color:#7B3AF4;}
.gcr-drawer .gcr-menu{flex-direction:column;align-items:stretch;gap:4px;}
.gcr-drawer .gcr-menu a{color:#4B3F72 !important;text-shadow:none !important;font-size:17px;padding:10px 0;border-radius:0;}
.gcr-drawer .gcr-menu a:hover{background:none !important;color:#FF7AA2 !important;}
.gcr-drawer .gcr-menu .current-menu-item>a,.gcr-drawer .gcr-menu .current_page_item>a{color:#FF7AA2 !important;}
.gcr-drawer .gcr-nav__cta{margin-left:0;margin-top:14px;text-align:center;}

@media (max-width:900px){
  .gcr-menu--desktop{display:none;}
  .gcr-burger{display:flex;}
}

/* FAQ accordion (native details/summary, styled to match prototype) */
.gcr-faq{list-style:none;}
.gcr-faq summary{list-style:none;cursor:pointer;padding:20px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;font-family:'Fredoka',sans-serif;font-weight:600;font-size:17px;color:#1B1333;}
.gcr-faq summary::-webkit-details-marker{display:none;}
.gcr-faq summary .gcr-plus{font-family:sans-serif;font-size:24px;color:#F52D8D;transition:transform .2s;display:inline-block;flex-shrink:0;}
.gcr-faq[open] summary .gcr-plus{transform:rotate(45deg);}
.gcr-faq p{padding:0 24px 20px;margin:0;font-size:15px;line-height:1.65;color:#7A728C;}

/* Hover niceties (ported from prototype style-hover) */
.gcr-tile{transition:transform .18s;cursor:pointer;}
.gcr-tile:hover{transform:scale(1.02);}

/* ============================================================
   JELLY-BEAN MODE (#17): glossy, 3D depth on buttons, cards, drips.
   Applied globally via inline-style attribute selectors so it
   covers every pill button + .gcr-lift card without touching templates.
   ============================================================ */

/* Pill buttons get position + springy transition */
a[style*="border-radius:999px"], button[style*="border-radius:999px"], .gcr-nav__cta{
  position:relative;
  transition:background .18s,color .18s,border-color .18s,box-shadow .2s,
             transform .24s cubic-bezier(.34,1.56,.64,1);
}
/* Glossy top highlight (the candy shine) */
a[style*="border-radius:999px"]::before, button[style*="border-radius:999px"]::before, .gcr-nav__cta::before{
  content:"";position:absolute;left:9%;right:9%;top:8%;height:40%;
  border-radius:999px;pointer-events:none;opacity:.8;
  background:linear-gradient(rgba(255,255,255,.6),rgba(255,255,255,0));
}
/* Rounded-bean shading: bright top rim + soft core shadow at the base */
a[style*="border-radius:999px"]::after, button[style*="border-radius:999px"]::after, .gcr-nav__cta::after{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  box-shadow:inset 0 2px 1px rgba(255,255,255,.55), inset 0 -9px 15px rgba(0,0,0,.17);
}
/* Springy press-and-bounce */
a[style*="border-radius:999px"]:hover, button[style*="border-radius:999px"]:hover, .gcr-nav__cta:hover{
  transform:translateY(-2px) scale(1.035);
}
a[style*="border-radius:999px"]:active, button[style*="border-radius:999px"]:active, .gcr-nav__cta:active{
  transform:translateY(1px) scale(.97);
}

/* Cards: jelly wobble on hover + inner top sheen */
.gcr-lift{position:relative;transition:transform .3s cubic-bezier(.34,1.56,.64,1), box-shadow .3s;}
.gcr-lift:hover{transform:translateY(-6px) scale(1.015);}
.gcr-lift::after{
  content:"";position:absolute;inset:0;border-radius:inherit;pointer-events:none;
  box-shadow:inset 0 2px 0 rgba(255,255,255,.6), inset 0 -14px 26px rgba(123,58,244,0.05);
}

/* Frosting drips: raised, glossy depth */
.gcr-drip svg, img[src*="hero-drip"]{filter:drop-shadow(0 4px 3px rgba(0,0,0,0.13));}

/* ============================================================
   Centered card grids — a partial last row centers instead of
   left-aligning (flex-wrap + justify-center; cards keep uniform
   width via a fixed flex-basis set inline per grid).
   ============================================================ */
.gcr-cardgrid{display:flex;flex-wrap:wrap;justify-content:center;}

/* Race-morning schedule: mobile-friendly stacking (no cramped overlap) */
@media (max-width:600px){
  .gcr-sched{flex-wrap:wrap;gap:8px 14px !important;padding:18px 20px !important;}
  .gcr-sched__time{min-width:0 !important;font-size:22px !important;}
  .gcr-sched__icon{font-size:24px !important;}
  .gcr-sched__desc{flex:1 1 100%;font-size:17px !important;}
}

/* Course-map framed image + simple zoom lightbox (data-gcr-zoom) */
.gcr-mapframe{display:flex;align-items:center;justify-content:center;background:#F1E9FF;border:5px solid #F1E9FF;border-radius:24px;padding:14px;box-shadow:0 18px 44px rgba(123,58,244,0.16);cursor:zoom-in;}
.gcr-mapframe img{display:block;width:auto;max-width:100%;max-height:560px;object-fit:contain;border-radius:12px;}
.gcr-zoom-ov{position:fixed;inset:0;z-index:1000;background:rgba(27,19,51,0.92);display:none;align-items:center;justify-content:center;padding:32px;}
.gcr-zoom-ov.is-open{display:flex;animation:gcrPop .2s ease;}
.gcr-zoom-ov img{max-width:92vw;max-height:90vh;width:auto;height:auto;border-radius:16px;box-shadow:0 24px 60px rgba(0,0,0,0.5);cursor:zoom-out;}
.gcr-zoom-close{position:absolute;top:20px;right:24px;width:46px;height:46px;border:none;border-radius:50%;background:rgba(255,255,255,0.18);color:#fff;font-size:26px;line-height:1;cursor:pointer;}
.gcr-zoom-close:hover{background:rgba(255,255,255,0.32);}

/* Gallery lightbox */
.gcr-lb{position:fixed;inset:0;z-index:1000;background:rgba(27,19,51,0.92);display:none;align-items:center;justify-content:center;padding:40px;}
.gcr-lb.is-open{display:flex;animation:gcrPop .2s ease;}
@keyframes gcrPop{0%{transform:scale(.9);opacity:0}100%{transform:scale(1);opacity:1}}
.gcr-lb__img{width:min(80vw,640px);height:min(70vh,480px);border-radius:20px;background-position:center;background-size:cover;background-repeat:no-repeat;box-shadow:0 24px 60px rgba(0,0,0,0.5);margin:0 auto;}
.gcr-lb__btn{position:absolute;background:rgba(255,255,255,0.15);color:#fff;border:none;border-radius:50%;cursor:pointer;}

/* WP admin bar shouldn't cover the fixed nav while editing */
.admin-bar .gcr-nav{top:32px;}
@media screen and (max-width:782px){.admin-bar .gcr-nav{top:46px;}}

/* Single blog post content (imported article HTML) */
.gcr-post-content h2,.gcr-post-content h3{font-family:'Boogaloo',cursive;line-height:1.2;margin:1.6em 0 .5em;}
.gcr-post-content h2{font-size:1.75rem;color:#7B3AF4;}
.gcr-post-content h3{font-size:1.35rem;color:#1B1333;}
.gcr-post-content p{margin:0 0 1.15em;}
.gcr-post-content a{color:#F52D8D;text-decoration:underline;}
.gcr-post-content a:hover{color:#7B3AF4;}
.gcr-post-content ul,.gcr-post-content ol{margin:0 0 1.15em 1.3em;}
.gcr-post-content li{margin:.35em 0;}
.gcr-post-content img{border-radius:16px;margin:1.1em 0;height:auto;max-width:100%;}
.gcr-post-content blockquote{border-left:4px solid #F52D8D;margin:1.3em 0;padding:.5em 0 .5em 1.15em;color:#7A728C;font-style:italic;}
.gcr-post-content iframe{max-width:100%;border-radius:16px;margin:1.1em 0;}

/* Blog pagination */
.gcr-pagination .page-numbers{display:inline-flex;align-items:center;justify-content:center;min-width:42px;height:42px;padding:0 14px;border-radius:999px;font-family:'Baloo 2',cursive;font-weight:700;font-size:15px;text-decoration:none;color:#7B3AF4;background:#fff;border:2px solid #F4F1F8;transition:all .15s;}
.gcr-pagination .page-numbers:hover{border-color:#FF7AA2;color:#FF7AA2;}
.gcr-pagination .page-numbers.current{background:#F52D8D;color:#fff;border-color:#F52D8D;}
.gcr-pagination .page-numbers.dots{background:none;border:none;}
