/*
Theme Name: Movies
Theme URI: https://example.com/
Author: Custom
Author URI: https://example.com/
Description: Tema portal video dengan layout header + menu + search, sidebar kategori, dan grid kartu.
Version: 1.0.2
Requires at least: 5.8
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: movies
Tags: custom, blog, one-column, two-columns, right-sidebar
*/

/* Base */
:root{
  --movies-maxw: 1180px;
  --movies-border: #e6e6e6;
  --movies-muted: #6b7280;
  --movies-text: #111827;
  --movies-link: #2563eb;
  --movies-bg: #ffffff;
  --movies-topbar: #0b0f19;
  --movies-chip: #ef4444;
}

*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--movies-text);
  background: var(--movies-bg);
}
img{max-width:100%; height:auto;}
a{color:inherit; text-decoration:none;}
a:hover{color:var(--movies-link);}

/* WP core align */
.alignwide{max-width: var(--movies-maxw); margin-left:auto; margin-right:auto;}
.alignfull{width:100vw; margin-left:calc(50% - 50vw); margin-right:calc(50% - 50vw);}

/* Top bar */
.movies-topbar{
  background: var(--movies-topbar);
  color:#fff;
  font-size:12px;
  line-height:32px;
  height:32px;
}
.movies-topbar__inner{
  max-width: var(--movies-maxw);
  margin:0 auto;
  padding:0 16px;
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:14px;
}
.movies-topbar a{color:#fff; opacity:.85;}
.movies-topbar a:hover{opacity:1;}

/* Header */
.movies-header{
  border-bottom:1px solid var(--movies-border);
  background:#fff;
}
.movies-header__inner{
  max-width: var(--movies-maxw);
  margin:0 auto;
  padding:14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.movies-brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width: 180px;
}
.movies-brand__logo img{max-height:32px; width:auto;}
.movies-brand__title{
  font-weight:800;
  letter-spacing:.2px;
}

/* Search */
.movies-search{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex: 1;
}
.movies-search form{
  width:100%;
  max-width: 380px;
  display:flex;
  align-items:center;
  border:1px solid var(--movies-border);
  border-radius: 999px;
  overflow:hidden;
  background:#fff;
}
.movies-search input[type="search"]{
  border:0;
  outline:none;
  padding:10px 14px;
  width:100%;
  font-size:14px;
}
.movies-search button{
  border:0;
  background:#111827;
  color:#fff;
  padding:10px 14px;
  cursor:pointer;
}

/* Nav */
.movies-nav{
  border-top:1px solid var(--movies-border);
}
.movies-nav__inner{
  max-width: var(--movies-maxw);
  margin:0 auto;
  padding:0 16px;
}
.movies-nav ul{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  gap:18px;
  align-items:center;
  min-height:44px;
  flex-wrap:wrap;
}
.movies-nav a{
  display:inline-flex;
  align-items:center;
  padding:10px 0;
  font-size:13px;
  text-transform:uppercase;
  letter-spacing:.5px;
  color:#111827;
}
.movies-nav a:hover{color:var(--movies-link);}

/* Layout */
.movies-wrap{
  max-width: var(--movies-maxw);
  margin:0 auto;
  padding:18px 16px 40px;
}
.movies-layout{
  display:flex;
  gap:18px;
  align-items:flex-start;
}

/* Sidebar */
.movies-sidebar{
  width:240px;
  flex: 0 0 240px;
}
.movies-widget{
  border:1px solid var(--movies-border);
  border-radius: 6px;
  overflow:hidden;
  background:#fff;
  margin-bottom:14px;
}
.movies-widget__title{
  padding:10px 12px;
  border-bottom:1px solid var(--movies-border);
  font-weight:700;
  font-size:13px;
  background:#fafafa;
}
.movies-widget ul{
  list-style:none;
  margin:0;
  padding:8px 12px;
}
.movies-widget li{
  margin:0;
  padding:6px 0;
  border-bottom:1px dashed #f0f0f0;
}
.movies-widget li:last-child{border-bottom:0;}
.movies-widget a{
  display:flex;
  justify-content:space-between;
  gap:10px;
  font-size:13px;
  color:#111827;
}
.movies-widget a .count{
  color: var(--movies-muted);
  font-variant-numeric: tabular-nums;
}

/* Main content */
.movies-main{
  flex:1;
  min-width:0;
}

.movies-section{
  margin-bottom: 26px;
}
.movies-section__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding-bottom:10px;
  border-bottom:1px solid var(--movies-border);
  margin-bottom:12px;
}
.movies-section__title{
  font-size:16px;
  font-weight:800;
  margin:0;
}

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

.movies-card{
  border:1px solid var(--movies-border);
  border-radius: 6px;
  overflow:hidden;
  background:#fff;
}
.movies-card__thumb{
  position:relative;
  width:100%;
  aspect-ratio: 16/9;
  background:#f3f4f6;
  overflow:hidden;
}
.movies-card__thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transform: scale(1);
  transition: transform .25s ease;
}
.movies-card:hover .movies-card__thumb img{transform: scale(1.03);}

.movies-badge{
  position:absolute;
  top:8px;
  right:8px;
  background: var(--movies-chip);
  color:#fff;
  font-size:11px;
  font-weight:800;
  padding:3px 6px;
  border-radius: 4px;
}
.movies-duration{
  position:absolute;
  bottom:8px;
  right:8px;
  background: rgba(0,0,0,.65);
  color:#fff;
  font-size:11px;
  padding:3px 6px;
  border-radius: 4px;
}

.movies-card__body{
  padding:10px 10px 9px;
}
.movies-card__title{
  font-size:13px;
  font-weight:700;
  line-height:1.25;
  margin:0 0 8px;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
  min-height: 32px;
}
.movies-card__meta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  font-size:12px;
  color: var(--movies-muted);
}
.movies-card__meta .views{
  font-variant-numeric: tabular-nums;
}

/* Pagination */
.movies-pagination{
  display:flex;
  justify-content:center;
  gap:6px;
  margin-top: 18px;
}
.movies-pagination .page-numbers{
  border:1px solid var(--movies-border);
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius: 999px;
  font-size:13px;
  color:#111827;
  background:#fff;
}
.movies-pagination .page-numbers.current{
  background:#111827;
  color:#fff;
  border-color:#111827;
}

/* Footer */
.movies-footer{
  border-top:1px solid var(--movies-border);
  padding:18px 16px;
  color: var(--movies-muted);
  font-size:13px;
}
.movies-footer__inner{
  max-width: var(--movies-maxw);
  margin:0 auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap:10px;
}

/* Responsive */
@media (max-width: 980px){
  .movies-layout{flex-direction:column;}
  .movies-sidebar{width:100%; flex:0 0 auto;}
  .movies-grid{grid-template-columns: repeat(2, minmax(0, 1fr));}
  .movies-header__inner{flex-wrap:wrap;}
  .movies-search{width:100%;}
  .movies-search form{max-width:100%;}
}
@media (max-width: 560px){
  .movies-grid{grid-template-columns: 1fr;}
}

/* Make WP widgets look consistent */
.widget{margin:0;}
.widget-title{display:none;}
