/* ============================================================
   NEWSROOM INDONESIA – mobile-nav.css
   Clean White Theme for Mobile App Bar, Category Strip, & Drawer
   ============================================================ */

/* ============================================================
   1. DESKTOP DEFAULTS (Hidden on Desktop)
   ============================================================ */
.mobile-center-logo {
  display: none;
}

.mobile-category-strip {
  display: none;
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.3s;
}

.mobile-nav-backdrop.active {
  opacity: 1;
  visibility: visible;
}

/* ============================================================
   2. SLIDING DRAWER MENU (Clean White Theme)
   ============================================================ */
.mobile-nav {
  display: block; /* Override default display:none */
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  max-width: 85vw;
  height: 100vh;
  height: 100dvh;
  background: #ffffff; /* Clean white drawer */
  color: var(--gray-800);
  z-index: 9999;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

.mobile-nav::-webkit-scrollbar {
  width: 4px;
}
.mobile-nav::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 4px;
}

.mobile-nav.open {
  transform: translateX(0);
}

/* Drawer Header */
.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}

.mobile-drawer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.mobile-drawer-logo img {
  height: 34px;
  width: auto;
  display: block;
}

.mobile-nav-close {
  position: static;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--gray-100);
  border: none;
  font-size: 16px;
  cursor: pointer;
  color: var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.mobile-nav-close:hover {
  background: var(--primary);
  color: #ffffff;
}

/* Drawer Search Bar */
.mobile-drawer-search {
  padding: 14px 20px;
  background: #f8f9fa;
  border-bottom: 1px solid var(--border);
}

.drawer-search-box {
  position: relative;
  display: flex;
  align-items: center;
}

.drawer-search-box input {
  width: 100%;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 9px 38px 9px 12px;
  font-size: 13px;
  color: var(--black);
  font-family: var(--font-sans);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.drawer-search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

.drawer-search-box input::placeholder {
  color: var(--gray-400);
}

.drawer-search-box button {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--gray-500);
  font-size: 14px;
  cursor: pointer;
  padding: 4px;
}

.drawer-search-box button:hover {
  color: var(--primary);
}

/* Drawer Section Headings */
.mobile-drawer-section {
  padding: 12px 0 4px;
}

.drawer-section-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  padding: 6px 20px 8px;
  margin-bottom: 2px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Drawer Navigation Items */
.mobile-drawer-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-drawer-list li {
  border-bottom: 1px solid #f0f0f0;
}

.mobile-drawer-list li a,
.mobile-drawer-list li .drawer-accordion-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--gray-800);
  text-decoration: none;
  font-family: var(--font-sans);
  transition: all 0.2s ease;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
}

.drawer-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-item-left i {
  font-size: 14px;
  width: 18px;
  text-align: center;
  color: var(--gray-500);
  transition: color 0.2s ease;
}

.mobile-drawer-list li a:hover,
.mobile-drawer-list li .drawer-accordion-btn:hover {
  background: #f8f9fa;
  color: var(--primary);
}

.mobile-drawer-list li a:hover .drawer-item-left i,
.mobile-drawer-list li .drawer-accordion-btn:hover .drawer-item-left i {
  color: var(--primary);
}

.drawer-arrow {
  font-size: 11px;
  color: var(--gray-400);
  transition: transform 0.25s ease;
}

.drawer-accordion-btn.active .drawer-arrow {
  transform: rotate(180deg);
  color: var(--primary);
}

/* Accordion Sub-items */
.drawer-submenu {
  display: none;
  background: #f8f9fa;
  padding: 6px 0;
  border-left: 3px solid var(--primary);
  margin-left: 20px;
}

.drawer-submenu.open {
  display: block;
  animation: drawerSlideDown 0.25s ease forwards;
}

@keyframes drawerSlideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.drawer-submenu a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  color: var(--gray-700) !important;
  text-transform: none !important;
}

.drawer-submenu a::before {
  content: "•";
  color: var(--gray-400);
  font-size: 14px;
}

.drawer-submenu a:hover {
  color: var(--primary) !important;
  background: #f0f2f5 !important;
  padding-left: 22px !important;
}

.drawer-submenu a:hover::before {
  color: var(--primary);
}

/* Drawer Footer Info */
.drawer-footer-info {
  padding: 20px;
  background: #f8f9fa;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

.drawer-social-icons {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.drawer-social-icons a {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--gray-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s ease;
}

.drawer-social-icons a:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-2px);
}

.drawer-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-bottom: 14px;
}

.drawer-footer-links a {
  font-size: 11.5px;
  color: var(--gray-600);
  font-weight: 600;
  text-decoration: none;
}

.drawer-footer-links a:hover {
  color: var(--primary);
}

.drawer-copyright {
  font-size: 11px;
  color: var(--gray-500);
  line-height: 1.5;
}

/* ============================================================
   3. MOBILE SCREEN STYLING (max-width: 768px) - White Theme
   ============================================================ */
@media (max-width: 768px) {

  /* Hide Desktop Header Container Ad & Desktop Logo Row */
  .site-header {
    display: none !important;
  }

  /* Transform Main Nav into Clean White Mobile App Bar */
  .main-nav {
    position: sticky;
    top: 0;
    z-index: 9990;
    background: #ffffff; /* Clean white topbar */
    border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 0;
  }

  .main-nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
    height: 54px;
    position: relative;
  }

  /* Center Logo on Mobile Topbar (Authentic brand colors) */
  .mobile-center-logo {
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    height: 100%;
  }

  .mobile-center-logo img {
    height: 32px;
    width: auto;
    /* No inversion filter - preserve crisp original logo */
  }

  /* Hamburger Menu Button */
  .hamburger {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    gap: 4.5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: 6px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 2;
  }

  .hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--black); /* Dark bars on white topbar */
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .hamburger:hover {
    background: var(--gray-100);
  }

  .hamburger.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .hamburger.active span:nth-child(2) { opacity: 0; transform: scale(0); }
  .hamburger.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  /* Mobile Search Button */
  .nav-search {
    display: flex;
    align-items: center;
  }

  .nav-search button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: transparent;
    border: none;
    color: var(--gray-800); /* Dark search icon */
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .nav-search button:hover {
    background: var(--gray-100);
    color: var(--primary);
  }

  /* Hide Desktop Horizontal Menu */
  .nav-menu {
    display: none !important;
  }

  /* ============================================================
     4. HORIZONTAL CATEGORY SCROLL STRIP (Clean White Theme)
     ============================================================ */
  .mobile-category-strip {
    display: flex !important;
    align-items: center;
    background: #ffffff; /* White background */
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 8px;
  }

  .mobile-category-strip::-webkit-scrollbar {
    display: none;
  }

  .mobile-category-strip a {
    display: inline-block;
    padding: 10px 14px;
    font-family: var(--font-sans);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--gray-700); /* Crisp dark gray text */
    text-transform: capitalize;
    letter-spacing: 0.02em;
    text-decoration: none;
    border-bottom: 2.5px solid transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
  }

  .mobile-category-strip a:hover {
    color: var(--primary);
  }

  .mobile-category-strip a.active {
    color: var(--primary);
    font-weight: 700;
    border-bottom-color: var(--primary);
  }

  /* Trending Bar Mobile Adjustments */
  .trending-bar {
    padding: 6px 0;
  }

  .trending-label {
    font-size: 10px;
    padding: 4px 8px;
    gap: 4px;
  }

  .trending-ticker span {
    font-size: 12px;
    padding: 0 14px;
  }
}

/* Extra small mobile tuning */
@media (max-width: 480px) {
  .main-nav .container {
    height: 52px;
  }
  .mobile-center-logo img {
    height: 28px;
  }
  .mobile-category-strip a {
    padding: 9px 12px;
    font-size: 12px;
  }
}
