/*
Theme Name: The Leap Advisory
Theme URI: https://theleapadvisory.com
Author: The Leap Advisory
Author URI: https://theleapadvisory.com
Description: Executive and strategic career transition advisory theme for modern corporate leaders. Pixel-perfect, high-performance, dark-mode ready theme with complete blog and article URL integration.
Version: 1.0.2
Tested up to: 6.7
Requires at least: 6.0
Requires PHP: 7.4
License: Apache-2.0
License URI: https://www.apache.org/licenses/LICENSE-2.0
Text Domain: the-leap-advisory
Tags: modern, responsive-layout, block-patterns, one-column, custom-colors, custom-logo, featured-images, full-width-template, translation-ready
*/

/* -------------------------------------------------------------------------
   Load Core Tailwind CSS Bundle
   ------------------------------------------------------------------------- */
@import url('assets/css/bundle.css');

/* -------------------------------------------------------------------------
   CRITICAL FIX: Resilient Text & Section Visibility
   Ensure all headings, copy, cards, and sections are 100% visible by default
   so content is NEVER hidden if JS is delayed, cached, or initializing.
   ------------------------------------------------------------------------- */
.section-reveal,
.fade-in-up-scroll,
.fade-in-scale-scroll,
.animate-hero-reveal {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Smooth reveal animation enhancement when JS confirms readiness */
html.js-ready .section-reveal.scroll-anim:not(.is-visible) {
  opacity: 0 !important;
  transform: translateY(20px);
}

html.js-ready .fade-in-up-scroll.scroll-anim:not(.is-visible) {
  opacity: 0 !important;
  transform: translateY(24px) scale(0.992);
}

html.js-ready .fade-in-scale-scroll.scroll-anim:not(.is-visible) {
  opacity: 0 !important;
  transform: scale(0.965);
}

/* Transition properties when animating */
.section-reveal,
.fade-in-up-scroll,
.fade-in-scale-scroll {
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.section-reveal.is-visible,
.fade-in-up-scroll.is-visible,
.fade-in-scale-scroll.is-visible {
  opacity: 1 !important;
  transform: translateY(0) scale(1) !important;
}

/* -------------------------------------------------------------------------
   CRITICAL FIX: WordPress Admin Bar & Sticky Header Support
   When logged into WordPress, the admin bar (32px / 46px) must not overlap
   or block the floating curved navigation bar and dark mode toggle.
   ------------------------------------------------------------------------- */
body.admin-bar .sticky-header-container {
  top: calc(32px + 0.75rem) !important;
}

@media screen and (max-width: 782px) {
  body.admin-bar .sticky-header-container {
    top: calc(46px + 0.75rem) !important;
  }
}

/* Smooth anchor scrolling offset so sticky header does not cover section headings */
html {
  scroll-padding-top: 6rem;
}

/* -------------------------------------------------------------------------
   Dark Mode Base Rule Enforcement
   ------------------------------------------------------------------------- */
html.dark {
  color-scheme: dark;
  background-color: #020617;
  color: #f8fafc;
}

html.dark body {
  background-color: #020617 !important;
  color: #f8fafc !important;
}

/* -------------------------------------------------------------------------
   Dark Mode Sun & Moon Icon Automatic CSS Visibility
   ------------------------------------------------------------------------- */
html:not(.dark) .theme-icon-sun {
  display: none !important;
}
html:not(.dark) .theme-icon-moon {
  display: inline-block !important;
}

html.dark .theme-icon-sun {
  display: inline-block !important;
}
html.dark .theme-icon-moon {
  display: none !important;
}

/* Mobile navigation drawer transition & visibility */
#mobile-nav.is-open {
  display: block !important;
}

/* -------------------------------------------------------------------------
   WordPress Content Typography & Alignment Support
   ------------------------------------------------------------------------- */
.prose p {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  line-height: 1.8;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
  font-weight: 800;
  color: #0f172a;
  margin-top: 1.8em;
  margin-bottom: 0.8em;
  line-height: 1.25;
}

.dark .prose h1, .dark .prose h2, .dark .prose h3, .dark .prose h4 {
  color: #ffffff;
}

.prose h2 {
  font-size: 1.875rem;
}

.prose h3 {
  font-size: 1.5rem;
}

.prose ul, .prose ol {
  margin-top: 1.25em;
  margin-bottom: 1.25em;
  padding-left: 1.75em;
}

.prose ul {
  list-style-type: disc;
}

.prose ol {
  list-style-type: decimal;
}

.prose li {
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  line-height: 1.7;
}

.prose blockquote {
  font-family: 'Playfair Display', Georgia, Cambria, serif;
  font-style: italic;
  border-left: 4px solid #0056ef;
  padding-left: 1.5em;
  margin-top: 1.8em;
  margin-bottom: 1.8em;
  color: #1e293b;
}

.dark .prose blockquote {
  border-left-color: #4b8bff;
  color: #e2e8f0;
}

.prose a {
  color: #0056ef;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color 150ms ease;
}

.dark .prose a {
  color: #4b8bff;
}

.prose a:hover {
  color: #0036a3;
}

.dark .prose a:hover {
  color: #70a5ff;
}

.prose img {
  border-radius: 1rem;
  margin-top: 2em;
  margin-bottom: 2em;
  max-width: 100%;
  height: auto;
}

/* WordPress Core Layout Classes */
.alignwide {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.aligncenter {
  margin-left: auto;
  margin-right: auto;
  display: block;
}

/* Post Pagination */
.page-numbers {
  display: inline-flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.page-numbers li a,
.page-numbers li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
  background-color: #ffffff;
  color: #334155;
  transition: all 180ms ease;
  text-decoration: none;
}

.dark .page-numbers li a,
.dark .page-numbers li span {
  border-color: #334155;
  background-color: #0f172a;
  color: #cbd5e1;
}

.page-numbers li a:hover {
  background-color: #0056ef;
  color: #ffffff;
  border-color: #0056ef;
}

.page-numbers li span.current {
  background-color: #0056ef;
  color: #ffffff;
  border-color: #0056ef;
}
