/*
 Theme Name:     Divi Child
 Description:    Child theme for Divi
 Template:       Divi
 Version:        2.0.0 (Cleaned & Consolidated)
*/

/* =========================================================
   GLOBAL BASE
========================================================= */

:root{
  --ts-primary:#28a4a4;
  --ts-primary-dark:#1e7b7b;
  --ts-soft:#e6f5f5;
  --ts-secondary:#c1f0f0;
  --ts-secondary-dark:#2db9b9;
}

body{
  overflow-x:hidden;
}

/* Reduce header/content spacing */
#main-content .container{
  padding-top:10px;
}

h1{
  margin-top:10px;
}

/* Mobile heading */
@media (max-width:600px){
  h1{ font-size:28px; line-height:1.2; }
}

body:not(.et-tb) #main-content .container,
body:not(.et-tb-has-header) #main-content .container{
  padding-top:30px;
}

/* Ensure BuddyPress notices are visible on register */
.buddypress.register .bp-feedback,
.buddypress.register #bp-feedback,
.buddypress.register .bp-template-notice {
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  margin:12px 0 !important;
}

.buddypress.register .bp-feedback p {
  margin:0 !important;
}

/* =========================================================
   RESOURCE LIBRARY — STRUCTURED CLEAN VERSION
========================================================= */

.ts-rl,
.ts-page-head{
  max-width:1280px;
  margin:0 auto;
}

/* Grid */
.ts-rl__grid{
  display:grid;
  gap:14px;
  grid-template-columns:repeat(4,minmax(0,1fr));
}

@media (max-width:1100px){
  .ts-rl__grid{ grid-template-columns:repeat(3,1fr); }
}
@media (max-width:980px){
  .ts-rl__grid{ grid-template-columns:repeat(2,1fr); }
}
@media (max-width:640px){
  .ts-rl__grid{ grid-template-columns:1fr; }
}

/* Card */
.ts-rl__card{
  display:flex;
  flex-direction:column;
  border-radius:8px;
  overflow:hidden;
  background:#fff;
  border:2px solid rgba(40, 164, 164);
  transition:transform .18s ease, box-shadow .18s ease;
}

.ts-rl__card:hover{
  transform:translateY(-3px);
  box-shadow:0 12px 28px rgba(0,0,0,.08);
}

/* Resource card thumbnail wrapper */
.ts-rl__thumb {
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  aspect-ratio:4 / 5;
  overflow:hidden;
  background:#f6f7f9;
  border-radius:12px;
}

/* Thumbnail image */
.ts-rl__thumb-img {
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  display:block;
  border-radius:12px;
}

/* Body */
.ts-rl__body{
  padding:12px 14px 14px;
}

.ts-rl__title{
  margin:8px 0 0;
  font-size:13px;
  line-height:1.3;
  display:-webkit-box;
  -webkit-line-clamp:4;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.ts-rl__meta{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:8px;
}

.ts-rl__badge{
  display:inline-flex;
  align-items:center;
  padding:2px 3px;
  font-size:12px;
  font-weight:500;
  border-radius:6px;
  border:1px solid rgba(0,0,0,0.08);
  background:#f2f4f7;
}

.ts-rl__date{
  font-size:13px;
  opacity:.75;
}

/* New wrapper item (optional, mostly for spacing control) */
.ts-rl__item{
  display:flex;
  flex-direction:column;
}

/* =========================================================
   Resource preview fallback (no thumbnail) + file-type styling
========================================================= */

/* Base fallback tile (used when no image exists) */
.ts-rl__thumb-fallback{
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  text-align:center;
  background:var(--ts-soft);
  border-radius:8px;
  padding:12px;
}

/* Base file badge */
.ts-rl__file-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:74px;
  height:44px;
  padding:0 16px;
  border-radius:999px;
  font-size:14px;
  font-weight:800;
  letter-spacing:.06em;
  color:#fff;
  background:var(--ts-primary);
  box-shadow:0 10px 22px rgba(0,0,0,.12);
}

/* PPT / PPTX: special “preview tile” look */
.ts-rl__card.is-ext-ppt .ts-rl__thumb,
.ts-rl__card.is-ext-pptx .ts-rl__thumb{
  background:#eef2f7;
}

.ts-rl__card.is-ext-ppt .ts-rl__thumb-fallback,
.ts-rl__card.is-ext-pptx .ts-rl__thumb-fallback{
  background:linear-gradient(135deg,var(--ts-secondary),var(--ts-secondary-dark));
}

/* PPT/PPTX tile text */
.ts-rl__card.is-ext-ppt .ts-rl__file-type,
.ts-rl__card.is-ext-pptx .ts-rl__file-type,
.ts-rl__card.is-ext-ppt .ts-rl__file-brand,
.ts-rl__card.is-ext-pptx .ts-rl__file-brand{
  color:#0f2d4a;
}

.ts-rl__card.is-ext-ppt .ts-rl__file-icon,
.ts-rl__card.is-ext-pptx .ts-rl__file-icon{
  background:rgba(255,255,255,0.15);
  color:#fff;
  box-shadow:none;
}

/* Back to Resources button */
.ts-back-resources-btn{
  display: inline-block;
  margin: 0 0 18px 0;
  padding: 10px 18px;
  border: 1px solid #6ea0d6;
  border-radius: 999px;
  background: #eef6ff;
  color: #4f8fd1;
  font-weight: 600;
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  transition: all .2s ease;
}

.ts-back-resources-btn:hover{
  background: #e3f0ff;
  color: #3f7fc2;
  border-color: #5b8fc9;
}

/* =========================================================
   BUDDYPRESS — ACTIVITY PAGE CLEAN VERSION
========================================================= */

body.buddypress.activity #buddypress{
  max-width:1248px;
  margin:0 auto;
  padding:0 16px;
}

/* Composer */
body.buddypress.activity form#whats-new-form{
  border:1px solid rgba(0,140,130,.25);
  border-radius:14px;
  background:rgba(0,140,130,.06);
  padding:16px;
}

@media (hover:hover){
  body.buddypress.activity ul.activity-list > li.activity-item:hover{
    transform:translateY(-2px);
    box-shadow:0 8px 22px rgba(0,0,0,.07);
  }
}

/* Avatar */
body.buddypress.activity .activity-avatar{
  width:48px;
  min-width:48px;
}

body.buddypress.activity .activity-avatar img{
  width:44px;
  height:44px;
  border-radius:999px;
  object-fit:cover;
}

/* Content */
body.buddypress.activity .activity-content{
  flex:1 1 auto;
  min-width:0;
}

/* =========================================================
   BBPRESS — CLEAN CARD STYLE
========================================================= */

#bbpress-forums li.bbp-body ul.forum,
#bbpress-forums ul.bbp-topics li.bbp-body ul.topic{
  margin:0 0 14px;
  padding:16px;
  border:1px solid rgba(0,140,130,.25);
  border-radius:14px;
  background:rgba(0,140,130,.06);
  transition:.18s ease;
}

#bbpress-forums li.bbp-body ul.forum:hover,
#bbpress-forums ul.bbp-topics li.bbp-body ul.topic:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 22px rgba(0,0,0,.07);
}

/* =========================================================
   HOMEPAGE ACTIVITY PREVIEW
========================================================= */

.ts-activity-preview .ts-activity-card{
  position:relative;
  overflow:hidden;
  padding:20px;
  border-radius:14px;
  background:#fff;
}

/* =========================================================
   Home landing page ONLY – Activity snippet card
========================================================= */

.page-id-501 .ts-activity-card{
  position:relative;
  display:block;
  padding:4px 18px 6px 18px;
  border:1px solid rgba(0,0,0,.08);
  border-radius:14px;
  background:#fff;
  box-shadow:0 10px 26px rgba(0,0,0,.08);
  max-width:560px;
  margin:12px 0 18px;
}

.page-id-501 .ts-activity-card{
  border-left:5px solid rgba(25,180,185,.55);
}

.page-id-501 .ts-activity-card::before{
  content:"LIVE FROM THE COMMUNITY";
  display:inline-flex;
  align-items:center;
  padding-left:18px;
  font-weight:800;
  font-size:12px;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#0e6f73;
  margin-bottom:10px;
}

.page-id-501 .ts-activity-card::after{
  content:"";
  position:absolute;
  top:12px;
  left:18px;
  width:9px;
  height:9px;
  border-radius:50%;
  background:#19b4b9;
  box-shadow:0 0 0 5px rgba(25,180,185,.18);
}

.page-id-501 .ts-activity-card__content p{
  margin:0;
  font-size:16px;
  line-height:1.45;
  color:rgba(0,0,0,.78);
}

.page-id-501 .ts-activity-card__content p::before{
  content:"“";
  font-size:26px;
  line-height:0;
  vertical-align:-5px;
  margin-right:4px;
  opacity:.25;
}
.page-id-501 .ts-activity-card__content p::after{
  content:"”";
  font-size:26px;
  line-height:0;
  vertical-align:-5px;
  margin-left:4px;
  opacity:.25;
}

@media (max-width:600px){
  .ts-activity-preview .ts-activity-card.is-logged-out{
    min-height:320px;
  }
}

.ts-activity-preview .ts-activity-card__cta{
  position:absolute;
  inset:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  text-align:center;
  padding:18px;
}

.page-id-501 .ts-activity-card.is-logged-out{
  position:relative;
  overflow:hidden;
  padding-bottom:90px;
}

.page-id-501 .ts-activity-card.is-logged-out .ts-activity-card__overlay{
  position:absolute;
  inset:0;
  background:rgba(255,255,255,.25);
  backdrop-filter:blur(2px);
  z-index:1;
}

.page-id-501 .ts-activity-card.is-logged-out .ts-activity-card__cta{
  position:absolute;
  inset:0;
  z-index:2;
  display:flex;
  flex-direction:column;
  padding:20px 20px 18px;
  text-align:center;
  pointer-events:none;
}

.page-id-501 .ts-activity-card.is-logged-out .ts-activity-card__cta-actions a{
  pointer-events:auto;
}

.page-id-501 .ts-activity-card.is-logged-out .ts-activity-card__cta-actions{
  margin-top:auto;
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
  padding-top:14px;
}

@media (max-width: 480px){
  .page-id-501 .ts-activity-card.is-logged-out .ts-activity-card__cta-actions{
    flex-direction:column;
    align-items:center;
  }
  .page-id-501 .ts-activity-card.is-logged-out .ts-activity-card__cta-actions a{
    width:min(260px, 100%);
  }
}

/* =========================================================
   CONTACT SECTION
========================================================= */

.ts-contact{
  background:#e6f5f5;
  padding:70px 0 80px;
}

.ts-contact .et_pb_contact_form_container{
  background:#fff;
  border-radius:18px;
  padding:30px;
  box-shadow:0 18px 40px rgba(0,0,0,.08);
}

.ts-contact .et_pb_contact_submit{
  border-radius:999px;
  background:var(--ts-primary);
  font-weight:700;
  padding:8px 14px;
}

.ts-contact .et_pb_contact_submit:hover{
  background:var(--ts-primary-dark);
}

/* =========================================================
   FIX: Resource Hub / Resource Library (restore layout + polish)
========================================================= */

/* --- Page head (Resource Hub title area) --- */
.ts-page-head{
  max-width:1280px;
  margin:20px auto 10px;
  padding:0 16px;
}
.ts-page-title{
  font-size:42px;
  font-weight:700;
  line-height:1.15;
  margin:0 0 10px;
}
.ts-page-sub{
  margin:0 0 8px;
  opacity:.85;
  font-size:18px;
}
.ts-page-sub-a{
  margin:0 0 10px;
  opacity:.95;
  font-size:16px;
}
.ts-page-sub-b{
  margin:0 0 12px;
  opacity:.95;
  font-size:14px;
  line-height:1.4;
}
.ts-page-actions{ margin:0 0 12px; }

@media (max-width: 600px){
  .ts-page-title{ font-size:28px; }
}

.ts-rl{
  max-width:1280px;
  margin:0 auto;
  padding:18px 16px 22px;
  border-radius:18px;
  background:#fff;
  box-sizing:border-box;
}

.ts-rl__intro{
  margin:0 0 14px;
  padding:12px 14px;
  border:1px solid rgba(0,0,0,.12);
  border-radius:12px;
  background:#fff;
}
.ts-rl__intro p{ margin:0; }

.ts-rl__controls{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  margin:0 0 14px;
}

.ts-rl__search{
  display:flex;
  gap:8px;
  flex:1 1 360px;
  min-width:260px;
}
.ts-rl__search input{
  flex:1 1 auto;
  min-width:0;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.18);
  background:#fff;
  box-sizing:border-box;
}
.ts-rl__search button{
  padding:10px 14px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.18);
  background:#fff;
  cursor:pointer;
}

.ts-rl__filter select{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid rgba(0,0,0,.18);
  background:#fff;
  box-sizing:border-box;
}

.ts-rl-tabs{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:0 0 14px;
}
.ts-rl-tab{
  display:inline-block;
  padding:8px 14px;
  border-radius:999px;
  border:1px solid rgba(43,108,176,0.35);
  background:#fff;
  text-decoration:none;
  line-height:1;
  font-weight:500;
}
.ts-rl-tab:hover{
  border-color:rgba(43,108,176,0.7);
  background:rgba(43,108,176,0.08);
}
.ts-rl-tab.is-active{
  background:rgba(43,108,176,0.12);
  border-color:rgba(43,108,176,0.75);
}

.ts-rl__pagination ul{
  display:flex;
  gap:8px;
  list-style:none;
  padding:0;
  margin:18px 0 0;
  flex-wrap:wrap;
}
.ts-rl__pagination a,
.ts-rl__pagination span{
  display:inline-block;
  padding:8px 12px;
  border:1px solid rgba(0,0,0,.15);
  border-radius:10px;
  text-decoration:none;
  background:#fff;
}
.ts-rl__pagination .current{ font-weight:600; }

@media (max-width: 600px){
  .ts-rl__search{
    flex-direction:column;
    width:100%;
    min-width:0;
  }
  .ts-rl__search input,
  .ts-rl__search button,
  .ts-rl__filter select{
    width:100%;
  }
}

/* =========================================================
   RESTORE: Teachers’ Lounge — BuddyPress Activity (/activity/)
========================================================= */

body.buddypress.activity .page-title,
body.buddypress.activity h1.entry-title,
body.buddypress.activity .et_post_meta_wrapper{
  display:none !important;
}

body.buddypress.activity{
  --ts-surface: rgba(40,164,164,0.08);
  --ts-surface-2:#f6f8f8;
  --ts-border: rgba(40,164,164,0.25);
  --ts-text: rgba(0,0,0,.84);
  --ts-muted: rgba(0,0,0,.62);
  --ts-shadow: 0 1px 0 rgba(0,0,0,0.03);
  --ts-radius: 14px;
}

body.buddypress.activity #buddypress{
  background:var(--ts-surface-2) !important;
  border-radius:var(--ts-radius);
  padding:18px 14px !important;
}

body.buddypress.activity #whats-new-form::before{
  content:"Share With The Community";
  display:block;
  font-size:22px;
  font-weight:700;
  margin:26px 0 14px;
  padding-top:18px;
  border-top:1px solid rgba(0,0,0,.08);
  color:rgba(0,0,0,.85);
}

body.buddypress.activity #whats-new-form{
  background:var(--ts-surface) !important;
  border:1px solid var(--ts-border) !important;
  border-radius:var(--ts-radius) !important;
  box-shadow:var(--ts-shadow) !important;
  padding:16px !important;
  margin-bottom:16px !important;
}

body.buddypress.activity #whats-new-textarea textarea,
body.buddypress.activity #whats-new{
  border-radius:10px !important;
  border:1px solid var(--ts-border) !important;
  background:#fff !important;
}

body.buddypress.activity #aw-whats-new-submit,
body.buddypress.activity #buddypress input[type="submit"],
body.buddypress.activity #buddypress button[type="submit"]{
  background:#28a4a4 !important;
  border-radius:10px !important;
  font-weight:700 !important;
}
body.buddypress.activity #aw-whats-new-submit:hover,
body.buddypress.activity #buddypress input[type="submit"]:hover,
body.buddypress.activity #buddypress button[type="submit"]:hover{
  background:#1e7b7b !important;
}

body.buddypress.activity .activity-list::before{
  content:"Live Community Feed";
  display:block;
  font-size:22px;
  font-weight:700;
  margin:26px 0 14px;
  padding-top:20px;
  border-top:1px solid rgba(0,0,0,.08);
  color:rgba(0,0,0,.85);
}

body.buddypress.activity .activity-list .activity-item{
  background:var(--ts-surface) !important;
  border:1px solid var(--ts-border) !important;
  border-radius:var(--ts-radius) !important;
  box-shadow:var(--ts-shadow) !important;
  padding:16px 16px 12px !important;
  margin-bottom:14px !important;
}

body.buddypress.activity .activity-header{
  color:var(--ts-muted) !important;
  font-size:14px !important;
  margin-bottom:8px !important;
}
body.buddypress.activity .activity-header a{
  color:var(--ts-text) !important;
  font-weight:800 !important;
  text-decoration:none !important;
}
body.buddypress.activity .activity-header a:hover{
  text-decoration:underline !important;
}

body.buddypress.activity .activity-inner{
  color:var(--ts-text) !important;
  font-size:16px !important;
  line-height:1.55 !important;
}

body.buddypress.activity .activity-meta{
  border-top:1px solid var(--ts-border) !important;
  margin-top:10px !important;
  padding-top:10px !important;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
body.buddypress.activity .activity-meta a,
body.buddypress.activity .activity-meta button{
  border:1px solid var(--ts-border) !important;
  border-radius:999px !important;
  padding:6px 10px !important;
  font-size:13px !important;
  color:var(--ts-muted) !important;
  background:transparent !important;
  text-decoration:none !important;
}
body.buddypress.activity .activity-meta a:hover,
body.buddypress.activity .activity-meta button:hover{
  color:#1e7b7b !important;
  border-color:rgba(30,123,123,.35) !important;
  background:rgba(40,164,164,.06) !important;
}

body.buddypress.activity .activity-comments .acomment-content{
  background:rgba(0,0,0,.02) !important;
  border:1px solid rgba(0,0,0,.06) !important;
  border-radius:10px !important;
  padding:10px 12px !important;
}

body.buddypress.activity .activity-avatar img,
body.buddypress.activity .acomment-avatar img{
  border-radius:999px !important;
}

body.buddypress.activity #buddypress #activity-stream .activity-avatar{
  float:none !important;
  margin:0 !important;
  width:48px !important;
  min-width:48px !important;
  flex:0 0 48px !important;
}
body.buddypress.activity #buddypress #activity-stream .activity-content{
  margin-left:0 !important;
  float:none !important;
  flex:1 1 auto;
  min-width:0;
}
body.buddypress.activity #buddypress #activity-stream .activity-avatar img.avatar{
  width:44px !important;
  height:44px !important;
  max-width:none !important;
  object-fit:cover;
  border-radius:999px !important;
}
@media (max-width:520px){
  body.buddypress.activity #buddypress #activity-stream ul.activity-list > li.activity-item{
    flex-direction:column;
  }
  body.buddypress.activity #buddypress #activity-stream .activity-avatar{
    width:auto !important;
    min-width:0 !important;
    flex:0 0 auto !important;
  }
}

.buddypress.register #main-content .container:before {
  display:none !important;
}
.buddypress.register #left-area {
  width:100% !important;
  float:none !important;
  padding-right:0 !important;
}
.buddypress.register #sidebar {
  display:none !important;
}

body.buddypress.activity #sidebar{ display:none !important; }
body.buddypress.activity #left-area{ width:100% !important; float:none !important; }
body.buddypress.activity #content-area{ float:none !important; }

@media (min-width:981px){
  body.buddypress.activity #main-content .container::before{
    display:none !important;
    content:none !important;
  }
}

/* =========================================================
   BuddyPress Activity — restore vertical stacking
========================================================= */

body.buddypress.activity #buddypress #activity-stream li.activity-item{
  display:block !important;
}

body.buddypress.activity #buddypress #activity-stream li.activity-item .activity-avatar{
  float:left !important;
  width:48px !important;
  margin:0 14px 0 0 !important;
}

body.buddypress.activity #buddypress #activity-stream li.activity-item .activity-content{
  margin-left:62px !important;
  min-width:0 !important;
}

body.buddypress.activity #buddypress #activity-stream li.activity-item .activity-comments li{
  display:block !important;
  width:100% !important;
  margin:0 0 12px !important;
  padding:0 !important;
}

body.buddypress.activity #buddypress #activity-stream .activity-comments .acomment-avatar{
  float:left !important;
  width:32px !important;
  margin:0 10px 0 0 !important;
}

body.buddypress.activity #buddypress #activity-stream .activity-comments .acomment-avatar img{
  width:32px !important;
  height:32px !important;
  border-radius:999px !important;
  display:block !important;
}

/* Mobile */
@media (max-width: 640px){
  body.buddypress.activity #buddypress #activity-stream li.activity-item .activity-avatar{
    width:40px !important;
    margin-right:10px !important;
  }

  body.buddypress.activity #buddypress #activity-stream li.activity-item .activity-content{
    margin-left:50px !important;
  }
}

body.buddypress.activity .buddypress-wrap .activity-comments .acomment-content p {
  margin-bottom:0 !important;
}

/* Hide duplicate bare Spam link on activity replies and updates */
body.buddypress.activity #buddypress .activity-meta.action > a.spam-activity-comment.confirm,
body.buddypress.activity #buddypress .activity-meta.action > a.spam-activity.confirm{
  display:none !important;
}

/* Buttons (shared) */
.ts-btn{
  display:inline-block;
  text-decoration:none;
  border-radius:10px;
  padding:10px 14px;
  font-weight:600;
}

.ts-btn--primary{
  background:var(--ts-primary);
  color:#fff !important;
}

.ts-btn--primary:hover{
  background:var(--ts-primary-dark);
}

.ts-btn--link{
  background:transparent;
  color:var(--ts-primary-dark) !important;
  border:1px solid rgba(30,123,123,.25);
}

.ts-btn--link:hover{
  border-color:rgba(30,123,123,.45);
}

/* =========================================================
   RESTORE: bbPress — full width (remove Divi sidebar)
========================================================= */
body.bbpress #sidebar{ display:none !important; }
body.bbpress #left-area{
  width:100% !important;
  float:none !important;
}
@media (min-width:981px){
  body.bbpress #main-content .container::before{
    display:none !important;
    content:none !important;
  }
}

/* =========================================================
   RESTORE: bbPress — State room links as pill buttons
========================================================= */
/* =========================================================
   bbPress — Subforum pills as 4-wide “cards”
========================================================= */

#bbpress-forums .bbp-forum-info ul.bbp-forums-list{
  list-style:none !important;
  align-items:stretch !important;
  margin:12px 0 0 !important;
  padding:0 !important;
  border:0 !important;
  display:grid !important;
  grid-template-columns:repeat(4, minmax(0, 1fr)) !important;
  gap:12px !important;
  width:100% !important;
  box-sizing:border-box !important;
}

#bbpress-forums .bbp-forum-info ul.bbp-forums-list > li.bbp-forum{
  margin:0 !important;
  padding:0 !important;
  list-style:none !important;
  min-width:0 !important;
}

#bbpress-forums .bbp-forum-info ul.bbp-forums-list > li.bbp-forum > a.bbp-forum-link{
  display:flex !important;
  width:100% !important;
  height:100% !important;
  min-height:64px;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  padding:14px 10px !important;
  border-radius:14px !important;
  background:rgba(40,164,164,0.10) !important;
  border:1px solid rgba(40,164,164,0.28) !important;
  font-weight:800 !important;
  text-decoration:none !important;
  box-sizing:border-box !important;
}

#bbpress-forums .bbp-forum-info {
  width:62%;
  box-sizing:border-box;
}

#bbpress-forums .bbp-forum-topic-count,
#bbpress-forums .bbp-forum-reply-count,
#bbpress-forums .bbp-forum-freshness {
  width:12.666%;
  white-space:nowrap;
  box-sizing:border-box;
}

#bbpress-forums .bbp-forums .bbp-body .bbp-forum-info,
#bbpress-forums .bbp-forums .bbp-body .bbp-forum-topic-count,
#bbpress-forums .bbp-forums .bbp-body .bbp-forum-reply-count,
#bbpress-forums .bbp-forums .bbp-body .bbp-forum-freshness {
  box-sizing:border-box;
}

#bbpress-forums .bbp-forum-info ul.bbp-forums-list {
  gap:10px;
}

#bbpress-forums .bbp-forum-info ul.bbp-forums-list a {
  padding:8px 12px;
  white-space:nowrap;
}

#bbpress-forums .bbp-forum-topic-count,
#bbpress-forums .bbp-forum-reply-count,
#bbpress-forums .bbp-forum-freshness {
  white-space:nowrap;
}

@media (max-width: 980px) {
  #bbpress-forums .bbp-forum-info { width:72%; }
  #bbpress-forums .bbp-forum-topic-count,
  #bbpress-forums .bbp-forum-reply-count,
  #bbpress-forums .bbp-forum-freshness { width:9.333%; }
}

#bbpress-forums .bbp-forum-info ul.bbp-forums-list {
  margin-top:8px;
}

#bbpress-forums .bbp-forum-info ul.bbp-forums-list > li.bbp-forum > a.bbp-forum-link:hover{
  background:rgba(40,164,164,0.18) !important;
  border-color:rgba(40,164,164,0.42) !important;
}

@media (max-width: 980px){
  #bbpress-forums .bbp-forum-info ul.bbp-forums-list{
    grid-template-columns:repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (max-width: 640px){
  #bbpress-forums .bbp-forum-info ul.bbp-forums-list{
    grid-template-columns:1fr !important;
  }
}

#bbpress-forums ul.bbp-forums-list li.bbp-forum{
  margin:0 !important;
  padding:0 !important;
}
#bbpress-forums ul.bbp-forums-list li.bbp-forum.css-sep::after{
  content:"" !important;
}

#bbpress-forums ul.bbp-forums-list a.bbp-forum-link:hover{
  background:rgba(40,164,164,.14) !important;
  border-color:rgba(30,123,123,.35) !important;
}

@media (max-width:768px){
  #bbpress-forums .bbp-forum-topic-count,
  #bbpress-forums .bbp-forum-reply-count,
  #bbpress-forums .bbp-forum-freshness{
    display:none !important;
  }
  #bbpress-forums ul.bbp-forums ul[id^="bbp-forum-"]{
    display:block !important;
    width:100% !important;
  }
  #bbpress-forums ul.bbp-forums ul[id^="bbp-forum-"] > li{
    float:none !important;
    clear:both !important;
  }
  #bbpress-forums ul.bbp-forums ul[id^="bbp-forum-"] > li.bbp-forum-info{
    display:block !important;
    width:100% !important;
    float:none !important;
    box-sizing:border-box !important;
  }
  #bbpress-forums ul.bbp-forums-list{
    justify-content:center !important;
  }
}

#bbpress-forums .bbp-forums-list{
  border-left:0 !important;
  margin-left:0 !important;
  padding-left:0 !important;
}

/* =========================================================
   RESTORE: bbPress — Search bar sizing + mobile behaviour
========================================================= */
#bbp-search-form,
#bbpress-forums #bbp-search-form,
#bbpress-forums form[role="search"]{
  max-width:520px !important;
  width:auto !important;
  margin:18px 0 14px !important;
}
#bbp-search-form{
  display:flex !important;
  gap:10px;
  align-items:center;
}
#bbp-search-form input[type="text"],
#bbp-search-form input[type="search"]{
  flex:1 1 auto;
  height:42px;
  padding:10px 12px;
  border-radius:12px;
  box-sizing:border-box;
}
#bbp-search-form input[type="submit"],
#bbp-search-form button[type="submit"]{
  flex:0 0 auto;
  height:42px;
  padding:0 16px;
  border-radius:12px;
}
@media (max-width:768px){
  #bbp-search-form,
  #bbpress-forums #bbp-search-form,
  #bbpress-forums form[role="search"]{
    margin:18px auto 14px !important;
  }
}

/* =========================================================
   Resource Hub – align top tabs with page head + library
========================================================= */
.ts-page-head,
.ts-rl,
.ts-rl-tabs{
  max-width:1280px;
  margin-left:auto;
  margin-right:auto;
  padding-left:16px;
  padding-right:16px;
  box-sizing:border-box;
}

.ts-rl-tabs{
  justify-content:flex-start;
}

/* =========================================================
   Resource cards — 4:3 landscape + title label overlay
========================================================= */

.ts-rl__card{
  position:relative;
  overflow:hidden;
  border-radius:12px;
}

.ts-rl__thumb{
  position:relative;
  width:100%;
  aspect-ratio:4 / 3;
  overflow:hidden;
  margin:0;
  background:linear-gradient(135deg,#eef2f7,#f8f9fb);
}

.ts-rl__thumb-img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.ts-rl__title-link{
  text-decoration:none;
  font-weight:600;
  color:rgba(0,0,0,0.85);
}

.ts-rl__title-link:hover{
  text-decoration:underline;
}

.ts-rl__body{
  padding:12px 14px 14px;
}

.ts-rl__meta{
  margin:0 0 8px;
}

/* =========================================================
   TeachShare — Resource Single: Preview + Rating + Comments
   Scope: body.single-resource only
========================================================= */

body.single-resource .et_pb_code_inner{
  max-width:100%;
}

body.single-resource .ts-resource-preview{
  width:100%;
  max-width:100%;
  display:block;
  margin:16px 0 18px;
  padding:0;
  box-sizing:border-box;
  border:1px solid rgba(0,0,0,0.08);
  border-radius:14px;
  overflow:hidden;
  background:#fff;
}

body.single-resource .ts-resource-preview--pdf iframe{
  display:block !important;
  width:100% !important;
  max-width:100% !important;
  height:70vh !important;
  border:0 !important;
  margin:0 !important;
  padding:0 !important;
  float:none !important;
  box-sizing:border-box !important;
}

body.single-resource #ts-rating.ts-rating{
  margin-top:22px;
  padding:22px;
  border-radius:16px;
  background:#fff;
  border:1px solid rgba(0,0,0,0.08);
  box-shadow:0 10px 30px rgba(0,0,0,0.05);
}

body.single-resource #ts-comments.ts-comments{
  margin-top:22px;
}

body.single-resource #ts-comments #comment-wrap{
  border:1px solid rgba(0,0,0,0.08);
  border-radius:16px;
  background:#fff;
  padding:18px;
  box-sizing:border-box;
}

body.single-resource #ts-comments,
body.single-resource #ts-comments *{
  box-sizing:border-box;
}

body.single-resource #ts-comments #comment-wrap .commentlist,
body.single-resource #ts-comments #comment-wrap .children{
  list-style:none !important;
  margin:0 !important;
  padding:0 !important;
}

body.single-resource #ts-comments #comment-wrap .comment-body{
  position:relative !important;
  display:grid !important;
  grid-template-columns:56px 1fr !important;
  grid-template-areas:
    "avatar meta"
    "avatar text" !important;
  column-gap:14px !important;
  row-gap:8px !important;
  align-items:start !important;
  padding:16px !important;
  margin:0 0 16px !important;
  background:#f8f9fb !important;
  border:1px solid rgba(0,0,0,0.06) !important;
  border-radius:14px !important;
}

body.single-resource #ts-comments #comment-wrap .comment_avatar{
  grid-area:avatar !important;
  margin:0 !important;
  float:none !important;
}

body.single-resource #ts-comments #comment-wrap .comment_avatar img.avatar{
  width:56px !important;
  height:56px !important;
  border-radius:999px !important;
  display:block !important;
}

body.single-resource #ts-comments #comment-wrap .comment_postinfo{
  grid-area:meta !important;
  margin:0 !important;
  float:none !important;
  width:auto !important;
  max-width:100% !important;
  padding-right:120px !important;
}

body.single-resource #ts-comments #comment-wrap .comment_area{
  grid-area:text !important;
  margin:0 !important;
  float:none !important;
  width:auto !important;
  max-width:100% !important;
  padding-right:120px !important;
}

body.single-resource #ts-comments #comment-wrap .comment_postinfo span,
body.single-resource #ts-comments #comment-wrap .comment_postinfo a{
  display:inline !important;
  white-space:normal !important;
}

body.single-resource #ts-comments #comment-wrap .reply-container{
  position:absolute !important;
  top:16px !important;
  right:16px !important;
  margin:0 !important;
  white-space:nowrap !important;
}

body.single-resource #ts-comments #comment-wrap .children{
  margin:10px 0 0 !important;
  padding-left:18px !important;
  border-left:2px solid rgba(0,0,0,0.06) !important;
}

body.single-resource #ts-comments #comment-wrap textarea#comment{
  width:100% !important;
  max-width:100% !important;
  border-radius:14px !important;
  padding:14px !important;
}
body.single-resource #ts-comments #comment-wrap input#submit{
  border-radius:12px !important;
  padding:10px 18px !important;
}

@media (max-width: 640px){
  body.single-resource #ts-comments #comment-wrap .comment-body{
    grid-template-columns:1fr !important;
    grid-template-areas:
      "avatar"
      "meta"
      "text" !important;
  }

  body.single-resource #ts-comments #comment-wrap .comment_avatar{
    margin-bottom:8px !important;
  }

  body.single-resource #ts-comments #comment-wrap .comment_postinfo,
  body.single-resource #ts-comments #comment-wrap .comment_area{
    padding-right:0 !important;
  }

  body.single-resource #ts-comments #comment-wrap .reply-container{
    position:static !important;
    margin-top:8px !important;
  }
}

@media (max-width: 600px){
  body.single-resource #ts-comments #comment-wrap .comment-body{
    grid-template-columns:44px 1fr !important;
    padding:14px !important;
    gap:8px 12px !important;
  }

  body.single-resource #ts-comments #comment-wrap .comment_avatar{
    width:44px !important;
    min-width:44px !important;
  }

  body.single-resource #ts-comments #comment-wrap .comment_avatar img.avatar{
    width:44px !important;
    height:44px !important;
    max-width:44px !important;
  }

  body.single-resource #ts-comments #comment-wrap .comment_postinfo,
  body.single-resource #ts-comments #comment-wrap .comment_area{
    padding-right:0 !important;
  }

  body.single-resource #ts-comments #comment-wrap .reply-container{
    position:static !important;
    display:inline-block !important;
    margin-top:8px !important;
    white-space:nowrap !important;
  }
}

@media (max-width: 980px){
  body.single-resource .ts-resource-preview--pdf{
    display:none !important;
  }

  body.single-resource .resource-download-link{
    display:inline-flex !important;
    width:100% !important;
    justify-content:center !important;
    margin-top:12px !important;
  }
}

@media (max-width: 640px){
  #bbpress-forums .bbp-topic-voice-count,
  #bbpress-forums .bbp-topic-reply-count,
  #bbpress-forums .bbp-topic-freshness,
  #bbpress-forums .bbp-header .bbp-topic-voice-count,
  #bbpress-forums .bbp-header .bbp-topic-reply-count,
  #bbpress-forums .bbp-header .bbp-topic-freshness{
    display:none !important;
  }

  #bbpress-forums li.bbp-topic-title{
    width:100% !important;
    float:none !important;
  }

  #bbpress-forums li.bbp-topic-title br{
    display:none !important;
  }
}

@media (max-width: 640px){
  body.buddypress.activity #buddypress .item-list-tabs ul,
  body.buddypress.activity #buddypress .activity-type-tabs{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:10px !important;
  }

  body.buddypress.activity #buddypress #activity-search,
  body.buddypress.activity #buddypress #activity-filter-select{
    width:100% !important;
    max-width:100% !important;
    float:none !important;
  }
}

@media (max-width: 768px){
  html, body{
    overflow-x:hidden !important;
  }

  #bbpress-forums,
  #bbpress-forums *{
    max-width:100% !important;
    box-sizing:border-box !important;
  }

  #bbpress-forums .bbp-topic-form,
  #bbpress-forums .bbp-reply-form,
  #bbpress-forums form,
  #bbpress-forums fieldset,
  #bbpress-forums .bbp-form,
  #bbpress-forums .bbp-template-notice{
    width:100% !important;
    max-width:100% !important;
  }

  #bbpress-forums input[type="text"],
  #bbpress-forums input[type="email"],
  #bbpress-forums input[type="url"],
  #bbpress-forums select,
  #bbpress-forums textarea{
    width:100% !important;
    max-width:100% !important;
  }

  #bbpress-forums .wp-editor-wrap,
  #bbpress-forums .wp-editor-container,
  #bbpress-forums .quicktags-toolbar,
  #bbpress-forums .mce-toolbar-grp{
    max-width:100% !important;
    overflow-x:auto !important;
  }

  #bbpress-forums .bbp-topic-content,
  #bbpress-forums .bbp-reply-content,
  #bbpress-forums .bbp-topic-title,
  #bbpress-forums .bbp-reply-content p{
    overflow-wrap:anywhere !important;
    word-break:break-word !important;
  }
}

#main-header .ts-login-btn > a,
#ts-bp-menu .ts-login-btn > a{
  display:inline-block;
  background:#0b2a4a !important;
  color:#fff !important;
  font-weight:600;
  border-radius:4px;
  text-decoration:none;
  padding:6px 14px !important;
  line-height:1.2 !important;
}

#main-header .ts-login-btn,
#ts-bp-menu .ts-login-btn{
  padding-top:0 !important;
  padding-bottom:0 !important;
}

#main-header .ts-login-btn > a:hover,
#ts-bp-menu .ts-login-btn > a:hover{
  opacity:0.9;
}

@media (max-width:980px){
  #main-header .ts-login-btn > a,
  #ts-bp-menu .ts-login-btn > a{
    width:fit-content;
    margin-top:8px;
    border-bottom:0;
  }
}

body.buddypress.activity #buddypress ul{
  padding-left:0 !important;
  margin-left:0 !important;
  list-style:none !important;
}

body.buddypress.activity #buddypress ul.activity-list,
body.buddypress.activity #buddypress .item-list-tabs ul,
body.buddypress.activity #buddypress nav.bp-navs ul{
  padding-left:0 !important;
  margin-left:0 !important;
}

@media (max-width: 980px){
  body:not(.et_fixed_nav) #page-container{
    padding-top:0 !important;
  }
}

@media (max-width: 640px){
  body.single-resource #ts-comments #comment-wrap .comment-body{
    display:flex !important;
    align-items:flex-start !important;
    gap:14px !important;
  }

  body.single-resource #ts-comments #comment-wrap .comment_avatar{
    flex:0 0 56px !important;
    width:56px !important;
    margin:0 !important;
    float:none !important;
  }

  body.single-resource #ts-comments #comment-wrap .comment_postinfo,
  body.single-resource #ts-comments #comment-wrap .comment_area{
    flex:1 1 auto !important;
    min-width:0 !important;
    width:auto !important;
    float:none !important;
    max-width:100% !important;
  }

  body.single-resource #ts-comments #comment-wrap .comment_postinfo{
    display:flex !important;
    flex-wrap:wrap !important;
    gap:6px 10px !important;
    align-items:baseline !important;
    padding-right:0 !important;
  }

  body.single-resource #ts-comments #comment-wrap .reply-container{
    position:static !important;
    display:inline-block !important;
    margin-top:10px !important;
    white-space:nowrap !important;
  }
}

@media (max-width: 600px){
  body.single-resource #ts-comments #comment-wrap .comment-body{
    position:relative !important;
    display:grid !important;
    grid-template-columns:56px 1fr !important;
    grid-template-areas:
      "avatar meta"
      "text   text" !important;
    column-gap:12px !important;
    row-gap:10px !important;
    align-items:start !important;
  }

  body.single-resource #ts-comments #comment-wrap .comment_avatar{
    grid-area:avatar !important;
    margin:0 !important;
  }

  body.single-resource #ts-comments #comment-wrap .comment_postinfo{
    grid-area:meta !important;
    padding-right:0 !important;
    min-width:0 !important;
  }

  body.single-resource #ts-comments #comment-wrap .comment_postinfo .fn,
  body.single-resource #ts-comments #comment-wrap .comment_postinfo .comment_date{
    display:block !important;
    white-space:normal !important;
  }

  body.single-resource #ts-comments #comment-wrap .comment_area{
    grid-area:text !important;
    padding-right:0 !important;
    margin:0 !important;
    min-width:0 !important;
  }

  body.single-resource #ts-comments #comment-wrap .comment_postinfo .comment-edit-link{
    position:absolute !important;
    left:16px !important;
    top:calc(16px + 56px + 8px) !important;
    margin:0 !important;
    white-space:nowrap !important;
    font-size:12px !important;
    opacity:0.85 !important;
  }

  body.single-resource #ts-comments #comment-wrap .comment_area{
    padding-top:22px !important;
  }

  body.single-resource #ts-comments #comment-wrap .reply-container{
    position:static !important;
    display:flex !important;
    justify-content:flex-end !important;
    margin-top:10px !important;
    white-space:nowrap !important;
  }

  body.single-resource #ts-comments #comment-wrap .comment_postinfo,
  body.single-resource #ts-comments #comment-wrap .comment_area,
  body.single-resource #ts-comments #comment-wrap .comment-content{
    float:none !important;
  }
}

body.single-resource .ts-resource-preview--pdf-mobile .ts-resource-preview__img{
  width:100%;
  height:auto;
  display:block;
  border-radius:12px;
}

body.single-resource .ts-resource-preview--pdf-mobile .ts-resource-preview__actions{
  margin-top:12px;
  display:flex;
  justify-content:flex-start;
}

#register-page #caps-warning,
#register-page .caps-warning {
  display:none !important;
}

/* =========================================================
   BuddyPress Activity — mobile reply layout
========================================================= */
@media (max-width: 640px){

  /* Main post content full width on phones */
  body.buddypress.activity #buddypress #activity-stream li.activity-item > .activity-content{
    margin-left: 0 !important;
    width: auto !important;
    max-width: 100% !important;
  }

  body.buddypress.activity #buddypress #activity-stream li.activity-item > .activity-avatar{
    margin-right: 8px !important;
  }

  /* Reply item layout */
  body.buddypress.activity #buddypress #activity-stream .activity-comments li.comment-item{
    display: grid !important;
    grid-template-columns: 24px 1fr !important;
    column-gap: 8px !important;
    row-gap: 6px !important;
    align-items: start !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    width: auto !important;
  }

  /* Reply avatar */
  body.buddypress.activity #buddypress #activity-stream .activity-comments li.comment-item > .acomment-avatar{
    grid-column: 1 !important;
    grid-row: 1 / span 3 !important;
    float: none !important;
    width: 24px !important;
    margin: 0 !important;
  }

  body.buddypress.activity #buddypress #activity-stream .activity-comments li.comment-item > .acomment-avatar img{
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    display: block !important;
    border-radius: 999px !important;
  }

  /* Reply text/action column */
  body.buddypress.activity #buddypress #activity-stream .activity-comments li.comment-item > .acomment-meta,
  body.buddypress.activity #buddypress #activity-stream .activity-comments li.comment-item > .acomment-content,
  body.buddypress.activity #buddypress #activity-stream .activity-comments li.comment-item > .activity-meta.action{
    grid-column: 2 !important;
    margin: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    float: none !important;
    clear: none !important;
    box-sizing: border-box !important;
  }

  body.buddypress.activity #buddypress #activity-stream .activity-comments li.comment-item > .acomment-content{
    text-align: left !important;
    padding: 8px 10px !important;
  }

  body.buddypress.activity #buddypress #activity-stream .activity-comments li.comment-item > .acomment-content p{
    margin: 0 !important;
  }

  /* No nested indent on mobile */
  body.buddypress.activity #buddypress #activity-stream .activity-comments li.comment-item > ul{
    grid-column: 1 / -1 !important;
    margin: 8px 0 0 0 !important;
    padding-left: 0 !important;
    border-left: none !important;
    list-style: none !important;
  }

  /* Reply buttons */
  body.buddypress.activity #buddypress #activity-stream .activity-comments li.comment-item > .activity-meta.action{
    gap: 20px !important;
    margin-top: 6px !important;
  }

  body.buddypress.activity #buddypress #activity-stream .activity-comments li.comment-item > .activity-meta.action a{
    padding: 5px 8px !important;
    font-size: 12px !important;
  }
}

@media (min-width: 641px){
  body.buddypress.activity #buddypress #activity-stream .activity-comments li.comment-item > ul{
    margin: 8px 0 0 16px !important;
    padding-left: 10px !important;
    border-left: 2px solid rgba(0,0,0,.06) !important;
    list-style: none !important;
  }

  body.buddypress.activity #buddypress #activity-stream .activity-comments li.comment-item > .acomment-meta,
  body.buddypress.activity #buddypress #activity-stream .activity-comments li.comment-item > .acomment-content,
  body.buddypress.activity #buddypress #activity-stream .activity-comments li.comment-item > .activity-meta.action{
    margin-left: 42px !important;
  }
}

/* =========================================================
   Resource Single — Additional Files block
========================================================= */

body.single-resource .ts-resource-extra-files{
  margin: 18px 0 0;
  padding: 18px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  background: #fff;
}

body.single-resource .ts-resource-extra-files__title{
  margin: 0 0 12px;
  font-size: 20px;
  line-height: 1.3;
}

body.single-resource .ts-resource-extra-files__list{
  list-style: none;
  margin: 0;
  padding: 0;
}

body.single-resource .ts-resource-extra-files__item{
  margin: 0 0 10px;
}

body.single-resource .ts-resource-extra-files__item:last-child{
  margin-bottom: 0;
}

body.single-resource .ts-resource-extra-files__link{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
}

body.single-resource .ts-resource-extra-files__link .dashicons{
  font-size: 18px;
  width: 18px;
  height: 18px;
  line-height: 18px;
}

.ts-resource-extra-files{
  margin:18px 0 10px;
  padding:18px;
  border-radius:14px;
  background:#f4f6f7;
}

.ts-resource-extra-files__title{
  margin:0 0 10px;
  font-weight:600;
}

.ts-resource-extra-files__list{
  list-style:none;
  margin:0;
  padding:0;
}

.ts-resource-extra-files__item{
  margin:6px 0;
}

.ts-resource-extra-files__link{
  display:inline-flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  font-weight:600;
}

/* =========================================================
   Resource Single — Additional Files polished card layout
   Place at VERY BOTTOM of style.css
========================================================= */

body.single-resource .ts-resource-extra-files{
  margin: 18px 0 14px;
  padding: 20px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

body.single-resource .ts-resource-extra-files__title{
  margin: 0 0 14px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  color: rgba(0,0,0,0.84);
}

body.single-resource .ts-resource-extra-files__list{
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

body.single-resource .ts-resource-extra-files__item{
  margin: 0;
  padding: 0;
}

body.single-resource .ts-resource-extra-files__link{
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(40,164,164,0.18);
  border-radius: 14px;
  background: rgba(40,164,164,0.06);
  text-decoration: none;
  box-sizing: border-box;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease;
}

body.single-resource .ts-resource-extra-files__link:hover{
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(0,0,0,0.06);
  border-color: rgba(40,164,164,0.32);
  background: rgba(40,164,164,0.10);
}

body.single-resource .ts-resource-extra-files__link .dashicons{
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  line-height: 38px;
  border-radius: 999px;
  text-align: center;
  font-size: 18px;
  background: #28a4a4;
  color: #fff;
}

body.single-resource .ts-resource-extra-files__text{
  display: block;
  font-size: 16px;
  line-height: 1.35;
  font-weight: 600;
  color: rgba(0,0,0,0.82);
  word-break: break-word;
}

@media (max-width: 640px){
  body.single-resource .ts-resource-extra-files{
    padding: 16px;
  }

  body.single-resource .ts-resource-extra-files__title{
    font-size: 20px;
  }

  body.single-resource .ts-resource-extra-files__link{
    padding: 12px 14px;
    gap: 12px;
  }

  body.single-resource .ts-resource-extra-files__link .dashicons{
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    line-height: 34px;
    font-size: 16px;
  }

  body.single-resource .ts-resource-extra-files__text{
    font-size: 15px;
  }
}

/* =========================================================
   Resource Single — polished preview styles
   Place at VERY BOTTOM of style.css
========================================================= */

body.single-resource .ts-resource-preview{
  width: 100%;
  max-width: 100%;
  display: block;
  margin: 16px 0 18px;
  padding: 0;
  box-sizing: border-box;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 30px rgba(0,0,0,0.04);
}

body.single-resource .ts-resource-preview--image{
  padding: 18px;
  background: #fff;
}

body.single-resource .ts-resource-preview__img{
  display: block;
  width: 100%;
  height: auto;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 12px;
  background: #f6f7f9;
}

body.single-resource .ts-resource-preview--pdf iframe{
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  border: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  box-sizing: border-box !important;
  background: #fff;
}

body.single-resource .ts-resource-preview--pdf-mobile{
  padding: 16px;
  background: #fff;
}

body.single-resource .ts-resource-preview__imglink{
  display: block;
  text-decoration: none;
}

body.single-resource .ts-resource-preview__actions{
  margin-top: 14px;
  display: flex;
  justify-content: flex-start;
}

body.single-resource .ts-resource-preview--file,
body.single-resource .ts-resource-preview--empty,
body.single-resource .ts-resource-preview--locked{
  padding: 18px;
  color: rgba(0,0,0,0.72);
}

@media (max-width: 980px){
  body.single-resource .ts-resource-preview--image,
  body.single-resource .ts-resource-preview--pdf-mobile{
    padding: 14px;
  }
}
