/* Modüller sayfası: mevcut tema (yapibak.css) korunur.
   Scroll gerekiyorsa sadece main içinde açılır. */

.modules-main{
  /* Sende body/html overflow hidden olduğu için:
     Ekrana sığmazsa burası scroll olur. */
  height: calc(100vh - var(--header-h) - var(--footer-h));
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 22px;
  position: relative;
}

/* içerik ortalansın, ama sığmazsa yukarıdan başlayıp scroll etsin */
.modules-wrap{
  width: min(1100px, 100%);
  margin: 0 auto;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.modules-title{
  text-align: center;
  font-size: clamp(32px, 3.4vw, 56px);
  line-height: 1.05;
  letter-spacing: -1px;
  font-weight: 950;
  text-shadow: 0 10px 26px rgba(0,0,0,.45);
}

/* Kartlar */
.modules-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 2vw, 22px);
  align-items: stretch;
}

.mcard{
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
  border-radius: 18px;
  overflow: hidden;

  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 18px 45px rgba(0,0,0,.25);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.mcard:hover{
  transform: translateY(-4px);
  border-color: rgba(255,255,255,.24);
  box-shadow: 0 26px 65px rgba(0,0,0,.32);
  background: rgba(255,255,255,.075);
}

.mimg{
  aspect-ratio: 16 / 9;
  background: rgba(255,255,255,.03);
}

.mimg img{
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.mlabel{
  padding: 14px 14px 16px;
  text-align: center;
  font-weight: 950;
  font-size: clamp(14px, 1.25vw, 18px);
  text-shadow: 0 8px 18px rgba(0,0,0,.35);
}

/* Responsive kırılımlar */
@media (max-width: 980px){
  .modules-main{ padding: 14px 16px; }
  .modules-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .modules-wrap{ justify-content: flex-start; padding-top: 8px; }
}

@media (max-width: 640px){
  .modules-grid{ grid-template-columns: 1fr; }
}
