/**
 * Editorial Theme - External CSS
 * Note: Most styles are included inline in the PHP section files
 * This file exists for system compatibility and any global overrides
 */

/* Editorial Theme Namespace: .chl-theme-editorial */

/* Typography imports */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600&family=Inter:wght@300;400;500;600;700&display=swap');

/* Base container overrides for editorial when used globally */
.chl-theme-editorial {
  --ed-font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --ed-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --ed-black: #0a0a0a;
  --ed-white: #ffffff;
  --ed-cream: #faf9f7;
  --ed-warm-gray: #f5f4f2;
  --ed-mid-gray: #a3a3a3;
  --ed-text: #262626;
  --ed-text-light: #525252;
  --ed-text-muted: #737373;
  --ed-border: #e5e5e5;
  --ed-border-dark: #d4d4d4;
  /* Connect to K3 color system - inherits from page color picker */
  --ed-accent: var(--k3-primary, #f97316);
  --ed-accent-light: var(--k3-primary-light, #FB923C);
  --ed-accent-dark: var(--k3-primary-dark, #ea580c);
  --ed-accent-rgb: var(--k3-shadow-rgb, 249, 115, 22);
  --ed-max-width: 1280px;
  --ed-content-width: 720px;
  --ed-gutter: 24px;
  --ed-section-gap: 100px;

  /* Nav base contract tokens */
  --nav-gap: 0;
  --nav-transition: all 0.2s ease;
  --nav-focus-color: var(--ed-accent);
  --nav-cta-lift: 0;
  --nav-active-weight: 600;
}

/* Ensure editorial sections render correctly in the main page flow */
.main_content .chl-theme-editorial,
.b_wrap .chl-theme-editorial {
  margin: 0;
  padding: 0;
}

/* ============================================
   COLOR SYSTEM INTEGRATION
   When inside section-color-wrapper, inherit k3 colors
   This enables per-section and global color picker support
   ============================================ */
.section-color-wrapper .chl-theme-editorial {
  --ed-accent: var(--k3-primary) !important;
  --ed-accent-light: var(--k3-primary-light) !important;
  --ed-accent-dark: var(--k3-primary-dark) !important;
  --ed-accent-rgb: var(--k3-shadow-rgb) !important;
}

/* ============================================
   BASE SECTION STYLES
   ============================================ */
.chl-theme-editorial .ed-section {
  padding: 100px 0;
  background: var(--ed-white);
  color: var(--ed-text);
  font-family: var(--ed-font-body);
}

.chl-theme-editorial .ed-section--dark {
  background: var(--ed-black);
  color: var(--ed-white);
}

.chl-theme-editorial .ed-section--cream {
  background: var(--ed-cream);
}

.chl-theme-editorial .ed-section--warm {
  background: var(--ed-warm-gray);
}

/* Container */
.chl-theme-editorial .ed-container {
  max-width: var(--ed-max-width);
  margin: 0 auto;
  padding: 0 var(--ed-gutter);
}

/* ============================================
   TYPOGRAPHY ENHANCEMENTS
   ============================================ */
.chl-theme-editorial h1,
.chl-theme-editorial h2,
.chl-theme-editorial h3,
.chl-theme-editorial h4 {
  font-family: var(--ed-font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.chl-theme-editorial p {
  font-family: var(--ed-font-body);
  line-height: 1.7;
}

/* ============================================
   HEADER SECTION STYLING
   ============================================ */
.chl-theme-editorial .ed-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--ed-white);
  border-bottom: 1px solid var(--ed-border);
  transition: all 0.3s ease;
}

.chl-theme-editorial .ed-header-inner {
  max-width: var(--ed-max-width);
  margin: 0 auto;
  padding: 1rem var(--ed-gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chl-theme-editorial .ed-logo {
  font-family: var(--ed-font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--ed-black);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.chl-theme-editorial .ed-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.chl-theme-editorial .ed-nav-link {
  font-family: var(--ed-font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ed-text-light);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  transition: color 0.3s ease;
  position: relative;
}

.chl-theme-editorial .ed-nav-link:hover,
.chl-theme-editorial .ed-nav-link.active {
  color: var(--ed-accent);
}

.chl-theme-editorial .ed-nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--ed-accent);
  transition: width 0.3s ease;
}

.chl-theme-editorial .ed-nav-link:hover::after,
.chl-theme-editorial .ed-nav-link.active::after {
  width: 100%;
}

/* ============================================
   HERO SECTION
   ============================================ */
.chl-theme-editorial .ed-hero {
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px var(--ed-gutter);
  background: var(--ed-cream);
  position: relative;
  overflow: hidden;
}

.chl-theme-editorial .ed-hero--dark {
  background: var(--ed-black);
  color: var(--ed-white);
}

.chl-theme-editorial .ed-hero__content {
  max-width: 800px;
  position: relative;
  z-index: 1;
}

.chl-theme-editorial .ed-hero__kicker {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ed-accent);
  margin-bottom: 24px;
}

.chl-theme-editorial .ed-hero__title {
  font-family: var(--ed-font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
}

.chl-theme-editorial .ed-hero__subtitle {
  font-size: 1.25rem;
  color: var(--ed-text-light);
  max-width: 600px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

/* ============================================
   BUTTONS
   ============================================ */
.chl-theme-editorial .ed-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  font-family: var(--ed-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.3s ease;
}

.chl-theme-editorial .ed-btn--primary {
  background: var(--ed-accent);
  color: var(--ed-white);
  border-color: var(--ed-accent);
}

.chl-theme-editorial .ed-btn--primary:hover {
  background: var(--ed-accent-dark);
  border-color: var(--ed-accent-dark);
  transform: translateY(-2px);
}

.chl-theme-editorial .ed-btn--outline {
  background: transparent;
  color: var(--ed-text);
  border-color: var(--ed-border-dark);
}

.chl-theme-editorial .ed-btn--outline:hover {
  background: var(--ed-black);
  color: var(--ed-white);
  border-color: var(--ed-black);
}

/* ============================================
   LINKS AND DECORATIVE ELEMENTS
   ============================================ */
.chl-theme-editorial a {
  color: var(--ed-accent);
  text-decoration: none;
  transition: color 0.3s ease;
}

.chl-theme-editorial a:hover {
  color: var(--ed-accent-dark);
}

/* Decorative dividers */
.chl-theme-editorial .ed-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin: 40px 0;
}

.chl-theme-editorial .ed-divider::before,
.chl-theme-editorial .ed-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ed-border);
  max-width: 100px;
}

.chl-theme-editorial .ed-divider span {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ed-text-muted);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */
@media (max-width: 900px) {
  .chl-theme-editorial .ed-section {
    padding: 70px 0;
  }

  .chl-theme-editorial .ed-hero {
    min-height: 60vh;
    padding: 100px var(--ed-gutter);
  }

  .chl-theme-editorial .ed-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex-wrap: nowrap;
  }
  .chl-theme-editorial .ed-nav::-webkit-scrollbar {
    display: none;
  }
  .chl-theme-editorial .ed-nav-link {
    flex-shrink: 0;
  }
}

@media (max-width: 600px) {
  .chl-theme-editorial .ed-section {
    padding: 50px 0;
  }

  .chl-theme-editorial {
    --ed-gutter: 16px;
  }
}

/* Print styles for editorial (magazine-friendly) */
@media print {
  .chl-theme-editorial {
    --ed-accent: #000;
    --ed-accent-light: #333;
  }
  .chl-theme-editorial .ed-section {
    page-break-inside: avoid;
    padding: 40px 0;
  }
  .chl-theme-editorial .ed-nav {
    display: none;
  }
}

/* ============================================
   NAV TABS (standalone magazine tab bar)
   (extracted from editorial/nav_section.php)
   ============================================ */
.ed-nav-tabs {
    border-top: 1px solid var(--ed-border);
    border-bottom: 3px double var(--ed-border);
    background: var(--ed-white);
    /* Neutralize .b_profile_tabs rules from haseeb/css/style.css */
    top: auto;
    z-index: auto;
    position: relative;
    white-space: normal;
    margin-bottom: 0;
}
.ed-nav-tabs .nav-container {
    max-width: var(--ed-max-width);
    margin: 0 auto;
    padding: 0 var(--ed-gutter);
}
.ed-nav-tabs ul {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}
.ed-nav-tabs li {
    margin: 0;
}
.ed-nav-tabs li a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 24px;
    color: var(--ed-text-muted);
    text-decoration: none;
    font-family: var(--ed-font-display);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: all 0.2s ease;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}
/* Kill K3 ::after pseudo-element underline (k3.css .b_profile_tabs li a::after).
   Editorial uses border-bottom instead — the ::after creates a second underline. */
.ed-nav-tabs li a::after {
    display: none;
}
.ed-nav-tabs li a:hover {
    color: var(--ed-black);
    border-bottom-color: var(--ed-accent, var(--ed-black));
}
.ed-nav-tabs li.active a {
    color: var(--ed-black);
    border-bottom-color: var(--ed-black);
}
.ed-nav-tabs li a i {
    font-size: 12px;
}
@media (max-width: 768px) {
    .ed-nav-tabs ul {
        justify-content: flex-start;
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .ed-nav-tabs ul::-webkit-scrollbar {
        display: none;
    }
    .ed-nav-tabs li a {
        padding: 12px 16px;
        font-size: 11px;
        white-space: nowrap;
    }
}
