/* =============================================
   ForgeSOP – Main Stylesheet
   Faithfully ported from React SOP Hub Website
   ============================================= */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { min-height: 100vh; width: 100%; }

/* ── Typography ── */
h1,h2,h3,h4,h5,h6 { line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.25rem; }
a  { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ── Utilities ── */
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 2rem; }
.section-padding { padding: 8rem 0; }
.text-gradient {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem; border-radius: 9999px; font-weight: 600;
  transition: all 0.2s ease; cursor: pointer; border: 1px solid transparent;
  font-size: 1rem; text-decoration: none;
}
.btn-orange {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 4px 6px -1px rgba(249,115,22,.3);
}
.btn-orange:hover {
  background: var(--primary-hover); border-color: var(--primary-hover);
  transform: translateY(-1px); box-shadow: 0 8px 15px -3px rgba(249,115,22,.4);
  color: #fff;
}
.btn-black {
  background: #111827; color: #fff; border-color: #111827;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.1);
}
.btn-black:hover {
  background: #000; border-color: #000; transform: translateY(-1px);
  box-shadow: 0 8px 15px -3px rgba(0,0,0,.2); color: #fff;
}
.btn-primary {
  background: var(--primary); color: #fff; border-color: var(--primary);
  box-shadow: 0 4px 6px -1px rgba(249,115,22,.3);
}
.btn-primary:hover {
  background: var(--primary-hover); border-color: var(--primary-hover);
  transform: translateY(-1px); box-shadow: 0 8px 15px -3px rgba(249,115,22,.4);
  color: #fff;
}
.btn-outline-orange {
  background: transparent; color: #f97316; border: 2px solid #f97316;
}
.btn-outline-orange:hover {
  background: #fff7ed; transform: translateY(-1px);
}

/* ── Grids ── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

/* ── Animations ── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.6s ease-out forwards; }
.fade-in-up { animation: fadeIn 0.8s ease-out forwards 0.4s; opacity: 0; }

@keyframes scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.animate-scroll { display: flex; width: max-content; animation: scroll 30s linear infinite; }
.animate-scroll:hover { animation-play-state: paused; }

/* ── Badge ── */
.badge {
  display: inline-block; padding: 0.25rem 0.75rem; background: #fff7ed;
  border-radius: 9999px; color: #ea580c; font-size: 0.875rem;
  font-weight: 600; margin-bottom: 1.5rem; border: 1px solid #ffedd5;
}

/* ── Cards ── */
.card-base {
  background: #fff; padding: 2.5rem; border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,.05);
  display: flex; flex-direction: column; align-items: flex-start;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card-base:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(0,0,0,.1);
}

.hover-lift { transition: transform 0.3s ease, box-shadow 0.3s ease; }
.hover-lift:hover { transform: translateY(-5px); box-shadow: 0 10px 25px -5px rgba(0,0,0,.1); }

/* ── Icon Box ── */
.icon-box {
  width: 56px; height: 56px; background: var(--surface-hover);
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  color: var(--primary); margin-bottom: 1.5rem;
  border: 1px solid rgba(249,115,22,.1);
}
.icon-box-lg {
  width: 64px; height: 64px; background: #fff7ed; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  color: #ea580c; margin-bottom: 1.5rem;
  box-shadow: inset 0 0 0 1px #ffedd5;
}

/* ── Hero Section ── */
.hero-section {
  padding: 4rem 0; text-align: center; position: relative;
}
.hero-bg-glow {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); width: 100%; height: 100%;
  background: radial-gradient(circle at center, rgba(249,115,22,.05) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}

/* ── Site Header / Navbar ── */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--header-height); display: flex; align-items: center;
  transition: all 0.3s ease;
  background: transparent; backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled,
body:not(.home) .site-header {
  background: rgba(255,255,255,.9);
  border-bottom: 1px solid var(--border-color);
}
.navbar { width: 100%; }
.navbar-container {
  max-width: var(--container-width); margin: 0 auto; padding: 0 2rem;
  display: flex; justify-content: space-between; align-items: center; width: 100%;
}

/* Logo */
.navbar-logo a,
.navbar-logo .logo-text {
  font-size: 1.5rem; font-weight: bold; display: flex; align-items: center;
  gap: 0.5rem; color: var(--text-primary); text-decoration: none; width: 200px;
}
.logo-icon {
  width: 24px; height: 24px; background: var(--accent-gradient); border-radius: 6px;
  display: inline-block; flex-shrink: 0;
}

/* Center Nav */
.navbar-menu {
  position: absolute; left: 50%; transform: translateX(-50%);
}
.navbar-menu .menu,
.navbar-menu .navbar-nav {
  display: flex; gap: 2rem; align-items: center;
  list-style: none; margin: 0; padding: 0;
}
.navbar-menu .menu li a,
.navbar-menu .navbar-nav li a {
  font-size: 0.9rem; color: var(--text-secondary); text-decoration: none;
  font-weight: 400; transition: color 0.2s;
}
.navbar-menu .menu li a:hover,
.navbar-menu .navbar-nav li a:hover,
.navbar-menu .menu li.current-menu-item > a,
.navbar-menu .menu li.current_page_item > a {
  color: var(--primary); font-weight: bold;
}

/* Dropdown sub-menu (wp_nav_menu & fallback) */
.navbar-menu .menu li,
.navbar-menu .navbar-nav li { position: relative; }
.navbar-menu .menu li .sub-menu,
.navbar-menu .navbar-nav li .sub-menu {
  display: none; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%); padding-top: 1rem;
  list-style: none; margin: 0;
}
.navbar-menu .menu li:hover > .sub-menu,
.navbar-menu .navbar-nav li:hover > .sub-menu { display: block; }
.navbar-menu .menu li .sub-menu::before,
.navbar-menu .navbar-nav li .sub-menu::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1rem;
}
.navbar-menu .sub-menu {
  background: #fff; border: 1px solid var(--border-color);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
  border-radius: 12px; width: 180px; padding: 0.5rem; overflow: hidden;
}
.navbar-menu .sub-menu li a {
  display: block; padding: 0.75rem 1rem; font-size: 0.9rem;
  color: var(--text-secondary); border-radius: 8px; transition: background 0.2s;
}
.navbar-menu .sub-menu li a:hover {
  background: #f9fafb; color: var(--primary);
}
.navbar-menu .navbar-nav li.menu-item-has-children > a svg {
  margin-left: 0.25rem; vertical-align: middle;
}

/* CTA Buttons */
.navbar-cta {
  display: flex; gap: 1rem; align-items: center;
  min-width: 200px; justify-content: flex-end;
}
.navbar-cta .btn {
  height: 42px; padding: 0 1.5rem; font-size: 0.9rem;
}

/* Mobile Toggle */
.navbar-toggle {
  display: none; background: none; border: none; cursor: pointer; padding: 0.5rem;
  flex-direction: column; gap: 5px; width: 28px;
}
.navbar-toggle span {
  display: block; width: 100%; height: 2px; background: var(--text-primary);
  border-radius: 2px; transition: all 0.3s ease;
}
.navbar-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.navbar-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.navbar-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border-color); padding: 4rem 0 2rem;
  margin-top: 4rem; background: #f9fafb;
}
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 3rem; margin-bottom: 3rem;
}
.footer-brand-desc {
  color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; max-width: 280px;
}
.footer-col-title {
  font-weight: 600; font-size: 0.85rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--text-primary); margin-bottom: 1.25rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-links a {
  color: var(--text-secondary); font-size: 0.9rem; text-decoration: none; transition: color 0.2s;
}
.footer-links a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid var(--border-color); padding-top: 2rem;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer-copyright { color: var(--text-secondary); font-size: 0.85rem; opacity: 0.8; }
.footer-legal { display: flex; gap: 1.5rem; color: var(--text-secondary); font-size: 0.85rem; }
.footer-legal a { color: inherit; text-decoration: none; }

/* ── Feature Rows (Zig-Zag) ── */
.feature-row {
  display: grid; grid-template-columns: 1fr; gap: 3rem;
  align-items: center; margin-bottom: 6rem;
}
@media (min-width: 968px) {
  .feature-row { grid-template-columns: 1fr 1fr; gap: 5rem; }
  .feature-row:nth-child(even) .feature-text { order: 2; }
  .feature-row:nth-child(even) .feature-image { order: 1; }
}
.feature-image {
  border-radius: 16px; overflow: hidden;
  transition: transform 0.3s ease; min-height: 320px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--text-secondary); position: relative;
}
.feature-image:hover { transform: translateY(-5px); }

/* ── Dashboard Mockup ── */
.dashboard-mock-grid {
  display: grid; grid-template-columns: 220px 1fr;
  min-height: 400px; max-height: 500px; overflow: hidden;
}
.dashboard-mock-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2rem;
}
.dashboard-mock-charts {
  display: grid; grid-template-columns: 2fr 1fr; gap: 1rem;
}
.mockup-stat {
  background: #fff; border-radius: 10px; padding: 1rem; border: 1px solid var(--border-color);
}
.mockup-stat-value { font-size: 1.5rem; font-weight: 700; color: var(--text-primary); }
.mockup-stat-label { font-size: 0.7rem; color: var(--text-secondary); }
.mockup-bar { height: 8px; border-radius: 4px; background: #f3f4f6; margin-bottom: 0.5rem; }
.mockup-bar-fill { height: 100%; border-radius: 4px; background: var(--primary); }

/* ── Pricing Section ── */
.pricing-section { position: relative; background: #fff7ed; }
.pricing-glow {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  width: 800px; height: 400px;
  background: radial-gradient(ellipse, rgba(249,115,22,.15) 0%, rgba(0,0,0,0) 70%);
  filter: blur(80px); z-index: 0; pointer-events: none;
}
.pricing-toggle {
  display: inline-flex; background: #f3f4f6; padding: 4px;
  border-radius: 9999px; border: 1px solid var(--border-color);
}
.pricing-toggle-btn {
  padding: 0.5rem 1.5rem; border-radius: 9999px; border: none;
  background: transparent; color: var(--text-secondary); cursor: pointer;
  font-weight: 500; transition: all 0.2s;
}
.pricing-toggle-btn.active {
  background: #fff; color: var(--text-primary);
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
}
.pricing-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; align-items: stretch;
}
.pricing-grid .pricing-card-featured { transform: scale(1.03); }
.pricing-card {
  background: #fff; border: 1px solid var(--border-color); border-radius: 24px;
  padding: 2.5rem 2rem; display: flex; flex-direction: column;
  position: relative; transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.pricing-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px -5px rgba(0,0,0,.05); }
.pricing-card.highlighted {
  border: 2px solid var(--primary); transform: scale(1.03); z-index: 1;
  box-shadow: 0 25px 50px -12px rgba(249,115,22,.15);
}
.pricing-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--primary); color: #fff; padding: 0.25rem 0.75rem;
  border-radius: 9999px; font-size: 0.75rem; font-weight: 600; white-space: nowrap;
}
.pricing-card h3 { font-size: 1.4rem; margin-bottom: 0.5rem; }
.pricing-price { font-size: 3rem; font-weight: 800; color: #111827; letter-spacing: -0.02em; line-height: 1.1; }
.pricing-price span { font-size: 1.15rem; color: var(--text-secondary); font-weight: 500; }
.pricing-price .price-value { font-size: 3rem; font-weight: 800; color: #111827; }
.pricing-features { margin-bottom: 2rem; flex: 1; display: flex; flex-direction: column; gap: 0.85rem; }
.pricing-features li { display: flex; gap: 0.75rem; align-items: center; font-size: 0.95rem; }
.pricing-features li .check { color: #f97316; font-weight: bold; flex-shrink: 0; }
.pricing-note { text-align: center; font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.75rem; }

/* ── Target Audience ── */
.audience-card-orange {
  background: #fff7ed; padding: 3.5rem; border-radius: 32px; border: 1px solid #ffedd5;
}
.audience-card-blue {
  background: #f0f9ff; padding: 3.5rem; border-radius: 32px; border: 1px solid #e0f2fe;
}
.audience-list { font-size: 1.15rem; display: flex; flex-direction: column; gap: 1.25rem; }
.audience-list li { display: flex; align-items: center; gap: 12px; font-weight: 500; }

/* ── Testimonials ── */
.star-rating { display: flex; gap: 4px; color: #f59e0b; margin-bottom: 1.5rem; }

/* ── Security Items ── */
.security-item {
  display: flex; align-items: center; gap: 1.5rem; padding: 1.5rem;
  border-radius: 16px; border: 1px solid var(--border-color); background: #f9fafb;
}
.security-icon {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 12px;
  background: #fff7ed; color: var(--primary); display: flex;
  align-items: center; justify-content: center; border: 1px solid #ffedd5;
}

/* ── CTA Block ── */
.cta-block {
  background: linear-gradient(135deg, rgba(249,115,22,.05) 0%, rgba(245,158,11,.05) 100%);
  border: 1px solid rgba(249,115,22,.2); border-radius: 32px;
  padding: 5rem 2rem; position: relative; overflow: hidden; text-align: center;
}

/* ── Timeline ── */
.timeline-container { position: relative; max-width: 800px; margin: 0 auto; padding: 2rem 0; }
.timeline-container::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  background: var(--border-color); transform: translateX(-50%);
}
.timeline-item { position: relative; margin-bottom: 3rem; width: 50%; padding: 0 2rem; }
.timeline-item:nth-child(odd) { left: 0; text-align: right; }
.timeline-item:nth-child(even) { left: 50%; text-align: left; }
.timeline-dot {
  position: absolute; top: 0; width: 16px; height: 16px; background: var(--primary);
  border-radius: 50%; border: 4px solid var(--bg-color); box-shadow: 0 0 0 1px var(--primary);
}
.timeline-item:nth-child(odd) .timeline-dot { right: -8px; }
.timeline-item:nth-child(even) .timeline-dot { left: -8px; }

/* ── Logo Ticker ── */
.logo-ticker-item {
  opacity: 0.6; font-weight: 600; font-size: 1.5rem; transition: opacity 0.3s;
  padding: 0 4rem; white-space: nowrap; color: #9ca3af;
}
.logo-ticker-item:hover { opacity: 1; }

/* ── Team ── */
.team-avatar {
  width: 80px; height: 80px; border-radius: 50%; margin-bottom: 1.5rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: bold; color: #fff;
  border: 4px solid #fff; box-shadow: 0 4px 6px -1px rgba(0,0,0,.1);
}
.team-role-tag {
  display: inline-block; padding: 0.25rem 0.75rem; border-radius: 9999px;
  font-size: 0.75rem; font-weight: 600; margin-bottom: 1rem; text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Blog / Post Styles ── */
.blog-featured-card {
  display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
  background: #f9fafb; border-radius: 24px; overflow: hidden;
  border: 1px solid var(--border-color); transition: transform 0.3s, box-shadow 0.3s;
}
.blog-featured-card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -10px rgba(0,0,0,.1); }
.category-tag {
  display: inline-block; padding: 0.2rem 0.6rem; background: #fff7ed;
  border-radius: 6px; color: #ea580c; font-size: 0.8rem; font-weight: 600;
}

/* ── Single Post ── */
.entry-header { margin-bottom: 2rem; }
.entry-title { font-size: 2.75rem; margin-bottom: 1.5rem; line-height: 1.15; letter-spacing: -0.02em; }
.entry-meta { display: flex; align-items: center; gap: 1rem; margin-bottom: 2.5rem; }
.entry-content { max-width: 720px; margin: 0 auto; }
.entry-content p { font-size: 1.125rem; line-height: 1.8; color: #374151; margin-bottom: 1.5rem; }
.entry-content h2 { font-size: 1.75rem; margin-top: 2.5rem; margin-bottom: 1rem; line-height: 1.3; }
.post-tags { display: flex; gap: 0.5rem; }
.post-tag {
  padding: 0.3rem 0.75rem; background: #f3f4f6; border-radius: 8px;
  font-size: 0.85rem; color: var(--text-secondary);
}

/* ── Comparison Table ── */
.comparison-table {
  width: 100%; border-collapse: collapse; background: #fff; border-radius: 12px;
  overflow: hidden; box-shadow: 0 4px 6px -1px rgba(0,0,0,.1);
}
.comparison-table th { padding: 1.5rem; text-align: center; }
.comparison-table th:first-child { text-align: left; width: 28%; }
.comparison-table td { padding: 1rem 1.5rem; text-align: center; }
.comparison-table td:first-child { text-align: left; }
.comparison-table thead tr { border-bottom: 2px solid var(--border-color); }
.comparison-table tbody tr { border-bottom: 1px solid #f3f4f6; }
.comparison-table .section-row { background: #f3f4f6; }
.comparison-table .section-row td {
  padding: 0.75rem 1.5rem; font-weight: bold; font-size: 0.875rem;
  color: var(--text-secondary);
}
.comparison-table .pro-col { color: var(--primary); font-weight: bold; }

/* ── FAQ ── */
.faq-item { border-bottom: 1px solid var(--border-color); padding-bottom: 2rem; }
.faq-item h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.faq-item p { color: var(--text-secondary); margin: 0; }

/* ── News ── */
.news-highlight {
  background: linear-gradient(135deg, rgba(249,115,22,.06) 0%, rgba(245,158,11,.06) 100%);
  border: 2px solid rgba(249,115,22,.2); border-radius: 24px;
  padding: 4rem; position: relative; overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.news-highlight:hover { transform: translateY(-4px); box-shadow: 0 20px 40px -10px rgba(249,115,22,.15); }
.news-timeline-item {
  display: grid; grid-template-columns: 64px 1fr; gap: 2rem;
  padding: 2.5rem 1rem; border-bottom: 1px solid var(--border-color);
  transition: background 0.2s; border-radius: 12px;
}
.news-timeline-item:hover { background: #fafafa; }

/* ── Template Cards ── */
.template-card {
  position: relative; padding: 2.5rem; border: 1px solid var(--border-color);
  height: 100%; cursor: pointer;
}
.template-popularity {
  position: absolute; top: 1.25rem; right: 1.25rem; padding: 0.2rem 0.6rem;
  border-radius: 6px; font-size: 0.7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em;
}

/* ── Newsletter ── */
.newsletter-input {
  flex: 1; padding: 0.875rem 1.25rem; border-radius: 12px;
  border: 1px solid var(--border-color); font-size: 1rem; outline: none;
  transition: border-color 0.2s;
}
.newsletter-input:focus { border-color: var(--primary); }

/* ── Skip Link ── */
.skip-link {
  position: absolute; top: -40px; left: 0; background: var(--primary);
  color: #fff; padding: 0.5rem 1rem; text-decoration: none; z-index: 100;
}
.skip-link:focus { top: 0; color: #fff; }

/* ── Accessibility ── */
.screen-reader-text {
  clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px;
  overflow: hidden; position: absolute; white-space: nowrap; width: 1px;
}

/* ── WordPress Alignment ── */
.aligncenter { text-align: center; }
.alignleft { float: left; margin-right: 2rem; }
.alignright { float: right; margin-left: 2rem; }
.wp-caption { max-width: 100%; }

/* ── 404 ── */
.error-404 { text-align: center; padding: 8rem 0; }

/* ── Main Content ── */
.site-content { margin-top: 0; }

/* ── Print ── */
@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
}
