/* Ambition Training Manager 0.2: scoped styles, preventing Divi heading colors from leaking */
.atm-catalog{--atm-navy:#082d4d;--atm-red:#c50023;--atm-header-text:#fff;--atm-body-text:#1c304a;--atm-stripe:#f4f7fb;--atm-border:#d8e1ed;--atm-filter-bg:#fff;--atm-card-bg:#fff;--atm-radius:10px;max-width:100%;font-family:inherit;color:var(--atm-body-text);font-size:14px}
.atm-catalog *{box-sizing:border-box}
.atm-catalog .atm-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:0 0 20px;padding:20px;border:1px solid var(--atm-border);border-radius:var(--atm-radius);background:var(--atm-filter-bg)}
.atm-catalog .atm-filters label{font-size:13px;font-weight:700;min-width:0;color:var(--atm-body-text)}
.atm-catalog .atm-filters input,.atm-catalog .atm-filters select{display:block;width:100%;margin:7px 0 0;min-height:44px;font-size:14px;padding:10px 12px;background:#fff;color:#20334b;border:1px solid var(--atm-border);border-radius:6px}
.atm-catalog .atm-responsive-wrap{width:100%;overflow-x:auto;border:1px solid var(--atm-border);border-radius:var(--atm-radius)}
.atm-catalog table.atm-table{width:100%!important;border:0!important;border-collapse:collapse!important;border-spacing:0!important;margin:0!important;table-layout:auto;background:#fff;font-size:13px}
.atm-catalog table.atm-table thead,.atm-catalog table.atm-table thead tr{background:var(--atm-navy)!important}
.atm-catalog table.atm-table th,.et_pb_text .atm-catalog table.atm-table th{background:var(--atm-navy)!important;color:var(--atm-header-text)!important;font-size:13px!important;font-weight:750!important;text-align:left!important;letter-spacing:0!important;line-height:1.4!important;padding:15px 13px!important;vertical-align:middle!important;border:0!important;white-space:nowrap}
.atm-catalog table.atm-table td{color:var(--atm-body-text)!important;padding:13px!important;line-height:1.6!important;vertical-align:middle!important;border:0!important;border-bottom:1px solid var(--atm-border)!important;background:var(--atm-card-bg)!important;overflow-wrap:break-word}
.atm-catalog table.atm-table tr:nth-child(even) td{background:var(--atm-stripe)!important}
.atm-catalog table.atm-table tbody tr:last-child td{border-bottom:0!important}
.atm-catalog table.atm-table td:first-child{font-weight:650;min-width:190px}
.atm-catalog table.atm-table .atm-cities{min-width:250px;max-width:450px;overflow-wrap:anywhere}
.atm-catalog .atm-view-btn{display:inline-flex;align-items:center;justify-content:center;gap:4px;color:#fff!important;background:var(--atm-red)!important;border:1px solid var(--atm-red)!important;border-radius:5px;padding:7px 11px;text-decoration:none!important;font-size:12px!important;font-weight:700;white-space:nowrap}
.atm-catalog .atm-view-btn:hover{filter:brightness(.9);color:#fff!important}
.atm-catalog .atm-pagination{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:16px;font-size:13px;color:var(--atm-body-text)}
.atm-catalog .atm-pagination button{padding:7px 13px!important;border:1px solid var(--atm-border);border-radius:6px;background:#fff;color:var(--atm-navy);cursor:pointer}
.atm-catalog .atm-pagination button:disabled{opacity:.45;cursor:default}
.atm-catalog .atm-empty{padding:24px;text-align:center;color:#61758c}
.atm-catalog .atm-entry[hidden]{display:none!important}
/* Card view on desktop when explicitly selected */
@media(min-width:768px){.atm-catalog.atm-view-cards .atm-responsive-wrap{border:0;overflow:visible}.atm-catalog.atm-view-cards table.atm-table,.atm-catalog.atm-view-cards table.atm-table tbody{display:block;border:0}.atm-catalog.atm-view-cards table.atm-table thead{display:none}.atm-catalog.atm-view-cards table.atm-table tbody{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.atm-catalog.atm-view-cards table.atm-table tr{display:block;border:1px solid var(--atm-border);border-radius:var(--atm-radius);overflow:hidden;background:var(--atm-card-bg)}.atm-catalog.atm-view-cards table.atm-table td{display:block;min-width:0;max-width:none;padding:10px 16px!important;border:0!important}.atm-catalog.atm-view-cards table.atm-table td:before{content:attr(data-label) ': ';font-weight:700;color:var(--atm-navy)}.atm-catalog.atm-view-cards table.atm-table td:first-child{padding-top:18px!important;font-size:15px}.atm-catalog.atm-view-cards table.atm-table td:first-child:before{content:none}}
@media(max-width:767px){.atm-catalog .atm-filters{grid-template-columns:1fr;padding:17px;gap:15px}.atm-catalog .atm-responsive-wrap{border:0;overflow:visible}.atm-catalog table.atm-table,.atm-catalog table.atm-table tbody{display:block;width:100%}.atm-catalog table.atm-table thead{display:none}.atm-catalog table.atm-table tr{display:block;margin-bottom:15px;border:1px solid var(--atm-border);border-radius:var(--atm-radius);overflow:hidden;background:var(--atm-card-bg)}.atm-catalog table.atm-table td,.atm-catalog table.atm-table tr:nth-child(even) td{display:block!important;min-width:0!important;max-width:none!important;width:100%!important;padding:11px 16px!important;border-bottom:1px solid var(--atm-border)!important;background:var(--atm-card-bg)!important;line-height:1.6!important}.atm-catalog table.atm-table td:last-child{border:0!important}.atm-catalog table.atm-table td:before{content:attr(data-label) ': ';display:inline;font-weight:800;color:var(--atm-navy)}.atm-catalog table.atm-table td:first-child{padding:17px 16px!important;font-size:16px;background:var(--atm-navy)!important;color:var(--atm-header-text)!important}.atm-catalog table.atm-table td:first-child strong{color:var(--atm-header-text)!important}.atm-catalog table.atm-table td:first-child:before{display:none}.atm-catalog table.atm-table td:last-child{padding:15px 16px!important}.atm-catalog .atm-view-btn{min-width:125px;padding:10px 16px}.atm-catalog .atm-pagination{align-items:flex-start}}
/* Dedicated training program detail view */
.atm-single-page{padding:50px 18px 80px;background:#f7f9fc;color:#1c304a;min-height:60vh}.atm-single-container{max-width:1070px;margin:0 auto}.atm-single-page .atm-back{color:#082d4d;text-decoration:none;font-weight:650}.atm-single-head{margin:24px 0;padding:28px 30px;border-radius:12px;background:#082d4d;color:#fff}.atm-single-head h1{color:#fff!important;line-height:1.2;font-size:clamp(26px,3vw,40px);margin:12px 0!important}.atm-single-category{color:#dce6f3!important}.atm-program-tag{display:inline-flex;background:#c50023;color:#fff;padding:4px 12px;border-radius:20px;font-size:12px}.atm-single-photo img{display:block;max-height:340px;width:100%;object-fit:cover;border-radius:12px}.atm-single-summary{font-size:18px;margin:24px 0}.atm-single-section{margin:22px 0;padding:25px 30px;border:1px solid #dae2ee;background:#fff;border-radius:12px}.atm-single-section h2,.atm-single-contact h2{color:#082d4d!important;font-size:23px;margin:0 0 16px}.atm-session{padding:16px 0;border-top:1px solid #e5eaf1}.atm-session:first-child{border-top:0}.atm-session-top{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;color:#082d4d}.atm-session-top span{font-size:12px;background:#e7f0fa;border-radius:16px;padding:3px 10px}.atm-session-cities{margin-top:8px;line-height:1.7}.atm-session-cities span{font-weight:700}.atm-single-contact{background:#fff;border:1px solid #dae2ee;border-radius:12px;padding:28px 30px}.atm-single-contact a{display:inline-block;color:#fff!important;background:#c50023;padding:11px 18px;border-radius:6px;text-decoration:none}

/* BUG006: Divi/alternating-row rules must never override card title backgrounds. */
@media (max-width:767px) {
  .atm-catalog .atm-responsive-wrap { overflow:visible!important; }
  .atm-catalog table.atm-table { border:0!important;background:transparent!important; }
  .atm-catalog table.atm-table tbody { display:block!important; }
  .atm-catalog table.atm-table tbody tr.atm-entry {
    display:block!important;
    margin:0 0 18px!important;
    border:1px solid var(--atm-border)!important;
    border-radius:12px!important;
    overflow:hidden!important;
    background:var(--atm-card-bg)!important;
    box-shadow:0 3px 12px rgba(8,45,77,.05);
  }
  .atm-catalog table.atm-table tbody tr.atm-entry td:first-child,
  .atm-catalog table.atm-table tbody tr.atm-entry:nth-child(even) td:first-child,
  .et_pb_text .atm-catalog table.atm-table tbody tr.atm-entry td:first-child {
    display:block!important;
    background:var(--atm-navy)!important;
    color:var(--atm-header-text)!important;
    border:0!important;
    padding:17px 18px!important;
    font-size:16px!important;
    font-weight:750!important;
    min-height:unset!important;
    height:auto!important;
    line-height:1.55!important;
    visibility:visible!important;
  }
  .atm-catalog table.atm-table tbody tr.atm-entry td:first-child *,
  .atm-catalog table.atm-table tbody tr.atm-entry:nth-child(even) td:first-child * {
    color:var(--atm-header-text)!important;
    opacity:1!important;
    visibility:visible!important;
  }
  .atm-catalog table.atm-table tbody tr.atm-entry td:not(:first-child),
  .atm-catalog table.atm-table tbody tr.atm-entry:nth-child(even) td:not(:first-child) {
    display:block!important;
    color:var(--atm-body-text)!important;
    background:var(--atm-card-bg)!important;
    padding:11px 18px!important;
    border:0!important;
    border-bottom:1px solid var(--atm-border)!important;
    font-size:14px!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  .atm-catalog table.atm-table tbody tr.atm-entry td:last-child,
  .atm-catalog table.atm-table tbody tr.atm-entry:nth-child(even) td:last-child {
    border-bottom:0!important;
    padding:14px 18px!important;
  }
  .atm-catalog table.atm-table tbody tr.atm-entry td:not(:first-child)::before {
    color:var(--atm-navy)!important;
    font-weight:750!important;
  }
  .atm-catalog .atm-view-btn {min-width:132px;min-height:42px;line-height:1.2!important;}
  .atm-catalog .atm-filters {margin-bottom:22px;}
  .atm-catalog .atm-filters input,.atm-catalog .atm-filters select {max-width:100%;}
}


/* ===== BUG007 + BUG008 improvements (v0.3.0) ===== */
.atm-catalog{font-size:15px;line-height:1.55}
.atm-catalog .atm-filters{box-shadow:0 10px 28px rgba(8,45,77,.06);padding:18px;border-radius:16px}
.atm-catalog .atm-filter-field{display:flex;flex-direction:column;gap:8px;position:relative}
.atm-catalog .atm-filter-title{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:800;color:var(--atm-navy)}
.atm-catalog .atm-filter-search .atm-filter-title:before,
.atm-catalog .atm-filter-month .atm-filter-title:before,
.atm-catalog .atm-filter-city .atm-filter-title:before{font-family:dashicons;font-size:18px;line-height:1;color:var(--atm-red)}
.atm-catalog .atm-filter-search .atm-filter-title:before{content:'\f179'}
.atm-catalog .atm-filter-month .atm-filter-title:before{content:'\f145'}
.atm-catalog .atm-filter-city .atm-filter-title:before{content:'\f231'}
.atm-catalog .atm-filters input,.atm-catalog .atm-filters select{min-height:50px;border-radius:10px;transition:border-color .2s ease, box-shadow .2s ease}
.atm-catalog .atm-filters input:focus,.atm-catalog .atm-filters select:focus{border-color:var(--atm-red);box-shadow:0 0 0 3px rgba(197,0,35,.10);outline:none}
.atm-catalog .atm-responsive-wrap{box-shadow:0 12px 30px rgba(8,45,77,.05);border-radius:16px;overflow:hidden}
.atm-catalog table.atm-table th{padding:18px 13px!important;font-size:14px!important}
.atm-catalog table.atm-table td{font-size:14px!important}
.atm-catalog table.atm-table tbody tr{transition:transform .18s ease, box-shadow .18s ease}
.atm-catalog table.atm-table tbody tr:hover{transform:translateY(-1px);box-shadow:inset 0 0 0 9999px rgba(8,45,77,.012)}
.atm-catalog .atm-view-btn{gap:6px;padding:9px 14px;border-radius:8px;box-shadow:0 6px 18px rgba(197,0,35,.15)}
.atm-catalog .atm-view-btn .dashicons{font-size:15px;width:15px;height:15px}
.atm-catalog .atm-pagination{margin-top:18px}
.atm-catalog .atm-pagination button{font-weight:700}
.atm-catalog .atm-empty{border:1px dashed var(--atm-border);border-radius:14px;background:#fff}
@media (max-width:767px){
  .atm-catalog .atm-filters{padding:20px 18px;border-radius:18px}
  .atm-catalog table.atm-table tbody tr.atm-entry{margin:0 0 18px!important;border-radius:16px!important}
  .atm-catalog table.atm-table td:first-child{padding:16px 18px!important;font-size:18px;background:var(--atm-navy)!important;color:var(--atm-header-text)!important}
  .atm-catalog table.atm-table td{padding:12px 18px!important}
  .atm-catalog table.atm-table td:before{display:block;font-size:13px;letter-spacing:.01em;margin-bottom:3px}
  .atm-catalog table.atm-table td:last-child{display:flex!important;align-items:center;justify-content:space-between;gap:12px}
  .atm-catalog .atm-view-btn{min-width:135px;justify-content:center}
  .atm-catalog .atm-pagination{flex-direction:column;gap:10px}
}
/* Hidden state must always win on mobile and desktop after filtering */
.atm-catalog .atm-entry.atm-hidden,
.atm-catalog .atm-entry[hidden],
.atm-catalog table.atm-table tbody tr.atm-entry.atm-hidden,
.atm-catalog table.atm-table tbody tr.atm-entry[hidden]{display:none!important}

/* BUG009: hidden wins against mobile card display!important rules, including Divi. */
@media (max-width: 767px) {
 .atm-catalog .atm-responsive-wrap table.atm-table tbody tr.atm-entry[hidden],
 .atm-catalog .atm-responsive-wrap table.atm-table tbody tr.atm-entry.atm-hidden {
    display: none !important;
 }
}


/* v0.6.0 BUG013–017: branded pagination, independent month/year/venue filters */
.atm-catalog .atm-filters{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.atm-catalog .atm-filter-year .atm-filter-title:before{content:'\f508';font-family:dashicons;font-size:18px;line-height:1;color:var(--atm-red)}
.atm-catalog .atm-pagination{gap:18px}
.atm-catalog .atm-page-controls,.atm-catalog .atm-page-numbers{display:flex;justify-content:center;align-items:center;gap:5px;flex-wrap:wrap}
.atm-catalog .atm-page-controls{margin-left:auto;padding:6px;border-radius:30px;background:#f0f6fc;border:1px solid var(--atm-border)}
.atm-catalog .atm-pagination .atm-page-controls button{height:37px;min-width:37px;padding:4px 10px!important;border-radius:50%!important;background:#fff!important;border:1px solid var(--atm-border)!important;font-weight:750!important;font-size:14px!important;color:var(--atm-navy)!important;transition:background-color .18s ease,color .18s ease,transform .18s ease}
.atm-catalog .atm-pagination .atm-page-controls button:hover:not(:disabled){transform:translateY(-2px);border-color:var(--atm-red)!important}
.atm-catalog .atm-pagination .atm-page-controls .atm-page-number.is-active{background:var(--atm-navy)!important;color:#fff!important;border-color:var(--atm-navy)!important}
.atm-catalog .atm-page-ellipsis{padding:0 5px;font-weight:800;color:var(--atm-navy)}
.atm-catalog .atm-filters input::placeholder{color:#8290a0;opacity:1;font-weight:400}
@media (max-width:980px){.atm-catalog .atm-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:767px){
 .atm-catalog .atm-filters{grid-template-columns:1fr}
 .atm-catalog .atm-pagination{justify-content:center;align-items:center}
 .atm-catalog .atm-page-controls{margin:0 auto}
 .atm-catalog .atm-pagination .atm-page-controls button{height:34px;min-width:34px;padding:3px 7px!important}
}

/* BUG018: keep numeric pagination while removing visible result-count text. */
.atm-catalog .atm-pagination{justify-content:flex-end!important}
.atm-catalog .atm-page-controls{margin-left:auto}
@media(max-width:767px){.atm-catalog .atm-pagination{justify-content:center!important}.atm-catalog .atm-page-controls{margin:0 auto}}

/* BUG019 mobile-only: delivery badge always immediately below its date. */
@media screen and (max-width: 767px) {
  .atm-single-page .atm-session-top {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 9px;
  }
  .atm-single-page .atm-session-top > span {
    display: inline-flex;
    align-self: flex-start;
    margin: 0;
  }
}
