/*
Theme Name: South Punjab Documentary Portfolio
Theme URI: https://jamshedrizwani.com/
Author: Jamshed Rizwani
Author URI: https://jamshedrizwani.com/
Description: An RTL-first editorial and documentary theme for Urdu/Saraiki photojournalism — video dispatches, photo essays, oral-history audio archives and field methodology. Built from the "South Punjab Editorial Portfolio & Documentary Platform" design system: Kashigari indigo, desert ochre, archival ivory, razor-sharp editorial edges and museum-grade field metadata.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: south-punjab
Tags: rtl-language-support, editorial, photography, video, portfolio, custom-logo, custom-menu, featured-images, translation-ready, three-columns, full-width-template
*/

:root {
  --sp-primary: #000e25;
  --sp-primary-container: #0e2442;
  --sp-secondary: #994703;
  --sp-secondary-container: #fc934f;
  --sp-tertiary: #000f26;
  --sp-surface: #fbf9f6;
  --sp-surface-dim: #dbdad7;
  --sp-surface-container: #efeeeb;
  --sp-surface-container-high: #eae8e5;
  --sp-surface-container-highest: #e4e2df;
  --sp-surface-container-low: #f5f3f0;
  --sp-surface-container-lowest: #ffffff;
  --sp-on-surface: #1b1c1a;
  --sp-on-surface-variant: #44474e;
  --sp-outline: #74777e;
  --sp-outline-variant: #c4c6ce;
  --sp-surface-tint: #4b5f80;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: clip;
  max-width: 100%;
}

body {
  overscroll-behavior: none;
  font-family: 'Nafees-Web-Naskh', 'Nafees Web Naskh', 'Noto Sans Arabic', Tahoma, system-ui, sans-serif;
  background-color: var(--sp-surface);
  color: var(--sp-on-surface);
}

main > :first-child {
  margin-top: 0 !important;
}

main > :last-child {
  margin-bottom: 0 !important;
}

::-webkit-scrollbar {
  display: none;
}

@font-face {
  font-family: 'Jameel Noori Nastaleeq';
  src: local('Jameel Noori Nastaleeq'),
       local('Jameel-Noori-Nastaleeq'),
       local('JameelNooriNastaleeq'),
       url("https://db.onlinewebfonts.com/t/8ae7fe1e60ecd9ad8e4161d1fc408e09.woff2") format("woff2"),
       url("https://db.onlinewebfonts.com/t/8ae7fe1e60ecd9ad8e4161d1fc408e09.woff") format("woff"),
       url("https://db.onlinewebfonts.com/t/8ae7fe1e60ecd9ad8e4161d1fc408e09.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Jameel Noori Nastaleeq Kasheeda';
  src: local('Jameel Noori Nastaleeq Kasheeda'),
       local('Jameel-Noori-Nastaleeq-Kasheeda'),
       local('JameelNooriNastaleeqKasheeda');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nafees-Web-Naskh';
  src: local('Nafees-Web-Naskh'),
       local('Nafees Web Naskh'),
       local('NafeesWebNaskh'),
       local('NafeesWeb'),
       url('assets/fonts/nafees-web-naskh-regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Nafees Web Naskh';
  src: local('Nafees Web Naskh'),
       local('Nafees-Web-Naskh'),
       local('NafeesWebNaskh'),
       local('NafeesWeb'),
       url('assets/fonts/nafees-web-naskh-regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Hussaini-Nastaleeq';
  src: local('Hussaini-Nastaleeq'), local('Hussaini Nastaleeq'), local('HussainiNastaleeq');
  font-display: swap;
}

h1, h2, h3,
.font-urdu-title {
  font-family: 'Jameel Noori Nastaleeq', 'Jameel-Noori-Nastaleeq', 'Jameel Noori Nastaleeq Kasheeda', 'Hussaini-Nastaleeq', 'Hussaini Nastaleeq', Tahoma, 'Noto Nastaliq Urdu', 'Gulzar', serif !important;
  line-height: 1.7;
}

.font-urdu-body,
.font-label-caps,
.font-label-ui,
p,
.sp-prose li,
.entry-content li,
blockquote,
figcaption,
.sp-prose {
  font-family: 'Nafees-Web-Naskh', 'Nafees Web Naskh', 'Noto Sans Arabic', Tahoma, system-ui, sans-serif;
  line-height: 1.85;
}

.line-clamp-3,
.line-clamp-2 {
  line-height: 1.95 !important;
  padding-bottom: 0.25rem;
}

.font-metadata-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ==========================================================================
   Header Editorial Navigation (Desktop & Mobile Drawer)
   Scoped strictly to the masthead navigation to preserve site-wide layout.
   ========================================================================== */

/* Brand Title & Tagline Auto-Adjustment (صحافت • ڈیٹا • بصیرت • اثر) */
.sp-masthead .sp-brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sp-masthead .sp-brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.sp-masthead a.sp-brand-title,
.sp-masthead .sp-brand-title {
  font-family: 'Jameel Noori Nastaleeq', 'Jameel-Noori-Nastaleeq', 'Hussaini-Nastaleeq', Tahoma, serif !important;
  font-size: 22px;
  line-height: 1.15 !important;
  color: var(--sp-primary, #000e25);
  text-decoration: none;
  margin: 0 !important;
  padding: 0 !important;
  display: block;
}

@media (min-width: 640px) {
  .sp-masthead a.sp-brand-title,
  .sp-masthead .sp-brand-title {
    font-size: 25px;
  }
}

.sp-masthead .sp-brand-tagline {
  font-family: 'Nafees-Web-Naskh', 'Nafees Web Naskh', Tahoma, sans-serif !important;
  font-size: 11px !important;
  line-height: 1.25 !important;
  color: var(--sp-on-surface-variant, #44474e) !important;
  letter-spacing: 0.04em;
  margin-top: 1px !important;
  margin-bottom: 0 !important;
  padding: 0 !important;
  display: block;
  white-space: nowrap;
  text-align: right;
}

/* Base font for all header navigation elements */
.sp-masthead nav,
.sp-desktop-nav-list,
.sp-drawer-nav-list,
#sp-mobile-drawer {
  font-family: 'Nafees-Web-Naskh', 'Nafees Web Naskh', Tahoma, sans-serif !important;
  -webkit-font-smoothing: antialiased;
}

/* Responsive visibility: Desktop Nav vs Mobile Toggle */
.sp-desktop-nav {
  display: none !important;
}

.sp-mobile-nav-toggle {
  display: flex !important;
}

@media (min-width: 1024px) {
  .sp-desktop-nav {
    display: flex !important;
    align-items: center;
  }
  .sp-mobile-nav-toggle {
    display: none !important;
  }
}

/* -------------------------------- Desktop Navigation (1024px and wider) */
.sp-desktop-nav-list {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 8px;
}

@media (min-width: 1180px) {
  .sp-desktop-nav-list {
    gap: 14px;
  }
}

@media (min-width: 1280px) {
  .sp-desktop-nav-list {
    gap: 18px;
  }
}

@media (min-width: 1440px) {
  .sp-desktop-nav-list {
    gap: 22px;
  }
}

.sp-desktop-nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 9px;
  font-family: 'Nafees-Web-Naskh', 'Nafees Web Naskh', Tahoma, sans-serif !important;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--sp-on-surface-variant, #44474e);
  text-decoration: none;
  white-space: nowrap;
  border-radius: 6px;
  background-color: transparent;
  transition: all 0.18s ease-in-out;
  box-sizing: border-box;
}

@media (min-width: 1180px) {
  .sp-desktop-nav-link {
    padding: 0 11px;
    font-size: 17.5px;
  }
}

@media (min-width: 1280px) {
  .sp-desktop-nav-link {
    padding: 0 12px;
    font-size: 18px;
  }
}

@media (min-width: 1440px) {
  .sp-desktop-nav-link {
    padding: 0 14px;
    font-size: 18px;
  }
}

/* Hover state for idle desktop links */
.sp-desktop-nav-link:hover {
  color: var(--sp-on-surface, #1b1c1a);
  background-color: var(--sp-surface-container, #efeeeb);
}

/* Active State for Current Page ONLY */
.sp-desktop-nav-link.is-active,
.current-menu-item > .sp-desktop-nav-link,
.current_page_item > .sp-desktop-nav-link {
  color: #ffffff !important;
  background-color: var(--sp-primary-container, #0e2442) !important;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(14, 36, 66, 0.22);
}

/* Strictly ensure no stray peach background on last item or any idle item */
.sp-desktop-nav-list li > a:not(.is-active) {
  background-color: transparent !important;
}

/* -------------------------------- Tablet & Mobile Drawer (< 1024px) */
.sp-drawer-toggle {
  min-height: 44px;
  min-width: 44px;
}

/* Dimmed backdrop */
#sp-drawer-backdrop {
  position: fixed !important;
  inset: 0 !important;
  background-color: rgba(0, 14, 37, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 99998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}

#sp-drawer-backdrop.is-open {
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Offcanvas RTL Drawer Container */
#sp-mobile-drawer {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: auto !important;
  width: 320px;
  max-width: 86vw;
  height: 100vh;
  height: 100dvh;
  background-color: #ffffff;
  z-index: 99999;
  box-shadow: -6px 0 30px rgba(0, 14, 37, 0.22);
  display: none !important;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  box-sizing: border-box;
}

#sp-mobile-drawer.is-open {
  display: flex !important;
  transform: translateX(0) !important;
}

/* Drawer Navigation List */
.sp-drawer-nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Drawer Links (18-20px, >= 44px tap target) */
.sp-drawer-nav-link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  font-family: 'Nafees-Web-Naskh', 'Nafees Web Naskh', Tahoma, sans-serif !important;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--sp-on-surface-variant, #44474e);
  text-decoration: none;
  border-radius: 8px;
  background-color: transparent;
  transition: all 0.18s ease-in-out;
  box-sizing: border-box;
}

@media (min-width: 480px) {
  .sp-drawer-nav-link {
    font-size: 19px;
    min-height: 50px;
    padding: 0 18px;
  }
}

.sp-drawer-nav-link:hover {
  color: var(--sp-on-surface, #1b1c1a);
  background-color: var(--sp-surface-container, #efeeeb);
}

/* Drawer Active State (Current Page ONLY) */
.sp-drawer-nav-link.is-active,
.current-menu-item > .sp-drawer-nav-link,
.current_page_item > .sp-drawer-nav-link {
  color: #ffffff !important;
  background-color: var(--sp-primary-container, #0e2442) !important;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(14, 36, 66, 0.22);
}

/* Equalizer bar keyframes */
@keyframes sp-eq-bar {
  0%, 100% {
    height: 4px;
  }
  50% {
    height: 16px;
  }
}

.animate-sp-eq {
  animation: sp-eq-bar 1.2s ease-in-out infinite;
}

/* Modal backdrop transition */
#sp-transcript-modal:not([hidden]),
#sp-syndicate-modal:not([hidden]) {
  display: flex !important;
  animation: sp-modal-fade 0.2s ease-out;
}

@keyframes sp-modal-fade {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

/* Field wire carousel transition */
.sp-wire-slide.is-entering {
  animation: sp-wire-slide-in 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes sp-wire-slide-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


