/* /assets/app.css */

:root{
  --bg:#f4f7fb;
  --card:#ffffff;
  --muted:#64748b;
  --text:#0f172a;
  --line:#dbe4ee;
  --accent:#4f46e5;
  --accent2:#14b8a6;
  --shadow:0 18px 45px rgba(15,23,42,.08);
  --shadow-soft:0 16px 40px rgba(15,23,42,.06);
  --shadow-hover:0 22px 56px rgba(15,23,42,.11);
  --radius:18px;
}

*,
*::before,
*::after{box-sizing:border-box}

html,body{
  margin:0;
  padding:0;
}

html{
  scroll-behavior:smooth;
}

body{
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,"Noto Sans","Helvetica Neue",sans-serif;
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(79,70,229,.10), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(20,184,166,.10), transparent 60%),
    linear-gradient(180deg, #f8fbff 0%, #f4f7fb 45%, #eef3f8 100%);
  color:var(--text);
}

img{
  max-width:100%;
}

a{
  color:inherit;
  text-decoration:none;
}

a:hover{
  opacity:.98;
}

button,
input,
select,
textarea{
  font:inherit;
}

.container{
  width:min(1120px, calc(100% - 32px));
  margin:0 auto;
}

/* ===== old shared blocks ===== */

.topbar{
  position:sticky;
  top:0;
  z-index:20;
  background:rgba(255,255,255,.82);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
  box-shadow:0 8px 24px rgba(15,23,42,.05);
}

.nav{
  display:flex;
  gap:14px;
  align-items:center;
  justify-content:space-between;
  padding:14px 0;
}

.brand{
  display:flex;
  gap:10px;
  align-items:center;
  font-weight:900;
  letter-spacing:.2px;
  color:var(--text);
}

.badge{
  font-size:12px;
  padding:4px 10px;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--muted);
  background:#ffffff;
}

.menu{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.menu a{
  padding:9px 12px;
  border:1px solid transparent;
  border-radius:999px;
  color:var(--muted);
  transition:background .18s ease, border-color .18s ease, color .18s ease;
}

.menu a:hover{
  background:rgba(79,70,229,.06);
  border-color:rgba(79,70,229,.10);
  color:var(--text);
}

.menu a.active{
  color:var(--text);
  border-color:rgba(79,70,229,.16);
  background:rgba(79,70,229,.08);
}

.hero{
  padding:34px 0 16px;
}

.hero-inner{
  display:grid;
  grid-template-columns:1.2fr .8fr;
  gap:16px;
}

.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}

.hero-card{
  padding:22px;
}

.h1{
  font-size:34px;
  line-height:1.05;
  margin:0 0 10px;
  color:var(--text);
}

.lead{
  margin:0;
  color:var(--muted);
  line-height:1.55;
}

.hero-cta{
  margin-top:14px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.btn{
  display:inline-flex;
  gap:10px;
  align-items:center;
  justify-content:center;
  border-radius:14px;
  padding:10px 14px;
  border:1px solid var(--line);
  background:#ffffff;
  color:var(--text);
  cursor:pointer;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.btn.primary{
  background:linear-gradient(135deg, var(--accent), var(--accent2));
  border-color:transparent;
  color:#ffffff;
}

.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(15,23,42,.08);
}

.btn:active{
  transform:translateY(0);
}

.grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:14px;
  padding:14px 0 30px;
}

.post-card{
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
  min-height:170px;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.post-card:hover{
  transform:translateY(-3px);
  box-shadow:0 20px 38px rgba(15,23,42,.10);
  border-color:#cfd9e5;
}

.kicker{
  font-size:12px;
  color:var(--muted);
  display:flex;
  gap:8px;
  align-items:center;
}

.dot{
  width:7px;
  height:7px;
  border-radius:50%;
  background:linear-gradient(135deg, var(--accent), var(--accent2));
}

.title{
  font-size:18px;
  margin:0;
  line-height:1.25;
  color:var(--text);
}

.excerpt{
  margin:0;
  color:var(--muted);
  line-height:1.45;
}

.meta{
  margin-top:auto;
  display:flex;
  gap:10px;
  align-items:center;
  justify-content:space-between;
  color:var(--muted);
  font-size:12px;
}

.page{
  padding:18px 0 34px;
}

.page h2{
  margin:0 0 10px;
  color:var(--text);
}

.page .content{
  color:#334155;
  line-height:1.7;
}

.hr{
  height:1px;
  background:var(--line);
  margin:16px 0;
}

.footer{
  border-top:1px solid var(--line);
  padding:22px 0 34px;
  color:var(--muted);
  background:rgba(255,255,255,.55);
}

.form-row{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.input,
select{
  background:#ffffff;
  border:1px solid var(--line);
  color:var(--text);
  border-radius:12px;
  padding:10px 12px;
  outline:none;
  transition:border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.input:focus,
select:focus{
  border-color:rgba(79,70,229,.35);
  box-shadow:0 0 0 4px rgba(79,70,229,.10);
}

.input{
  min-width:260px;
}

.notice{
  margin-top:10px;
  font-size:13px;
  color:var(--muted);
}

.flash{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid var(--line);
  background:#ffffff;
  margin:12px 0 0;
  color:var(--text);
}

.flash.ok{
  border-color:rgba(20,184,166,.30);
  background:rgba(20,184,166,.06);
}

.flash.err{
  border-color:rgba(239,68,68,.25);
  background:rgba(239,68,68,.05);
}

/* ===== new cards for sections/home ===== */

.kc-cards-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0,1fr));
  gap:20px;
}

.kc-poster-card{
  min-width:0;
}

.kc-poster-card-link{
  display:flex;
  flex-direction:column;
  height:100%;
  padding:14px;
  border-radius:24px;
  border:1px solid #e7ecf3;
  background:#ffffff;
  box-shadow:var(--shadow-soft);
  color:var(--text);
  text-decoration:none;
  transition:transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.kc-poster-card-link:hover{
  transform:translateY(-4px);
  box-shadow:var(--shadow-hover);
  border-color:#d8e4f0;
}

.kc-poster-frame{
  position:relative;
  overflow:hidden;
  border-radius:18px;
  background:#eef2f7;
  aspect-ratio:2 / 3;
  display:flex;
  align-items:center;
  justify-content:center;
}

.kc-poster-image{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

.kc-poster-placeholder{
  color:#64748b;
  font-size:14px;
  font-weight:700;
  text-align:center;
  padding:18px;
}

.kc-poster-body{
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:14px 4px 4px;
  flex:1 1 auto;
}

.kc-card-kicker{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  font-size:12px;
  font-weight:800;
  letter-spacing:.02em;
  color:#0f766e;
  text-transform:uppercase;
}

.kc-card-dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background:linear-gradient(135deg, #22c55e, #14b8a6);
  display:inline-block;
  flex:0 0 auto;
}

.kc-card-date{
  color:#64748b;
}

.kc-poster-title{
  margin:0;
  color:#0f172a;
  font-size:22px;
  line-height:1.3;
  font-weight:900;
}

.kc-poster-excerpt{
  margin:0;
  color:#475569;
  line-height:1.75;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:4;
  overflow:hidden;
}

.kc-watch-btn{
  margin-top:auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:12px 16px;
  border-radius:16px;
  background:linear-gradient(135deg, #4f46e5, #14b8a6);
  color:#ffffff;
  font-weight:800;
  box-shadow:0 10px 24px rgba(79,70,229,.18);
  transition:transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.kc-poster-card-link:hover .kc-watch-btn{
  transform:translateY(-1px);
  box-shadow:0 14px 28px rgba(79,70,229,.22);
}

/* ===== watch page ===== */

.kc-watch-page{
  padding-top:28px;
  padding-bottom:36px;
}

.kc-watch-layout{
  display:grid;
  gap:22px;
}

.kc-watch-panel{
  padding:22px;
  border-radius:28px;
  border:1px solid #e7ecf3;
  background:#ffffff;
  box-shadow:var(--shadow);
}

.kc-watch-head{
  display:grid;
  grid-template-columns:minmax(260px,360px) minmax(0,1fr);
  gap:22px;
  align-items:start;
}

.kc-watch-poster{
  overflow:hidden;
  border-radius:22px;
  border:1px solid var(--line);
  background:#eef2f7;
  box-shadow:0 14px 30px rgba(15,23,42,.06);
}

.kc-watch-poster img{
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:2 / 3;
  object-fit:cover;
}

.kc-watch-poster.kc-empty{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:320px;
  color:#64748b;
  font-weight:700;
  padding:20px;
  text-align:center;
}

.kc-watch-meta{
  display:grid;
  gap:14px;
}

.kc-watch-kicker{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  font-size:13px;
  font-weight:800;
  letter-spacing:.02em;
  color:#0f766e;
  text-transform:uppercase;
}

.kc-watch-title{
  margin:0;
  font-size:clamp(28px, 4vw, 42px);
  line-height:1.12;
  color:#0f172a;
  font-weight:900;
}

.kc-watch-excerpt{
  margin:0;
  color:#475569;
  line-height:1.85;
  font-size:16px;
}

.kc-watch-stack{
  display:grid;
  gap:18px;
}

.kc-player-card{
  overflow:hidden;
  border-radius:24px;
  border:1px solid var(--line);
  background:#ffffff;
  box-shadow:var(--shadow-soft);
}

.kc-player-ratio{
  position:relative;
  width:100%;
  padding-top:56.25%;
  background:#000000;
}

.kc-player-ratio iframe{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}

.kc-local-video{
  display:block;
  width:100%;
  height:auto;
  background:#000000;
}

.kc-watch-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
}

.kc-back-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:12px 18px;
  border-radius:16px;
  border:1px solid var(--line);
  background:#ffffff;
  color:#0f172a;
  font-weight:800;
  text-decoration:none;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.kc-back-btn:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(15,23,42,.08);
  border-color:#cfd9e5;
  background:#f8fbff;
}

.kc-post-extra,
.kc-post-files{
  padding:20px;
  border-radius:22px;
  border:1px solid #e7ecf3;
  background:#ffffff;
  box-shadow:var(--shadow-soft);
}

.kc-post-extra-title{
  margin:0 0 12px;
  font-size:22px;
  line-height:1.2;
  color:#0f172a;
  font-weight:900;
}

.kc-post-extra-body{
  color:#334155;
  line-height:1.8;
}

.kc-file-list{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.kc-file-link{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:10px 14px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#f8fbff;
  color:#0f172a;
  font-weight:700;
  text-decoration:none;
  transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

.kc-file-link:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 24px rgba(15,23,42,.08);
  border-color:#cfd9e5;
  background:#ffffff;
}

.kc-empty-media{
  padding:18px 20px;
  border-radius:20px;
  border:1px solid var(--line);
  background:#f8fbff;
  color:#64748b;
  line-height:1.7;
}

/* ===== helpers for header/footer blocks already in includes ===== */

.kc-topbar,
.kc-footer{
  width:100%;
}

.kc-menu-link,
.kc-footer-link,
.kc-footer-btn,
.kc-badge-link{
  -webkit-tap-highlight-color:transparent;
}

/* ===== responsive ===== */

@media (max-width: 1024px){
  .hero-inner{
    grid-template-columns:1fr;
  }

  .grid{
    grid-template-columns:repeat(2, 1fr);
  }

  .kc-cards-grid{
    grid-template-columns:repeat(2, minmax(0,1fr));
  }

  .kc-watch-head{
    grid-template-columns:1fr;
  }
}


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

@media (max-width: 640px){
  .container{
    width:min(1120px, calc(100% - 20px));
  }

  .grid{
    grid-template-columns:1fr;
  }

  .kc-cards-grid{
    grid-template-columns:1fr;
  }

  .kc-watch-page{
    padding-top:24px;
    padding-bottom:28px;
  }

  .kc-watch-panel{
    padding:18px;
  }

  .kc-watch-title{
    font-size:28px;
  }

  .h1{
    font-size:28px;
  }

  .page{
    padding:14px 0 28px;
  }
}

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