/*
Theme Name: NTCenter CTP
Description: Cognitive Training Point course site theme, ported from the ctp-landing/ctp-basic/ctp-advanced static mockups.
Author: NTCenter
Version: 0.8.5
Text Domain: ctp-theme
*/

:root{
  --bg:#fcfcfc;
  --surface:#ffffff;
  --surface-alt:#f1f1f1;
  --ink:#2b2b2b;
  --text:#515151;
  --muted:#56585D;
  --line:#e6e6e6;
  --blue:#6B2FBF;
  --blue-deep:#4A1F8F;
  --blue-dim:#F1E8FF;
  --teal:#9C7FD1;
  --teal-deep:#6B2FBF;
  --navy:#1A0F33;
  --navy-soft:#2E1A5C;
  --accent:#A64DFF;
  --accent-deep:#8A2BE2;
  --accent-dim:#F2E4FF;
  --display:'Arsenal', Georgia, serif;
  --sans:'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius:4px;
}
*{box-sizing:border-box;}
html{background:var(--bg);}
body{margin:0; background:var(--bg); color:var(--text); font-family:var(--sans); font-size:16px; line-height:1.65;}
h1,h2,h3,h4{font-family:var(--display); color:var(--ink); font-weight:700; margin:0; line-height:1.15; text-wrap:balance;}
.ntc-dash{position:relative; display:inline-block; width:2em; height:0.5em; vertical-align:middle;}
.ntc-dash::before{content:''; position:absolute; left:0; right:0; top:50%; height:0.09em; background:currentColor; transform:translateY(-50%);}
.ntc-dash img{position:absolute; left:50%; top:50%; height:0.45em; width:auto; transform:translate(-50%,-50%); display:block;}
a{color:var(--blue); text-decoration:none;}
a:hover{color:var(--blue-deep);}
button{font-family:inherit;}
.wrap{max-width:1140px; margin:0 auto; padding:0 32px;}
@media (max-width:720px){ .wrap{padding:0 20px;} }

/* nav */
.topnav{position:sticky; top:0; z-index:40; background:rgba(255,255,255,.95); backdrop-filter:blur(6px); border-bottom:1px solid var(--line);}
.topnav .wrap{display:flex; align-items:center; justify-content:space-between; height:78px;}
.brand{display:flex; align-items:center; gap:10px; text-decoration:none;}
.brand-logo{height:36px; width:auto; display:block;}
.brand-text{display:flex; flex-direction:column; line-height:1.2;}
.brand .tagline{font-family:var(--sans); font-weight:400; font-size:10px; letter-spacing:.05em; text-transform:uppercase; color:var(--muted); margin-top:2px;}
.brand .name{font-family:var(--sans); font-weight:400; font-size:10px; letter-spacing:.05em; text-transform:uppercase; color:var(--ink);}
.navlinks{display:flex; gap:26px; list-style:none; margin:0; padding:0; font-size:14.5px; align-items:center;}
.navlinks a{color:#7a7a7a;}
.navlinks a:hover, .navlinks a.active{color:var(--blue);}
.screen-reader-text{border:0; clip:rect(1px,1px,1px,1px); clip-path:inset(50%); height:1px; margin:-1px; overflow:hidden; padding:0; position:absolute !important; width:1px; word-wrap:normal !important;}
.nav-toggle{display:none; flex-direction:column; justify-content:center; gap:5px; width:34px; height:34px; padding:0; background:none; border:none; cursor:pointer;}
.nav-toggle > span:not(.screen-reader-text){display:block; width:100%; height:2px; background:var(--ink); border-radius:2px; transition:transform .2s, opacity .2s;}
.nav-toggle[aria-expanded="true"] span:nth-child(1){transform:translateY(7px) rotate(45deg);}
.nav-toggle[aria-expanded="true"] span:nth-child(2){opacity:0;}
.nav-toggle[aria-expanded="true"] span:nth-child(3){transform:translateY(-7px) rotate(-45deg);}
@media (max-width:900px){
  .brand-text{display:none;}
  /* Matches the mockup's mobile nav: brand hugs the left edge, the CTA
     hugs the right edge, plain flex (no fixed-width grid tracks fighting
     each other for space). The hamburger is prepended to the left cluster
     since the mockup itself has no mobile menu to toggle. */
  .topnav .wrap{display:flex; align-items:center; justify-content:flex-start;}
  .nav-toggle{order:-1; margin-right:10px;}
  .brand{order:0;}
  .nav-cta{order:1; margin-left:auto;}
  .navlinks{display:none;}
  .navlinks.nav-open{
    display:flex; flex-direction:column; align-items:flex-start; gap:0;
    position:absolute; top:100%; left:0; right:0; background:#fff;
    border-bottom:1px solid var(--line); box-shadow:0 14px 24px rgba(26,15,51,.08);
    padding:8px 20px 16px;
  }
  .navlinks.nav-open li{width:100%;}
  .navlinks.nav-open a{display:block; padding:12px 0; border-bottom:1px solid var(--line);}
  .navlinks.nav-open .nav-drop-menu{position:static; left:auto; opacity:1; visibility:visible; transform:none; box-shadow:none; border:none; min-width:0; padding:0 0 0 14px; margin-top:0; display:none;}
  .navlinks.nav-open .nav-drop.nav-drop-open .nav-drop-menu{display:block;}
  .nav-toggle{display:flex;}
}

.nav-drop{position:relative;}
.nav-drop > a{display:inline-flex; align-items:center; gap:5px;}
.nav-drop .caret{font-size:10px; transition:transform .15s;}
.nav-drop:hover .caret, .nav-drop:focus-within .caret{transform:rotate(180deg);}
.nav-drop-menu{
  position:absolute; top:100%; left:50%; transform:translateX(-50%); margin-top:14px;
  background:#fff; border:1px solid var(--line); border-radius:8px; box-shadow:0 14px 32px rgba(26,15,51,.14);
  min-width:200px; padding:8px; opacity:0; visibility:hidden; transform:translateX(-50%) translateY(4px);
  transition:opacity .15s, transform .15s, visibility .15s;
}
.nav-drop:hover .nav-drop-menu, .nav-drop:focus-within .nav-drop-menu{opacity:1; visibility:visible; transform:translateX(-50%) translateY(0);}
/* In the mobile nav-open panel the dropdown is already static/full-width
   (see the max-width:900px block above); this same-specificity hover/focus
   rule re-applies the desktop centering transform on top of it (translateX
   shifts a statically positioned element too), shoving the submenu half its
   own width off the left edge of the screen. Higher-specificity override. */
.navlinks.nav-open .nav-drop:hover .nav-drop-menu,
.navlinks.nav-open .nav-drop:focus-within .nav-drop-menu{transform:none;}
.nav-drop-menu a{display:flex; flex-direction:column; gap:2px; padding:10px 12px; border-radius:6px; color:var(--ink);}
.nav-drop-menu a:hover{background:var(--surface-alt); color:var(--ink);}
.nav-drop-menu a.active{background:var(--blue-dim);}
.nav-drop-menu a b{font-size:13.5px; font-weight:600;}
.nav-drop-menu a span{font-size:11.5px; color:var(--muted);}
.nav-drop-menu .price{color:var(--accent); font-weight:700;}
.nav-cta{background:var(--accent); color:#fff; border-radius:var(--radius); padding:11px 20px; font-size:14px; font-weight:600;}
.nav-cta:hover{background:var(--accent-deep); color:#fff;}

/* buttons */
.eyebrow{font-size:13px; letter-spacing:.06em; text-transform:uppercase; color:var(--teal-deep); font-weight:600; margin:0 0 16px;}
.btn{border-radius:var(--radius); padding:14px 26px; font-size:15px; font-weight:600; display:inline-flex; align-items:center; gap:8px; border:1px solid transparent; cursor:pointer;}
.btn-primary{background:var(--accent); color:#fff;}
.btn-primary:hover{background:var(--accent-deep); color:#fff;}
.btn-outline{background:#fff; color:var(--ink); border-color:#cfcfcf;}
.btn-outline:hover{border-color:var(--blue); color:var(--blue);}
.btn:disabled{opacity:.45; cursor:not-allowed;}
.btn:disabled:hover{background:var(--accent);}

/* hero (front page) */
.brand-intro{padding:56px 0; background:var(--navy); color:#fff; text-align:center;}
.brand-intro .eyebrow{color:var(--accent); margin:0 0 10px;}
.brand-intro h1{font-family:var(--display); color:#fff; font-size:clamp(22px,2.6vw,28px); margin-bottom:16px;}
.brand-intro > .wrap > p{max-width:720px; margin:0 auto; color:#D6C9EE; font-size:15.5px; line-height:1.65;}
.brand-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:24px; max-width:980px; margin:38px auto 0; text-align:left;}
@media (max-width:820px){ .brand-grid{grid-template-columns:1fr; text-align:center;} }
.brand-card{background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1); border-radius:var(--radius); padding:22px 24px;}
.brand-card h3{font-family:var(--sans); font-weight:600; color:var(--accent); font-size:13px; letter-spacing:.04em; text-transform:uppercase; margin-bottom:10px;}
.brand-card p{color:#D6C9EE; font-size:14.5px; line-height:1.45; margin:0;}

/* stats band (front page) */
.stats{background:linear-gradient(rgba(0,0,0,.5), rgba(0,0,0,.5)), url('images/track-advanced.jpg') center/cover no-repeat; color:#fff;}
.stats .wrap{display:grid; grid-template-columns:repeat(5,1fr);}
.stat{padding:34px 20px; text-align:center; border-left:1px solid rgba(255,255,255,.25);}
.stat:first-child{border-left:none;}
.stat .n{font-family:var(--display); font-weight:700; font-size:30px; color:#fff;}
.stat .l{font-size:12.5px; color:rgba(255,255,255,.85); margin-top:6px; line-height:1.4;}
@media (max-width:720px){ .stats .wrap{grid-template-columns:repeat(2,1fr);} .stat:nth-child(3), .stat:nth-child(5){border-left:none;} }

section{padding:80px 0;}
section.alt{background:var(--surface-alt);}
.section-head{max-width:680px; margin-bottom:40px;}
.section-head h2{font-size:clamp(26px,3vw,32px); margin-bottom:14px;}
.section-head p{color:var(--text); margin:0; line-height:1.45;}
.section-head .course-tag{font-size:13.5px; font-weight:600; color:var(--teal-deep); margin:0 0 12px;}

/* Page-header pattern (Дискусии/Сертификати/Екип intros) — originally inline
   styles on the <h1>/<p> in a plain <header class="wrap">, not a class-based
   rule, so BB Content Slots (see inc/bb-migrate.php) apply these classes
   explicitly since inline styles aren't preserved when converting to modules. */
.ctp-page-intro-h1{font-size:clamp(28px,3.6vw,40px); margin-bottom:16px;}
.ctp-page-intro-p{max-width:680px; color:var(--text);}

/* tracks (front page) */
.tracks-grid{display:grid; grid-template-columns:repeat(4,1fr); gap:18px;}
@media (max-width:980px){ .tracks-grid{grid-template-columns:repeat(2,1fr);} }
@media (max-width:600px){ .tracks-grid{grid-template-columns:1fr;} }
.track-card{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:26px; display:flex; flex-direction:column; gap:10px; transition:box-shadow .15s, transform .15s; overflow:hidden; color:inherit; text-decoration:none;}
.track-cap{display:block; width:calc(100% + 52px); height:140px; object-fit:cover; margin:-26px -26px 6px;}
.track-card:hover{box-shadow:0 10px 24px rgba(26,15,51,.1); transform:translateY(-2px);}
.track-tag{font-size:11.5px; letter-spacing:.05em; text-transform:uppercase; color:var(--teal-deep); font-weight:700;}
.track-card h3{font-family:var(--sans); font-weight:700; font-size:18px;}
.track-card p{font-size:14px; color:var(--text); flex:1; margin:0; line-height:1.4;}
.track-price{display:flex; flex-direction:column; margin-top:4px;}
.track-price .price-amount{font-weight:700; color:var(--ink); font-size:15px;}
.track-price .price-caption{font-size:11px; font-weight:400; color:#b0b0b0; margin-top:2px;}
.track-badges{display:flex; gap:6px; flex-wrap:wrap;}
.track-badges .tier-badge{margin-left:0;}
#tracks .tier-badge{color:#fff;}
.track-card p.track-note{flex:none; font-size:11px; color:#b0b0b0; margin:2px 0 0;}

/* curriculum mosaic (front page) */
.mod-mosaic{display:grid; grid-template-columns:repeat(4,1fr); grid-auto-rows:200px; grid-auto-flow:dense; gap:16px;}
@media (max-width:900px){ .mod-mosaic{grid-template-columns:repeat(2,1fr);} }
@media (max-width:560px){ .mod-mosaic{grid-template-columns:1fr; grid-auto-rows:auto;} }
.mod-tile{position:relative; background:var(--surface); border:1px solid rgba(255,255,255,.15); border-radius:var(--radius); padding:20px; display:flex; flex-direction:column; justify-content:flex-end; gap:6px; transition:box-shadow .15s, transform .15s;}
.mod-tile:hover{box-shadow:0 10px 24px rgba(26,15,51,.25); transform:translateY(-2px);}
.mod-tile.c1{background:#3f5e78;}
.mod-tile.c2{background:#cc7a00;}
.mod-tile.c3{background:#b38600;}
.mod-tile.c4{background:#aa2518;}
.mod-tile.c5{background:#c1830a;}
.mod-tile.c6{background:#425c14;}
.mod-tile.c7{background:#69751e;}
.mod-tile.big{grid-column:span 2; grid-row:span 2;}
.mod-tile.wide{grid-column:span 2;}
@media (max-width:560px){ .mod-tile.big, .mod-tile.wide{grid-column:span 1; grid-row:span 1;} }
.mod-tile .mod-num{align-self:flex-start; display:inline-flex; align-items:center; gap:9px; white-space:nowrap; font-family:var(--display); font-weight:700; font-size:19.5px; line-height:1; color:#fff; background:rgba(255,255,255,.22); border:1px solid rgba(255,255,255,.3); border-radius:999px; padding:7.5px 18px; margin-bottom:4.5px;}
.mod-tile .mod-num svg{width:21px; height:21px; flex:none; stroke:currentColor;}
.mod-tile h3{font-family:var(--sans); font-weight:700; font-size:19px; line-height:1.08; margin:0; color:#fff;}
.mod-tile p{margin:0; font-size:13px; color:rgba(255,255,255,.85); line-height:1.4;}
.mod-tile.big p{font-size:14.5px;}
.mod-more{margin-top:26px; font-size:14.5px;}

/* compare table (front page) */
.compare-wrap{overflow-x:auto; border:1px solid var(--line); border-radius:var(--radius); background:var(--surface);}
table.compare{width:100%; border-collapse:collapse; min-width:640px;}
table.compare th,table.compare td{padding:17px 20px; text-align:left; border-bottom:1px solid var(--line); font-size:14.5px; vertical-align:top;}
table.compare th{background:var(--surface-alt); font-family:var(--sans); font-weight:700; font-size:12.5px; letter-spacing:.03em; text-transform:uppercase; color:var(--muted);}
table.compare td:first-child{color:var(--muted); font-weight:600; white-space:nowrap;}
table.compare tr:last-child td{border-bottom:none;}
.lvl-chip{display:inline-block; font-size:11px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; padding:3px 9px; border-radius:20px;}
.lvl-chip.basic{background:var(--blue-dim); color:var(--blue-deep);}
.lvl-chip.adv{background:#2E1A5C; color:#fff;}
.cert-pill{display:inline-block; font-size:12px; font-weight:600; border:1px solid var(--line); border-radius:20px; padding:5px 14px; color:var(--ink);}

/* format cards (front page) */
.policy-grid{display:grid; grid-template-columns:repeat(3,1fr); gap:18px;}
@media (max-width:820px){ .policy-grid{grid-template-columns:1fr;} }
.policy-card{background:var(--surface); border:1px solid var(--line); border-radius:var(--radius); padding:24px; border-top:3px solid var(--teal-deep);}
.policy-card h3{font-family:var(--sans); font-size:16px; font-weight:700; margin-bottom:8px;}
.policy-card p{margin:0; font-size:14.5px; color:var(--text); line-height:1.45;}

/* booking (front page) */
.booking-section{background:var(--navy); color:#e7e9ec;}
.booking-section .section-head h2, .booking-section .eyebrow{color:#fff;}
.booking-section .eyebrow{color:var(--accent);}
.booking-section .section-head p{color:#B3A0CC;}
.booking-grid{display:grid; grid-template-columns:1.6fr 1fr; gap:28px; align-items:start;}
@media (max-width:900px){ .booking-grid{grid-template-columns:1fr;} }
.booking-notice{background:rgba(166,77,255,.14); border:1px solid rgba(166,77,255,.35); color:#fff; border-radius:var(--radius); padding:14px 18px; font-size:14px; margin-bottom:24px;}
.booking-contact{display:flex; flex-direction:column; gap:6px; margin-top:18px; padding-top:18px; border-top:1px solid rgba(255,255,255,.1);}
.booking-contact label{margin-top:8px;}
.booking-contact label:first-child{margin-top:0;}

label{font-size:12px; font-weight:600; color:#B3A0CC;}
input,select,textarea{background:#04122f; border:1px solid rgba(255,255,255,.15); border-radius:var(--radius); color:#fff; font-family:var(--sans); font-size:14.5px; padding:11px 12px; width:100%;}
input:focus,select:focus,textarea:focus{outline:2px solid var(--accent); outline-offset:1px;}
textarea{resize:vertical; min-height:80px;}

/* faq (front page) */
.faq-item{border-bottom:1px solid var(--line);}
.faq-q{width:100%; text-align:left; background:none; border:none; color:var(--ink); font-size:16px; font-weight:600; padding:20px 0; cursor:pointer; display:flex; justify-content:space-between; align-items:center; gap:16px;}
.faq-q:hover{color:var(--blue);}
.faq-q .plus{color:var(--muted); font-size:20px; transition:transform .2s; flex-shrink:0;}
.faq-item.open .faq-q .plus{transform:rotate(45deg); color:var(--accent);}
.faq-a{max-height:0; overflow:hidden; transition:max-height .25s ease;}
.faq-a p{margin:0 0 20px; color:var(--text); font-size:14.5px; max-width:680px; line-height:1.45;}

/* course accordion (still used by page-confirmation.php's order-summary rows) */
.course-accordion{max-width:840px; border-top:1px solid var(--line);}
.acc-item{border-bottom:1px solid var(--line);}
.acc-q{width:100%; text-align:left; background:none; border:none; cursor:pointer; display:grid; grid-template-columns:56px 1fr 24px; gap:20px; align-items:center; padding:22px 0;}
.acc-num{font-family:var(--display); font-weight:700; font-size:15px; color:var(--accent);}
.acc-q h3{font-family:var(--sans); font-weight:700; font-size:17px; color:var(--ink);}
.acc-plus{font-size:20px; font-weight:300; color:var(--muted); transition:transform .2s;}
.acc-item.open .acc-plus{transform:rotate(45deg); color:var(--accent);}
.acc-a{max-height:0; overflow:hidden; transition:max-height .3s ease;}
.acc-a p{margin:0 0 24px 76px; font-size:14.5px; color:var(--text); max-width:680px; line-height:1.6;}
.acc-elo{margin:0 0 22px 76px; font-size:14.5px; color:var(--text); max-width:680px; line-height:1.6;}
.acc-elo b{color:var(--ink);}
.acc-topics{margin:0 0 28px 76px; max-width:680px; border-top:1px solid var(--line);}
.acc-topic{display:grid; grid-template-columns:220px 1fr; gap:20px; padding:14px 0; border-bottom:1px solid var(--line);}
.acc-topic-name{font-weight:600; font-size:13.5px; color:var(--ink); line-height:1.4;}
.acc-topic-body{font-size:13.5px; color:var(--text); line-height:1.55;}
@media (max-width:600px){ .acc-a p{margin-left:0;} .acc-q{grid-template-columns:40px 1fr 20px; gap:12px;} .acc-elo{margin-left:0;} .acc-topics{margin-left:0;} .acc-topic{grid-template-columns:1fr; gap:4px;} }

/* events (Предстоящи събития) */
.event-filters{display:flex; gap:10px; flex-wrap:wrap; margin-bottom:28px;}
.event-filter{display:inline-block; border:1px solid var(--line); border-radius:999px; padding:8px 16px; font-size:13.5px; color:var(--muted); text-decoration:none;}
.event-filter:hover{border-color:var(--blue); color:var(--blue);}
.event-filter.active{background:var(--navy); border-color:var(--navy); color:#fff;}
.event-list{list-style:none; margin:0; padding:0; max-width:760px; border-top:1px solid var(--line);}
.event-item{display:flex; align-items:center; gap:20px; padding:18px 0; border-bottom:1px solid var(--line); flex-wrap:wrap;}
.event-date{font-family:var(--display); font-weight:700; font-size:14px; color:var(--accent); width:150px; flex-shrink:0;}
.event-title{flex:1; min-width:160px; font-size:15px; color:var(--ink); font-weight:600;}
.event-level-badge{font-size:11px; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color:var(--teal-deep); background:var(--surface-alt); border-radius:999px; padding:5px 12px;}
.events-empty{color:var(--text); font-size:14.5px;}
@media (max-width:560px){ .event-date{width:auto;} }

/* footer */
footer{background:var(--navy); color:#D6C9EE; padding:56px 0 36px;}
.foot-grid{display:flex; justify-content:space-between; gap:32px; flex-wrap:wrap; margin-bottom:36px;}
.foot-brand{max-width:320px; font-size:13.5px; color:#B3A0CC; line-height:1.45;}
.foot-brand .name{color:#fff; display:block; margin-bottom:8px; font-family:var(--display); font-size:16px;}
.foot-partners{display:flex; align-items:center; gap:22px; margin-top:16px;}
.foot-partners img{display:block; height:34px; width:auto; opacity:.85; transition:opacity .15s;}
.foot-partners a:hover img{opacity:1;}
.foot-partners a:first-child img{height:24px;}
.foot-cols{display:flex; gap:56px; flex-wrap:wrap;}
.foot-col h4{font-size:11.5px; letter-spacing:.04em; text-transform:uppercase; color:#9483AD; margin:0 0 12px;}
.foot-col a{display:block; font-size:13.5px; color:#D6C9EE; margin-bottom:9px;}
.foot-col a:hover{color:var(--accent);}
.foot-bottom{border-top:1px solid rgba(255,255,255,.1); padding-top:22px; display:flex; justify-content:space-between; gap:16px; flex-wrap:wrap; font-size:12px; color:#9483AD;}
.foot-legal{line-height:1.6;}
.foot-legal a{color:inherit; white-space:nowrap;}
.foot-legal a:not(:last-child)::after{content:"\2022"; display:inline-block; margin:0 12px; text-decoration:none;}
.foot-legal a:hover{color:inherit; text-decoration:underline;}

/* Beaver Builder content slots (see inc/bb-migrate.php): BB's own row
   defaults leave no side gutter, so converted sections hug the viewport
   edges on narrower screens even though the row itself is fixed-width.
   Applies retroactively to already-published slots without needing a
   rebuild, unlike the padding written into new rows going forward. */
.fl-builder-content .fl-row-content{padding-left:32px; padding-right:32px;}
@media (max-width:720px){ .fl-builder-content .fl-row-content{padding-left:20px; padding-right:20px;} }
