/*
Theme Name: ThePropFirmGuide
Theme URI: https://www.thepropfirmguide.com
Author: ThePropFirmGuide
Description: Custom dark theme for ThePropFirmGuide - Prop firm reviews, comparisons, and deals.
Version: 1.0
License: All Rights Reserved
Text Domain: thepropfirmguide
*/

/* =============================================
   CSS VARIABLES
   ============================================= */
:root {
  --bg-primary: #0a0f1c;
  --bg-secondary: #0f1629;
  --bg-card: #131b2e;
  --bg-card-hover: #182035;
  --cyan: #00d4aa;
  --cyan-dim: rgba(0,212,170,0.15);
  --cyan-glow: rgba(0,212,170,0.3);
  --text-primary: #ffffff;
  --text-secondary: #c8ccd4;
  --text-muted: #8a8f9c;
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(0,212,170,0.3);
  --yellow: #f0c040;
  --red: #ff4757;
  --green: #00d4aa;
  --orange: #ff9500;
  --max-width: 1200px;
  --header-height: 70px;
}

/* =============================================
   RESET & BASE
   ============================================= */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  background: var(--bg-primary);
  overflow-y: scroll;
  scrollbar-gutter: stable;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: transparent;
  color: var(--text-secondary);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: clip;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: #00ffcc;
}

img {
  max-width: 100%;
  height: auto;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-primary);
  line-height: 1.3;
}

/* =============================================
   HEADER / NAVIGATION
   ============================================= */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(10, 15, 28, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: var(--header-height);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 12px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img {
  height: 40px;
  width: auto;
}

.site-logo span {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* Desktop Navigation — nav links only, no right-side items inside */
.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Right-side slot — always same HTML structure, login state only changes inner content */
.header-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  transition: all 0.2s;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

.nav-link .arrow {
  font-size: 10px;
  transition: transform 0.2s;
}

.nav-item:hover .arrow {
  transform: rotate(180deg);
}

/* Dropdown */
.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.2s;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.nav-item:hover .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a {
  display: block;
  padding: 10px 14px;
  color: var(--text-secondary);
  font-size: 14px;
  border-radius: 8px;
  transition: all 0.15s;
}

.dropdown a:hover {
  color: var(--text-primary);
  background: rgba(255,255,255,0.05);
}

/* Sign Up Button */
.btn-signup {
  display: inline-flex;
  align-items: center;
  padding: 9px 22px;
  background: var(--cyan);
  color: #0a0f1c !important;
  font-weight: 700;
  font-size: 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  flex-shrink: 0;
}

.btn-signup:hover {
  background: #00ffcc;
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--cyan-glow);
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.mobile-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all 0.3s;
}

/* =============================================
   MOBILE RESPONSIVE - HEADER
   ============================================= */
@media (max-width: 968px) {
  .mobile-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    flex-direction: column;
    align-items: stretch;
    padding: 20px;
    gap: 4px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s;
  }

  .main-nav.open {
    transform: translateX(0);
  }

  .nav-link {
    padding: 12px 16px;
    font-size: 16px;
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: rgba(255,255,255,0.03);
    display: none;
    margin-top: 4px;
  }

  .nav-item.open .dropdown {
    display: block;
  }

  .btn-signup {
    margin-top: 10px;
    justify-content: center;
    padding: 14px;
    font-size: 16px;
  }
}

/* =============================================
   FOOTER
   ============================================= */
.site-footer {
  background: #060a14;
  border-top: 1px solid var(--border);
  padding: 50px 24px 30px;
  color: var(--text-muted);
  font-size: 14px;
  cursor: default;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
  cursor: default;
}

.footer-brand h3 {
  color: var(--text-primary);
  font-size: 18px;
  margin-bottom: 12px;
}

.footer-brand p {
  margin-bottom: 8px;
  line-height: 1.5;
}

.footer-brand a {
  color: var(--cyan);
  width: fit-content;
  display: table;
}

.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 16px;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  transition: all 0.2s;
}

.footer-social a:hover {
  background: var(--cyan-dim);
}

.footer-social img {
  width: 18px;
  height: 18px;
}

.footer-col h4 {
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: default;
}

.footer-col {
  cursor: default;
}

.footer-col a {
  display: table;
  color: var(--text-muted);
  padding: 4px 0;
  font-size: 14px;
  transition: color 0.2s;
  cursor: pointer;
  text-decoration: none;
}

.footer-col a:hover {
  color: var(--text-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}

.footer-bottom-links a {
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
}

.footer-bottom {
  cursor: default;
}

@media (max-width: 768px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* =============================================
   ANIMATED BACKGROUND ORBS
   ============================================= */
.site-orbs {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  /* Force compositor layer before filter:blur children trigger their own — prevents black flash */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  /* clip is more reliable than overflow:hidden for fixed-position containers */
  clip: rect(0, auto, auto, 0);
}

.site-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  animation: site-drift 25s ease-in-out infinite;
  /* Compositor layer per orb — GPU initialises at parse time, no mid-paint black frame */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  will-change: transform;
}

.site-orb-1 {
  width: 500px;
  height: 500px;
  background: linear-gradient(225deg, #667eea, #33ccff);
  top: -150px;
  right: -150px;
  animation: none;
  opacity: 0.15;
}

.site-orb-2 {
  width: 350px;
  height: 350px;
  background: linear-gradient(225deg, #667eea, #31d0aa);
  /* Changed from bottom:200px to top-based positioning — bottom on fixed+overflow:hidden
     can bleed outside the clipping rect on some browsers, adding temporary scroll height */
  top: 60vh;
  left: -100px;
  animation-delay: 8s;
}

@keyframes site-drift {
  0%, 100% { transform: translateZ(0) translate(0, 0) scale(1); }
  50% { transform: translateZ(0) translate(30px, -30px) scale(1.1); }
}

/* =============================================
   PAGE CONTENT AREA
   ============================================= */
.site-content {
  min-height: calc(100vh - var(--header-height) - 300px);
  padding-top: var(--header-height);
}

/* Journal page: strip page-container padding so the journal doesn't add extra
   height beyond 100vh — that extra height makes the scrollbar appear/disappear
   on navigation, shifting the footer by a couple of pixels */
.page-container:has(.tpfg-journal-wrap) {
  padding: 0;
}

/* Correct journal min-height to exclude the fixed header, matching the actual
   visible viewport so the page stays at exactly 100vh with no overflow */
.tpfg-journal-wrap {
  min-height: calc(100vh - var(--header-height)) !important;
}

.page-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 30px 24px;
}

/* WordPress admin bar — offset fixed header */
body.admin-bar .site-header {
  top: 32px;
}
body.admin-bar .site-content {
  padding-top: calc(var(--header-height) + 32px);
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
  body.admin-bar .site-content {
    padding-top: calc(var(--header-height) + 46px);
  }
}
