/* ==========================================================================
   NURSEN YAKUT - CHANI NICHOLAS ZINE EDITORIAL MOBILE RESPONSIVE STYLESHEET
   ========================================================================== */

/* 1. Reset & General Layout Constraints & Mobile Tap Cleanup */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent !important;
}

*, *::before, *::after {
  box-sizing: inherit;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none;
}

a, button, input, select, textarea, label, [role="button"], .btn, .subnav-item, .drawer-nav-link, .menu-link {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0) !important;
  outline: none !important;
}

a:focus, button:focus, input:focus, select:focus, textarea:focus, *:focus {
  outline: none !important;
}

img, svg, iframe, video {
  max-width: 100%;
  height: auto;
}

/* 2. Fluid Typography & Headings Word Wrap (No Hyphenation) */
h1, h2, h3, h4, h5, h6,
.title-outline, .hero-title, .page-title, .section-title, .card-title,
.chani-brand-logo span, .category-header-title {
  word-break: normal !important;
  overflow-wrap: break-word !important;
  -webkit-hyphens: none !important;
  -moz-hyphens: none !important;
  -ms-hyphens: none !important;
  hyphens: none !important;
  text-wrap: balance;
}

@media (max-width: 768px) {
  h1, .hero-title, .page-title {
    font-size: clamp(1.75rem, 6.5vw, 2.5rem) !important;
    line-height: 1.22 !important;
    margin-bottom: 16px !important;
    letter-spacing: -0.01em;
  }

  h2, .section-title {
    font-size: clamp(1.35rem, 5vw, 2rem) !important;
    line-height: 1.25 !important;
    margin-bottom: 16px !important;
  }

  h3, .card-title {
    font-size: clamp(1.15rem, 4.5vw, 1.5rem) !important;
    line-height: 1.3 !important;
    margin-bottom: 12px !important;
  }

  p, span, li, td, th {
    font-size: clamp(0.9rem, 3.8vw, 1.02rem);
    line-height: 1.62 !important;
  }

  .wrap, .container, .main-wrap {
    padding-left: 20px !important;
    padding-right: 20px !important;
    width: 100% !important;
  }

  section {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
    margin-bottom: 24px !important;
  }
}

/* 3. Touch Targets (Minimum 44px Height/Width) */
button, .btn, input, select, textarea, .subnav-item, .menu-link {
  min-height: 44px;
  touch-action: manipulation;
}

.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 12px 22px !important;
  font-size: 13.5px !important;
  letter-spacing: 0.05em;
}

/* 4. Top Announcement Bar & Kozmik Marquee Speed Equalizer */
.chani-top-bar {
  padding: 8px 0 !important;
  font-size: 11.5px !important;
  display: flex !important;
  align-items: center !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  background: var(--parchment, #F6EFE4);
  border-bottom: 2px solid var(--ink, #221B14) !important;
  width: 100vw !important;
  max-width: 100vw !important;
  box-sizing: border-box !important;
}

.chani-top-bar-track {
  display: flex !important;
  align-items: center !important;
  gap: 40px !important;
  animation: topbarScroll 26s linear infinite;
  width: max-content !important;
  will-change: transform !important;
}

.chani-top-bar-track:hover, .chani-top-bar-track:active,
.marquee-container:hover .marquee-track, .marquee-container:active .marquee-track {
  animation-play-state: paused !important;
}

.chani-top-bar span {
  flex: 0 0 auto !important;
  display: inline-flex !important;
  align-items: center !important;
  font-size: 11.5px !important;
  letter-spacing: 0.04em !important;
  font-weight: 700 !important;
  color: inherit;
}

.chani-top-bar a {
  color: inherit !important;
  font-weight: 700;
  text-decoration: underline;
  margin-left: 5px;
}

.chani-top-bar .topbar-icon {
  color: inherit;
  fill: none;
}

@keyframes topbarScroll {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

@keyframes marqueeLoop {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-50%, 0, 0); }
}

/* 5. Mobile Navigation Header & Hamburger Drawer (Spacious & Clean Layout) */
.mobile-menu-btn {
  display: none;
  background: var(--ink, #221B14) !important;
  color: var(--parchment, #F6EFE4) !important;
  border: 2px solid var(--ink, #221B14) !important;
  padding: 8px 16px !important;
  font-family: 'Space Mono', monospace !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  cursor: pointer;
  align-items: center;
  gap: 8px;
  box-shadow: 3px 3px 0px var(--ink, #221B14) !important;
  transition: all 0.2s ease;
  flex-shrink: 0 !important;
}

.mobile-menu-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0px 0px 0px var(--ink, #221B14) !important;
}

@media (max-width: 992px) {
  .chani-subnav-bar {
    display: none !important;
  }

  .mobile-menu-btn {
    display: inline-flex !important;
  }

  .chani-main-header {
    border-bottom: 2px solid var(--ink, #221B14);
    background: var(--parchment, #F6EFE4);
  }

  .chani-main-header-row {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 16px 20px !important;
    width: 100% !important;
    text-align: left !important;
  }

  .chani-brand-logo {
    display: inline-flex !important;
    align-items: center !important;
    margin: 0 !important;
  }

  .chani-brand-logo span {
    font-size: clamp(24px, 6.2vw, 34px) !important;
    letter-spacing: 0.05em !important;
    font-weight: 800 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
  }

  .header-right-group {
    display: none !important;
  }
}

.mobile-drawer-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(34, 27, 20, 0.6);
  /* no blur */
  z-index: 99990;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-drawer-content {
  position: fixed;
  top: 0;
  right: 0;
  width: 85%;
  max-width: 340px;
  height: 100vh;
  background: var(--parchment, #F6EFE4);
  border-left: 3px solid var(--ink, #221B14);
  z-index: 99999;
  padding: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: -6px 0px 0px var(--ink, #221B14);
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
}

body.mobile-drawer-open {
  overflow: hidden !important;
}

body.mobile-drawer-open .mobile-drawer-overlay {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.mobile-drawer-open .mobile-drawer-content {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--ink, #221B14);
  margin-bottom: 20px;
}

.drawer-brand {
  font-family: 'Fraunces', serif;
  font-weight: 900;
  font-size: 18px;
  letter-spacing: 1px;
  color: var(--ink, #221B14);
  text-decoration: none;
}

.drawer-close-btn {
  background: none;
  border: 2px solid var(--ink, #221B14);
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 2px 2px 0px var(--ink, #221B14);
  padding: 0;
}

.drawer-close-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--ink, #221B14);
}

.drawer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0 0 24px 0;
}

.drawer-nav-link {
  font-family: 'Space Mono', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink, #221B14);
  text-decoration: none;
  padding: 12px 8px;
  border-bottom: 1px dashed rgba(34, 27, 20, 0.3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s ease;
}

.drawer-nav-link:hover, .drawer-nav-link.active {
  background: var(--cream, #FAF6EE);
  padding-left: 12px;
}

.drawer-actions {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 18px;
  border-top: 2px solid var(--ink, #221B14);
}

.drawer-search input {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid var(--ink, #221B14);
  background: var(--cream, #FAF6EE);
  font-family: 'Karla', sans-serif;
  font-size: 14px;
}

/* 6. Spotlight Banner & Newsletter Box (Un-squishing & Proper Padding) */
@media (max-width: 768px) {
  .spotlight-banner, .consult-teaser-section {
    padding: 28px 0 !important;
    margin: 20px 0 !important;
  }

  .spotlight-box {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    padding: 32px 20px !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    background: var(--parchment-light, #FBF7EF) !important;
    border: 2px solid var(--ink, #221B14) !important;
    box-shadow: 6px 6px 0px var(--ink, #221B14) !important;
    border-radius: 20px !important;
  }

  .spotlight-box div {
    width: 100% !important;
    text-align: center !important;
  }

  .spotlight-img {
    width: 100% !important;
    max-width: 220px !important;
    margin: 0 auto 8px auto !important;
  }

  .spotlight-img img {
    border-radius: 12px !important;
    border: 1.5px solid var(--ink, #221B14) !important;
  }

  .spotlight-box .script-accent {
    font-size: 26px !important;
    line-height: 1.3 !important;
    margin-bottom: 8px !important;
  }

  .spotlight-box p {
    font-size: 15px !important;
    line-height: 1.6 !important;
    margin-bottom: 16px !important;
    max-width: 100% !important;
  }

  .spotlight-box .btn {
    width: 100% !important;
    padding: 14px 20px !important;
    font-size: 13.5px !important;
    text-align: center !important;
  }
}

/* 7. Bento Grid & Card Un-cramping */
@media (max-width: 768px) {
  .hero-zine-grid,
  .podcast-grid,
  .services-grid,
  .blog-grid,
  .bento-grid,
  .houses-grid,
  .planets-grid,
  .zodiac-grid,
  .sunak-grid,
  .terim-grid,
  .stats-grid,
  .chani-hero-row {
    grid-template-columns: 1fr !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
  }

  .bento-card, .service-card, .blog-card, .house-card, .planet-card, .sunak-card, .terim-card, .chani-card, .paper-scrap-card {
    width: 100% !important;
    margin-bottom: 0 !important;
    padding: 24px 20px !important;
    border: 2px solid var(--ink, #221B14) !important;
    box-shadow: 5px 5px 0px var(--ink, #221B14) !important;
    border-radius: 18px !important;
  }

  .chani-hero-left, .chani-hero-right {
    width: 100% !important;
  }

  .hero-zine-grid div > div[style*="flex"] {
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }

  .hero-zine-grid .btn {
    width: 100% !important;
    text-align: center !important;
  }

  footer {
    padding: 40px 0 24px 0 !important;
  }

  .footer-grid {
    grid-template-columns: 1fr !important;
    gap: 32px !important;
    margin-bottom: 32px !important;
  }

  .footer-bottom {
    flex-direction: column !important;
    gap: 12px !important;
    text-align: center !important;
    padding-top: 24px !important;
  }
}

/* 8. Perfect Geometric Circle for Modal Close Buttons */
.modal-close {
  width: 44px !important;
  height: 44px !important;
  min-width: 44px !important;
  min-height: 44px !important;
  max-width: 44px !important;
  max-height: 44px !important;
  border-radius: 50% !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  aspect-ratio: 1 / 1 !important;
  box-sizing: border-box !important;
}

@media (max-width: 768px) {
  .modal-overlay.active, .modal-backdrop.active {
    padding: 16px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .modal-content, .modal-card, .login-box {
    width: 100% !important;
    max-width: 100% !important;
    max-height: 88vh !important;
    overflow-y: auto !important;
    padding: 24px 20px !important;
    margin: 0 auto !important;
    box-shadow: 6px 6px 0px var(--ink, #221B14) !important;
    border-radius: 20px !important;
  }

  .modal-close {
    top: 14px !important;
    right: 14px !important;
  }
}

/* 9. Admin Panel Mobile Adaptation (`admin.html`) */
@media (max-width: 992px) {
  body.admin-body {
    display: flex !important;
    flex-direction: column !important;
  }

  .admin-sidebar {
    width: 100% !important;
    height: auto !important;
    position: relative !important;
    border-right: none !important;
    border-bottom: 3px solid var(--ink, #221B14) !important;
  }

  .sidebar-menu {
    display: flex !important;
    overflow-x: auto !important;
    white-space: nowrap !important;
    padding: 12px 10px !important;
    gap: 10px !important;
    scrollbar-width: thin;
  }

  .menu-item {
    flex: 0 0 auto !important;
  }

  .menu-link {
    padding: 10px 16px !important;
    font-size: 13px !important;
    border: 1.5px solid var(--ink, #221B14) !important;
    background: var(--parchment, #F6EFE4) !important;
  }

  .menu-link.active {
    background: var(--ink, #221B14) !important;
    color: var(--parchment, #F6EFE4) !important;
  }

  .admin-main {
    margin-left: 0 !important;
    padding: 20px 16px !important;
    width: 100% !important;
  }

  .top-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 14px !important;
  }

  .table-responsive, table {
    display: block !important;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch !important;
    white-space: nowrap;
  }

  .zine-format-bar {
    overflow-x: auto !important;
    white-space: nowrap !important;
    display: flex !important;
    gap: 8px !important;
    padding: 10px 6px !important;
    scrollbar-width: thin;
  }

  .zine-format-bar button, .zine-format-bar select, .zine-format-bar input {
    flex: 0 0 auto !important;
  }
}

/* 10. Marquee Track Fix */
.marquee-container {
  overflow: hidden !important;
  width: 100vw !important;
  max-width: 100vw !important;
}

.marquee-track {
  display: flex !important;
  width: max-content !important;
}

/* 11. Zine Editorial Custom Scrollbar (Global & Cross-Browser) */
::-webkit-scrollbar,
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 10px !important;
  height: 10px !important;
}

::-webkit-scrollbar-track,
html::-webkit-scrollbar-track,
body::-webkit-scrollbar-track,
*::-webkit-scrollbar-track {
  background: var(--parchment-light, #F6EFE4) !important;
  border-left: 1.5px solid var(--ink, #221B14) !important;
}

::-webkit-scrollbar-thumb,
html::-webkit-scrollbar-thumb,
body::-webkit-scrollbar-thumb,
*::-webkit-scrollbar-thumb {
  background: var(--ink, #221B14) !important;
  border-radius: 6px !important;
  border: 2px solid var(--parchment-light, #F6EFE4) !important;
}

::-webkit-scrollbar-thumb:hover,
html::-webkit-scrollbar-thumb:hover,
body::-webkit-scrollbar-thumb:hover,
*::-webkit-scrollbar-thumb:hover {
  background: #fcd2fb !important;
  border-color: var(--ink, #221B14) !important;
}

::-webkit-scrollbar-corner,
html::-webkit-scrollbar-corner,
body::-webkit-scrollbar-corner,
*::-webkit-scrollbar-corner {
  background: var(--parchment-light, #F6EFE4) !important;
}

/* Scoped Firefox Support (prevents Chrome 121+ from triggering native OS scrollbar fallback) */
@supports (-moz-appearance: none) {
  html, body, * {
    scrollbar-width: thin;
    scrollbar-color: var(--ink, #221B14) var(--parchment-light, #F6EFE4);
  }
}

/* ==========================================================================
   Header & Mobile Drawer Social Media Buttons (Chani Zine Style)
   ========================================================================== */
.header-social-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.header-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  border: 1.5px solid var(--ink, #221B14);
  background: var(--parchment-light, #FAF6EE);
  color: var(--ink, #221B14);
  box-shadow: 2px 2px 0px var(--ink, #221B14);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  text-decoration: none;
  cursor: pointer;
  flex-shrink: 0;
}

.header-social-btn:hover {
  transform: translate(-1.5px, -1.5px);
  box-shadow: 3.5px 3.5px 0px var(--ink, #221B14);
  background: var(--gold, #C9A24B);
  color: var(--ink, #221B14);
}

.header-social-btn svg {
  display: block;
  width: 17px;
  height: 17px;
  stroke: currentColor;
}

.drawer-social-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 14px;
}

.drawer-social-links .header-social-btn {
  width: 42px;
  height: 42px;
  background: var(--parchment, #F6EFE4);
}

@media (max-width: 1120px) and (min-width: 992px) {
  .header-search input {
    width: 160px !important;
  }
  .header-social-btn {
    width: 34px;
    height: 34px;
  }
  .header-social-btn svg {
    width: 15px;
    height: 15px;
  }
}

