/* LGA Teacher Management - frontend. Everything is namespaced with .lga-tm / .lga-tm-profile / .lga-tm-modal */
.lga-tm,.lga-tm-profile{--lga-primary:#067252;--lga-primary-soft:rgba(6,114,82,.1);--lga-primary-dark:#055640;--lga-heading:#111827;--lga-text:#4b5563;--lga-card:#fff;--lga-radius:18px;--lga-body:15px;--lga-h:34px;--lga-shadow:0 6px 24px rgba(16,24,40,.08);--lga-aspect:14/13;--lga-img-h:auto}
.lga-tm{box-sizing:border-box;width:100%;max-width:1240px;margin:0 auto;padding:40px 16px;color:var(--lga-text);font-size:var(--lga-body);line-height:1.6;background:var(--lga-section,transparent);overflow-wrap:anywhere}
.lga-tm *,.lga-tm *::before,.lga-tm *::after,.lga-tm-profile *,.lga-tm-profile *::before,.lga-tm-profile *::after{box-sizing:border-box}
.lga-tm [hidden],.lga-tm-profile [hidden]{display:none!important}
.lga-tm-sr{position:absolute!important;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.lga-tm-ico{display:block;flex:none}

/* Heading */
.lga-tm__head{text-align:center;margin:0 auto 40px;max-width:820px}
.lga-tm__badge{display:inline-flex;align-items:center;gap:8px;padding:8px 16px;border-radius:999px;background:var(--lga-primary-soft);color:var(--lga-primary);font-weight:700;font-size:.85em;letter-spacing:.06em;text-transform:uppercase;line-height:1}
.lga-tm__badge .lga-tm-ico{animation:lga-tm-float 3s ease-in-out infinite}
.lga-tm__title{margin:14px 0 12px!important;font-size:var(--lga-h)!important;line-height:1.2!important;font-weight:800;color:var(--lga-heading)!important;text-wrap:balance}
.lga-tm__desc{margin:0 auto!important;max-width:760px;color:#6b7280;font-size:1.05em;line-height:1.7}

/* Filters */
.lga-tm__filters{display:flex;flex-wrap:wrap;gap:12px;justify-content:center;align-items:center;margin:0 0 30px}
.lga-tm__field{flex:1 1 200px;max-width:280px}
.lga-tm__filters input[type=search],.lga-tm__filters select{width:100%;height:46px;padding:0 14px;border:1px solid #d1d5db;border-radius:10px;background:#fff;color:#1f2937;font-size:15px;line-height:1.2;box-shadow:none}
.lga-tm__filters input:focus,.lga-tm__filters select:focus,.lga-tm__more:focus-visible,.lga-tm__soc:focus-visible,.lga-tm__loadmore:focus-visible,.lga-tm__page:focus-visible{outline:3px solid var(--lga-primary-soft);outline-offset:2px;border-color:var(--lga-primary)}
.lga-tm__check{display:inline-flex;align-items:center;gap:8px;font-weight:600;color:var(--lga-heading);cursor:pointer}

/* Grid */
.lga-tm__grid{display:grid;gap:30px;grid-template-columns:repeat(3,minmax(0,1fr));align-items:stretch}
.lga-tm--cols-1 .lga-tm__grid{grid-template-columns:minmax(0,1fr);max-width:520px;margin:0 auto}
.lga-tm--cols-2 .lga-tm__grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.lga-tm--cols-3 .lga-tm__grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.lga-tm--cols-4 .lga-tm__grid{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:1100px){.lga-tm--cols-3 .lga-tm__grid,.lga-tm--cols-4 .lga-tm__grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:700px){.lga-tm .lga-tm__grid,.lga-tm--cols-2 .lga-tm__grid,.lga-tm--cols-3 .lga-tm__grid,.lga-tm--cols-4 .lga-tm__grid{grid-template-columns:minmax(0,1fr);max-width:520px;margin-left:auto;margin-right:auto}.lga-tm{padding:28px 14px}.lga-tm__field{max-width:none;flex-basis:100%}}

/* Card */
.lga-tm__card{display:flex;flex-direction:column;min-width:0;background:var(--lga-card);border-radius:var(--lga-radius);box-shadow:var(--lga-shadow);overflow:hidden;transition:transform .35s ease,box-shadow .35s ease}
.lga-tm--bordered .lga-tm__card{border:1px solid #e5e7eb;box-shadow:none}
.lga-tm--flat .lga-tm__card{background:#f3f6f5;box-shadow:none}
.lga-tm__photo{position:relative;width:100%;aspect-ratio:var(--lga-aspect);height:var(--lga-img-h);overflow:hidden;background:#eef2f1}
.lga-tm__img{display:block;width:100%!important;height:100%!important;max-width:none!important;object-fit:cover;object-position:center top;transition:transform .6s ease;margin:0!important;border-radius:0!important}
.lga-tm__ph{display:flex;align-items:center;justify-content:center;width:100%;height:100%;min-height:160px;font-size:56px;font-weight:700;color:var(--lga-primary);background:var(--lga-primary-soft)}
.lga-tm__body{display:flex;flex-direction:column;flex:1 1 auto;padding:26px 26px 24px}
.lga-tm__name{margin:0 0 6px!important;text-align:center;font-size:1.45em!important;line-height:1.25!important;font-weight:700;color:var(--lga-heading)!important}
.lga-tm__role{margin:0 0 18px!important;text-align:center;color:var(--lga-primary);font-weight:600;font-size:.95em;line-height:1.4}
.lga-tm__bio{margin:0 0 18px!important;min-height:4.8em;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden;color:var(--lga-text);line-height:1.6}
.lga-tm__more{display:inline-flex;align-self:center;align-items:center;gap:8px;margin:0 0 16px;padding:6px 4px;border:0;background:none;box-shadow:none;color:var(--lga-primary)!important;font:inherit;font-weight:700;letter-spacing:.02em;text-decoration:none!important;cursor:pointer;border-radius:6px}
.lga-tm__more .lga-tm-ico{transition:transform .25s ease}
.lga-tm__more:hover .lga-tm-ico,.lga-tm__more:focus-visible .lga-tm-ico{transform:translateX(4px)}
.lga-tm__more:hover{color:var(--lga-primary-dark)!important;background:none}
.lga-tm__badges{display:flex;flex-wrap:wrap;justify-content:center;gap:10px;margin:0 0 18px}
.lga-tm__badges--left{justify-content:flex-start;margin-bottom:14px}
.lga-tm__badge-item{display:inline-flex;align-items:center;gap:7px;padding:6px 12px;border:1px solid #e5e7eb;border-radius:8px;background:#f9fafb;color:#374151;font-size:.82em;font-weight:600;line-height:1.2}
.lga-tm__badge-item .lga-tm-ico{color:var(--lga-primary)}
.lga-tm__foot{display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:12px;margin-top:auto;padding-top:18px;border-top:1px solid #eef0f2;min-height:78px}
.lga-tm__foot--plain{margin-top:6px;border-top:0;min-height:0;justify-content:flex-start;padding-top:6px}
.lga-tm__soc{position:relative;display:inline-flex;align-items:center;justify-content:center;width:42px;height:42px;border:1px solid #e5e7eb;border-radius:50%;background:#f3f4f6;color:#374151!important;text-decoration:none!important;transition:background .25s ease,color .25s ease,transform .25s ease,border-color .25s ease}
.lga-tm__soc:hover,.lga-tm__soc:focus-visible{background:var(--lga-primary);border-color:var(--lga-primary);color:#fff!important;transform:translateY(-3px)}
.lga-tm__soc::after{content:attr(data-tip);position:absolute;bottom:calc(100% + 8px);left:50%;transform:translateX(-50%) translateY(4px);padding:4px 9px;border-radius:6px;background:#111827;color:#fff;font-size:12px;line-height:1.3;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .2s,transform .2s;z-index:3}
.lga-tm__soc:hover::after,.lga-tm__soc:focus-visible::after{opacity:1;transform:translateX(-50%) translateY(0)}

/* Hover effects */
.lga-tm--hover .lga-tm__card:hover{transform:translateY(-6px);box-shadow:0 18px 40px rgba(16,24,40,.16)}
.lga-tm--hover .lga-tm__card:hover .lga-tm__img{transform:scale(1.05)}

/* Entrance animation (applied only after JS adds --ready, so it never hides content without JS) */
.lga-tm--anim.lga-tm--ready .lga-tm__card{opacity:0;transform:translateY(26px);transition:opacity .6s ease,transform .6s ease,box-shadow .35s ease}
.lga-tm--anim.lga-tm--ready .lga-tm__card.is-visible{opacity:1;transform:none}
.lga-tm--anim.lga-tm--ready.lga-tm--hover .lga-tm__card.is-visible:hover{transform:translateY(-6px)}
@keyframes lga-tm-float{0%,100%{transform:translateY(0)}50%{transform:translateY(-3px)}}

/* Empty / pager */
.lga-tm__empty{margin:10px auto 0!important;padding:40px 20px;max-width:560px;text-align:center;border:2px dashed #d1d5db;border-radius:14px;color:#6b7280}
.lga-tm__pager{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:34px}
.lga-tm__pager:empty{display:none}
.lga-tm__loadmore,.lga-tm__page{min-width:44px;min-height:44px;padding:0 20px;border:1px solid var(--lga-primary);border-radius:999px;background:#fff;color:var(--lga-primary);font:inherit;font-weight:700;cursor:pointer;transition:background .2s,color .2s,transform .2s}
.lga-tm__page{padding:0 12px;border-radius:10px}
.lga-tm__loadmore:hover,.lga-tm__page:hover,.lga-tm__page[aria-current=page]{background:var(--lga-primary);color:#fff}
.lga-tm__loadmore:hover{transform:translateY(-2px)}

/* Modal */
.lga-tm-modal{position:fixed;inset:0;z-index:999999;display:flex;align-items:center;justify-content:center;padding:16px;opacity:0;transition:opacity .25s ease}
.lga-tm-modal[hidden]{display:none}
.lga-tm-modal.is-open{opacity:1}
.lga-tm-modal__backdrop{position:absolute;inset:0;background:rgba(17,24,39,.6)}
.lga-tm-modal__dialog{position:relative;width:100%;max-width:880px;max-height:92vh;overflow-y:auto;overflow-x:hidden;background:#fff;border-radius:18px;box-shadow:0 30px 80px rgba(0,0,0,.35);transform:translateY(24px) scale(.98);transition:transform .3s ease;-webkit-overflow-scrolling:touch;outline:0}
.lga-tm-modal.is-open .lga-tm-modal__dialog{transform:none}
.lga-tm-modal__close{position:absolute;top:12px;right:12px;z-index:5;width:42px;height:42px;border:0;border-radius:50%;background:rgba(255,255,255,.95);color:#111827;font-size:28px;line-height:1;cursor:pointer;box-shadow:0 2px 10px rgba(0,0,0,.2);padding:0}
.lga-tm-modal__close:hover,.lga-tm-modal__close:focus-visible{background:#067252;color:#fff;outline:0}
html.lga-tm-lock,html.lga-tm-lock body{overflow:hidden}

/* Profile (page + modal) */
.lga-tm-profile{width:100%;max-width:960px;margin:0 auto;color:var(--lga-text);font-size:var(--lga-body);line-height:1.75;overflow-wrap:anywhere}
.lga-tm-profile--modal{max-width:none}
.lga-tm-profile--single{padding:24px 16px 48px}
.lga-tm-profile__crumbs ol{display:flex;flex-wrap:wrap;gap:6px;list-style:none;margin:0 0 20px;padding:0;font-size:.9em}
.lga-tm-profile__crumbs li+li::before{content:"/";margin-right:6px;color:#9ca3af}
.lga-tm-profile__crumbs a{color:var(--lga-primary);text-decoration:none}
.lga-tm-profile__banner{border-radius:var(--lga-radius) var(--lga-radius) 0 0;overflow:hidden;max-height:300px}
.lga-tm-profile--modal .lga-tm-profile__banner{border-radius:0}
.lga-tm-profile__banner img{display:block;width:100%;height:260px;object-fit:cover}
.lga-tm-profile__head{position:relative;display:flex;gap:30px;align-items:center;padding:30px;background:#f6faf8;border-radius:var(--lga-radius)}
.lga-tm-profile--banner .lga-tm-profile__head{border-radius:0 0 var(--lga-radius) var(--lga-radius)}
.lga-tm-profile--modal .lga-tm-profile__head{border-radius:0;padding:44px 30px 30px}
.lga-tm-profile--behind .lga-tm-profile__head,.lga-tm-profile--overlay .lga-tm-profile__head{background-image:var(--lga-bg-img);background-size:cover;background-position:center;overflow:hidden;isolation:isolate}
.lga-tm-profile--behind .lga-tm-profile__head::before,.lga-tm-profile--overlay .lga-tm-profile__head::before{content:"";position:absolute;inset:0;z-index:-1}
.lga-tm-profile--behind .lga-tm-profile__head::before{background:rgba(255,255,255,.88)}
.lga-tm-profile--overlay .lga-tm-profile__head::before{background:linear-gradient(135deg,rgba(6,60,45,.88),rgba(6,114,82,.72))}
.lga-tm-profile--overlay .lga-tm-profile__name,.lga-tm-profile--overlay .lga-tm-profile__role,.lga-tm-profile--overlay .lga-tm-profile__chips li{color:#fff!important}
.lga-tm-profile--overlay .lga-tm-profile__chips li{background:rgba(255,255,255,.18)}
.lga-tm-profile__photos{flex:0 0 230px;max-width:230px}
.lga-tm-profile--banner .lga-tm-profile__photos{margin-top:-80px}
.lga-tm-profile__photo{aspect-ratio:4/5;overflow:hidden;border-radius:16px;border:4px solid #fff;background:#eef2f1;box-shadow:0 8px 24px rgba(16,24,40,.15)}
.lga-tm-profile__img{display:block;width:100%!important;height:100%!important;max-width:none!important;object-fit:cover;object-position:center top;margin:0!important}
.lga-tm-profile__photo .lga-tm__ph{font-size:64px}
.lga-tm-profile__alt{width:90px;aspect-ratio:1/1;margin-top:12px;overflow:hidden;border-radius:12px;border:3px solid #fff;box-shadow:0 4px 12px rgba(16,24,40,.15)}
.lga-tm-profile__info{flex:1 1 auto;min-width:0}
.lga-tm-profile__name{margin:0 0 6px!important;font-size:2em!important;line-height:1.2!important;font-weight:800;color:var(--lga-heading)!important}
.lga-tm-profile__role{margin:0 0 12px!important;color:var(--lga-primary);font-weight:700;font-size:1.1em}
.lga-tm-profile__chips{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 14px!important;padding:0!important;list-style:none!important}
.lga-tm-profile__chips li{margin:0!important;padding:4px 12px;border-radius:999px;background:var(--lga-primary-soft);color:var(--lga-primary);font-size:.85em;font-weight:600}
.lga-tm-profile__content{padding:30px 6px 0}
.lga-tm-profile--modal .lga-tm-profile__content{padding:26px 30px 34px}
.lga-tm-profile__content section{margin:0 0 28px}
.lga-tm-profile__content h3,.lga-tm-profile__related h3{margin:0 0 12px!important;padding-left:12px;border-left:4px solid var(--lga-primary);font-size:1.25em!important;line-height:1.3!important;color:var(--lga-heading)!important}
.lga-tm-profile__text p{margin:0 0 1em}
.lga-tm-profile__text ul,.lga-tm-profile__text ol{margin:0 0 1em 1.4em}
.lga-tm-profile__facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px;margin:0}
.lga-tm-profile__facts div{padding:14px 16px;border-radius:12px;background:#f6faf8}
.lga-tm-profile__facts dt{font-size:.8em;text-transform:uppercase;letter-spacing:.05em;color:#6b7280;font-weight:700}
.lga-tm-profile__facts dd{margin:2px 0 0;color:var(--lga-heading);font-weight:600}
.lga-tm-profile__related{margin-top:30px}
.lga-tm-profile__related .lga-tm{padding:10px 0 0}
@media (max-width:700px){
.lga-tm-profile__head{flex-direction:column;text-align:center;padding:24px 18px}
.lga-tm-profile--modal .lga-tm-profile__head{padding-top:50px}
.lga-tm-profile__photos{flex-basis:auto;width:200px;max-width:100%}
.lga-tm-profile--banner .lga-tm-profile__photos{margin-top:-70px}
.lga-tm-profile__alt{margin-left:auto;margin-right:auto}
.lga-tm-profile__chips,.lga-tm__badges--left,.lga-tm__foot--plain{justify-content:center}
.lga-tm-profile__name{font-size:1.6em!important}
.lga-tm-profile--modal .lga-tm-profile__content{padding:20px 18px 28px}
.lga-tm-profile__banner img{height:170px}
}

/* Reduced motion: no animation at all */
@media (prefers-reduced-motion:reduce){
.lga-tm *,.lga-tm-modal,.lga-tm-modal *{animation:none!important;transition:none!important}
.lga-tm--anim.lga-tm--ready .lga-tm__card{opacity:1!important;transform:none!important}
.lga-tm--hover .lga-tm__card:hover,.lga-tm--hover .lga-tm__card:hover .lga-tm__img{transform:none!important}
}
