/* =========================
   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;
}

/* =========================
   MOTOCAL – PREMIUM WIDE CARD CALENDAR
========================= */
.motocal-grid{
  grid-template-columns: 1fr;
  gap: 20px;
}

.motocal-card--wide{
  border: 1px solid rgba(17,24,39,.08);
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #fcfcfd 100%);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
}

.motocal-card--wide .motocal-card-link{
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  color: inherit;
  text-decoration: none;
}

.motocal-card--wide .motocal-img{
  height: 100%;
  min-height: 240px;
}

.motocal-card--wide .motocal-content{
  padding: 24px 26px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.motocal-card--wide .motocal-content::before{
  display: none !important;
}

.motocal-topline,
.motocal-meta-row,
.motocal-title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.motocal-title-main{
  display:flex;
  align-items:center;
  gap:14px;
  min-width:0;
}

.motocal-heading-stack{
  display:flex;
  flex-direction:column;
  gap:6px;
  min-width:0;
}

.motocal-card--wide .gp-name{
  margin:0;
  font-size:30px;
  line-height:1.05;
  font-weight:900;
  letter-spacing:-0.02em;
}

.motocal-card--wide .motocal-track{
  font-size:15px;
  color:#6b7280;
  font-weight:600;
}

.motocal-series,
.motocal-data-state,
.motocal-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:8px 14px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  line-height:1;
  letter-spacing:.02em;
  white-space:nowrap;
}

.motocal-series--motogp{
  background: rgba(177,18,23,.10);
  color:#b11217;
  border:1px solid rgba(177,18,23,.18);
}

.wsbk-theme .motocal-series--wsbk{
  background: rgba(10,88,202,.10);
  color:#0a58ca;
  border:1px solid rgba(10,88,202,.18);
}

.motocal-data-state{
  background:#f3f4f6;
  color:#111827;
  border:1px solid rgba(17,24,39,.08);
}

.motocal-data-state.is-results{
  background: rgba(22,163,74,.10);
  color:#166534;
  border-color: rgba(22,163,74,.18);
}

.motocal-data-state.is-program{
  background: rgba(59,130,246,.10);
  color:#1d4ed8;
  border-color: rgba(59,130,246,.18);
}

.motocal-card--wide .motocal-date{
  margin:0;
  font-size:16px;
  font-weight:800;
}

.motocal-cta-text{
  font-size:13px;
  font-weight:800;
  color:#111827;
  opacity:.72;
}

.motocal-card--wide .motocal-times{
  margin-top:0;
  gap:10px;
}

.motocal-card--wide .motocal-times span{
  padding:8px 12px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
}

.motocal-card--wide:hover{
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
}

.motocal-card--wide:hover .motocal-cta-text{
  opacity:1;
}

@media (max-width: 1024px){
  .motocal-card--wide .motocal-card-link{
    grid-template-columns: 1fr;
  }

  .motocal-card--wide .motocal-img{
    min-height: 220px;
  }
}

@media (max-width: 767px){
  .motocal-wrapper{
    padding: 28px 14px;
    border-radius: 14px;
  }

  .motocal-filter{
    flex-wrap:wrap;
  }

  .motocal-topline,
  .motocal-meta-row,
  .motocal-title-row{
    flex-direction:column;
    align-items:flex-start;
  }

  .motocal-card--wide .motocal-content{
    padding: 18px 16px 18px;
  }

  .motocal-card--wide .gp-name{
    font-size: 24px;
  }
}
