/* GOTCPR, LLC site stylesheet */
:root {
  --navy: #0B2545;
  --primary-blue: #134074;
  --primary-teal: #0E7C74;      /* text-safe teal */
  --teal-bright: #13A89E;       /* graphic accent (matches logo) */
  --dark-blue: #0B2545;
  --bg-color: #F4F7FA;
  --card-bg: #ffffff;
  --text-main: #2B3A4D;
  --text-muted: #5B6B7F;
  --border-light: #DDE5EE;
  --tint: #EAF0F8;
  --shadow-sm: 0 1px 2px rgb(11 37 69 / .06);
  --shadow-md: 0 4px 14px rgb(11 37 69 / .08);
  --shadow-lg: 0 10px 24px rgb(11 37 69 / .12);
}
* { box-sizing: border-box; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-color); color: var(--text-main);
  margin: 0; line-height: 1.65;
}
a { color: var(--primary-blue); text-decoration: none; }
a:hover { color: var(--primary-teal); }
h1, h2, h3, h4 { color: var(--navy); font-weight: 700; margin-top: 0; line-height: 1.25; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--teal-bright); outline-offset: 2px; }

/* ---------- Header: company logo is the primary brand mark ---------- */
#sitehead {
  background: #fff; border-bottom: 1px solid var(--border-light);
  padding: 18px 24px;
}
#sitehead .inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
#sitehead .brand img { display: block; height: 84px; width: auto; }
#sitehead .head-cta { text-align: right; font-size: .9rem; color: var(--text-muted); line-height: 1.4; }
#sitehead .head-cta a.phone { display: block; font-size: 1.25rem; font-weight: 700; color: var(--navy); }
#sitehead .head-cta a.phone:hover { color: var(--primary-teal); }

/* Home: large stacked logo, so any AHA seal on the page stays well under 50% of it */
body.home #sitehead { padding: 40px 24px 32px; border-bottom: 0; }
body.home #sitehead .inner { justify-content: center; }
body.home #sitehead .inner { position: relative; }
body.home #sitehead .head-cta { position: absolute; top: 0; right: 0; }
body.home #sitehead .brand img { height: 260px; }

/* ---------- Navigation ---------- */
#mainmenu {
  background: #fff; position: sticky; top: 0; z-index: 100;
  border-top: 1px solid var(--border-light); border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}
#mainmenu ul {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 4px;
  list-style: none; margin: 0 auto; padding: 8px 16px; max-width: 1200px;
}
#mainmenu a {
  display: block; padding: 10px 16px; border-radius: 8px;
  color: var(--navy); font-weight: 600; font-size: .95rem;
}
#mainmenu a:hover { background: var(--tint); color: var(--navy); }
#mainmenu a.current { background: var(--navy); color: #fff; }
.nav-toggle {
  display: none; width: 100%; background: #fff; border: 0; padding: 14px 20px;
  font: 600 1rem 'Inter', sans-serif; color: var(--navy); text-align: left; cursor: pointer;
}

/* ---------- Layout ---------- */
#wrap {
  display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px;
  max-width: 1200px; margin: 48px auto; padding: 0 24px; align-items: start;
}
body.home #wrap { margin-top: 56px; }
#content, #rightside {
  background: var(--card-bg); border: 1px solid var(--border-light);
  border-radius: 14px; box-shadow: var(--shadow-md);
}
#content { padding: 44px; }
#rightside { padding: 28px; position: sticky; top: 84px; }
#rightside h2 { font-size: 1.25rem; color: var(--navy); margin-bottom: 14px; }
#rightside p { font-size: .95rem; margin: 0 0 14px; }
#rightside .btn { display: block; text-align: center; }
#rightside .phone { font-weight: 700; font-size: 1.1rem; color: var(--navy); }

.btn, .linklist b u {
  display: inline-block; background: var(--navy); color: #fff !important;
  padding: 12px 22px; border-radius: 8px; font-weight: 600; text-decoration: none;
  transition: background .2s, transform .2s;
}
.btn:hover { background: var(--primary-teal); transform: translateY(-1px); }
.btn.secondary { background: #fff; color: var(--navy) !important; border: 2px solid var(--navy); padding: 10px 20px; }
.btn.secondary:hover { background: var(--tint); }

/* ---------- Content ---------- */
#content h1 { font-size: 2.2rem; margin-bottom: 18px; }
#content h2 { font-size: 1.6rem; margin: 40px 0 14px; color: var(--primary-blue); }
#content h3 { font-size: 1.15rem; margin: 24px 0 10px; }
#content p, #content li { font-size: 1.05rem; }
#content p.intro { font-size: 1.2rem; color: var(--text-main); }
#content ul { padding-left: 1.3em; }
#content img { border-radius: 10px; }
iframe { width: 100%; max-width: 100%; border: 0; border-radius: 10px; }
font { color: inherit !important; }

/* Home value strip */
.pillars { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 8px; padding: 0; list-style: none; }
.pillars li {
  background: var(--tint); color: var(--navy); font-weight: 600; font-size: .95rem !important;
  padding: 8px 16px; border-radius: 999px;
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 0; }

/* ---------- AHA Aligned Training Site seal block ----------
   Seal: shown whole, unaltered, un-faded, >= 3/8 in heart/torch (seal 128px),
   clear space >= heart width on all sides, never next to the company logo. */
.aha-panel {
  margin: 48px 0 8px; padding: 44px 44px 36px; text-align: center;
  background: #fff; border: 1px solid var(--border-light); border-radius: 14px;
}
.aha-panel figure { margin: 0; }
.aha-panel img.seal-img {
  display: block; margin: 0 auto 14px; width: 128px; height: 128px;
  border-radius: 0 !important; box-shadow: none !important; transform: none !important; opacity: 1 !important;
}
.aha-panel .alignment {
  margin: 0 auto; max-width: 340px; font-weight: 600; font-size: .95rem !important;
  color: var(--navy); line-height: 1.45; white-space: normal !important;
}

/* ---------- Products: AHA course pointer vs. commercial merchandise ---------- */
.aha-pointer {
  background: var(--tint); border-left: 6px solid var(--navy); border-radius: 10px;
  padding: 26px 30px; margin: 6px 0 0;
}
.aha-pointer h2 { margin: 0 0 8px !important; font-size: 1.3rem !important; color: var(--navy) !important; }
.aha-pointer p { margin: 0 0 16px; white-space: normal !important; }
.section-break { border: 0; height: 1px; background: var(--border-light); margin: 56px 0 40px; }
.merch-head h2 { margin: 0 0 8px !important; }
.merch-note {
  font-size: .95rem !important; color: var(--text-muted); margin-bottom: 26px;
  white-space: normal !important;
}
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.product-card {
  border: 1px solid var(--border-light); border-top: 4px solid var(--teal-bright);
  border-radius: 10px; padding: 18px; background: #fff; text-align: center;
}
.product-card img { width: 100%; height: 200px; object-fit: contain; margin: 0 0 14px !important; }
.product-card .name { font-weight: 700; color: var(--navy); margin: 0 !important; white-space: normal !important; }
.product-card .price { font-size: 1.25rem !important; font-weight: 700; color: var(--primary-teal); margin: 4px 0 0 !important; white-space: normal !important; }
.order-note { margin-top: 28px; white-space: normal !important; }

/* ---------- Footer ---------- */
#footer { background: var(--navy); color: #B8C4D4; padding: 40px 24px; margin-top: 64px; font-size: .9rem; text-align: center; }
#footer .inner { max-width: 900px; margin: 0 auto; }
#footer p { margin: 0 0 10px; }
#footer .fine { font-size: .8rem; color: #8FA0B6; max-width: 760px; margin: 14px auto 0; }
#footer a { color: #D6E0EC; }
#footer a:hover { color: #fff; }
#footer .host { display: inline-block; background: #fff; border-radius: 8px; padding: 6px 12px; }
#footer .host img { display: block; height: 24px; width: auto; }

.clearingdiv { display: none; }

/* Scroll-in animation (never applied to the AHA seal) */
.fade-in { opacity: 0; transform: translateY(18px); transition: opacity .6s ease-out, transform .6s ease-out; }
.fade-in.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .fade-in { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  #wrap { grid-template-columns: 1fr; }
  #rightside { position: static; }
}
@media (max-width: 768px) {
  #sitehead .inner { flex-direction: column; text-align: center; }
  #sitehead .head-cta { text-align: center; }
  body.home #sitehead .head-cta { position: static; margin-top: 14px; }
  #sitehead .brand img { height: auto; width: min(320px, 86vw); }
  body.home #sitehead .brand img { width: min(280px, 80vw); height: auto; }
  .nav-toggle { display: block; }
  #mainmenu ul { display: none; flex-direction: column; padding: 4px 12px 12px; }
  #mainmenu.open ul { display: flex; }
  #mainmenu a { text-align: center; }
  #content { padding: 26px 20px; }
  #content h1 { font-size: 1.7rem; }
  .aha-panel { padding: 40px 24px 30px; }
}


/* Version 2 Catalog Additions */
.catalog-content {
    position: relative;
    padding-bottom: 50px;
}
.course-catalog-header {
    text-align: center;
    margin-bottom: 30px;
}
.course-catalog-header h1 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 5px;
}
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    perspective: 1000px;
}

/* Tile styling */
.course-tile {
    width: 100%;
    height: 180px;
    cursor: pointer;
    perspective: 1000px;
    position: relative;
    z-index: 1;
}

.course-tile-inner {
    position: absolute;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                width 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                top 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.course-tile:not(.expanded):hover .course-tile-inner {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.course-tile-front, .course-tile-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
}

.course-tile-front {
    background: linear-gradient(135deg, var(--primary-teal), var(--primary-blue));
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.course-tile-front h3 {
    color: white;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.btn-more {
    background: rgba(255,255,255,0.2);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.course-tile-back {
    background: var(--card-bg);
    color: var(--text-main);
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    padding: 30px;
    border: 1px solid var(--border-light);
}

.course-content-scroll {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 10px;
    opacity: 0;
    transition: opacity 0.3s;
    transition-delay: 0.3s;
}

.course-tile.expanded .course-content-scroll {
    opacity: 1;
}

.course-tile.expanded {
    z-index: 100;
}

.course-tile.expanded .course-tile-inner {
    transform: rotateY(180deg);
    position: fixed;
    /* values injected by JS based on container bounding client rect */
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                width 0.6s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                top 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-close {
    align-self: flex-end;
    background: var(--border-light);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    margin-bottom: 10px;
    color: var(--text-main);
}

.btn-close:hover {
    background: #cbd5e1;
}

.course-tile.expanded-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(5px);
    z-index: 90;
    display: none;
}
.course-tile-overlay.active {
    display: block;
}


/* Preserve raw line breaks natively in catalog content */
#content p, .course-content-scroll p {
    white-space: pre-wrap;
}

/* Expanded tile sits above sticky nav/contact card, with a dimmed backdrop */
.course-tile-overlay { position: fixed; inset: 0; background: rgba(11,37,69,.6); z-index: 1000; display: none; }
.course-tile-overlay.active { display: block; }
.course-tile.expanded { z-index: 1200; }
.course-tile-front { background: linear-gradient(135deg, var(--primary-teal), var(--primary-blue)); }
.course-grid:has(.course-tile.expanded) { position: relative; z-index: 1100; }
