/*
Theme Name: Lifestyle & Culture
Theme URI: https://example.com/lifestyle-culture
Author: Your Name
Author URI: https://example.com
Description: Tema WordPress blog travel (wisata dalam negeri & luar negeri) yang ringan, responsif, mudah dikustomisasi, SEO friendly, dan mendukung mode terang/gelap otomatis maupun manual.
Version: 1.0.0
Requires at least: 6.0
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: lifestyle-culture
Tags: blog, custom-menu, custom-logo, dark-mode, responsive, translation-ready
*/

/* Fonts are loaded via wp_enqueue_style() + preconnect in functions.php,
   not @import here — @import blocks parallel downloading and slows first paint. */

/* ==========================================================================
   1. CSS VARIABLES (LIGHT / DARK)
   ========================================================================== */
:root {
  --bg: #faf5ee;
  --bg-card: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5c5c5c;
  --border: #1a1a1a;
  --pill-bg: transparent;
  --pill-border: #1a1a1a;
  --btn-bg: #111111;
  --btn-text: #ffffff;
  --btn-outline-border: #1a1a1a;
  --tag-bg: #111111;
  --tag-text: #ffffff;
  --tag-accent-bg: #f2b544;
  --tag-accent-text: #1a1a1a;
  --footer-border: #d8d2c7;
  --input-bg: #ffffff;
  --input-border: #1a1a1a;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --radius-lg: 22px;
  --radius-pill: 999px;
  --transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

[data-theme="dark"] {
  --bg: #121212;
  --bg-card: #1c1c1c;
  --text: #f5f5f5;
  --text-muted: #b3b3b3;
  --border: #f5f5f5;
  --pill-bg: transparent;
  --pill-border: #f5f5f5;
  --btn-bg: #ffffff;
  --btn-text: #111111;
  --btn-outline-border: #f5f5f5;
  --tag-bg: #f5f5f5;
  --tag-text: #111111;
  --tag-accent-bg: #f2b544;
  --tag-accent-text: #1a1a1a;
  --footer-border: #333333;
  --input-bg: #1c1c1c;
  --input-border: #f5f5f5;
  --shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: var(--transition);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; margin: 0; padding: 0; }
button { font-family: inherit; cursor: pointer; }
.screen-reader-text { position: absolute; left: -9999px; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4,
.site-logo a, .btn, .post-tag, .footer-col h4 {
  font-family: "Poppins", "Inter", sans-serif;
}

h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; margin: 0; }

/* ==========================================================================
   3. HEADER
   ========================================================================== */
.site-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  row-gap: 10px;
  justify-content: space-between;
  padding: 20px 24px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.site-logo a { display: flex; align-items: center; }
.site-logo img { display: block; }

.site-logo-fallback {
  display: flex !important;
  align-items: center;
  gap: 10px;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  min-width: 0;
}
.site-logo-fallback img {
  width: 40px; height: 40px; border-radius: 10px; display: block; flex-shrink: 0;
}
.site-logo-fallback span {
  font-weight: 800; font-size: 18px; letter-spacing: -.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 46vw;
}

.main-navigation { display: none; }

.main-navigation ul { display: flex; gap: 28px; align-items: center; }
.main-navigation a { font-weight: 500; font-size: 15px; }
.main-navigation a:hover { opacity: .6; }

/* Region dropdowns (Dalam Negeri / Luar Negeri) */
.main-navigation li { position: relative; }
.main-navigation .sub-menu {
  display: none;
  position: absolute;
  top: 100%; left: 0;
  background: var(--bg-card);
  border: 1px solid var(--footer-border);
  border-radius: 12px;
  padding: 8px;
  min-width: 200px;
  box-shadow: var(--shadow);
  z-index: 60;
}
.main-navigation li:hover > .sub-menu { display: block; }
.main-navigation .sub-menu li { width: 100%; }
.main-navigation .sub-menu a {
  display: block; padding: 8px 12px; border-radius: 8px; font-size: 14px;
}
.main-navigation .sub-menu a:hover { background: var(--bg); opacity: 1; }

/* Inside the mobile drawer, sub-menus expand inline instead of floating */
.main-navigation.mobile-open .sub-menu {
  display: block; position: static; border: none; box-shadow: none;
  padding-left: 14px; margin-top: 8px;
}

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; flex-wrap: wrap; justify-content: flex-end; }

@media (max-width: 420px) {
  .header-actions { gap: 8px; }
  .icon-btn, .theme-toggle { width: 34px; height: 34px; }
  .icon-btn svg, .theme-toggle svg { width: 15px; height: 15px; }
  .lang-option { padding: 4px 9px; font-size: 11px; }
}

.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  color: var(--text);
  position: relative;
}

.icon-btn svg { width: 18px; height: 18px; }

.notif-dot {
  position: absolute; top: 6px; right: 7px;
  width: 7px; height: 7px; background: #e04b3f; border-radius: 50%;
}

.notif-wrapper { position: relative; }

.notif-panel {
  display: none;
  position: absolute; top: calc(100% + 10px); right: 0;
  width: 300px; max-width: 82vw;
  background: var(--bg-card);
  border: 1.5px solid var(--footer-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 14px;
  z-index: 70;
}
.notif-panel.is-open { display: block; }
.notif-panel-title { font-weight: 700; font-size: 13px; margin: 0 0 10px; }
.notif-panel ul { display: flex; flex-direction: column; gap: 10px; }
.notif-panel li a { display: flex; align-items: center; gap: 10px; }
.notif-panel li img { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.notif-panel li strong { display: block; font-size: 13px; font-weight: 600; line-height: 1.3; }
.notif-panel li em { display: block; font-size: 11px; color: var(--text-muted); font-style: normal; margin-top: 2px; }
.notif-empty { font-size: 13px; color: var(--text-muted); margin: 0; }

/* Mockup: mobile header = hamburger + logo + notification bell.
   Desktop header = logo + menu + search + Subscribe (no bell). */
.icon-search, .header-actions .btn-solid { display: none; }
.icon-notif { display: flex; }

@media (min-width: 900px) {
  .icon-search, .header-actions .btn-solid { display: flex; }
  .icon-notif { display: none; }
}

.btn {
  border-radius: var(--radius-pill);
  padding: 10px 22px;
  font-weight: 600;
  font-size: 14px;
  border: 1.5px solid var(--btn-outline-border);
  transition: var(--transition), transform .15s ease;
  display: inline-block;
}

.btn:hover { transform: translateY(-1px); }

.btn-solid { background: var(--btn-bg); color: var(--btn-text); border-color: var(--btn-bg); }
.btn-outline { background: transparent; color: var(--text); }

.menu-toggle {
  display: flex;
  background: none;
  border: none;
  color: var(--text);
}

@media (min-width: 900px) {
  .main-navigation { display: block; }
  .menu-toggle { display: none; }
}

/* Mobile nav drawer — anchored to .site-header (position:relative), so it
   always sits just below the full header regardless of how many lines the
   header itself wraps to on narrow screens. */
.main-navigation.mobile-open {
  display: block;
  position: absolute;
  top: 100%; left: 24px; right: 24px;
  margin-top: 10px;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 16px;
  z-index: 50;
  box-shadow: var(--shadow);
  max-height: 70vh;
  overflow-y: auto;
}
.main-navigation.mobile-open ul { flex-direction: column; align-items: flex-start; gap: 14px; }

/* ==========================================================================
   3b. FEATURES BAR (NEW badge + feature pills)
   ========================================================================== */
.features-bar {
  max-width: 1200px; margin: 28px auto 30px;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px; padding: 24px 24px 0;
  border-top: 1px solid var(--footer-border);
}

.new-badge {
  background: var(--btn-bg); color: var(--btn-text);
  border-radius: var(--radius-pill); padding: 8px 22px;
  font-weight: 700; font-size: 13px;
}

.feature-pills { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; flex: 1; }

.feature-pill {
  border: 1.5px solid var(--pill-border); border-radius: var(--radius-pill);
  padding: 9px 18px; font-size: 13px; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
}
.feature-pill svg { width: 15px; height: 15px; }

@media (max-width: 700px) {
  .features-bar { flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; }
  .feature-pills { justify-content: center; flex: none; width: 100%; }
}

/* ==========================================================================
   4. HERO
   ========================================================================== */
.hero {
  text-align: center;
  max-width: 720px;
  margin: 40px auto 56px;
  padding: 0 24px;
}

.hero h1 { font-size: clamp(28px, 5vw, 44px); }
.hero p { color: var(--text-muted); margin: 18px auto 26px; max-width: 520px; }

/* ==========================================================================
   4b. TRENDING / MOST VIEWED SLIDER
   ========================================================================== */
.trending { max-width: 1200px; margin: 0 auto 50px; padding: 0 24px; }
.trending-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.trending-head h2 { font-size: clamp(20px, 3vw, 26px); }
.trending-arrows { display: flex; gap: 8px; }
.trending-arrow {
  width: 36px; height: 36px; border-radius: 50%;
  border: 1.5px solid var(--border); background: transparent; color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.trending-arrow svg { width: 16px; height: 16px; }
.trending-arrow:disabled { opacity: .35; }

.trending-track {
  display: flex; gap: 16px; overflow-x: auto;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  padding-bottom: 6px; scrollbar-width: none;
}
.trending-track::-webkit-scrollbar { display: none; }

.trending-card {
  scroll-snap-align: start;
  flex: 0 0 220px;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
}
.trending-rank {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  background: rgba(17,17,17,.75); color: #fff;
  font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: var(--radius-pill);
}
.trending-card .thumb { position: relative; aspect-ratio: 4/3; overflow: hidden; background: #ccc; }
.trending-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.trending-card .body { padding: 12px 14px 16px; }
.trending-card h3 { font-size: 14px; margin-bottom: 8px; line-height: 1.35; }
.trending-views { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-muted); }

@media (max-width: 560px) {
  .trending-arrows { display: none; }
  .trending-card { flex-basis: 62vw; }
}

/* ==========================================================================
   5. FEATURED POSTS GRID
   ========================================================================== */
.grid-view-toggle {
  display: none;
  gap: 8px;
  max-width: 1200px;
  margin: 0 auto 16px;
  padding: 0 24px;
  justify-content: flex-end;
}
.grid-view-btn {
  width: 36px; height: 36px; border-radius: 10px;
  border: 1.5px solid var(--border); background: transparent; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center;
}
.grid-view-btn svg { width: 16px; height: 16px; }
.grid-view-btn.is-active { background: var(--btn-bg); color: var(--btn-text); border-color: var(--btn-bg); }

.featured-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 24px;
}

@media (max-width: 900px) {
  .featured-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .grid-view-toggle { display: flex; }
  .featured-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .featured-grid.is-list { grid-template-columns: 1fr; }
  .featured-grid .post-card .body { padding: 10px 12px 14px; }
  .featured-grid .post-card h3 { font-size: 13px; margin-bottom: 8px; }
  .featured-grid .post-card .btn { padding: 6px 12px; font-size: 12px; }
  .featured-grid.is-list .post-card { flex-direction: row; }
  .featured-grid.is-list .post-card .thumb { width: 130px; flex-shrink: 0; aspect-ratio: 1; }
  .featured-grid.is-list .post-card h3 { font-size: 14px; }
}

.post-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.post-card .thumb {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #ccc;
}
.post-card .thumb img { width: 100%; height: 100%; object-fit: cover; }

.post-tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--tag-bg); color: var(--tag-text);
  font-size: 11px; font-weight: 700;
  padding: 5px 12px; border-radius: var(--radius-pill);
}
.post-tag.accent { background: var(--tag-accent-bg); color: var(--tag-accent-text); }

.post-card .body { padding: 14px 16px 18px; flex: 1; display: flex; flex-direction: column; }
.post-card h3 { font-size: 15px; margin-bottom: 12px; flex: 1; }
.post-card .btn { align-self: flex-start; padding: 7px 16px; font-size: 13px; }

.video-card {
  background: #1e3d33;
  color: #fff;
  border-radius: var(--radius-lg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 14px; padding: 24px;
}
.video-card .play-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: #fff; color: #1e3d33;
  display: flex; align-items: center; justify-content: center;
}
.video-card h3 { color: #fff; font-size: 16px; }
.video-card .btn-solid { background: #fff; color: #1e3d33; border-color: #fff; }

/* ==========================================================================
   6. NEWSLETTER / CTA BAND
   ========================================================================== */
.cta-band { text-align: center; padding: 30px 24px 70px; }
.cta-band h2 { font-size: clamp(22px, 4vw, 30px); margin-bottom: 6px; }
.cta-band p { color: var(--text-muted); }

/* ==========================================================================
   7. FOOTER
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--footer-border);
  padding: 48px 24px 32px;
}

.footer-grid {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
}

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

.footer-col h4 { font-size: 15px; margin-bottom: 14px; }
.footer-col p, .footer-col a { color: var(--text-muted); font-size: 13px; }
.footer-col ul li { margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.footer-col ul li img { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; }
.footer-col ul li a { color: var(--text); font-size: 13px; font-weight: 500; }

.subscribe-form { display: flex; margin-top: 10px; gap: 8px; }
.subscribe-form input {
  flex: 1; border: 1.5px solid var(--input-border); background: var(--input-bg);
  color: var(--text); border-radius: var(--radius-pill); padding: 9px 14px; font-size: 13px;
}
.subscribe-form button {
  background: var(--btn-bg); color: var(--btn-text); border: none;
  border-radius: var(--radius-pill); padding: 9px 18px; font-size: 13px; font-weight: 600;
}

.social-icons { display: flex; gap: 12px; margin-top: 6px; }
.social-icons a {
  width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.social-icons svg { width: 14px; height: 14px; }

.footer-legal {
  max-width: 1200px; margin: 32px auto 0; padding-top: 24px;
  border-top: 1px solid var(--footer-border);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
}
.footer-copyright { font-size: 12px; color: var(--text-muted); margin: 0; }
.footer-legal-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer-legal-links a { font-size: 12px; color: var(--text-muted); }
.footer-legal-links a:hover { color: var(--text); }

/* ==========================================================================
   8. THEME TOGGLE SWITCH
   ========================================================================== */
.theme-toggle {
  width: 40px; height: 40px; border-radius: 50%;
  border: 1.5px solid var(--border); background: transparent; color: var(--text);
  display: flex; align-items: center; justify-content: center;
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

/* Language toggle (ID / EN) */
.lang-toggle {
  display: flex; align-items: center;
  border: 1.5px solid var(--border); border-radius: var(--radius-pill);
  padding: 3px; gap: 2px;
}
.lang-option {
  padding: 5px 12px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 700; letter-spacing: .3px;
  color: var(--text-muted);
}
.lang-option.is-active { background: var(--btn-bg); color: var(--btn-text); }

/* ==========================================================================
   10. AD SLOTS
   ========================================================================== */
.lc-ad-slot {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 24px;
  display: flex;
  justify-content: center;
  overflow: hidden;
}
.lc-ad-slot.lc-ad-single_before_content,
.lc-ad-slot.lc-ad-single_after_content {
  max-width: 760px;
  margin: 24px auto;
  padding: 0;
}
/* ==========================================================================
   9. SINGLE / PAGE CONTENT
   ========================================================================== */
.single-content {
  max-width: 760px; margin: 40px auto 80px; padding: 0 24px;
}
.single-content h1 { font-size: clamp(26px, 4vw, 38px); margin-bottom: 10px; }
.single-meta {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted); margin: 0 0 18px;
}
.single-meta-dot { opacity: .6; }
.single-views { display: flex; align-items: center; gap: 5px; }
.single-thumb {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 20px 0;
  aspect-ratio: 16 / 9;
  background: #ccc;
}
.single-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  margin: 0; border-radius: 0;
}
.single-content img { border-radius: var(--radius-lg); margin: 20px 0; max-width: 100%; height: auto; }
.single-content p { line-height: 1.75; color: var(--text); margin-bottom: 18px; }
