/* Page wrapper */
.inst-content{
    padding: 2rem 0 4rem;
    background: #fafafa;
  }
  
  /* HERO (по логике как promo-hero из promo страницы) */
  .inst-hero{
    padding: 110px 0 2rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  }
  
  .inst-hero-inner{
    max-width: 920px;
  }
  
  .inst-badge{
    display: inline-flex;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.8rem;
    border: 1px solid #e5e5e5;
    background: rgba(255,255,255,0.95);
    color: #4a4a4a;
    backdrop-filter: blur(6px);
  }
  
  .inst-hero h1{
    margin: 0.9rem 0 0.6rem;
    color: #1a1a1a;
    font-size: 2.35rem;
    line-height: 1.15;
  }
  
  .inst-hero p{
    color: #4a4a4a;
    font-size: 1.05rem;
    margin: 0 0 1.25rem;
    max-width: 760px;
  }
  
  .inst-hero-cta{
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
  }
  
  .inst-meta{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
  }
  
  .inst-meta-item{
    background: rgba(255,255,255,0.92);
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 0.9rem 1rem;
  }
  
  .inst-meta-title{
    color: #6a6a6a;
    font-size: 0.85rem;
    font-weight: 700;
  }
  
  .inst-meta-value{
    color: #1a1a1a;
    font-weight: 900;
    margin-top: 0.2rem;
  }
  
  /* Titles */
  .inst-title{
    font-size: 1.8rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 1.2rem;
  }
  
  /* GRID (в духе promotions.css) */
  .inst-grid{
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
  }
  
  @media (max-width: 1024px){
    .inst-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .inst-meta{ grid-template-columns: 1fr; }
  }
  @media (max-width: 640px){
    .inst-grid{ grid-template-columns: 1fr; }
    .inst-hero h1{ font-size: 2rem; }
  }
  
  /* CARD */
  .inst-card{
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    display: flex;
    flex-direction: column;
    height: auto;
  }
  
  @media (hover:hover) and (pointer:fine){
    .inst-card:hover{
      transform: translateY(-2px);
      border-color: #dcdcdc;
      box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    }
  }
  
  .inst-card-media{
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .inst-card-media img{
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 14px;
    display: block;
  }
  
  .inst-card-badges{
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  
  /* Badges */
  .inst-pill{
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.75rem;
    border: 1px solid #e5e5e5;
    background: rgba(255,255,255,0.95);
    color: #4a4a4a;
    backdrop-filter: blur(6px);
  }
  
  .inst-pill--dark{
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #fff;
  }
  .inst-pill--green{
    background: rgba(34,197,94,0.12);
    border-color: rgba(34,197,94,0.35);
    color: #166534;
  }
  
  /* Body */
  .inst-card-body{
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex: 1;
  }
  
  .inst-card-title{
    font-size: 1.05rem;
    font-weight: 900;
    color: #1a1a1a;
    line-height: 1.25;
    margin: 0 0 0.4rem 0;
  
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .inst-card-subtitle{
    color: #4a4a4a;
    font-size: 0.95rem;
    margin: 0 0 0.75rem 0;
  
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  /* Details (accordion without JS) */
  .inst-details{
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: #fafafa;
    overflow: hidden;
    margin-bottom: 0.85rem;
  }
  
  .inst-summary{
    cursor: pointer;
    list-style: none;
    padding: 0.85rem 0.9rem;
    font-weight: 900;
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }
  
  .inst-summary::-webkit-details-marker{ display:none; }
  
  .inst-summary-icon{
    font-weight: 900;
    color: #6a6a6a;
    transition: transform .2s ease;
  }
  
  .inst-details[open] .inst-summary-icon{
    transform: rotate(45deg);
    color: #1a1a1a;
  }
  
  .inst-details-body{
    padding: 0 0.9rem 0.9rem;
  }
  
  .inst-list{
    margin: 0.5rem 0 0;
    padding-left: 1.1rem;
    color: #4a4a4a;
  }
  
  .inst-list li{
    margin: 0.35rem 0;
  }
  
  .inst-note{
    margin-top: 0.75rem;
    color: #6a6a6a;
    font-size: 0.85rem;
  }
  
  /* Actions */
  .inst-actions{
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
  }
  
  .inst-actions .btn{
    padding: 0.55rem 0.9rem;
    font-size: 0.95rem;
  }
  
  /* Box like promo-box */
  .inst-box{
    margin-top: 1.25rem;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1rem;
  }
  
  .inst-box h3{
    margin: 0 0 0.6rem;
    font-size: 1.1rem;
    font-weight: 900;
    color: #1a1a1a;
  }
  
  /* Empty */
  .inst-empty{
    grid-column: 1 / -1;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 1rem;
    color: #4a4a4a;
  }
  
  .inst-empty-actions{
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
  }
  
  /* CTA spacing */
  .inst-cta{
    margin-top: 1.5rem;
  }
  
  .inst-cta-buttons{
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .inst-grid{
  align-items: start;
}

/* чтобы карточка не тянулась на 100% высоты строки grid */
.inst-card{
  height: auto;     /* перебивает height:100% */
  align-self: start;/* на случай, если где-то переопределён align-items */
}