/* =========================
   MOTOCAL – CORE (shared)
========================= */

/* =========================
   MOTOCAL – LAYOUT STANDARD
========================= */

/* Ana panel: tüm motocal sayfaları */
.motocal-wrapper{
  max-width: 1200px;
  margin: 40px auto 30px;
  background: #fff;
  padding: 40px 20px;
  border-radius: 16px;
}

/* Başlık: panelin içinde */
.motocal-page-title{
  margin: 0 0 22px;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
}

/* motocal-inner varsa ekstra panel yaratmasın */
.motocal-wrapper .motocal-inner{
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

/* WordPress p tag fix (sadece motocal grid içinde) */
.motocal-grid > p{
  display: contents !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Wrapper fallback */
.motocal-inner{
  max-width: 1200px;
  margin: 40px auto;
  padding: 40px 20px;
  background: #fff;
  border-radius: 16px;
}

/* Filter */
.motocal-filter{
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
}

.motocal-filter button{
  padding: 8px 18px;
  border-radius: 999px;
  border: 1.5px solid #b11217;
  background: #fff;
  color: #b11217;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: all .2s ease;
}

.motocal-filter button.active,
.motocal-filter button:hover{
  background: #b11217;
  color: #fff;
}

/* Grid (calendar uses this, drivers/standings have own grids) */
.motocal-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 1024px){
  .motocal-grid{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px){
  .motocal-grid{
    grid-template-columns: 1fr;
  }
}

/* Card base */
.motocal-card{
  background: #fff;
  border: 1.5px solid #ddd;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.motocal-card:hover{
  transform: translateY(-4px);
  border-color: #b11217;
  box-shadow: 0 14px 34px rgba(177,18,23,.18);
}

/* Image */
.motocal-img{
  position: relative;
  height: 210px;
  background-size: cover;
  background-position: center;
}

.motocal-img::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,.35) 100%);
}

/* Content */
.motocal-content{
  padding: 20px 18px 18px;
}

/* Title */
.motocal-title{
  display: flex;
  align-items: center;
  gap: 12px;
}

.motocal-flag{
  width: 24px;
  height: 16px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 0 0 1px rgba(0,0,0,.15);
}

.gp-name{
  font-size: 21px;
  font-weight: 800;
  letter-spacing: .3px;
  line-height: 1;
}

.motocal-track{
  font-size: 13px;
  color: #666;
  font-weight: 500;
}

/* =========================
   MOTOCAL – WRAPPER FALLBACK
   Takvim + Standings sayfalarında .motocal-inner yoksa da 1200px white card olsun
========================= */

/* Takvim sayfaları */
.page-id-2463 .motocal-wrapper,
.page-id-2463 .motocal-grid,
.page-id-6921 .motocal-wrapper,
.page-id-6921 .motocal-grid{
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Standings template sayfaları */
.page-template-page-motogp-puan-durumu .motogp-standings,
.page-template-page-moto2-puan-durumu .motogp-standings,
.page-template-page-moto3-puan-durumu .motogp-standings,
.page-template-page-worldsbk-puan-durumu .motogp-standings,
.page-template-page-worldssp-puan-durumu .motogp-standings{
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* White card/panel efekti */
.page-id-2463 .motocal-grid,
.page-id-6921 .motocal-grid,
.page-template-page-motogp-puan-durumu .motogp-standings,
.page-template-page-moto2-puan-durumu .motogp-standings,
.page-template-page-moto3-puan-durumu .motogp-standings,
.page-template-page-worldsbk-puan-durumu .motogp-standings,
.page-template-page-worldssp-puan-durumu .motogp-standings{
  background: #fff;
  border-radius: 16px;
  padding: 40px 20px;
}