/*
Theme Name: Fajar Timur
Theme URI: https://fajartimur.id
Author: Waid Amin
Author URI: https://fajartimur.id
Description: Tema portal berita responsif Fajar Timur - 5 menu bar biru, layout Kompas/Detik style, support logo FT asli. Satu baris nama situs.
Version: 1.0
License: GPLv2
Text Domain: fajartimur
*/

:root{
  --blue:#0d47a1;
  --blue-dark:#0a357a;
  --blue-soft:#e8f0fe;
  --red:#dc2626;
}
* {box-sizing:border-box}
body{margin:0;font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,sans-serif;background:#f7f8fb;color:#111827}
a{color:inherit;text-decoration:none}
.container{max-width:1280px;margin:0 auto;padding:0 16px}
.topbar{display:flex;justify-content:space-between;align-items:center;padding:10px 0;font-size:12px;color:#64748b}
.logo-row{display:flex;align-items:center;gap:12px;white-space:nowrap}
.logo-row img{width:56px;height:56px;border-radius:50%;object-fit:cover;background:#fff;padding:2px;box-shadow:0 2px 10px rgba(0,0,0,.15)}
.logo-row .brand{font-weight:900;font-size:28px;letter-spacing:-0.02em;line-height:1;white-space:nowrap}
.logo-row .tagline{font-size:11px;letter-spacing:.16em;opacity:.6;font-weight:600;margin-top:4px}
@media(max-width:768px){.logo-row img{width:44px;height:44px}.logo-row .brand{font-size:22px}}

.navbar{background:var(--blue);position:sticky;top:0;z-index:50;box-shadow:0 4px 18px rgba(13,71,161,.25)}
.navbar .inner{display:flex;align-items:center;justify-content:space-between;height:52px}
.menu{display:flex;gap:2px}
.menu a{color:#fff;font-weight:800;font-size:13px;letter-spacing:.06em;padding:0 18px;height:52px;display:flex;align-items:center;transition:.2s}
.menu a:hover,.menu a.active{background:rgba(255,255,255,.12)}
.hamburger{display:none;color:#fff;background:none;border:none}
@media(max-width:860px){.menu{display:none}.menu.open{display:flex;flex-direction:column;position:absolute;top:52px;left:0;right:0;background:var(--blue);padding:8px}.menu.open a{height:44px}.hamburger{display:block}}

.breaking{display:flex;align-items:center;background:#fff;border-bottom:1px solid #e5e7eb;height:42px;overflow:hidden}
.breaking .label{background:var(--red);color:#fff;font-weight:900;font-size:11px;padding:0 12px;height:100%;display:flex;align-items:center;letter-spacing:.08em}
.breaking marquee{flex:1;font-size:13px;font-weight:600}

.hero{display:grid;grid-template-columns:1.7fr .9fr;gap:18px;margin:18px 0}
@media(max-width:900px){.hero{grid-template-columns:1fr}}
.card{background:#fff;border-radius:16px;border:1px solid #e5e7eb;overflow:hidden;box-shadow:0 8px 24px rgba(0,0,0,.04)}
.card-img{aspect-ratio:16/9;background:#e5e7eb;object-fit:cover;width:100%}
.grid-3{display:grid;grid-template-columns:2fr 1fr;gap:18px}
@media(max-width:900px){.grid-3{grid-template-columns:1fr}}
.post-list{display:grid;gap:14px}
.badge{font-size:10px;font-weight:900;letter-spacing:.08em;padding:4px 8px;border-radius:999px;display:inline-block}
footer{background:#071a3a;color:#fff;padding:40px 0 0;margin-top:40px}


/* FIX RESPONSIVE HP - Fajar Timur */
header.container {flex-wrap:wrap; gap:12px}
header.container form {flex:1; min-width:0}
header.container form input {width:100%; max-width:100%; min-width:0 !important}

@media(max-width: 768px){
  header.container {padding:10px 12px !important}
  .logo-row .brand {font-size:18px !important}
  .logo-row .tagline {display:none}
  header.container form {width:100%; order:3; flex-basis:100%}
  header.container form input {min-width:0 !important; width:100% !important; max-width:100%}
  .container.topbar {font-size:11px; padding:8px 12px}
  .topbar span:last-child {display:none}
}

@media(max-width: 480px){
  .logo-row img {width:40px !important; height:40px !important}
  .logo-row .brand {font-size:16px !important}
}

/* FIX MELUBER KONTEN BERITA & TAG */
* {max-width:100%; box-sizing:border-box}
img, video, iframe {max-width:100% !important; height:auto !important}
p, h1, h2, h3, h4, span, a, li, div {overflow-wrap:break-word; word-wrap:break-word; word-break:break-word}
.card, .container, main, article, aside {overflow:hidden}
.tag-cloud, .wp-tag-cloud {display:flex; flex-wrap:wrap; gap:8px; overflow:hidden}
.tag-cloud a, .wp-tag-cloud a {white-space:normal !important; word-break:break-word; display:inline-block; max-width:100%}
.breadcrumb {flex-wrap:wrap}
.breadcrumb span, .breadcrumb a {white-space:normal; word-break:break-word}

/* Footer satu kolom fix */
footer .container {grid-template-columns:1fr !important; text-align:center}
footer ul {list-style:none; padding:0}

/* === FIX FINAL TAG & GAMBAR MELUBER - V3 === */
/* Paksa semua TAG ukuran sama 13px, tidak besar kecil */
.tag-cloud a, .wp-tag-cloud a, .tagcloud a,
div.tagcloud a, aside .tagcloud a {
  font-size:13px !important;
  font-weight:600 !important;
  line-height:1.4 !important;
  padding:6px 10px !important;
  background:#f1f5f9 !important;
  border-radius:999px !important;
  color:#334155 !important;
  border:1px solid #e2e8f0 !important;
  margin:4px !important;
  display:inline-block !important;
  white-space:normal !important;
  word-break:break-word !important;
}

/* Container tag biar wrap rapi */
.tagcloud, .wp-tag-cloud, div.tagcloud {
  display:flex !important;
  flex-wrap:wrap !important;
  gap:6px !important;
  overflow:hidden !important;
}

/* Gambar & konten berita jangan meluber di HP */
.single .content img, .content img, .card img, article img,
.wp-block-image img, figure img {
  max-width:100% !important;
  width:100% !important;
  height:auto !important;
  border-radius:12px !important;
  display:block !important;
  margin:12px 0 !important;
}

.content, .detik-single, .container, main, article {
  max-width:100% !important;
  overflow-x:hidden !important;
  box-sizing:border-box !important;
}

/* Di single post, foto utama jangan full lebar melebihi card */
.single .card-img, .single div[style*="border-radius:16px"] img {
  max-width:100% !important;
  width:100% !important;
  object-fit:cover !important;
}


/* ULTRA FIX - PASTE PALING BAWAH style.css */
html, body {max-width:100%; overflow-x:hidden !important}
.container, main, article, .card, .content, .detik-single {max-width:100% !important; overflow-x:hidden !important; box-sizing:border-box !important}
img {max-width:100% !important; height:auto !important; box-sizing:border-box}
p, h1, h2, h3, h4, span, a, div {overflow-wrap:break-word !important; word-break:break-word !important}

/* FIX LOGO FAJAR TIMUR BIAR TIDAK KEPOTONG */
.site-branding img, .custom-logo, header img {
  max-width: 185px !important;
  width: 185px !important;
  height: auto !important;
  object-fit: contain !important;
}
.site-branding, .site-logo {
  min-width: 190px !important;
}
header .site-title {
  font-size: 19px !important;
  white-space: nowrap !important;
}

/* FIX FINAL FAJAR TIMUR - HAPUS BORDER BIRU & GAP PUTIH */
.home img, .home .wp-post-image, .home article img {
  border: 0 !important;
  background: none !important;
  padding: 0 !important;
}
.f2-wrap img { border:0 !important; background:none !important; }
.f2-big img{ height:320px !important; object-fit:cover !important; }
.f2-right a img{ height:120px !important; object-fit:cover !important; }
.f2-grid a img{ height:135px !important; object-fit:cover !important; }
.f2-big{ height:auto !important; }
.f2-big p{ flex:none !important; }

/* HAPUS GAP PUTIH BESAR DI BAWAH FAP KAMTIBMAS */
.f2-top{ align-items:start !important; }
.f2-top > *{ height:auto !important; align-self:start !important; }
.f2-big{ height:auto !important; min-height:0 !important; display:block !important; }
.f2-big p{ flex:none !important; flex-grow:0 !important; }