/* 
  Passed.com - Full Theme Overrides 
  This CSS handles the styling for the custom Header/Footer HTML patterns
  AND overrides the WordPress content styles to match the main site.
*/

/* --- 1. Fonts & Variables --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono&display=swap');

:root {
  --passed-primary: #00CF79;
  --passed-primary-dark: #00A862;
  --passed-primary-fg: #FFFFFF;
  
  --passed-bg: #FFFFFF;
  --passed-fg: #0F172A;
  
  --passed-muted: #F5F5F5;
  --passed-muted-fg: #64748B;
  
  --passed-border: #E2E8F0;
  
  --passed-font-sans: 'Inter', sans-serif;
  --passed-radius: 0.5rem;
  
  --wp--preset--color--primary: var(--passed-primary) !important;
}

/* --- 2. Global Resets & Typography --- */
* {
  box-sizing: border-box; /* Global box-sizing fix */
}

html, body {
  max-width: 100%;
  overflow-x: hidden; /* Prevent horizontal scroll globally */
}

body {
  font-family: var(--passed-font-sans);
  color: var(--passed-fg);
  background-color: var(--passed-bg);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  padding-top: 64px;
  width: 100%;
  position: relative;
}

/* Handle WordPress Admin Bar */
body.admin-bar {
  padding-top: calc(64px + 32px);
}

@media screen and (max-width: 782px) {
  body.admin-bar {
    padding-top: calc(64px + 46px);
  }
}

/* Header Position Fix for Admin Bar */
body.admin-bar .passed-header-wrapper {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .passed-header-wrapper {
    top: 46px;
  }
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--passed-font-sans);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--passed-fg);
  margin-bottom: 1rem;
}

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

a:hover {
  color: var(--passed-primary-dark);
}

/* --- 3. HEADER STYLES (Matches Navbar.tsx) --- */
.passed-header-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
  height: 64px;
  display: flex;
  align-items: center;
  width: 100%;
  overflow: visible !important; /* Ensure dropdowns can spill out */
}

.passed-header-container {
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  overflow: visible !important; /* Double safety */
}

/* Mimic Tailwind Container Breakpoints */
@media (min-width: 640px) { .passed-header-container { max-width: 640px; } }
@media (min-width: 768px) { .passed-header-container { max-width: 768px; } }
@media (min-width: 1024px) { .passed-header-container { max-width: 1024px; } }
@media (min-width: 1280px) { .passed-header-container { max-width: 1280px; } }
@media (min-width: 1536px) { .passed-header-container { max-width: 1536px; } }

/* ... (rest of header styles) ... */


/* Logo */
.passed-logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--passed-fg) !important;
  letter-spacing: -0.02em;
}

.passed-logo-text {
  font-family: 'TT Norms Pro', var(--passed-font-sans); /* Fallback if TT Norms not avail */
}

/* Desktop Nav */
.passed-desktop-nav {
  display: none;
}

@media (min-width: 768px) {
  .passed-desktop-nav {
    display: block;
  }
}

.passed-nav-list {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.25rem;
  align-items: center;
}

.passed-nav-item {
  position: relative;
}

.passed-nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--passed-fg) !important;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
}

.passed-nav-link:hover,
.passed-nav-link:focus,
.passed-has-dropdown:hover .passed-nav-link { /* Keep active state when dropdown is open */
  background-color: rgba(0, 207, 121, 0.08) !important; /* Light green tint */
  color: var(--passed-primary) !important;
}

.passed-nav-item:hover .passed-nav-link svg {
  transform: rotate(180deg);
}

/* Dropdown Menu */
.passed-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--passed-border);
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  width: 600px;
  margin-top: 0;
  z-index: 10000;
}

/* Bridge the gap using pseudo-element to prevent auto-closing */
.passed-dropdown-menu::before {
  content: '';
  position: absolute;
  top: -10px; /* Extend upwards to meet the nav item */
  left: 0;
  width: 100%;
  height: 10px;
  background: transparent;
}

.passed-has-dropdown:hover .passed-dropdown-menu,
.passed-has-dropdown.is-active .passed-dropdown-menu { /* Support click toggle */
  display: block;
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

.passed-dropdown-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem; /* Match gap-3 (12px) */
}

.passed-dropdown-col h4 {
  font-size: 1rem; /* Match default text size (text-base) */
  color: var(--passed-primary);
  margin-bottom: 1rem; /* Match space-y-4 */
  margin-top: 0 !important; /* Reset default browser margin */
  padding-top: 0 !important;
  font-weight: 500; /* Match font-medium */
  letter-spacing: normal; /* Match leading-none/normal */
  line-height: 1; /* Match leading-none */
}

.passed-dropdown-col *:first-child {
  margin-top: 0 !important;
}

.passed-dropdown-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* Match gap-2 */
}

.passed-dropdown-col ul li a {
  display: block;
  padding: 0.75rem; /* Match p-3 */
  font-size: 0.875rem; /* Match text-sm */
  font-weight: 500; /* Match font-medium */
  color: var(--passed-fg) !important;
  border-radius: 0.375rem;
  line-height: 1; /* Match leading-none */
}

.passed-dropdown-col ul li a:hover {
  background-color: rgba(0, 207, 121, 0.08) !important; /* Light green tint for dropdown items too */
  color: var(--passed-primary) !important; /* Ensure text turns green */
}

/* Header Actions */
.passed-header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.passed-login-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--passed-muted-fg) !important;
  display: none;
}

@media (min-width: 640px) {
  .passed-login-link {
    display: block;
  }
}

.passed-login-link:hover {
  color: var(--passed-primary) !important;
}

.passed-btn-primary {
  background-color: var(--passed-primary);
  color: var(--passed-primary-fg) !important;
  padding: 0 1rem;
  border-radius: var(--passed-radius);
  font-weight: 500;
  font-size: 0.875rem;
  transition: background-color 0.2s;
  display: none;
  box-shadow: 0 4px 6px -1px rgba(0, 207, 121, 0.2);
  height: 40px;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .passed-btn-primary {
    display: inline-flex;
  }
}

.passed-btn-primary:hover {
  background-color: var(--passed-primary-dark);
  color: white !important;
}

.passed-mobile-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--passed-fg);
  z-index: 10001; /* Ensure clickable above everything */
  position: relative;
  -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

@media (min-width: 768px) {
  .passed-mobile-toggle {
    display: none;
  }
}

/* Mobile Menu */
.passed-mobile-toggle svg {
  pointer-events: none;
}

.passed-mobile-menu {
  position: fixed;
  top: 0; 
  right: 0;
  bottom: 0;
  width: 100%; 
  background: #fff;
  padding: 1.5rem;
  transform: translateX(100%);
  transition: transform 0.3s ease-in-out;
  overflow-y: auto;
  z-index: 10002; 
  display: flex;
  flex-direction: column;
  pointer-events: none; 
}

.passed-mobile-menu.is-open {
  transform: translateX(0);
  box-shadow: -5px 0 15px rgba(0,0,0,0.1);
  pointer-events: auto; /* Re-enable clicks when open */
}

.passed-mobile-header {
  display: flex;
  justify-content: space-between; /* Default to space between, but we'll just have X on right */
  align-items: center;
  margin-bottom: 1.5rem;
}

.passed-mobile-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--passed-fg);
  /* Removed green styling to match Website Image 1 simple black X */
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto; /* Force push to right */
}

.passed-mobile-close svg {
  width: 24px;
  height: 24px;
  color: var(--passed-fg);
  /* Removed green border to match Website Image 1 */
}

.passed-mobile-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* Reduced gap */
}

.passed-mobile-link {
  font-size: 1rem; /* Reduced from 1.25rem */
  font-weight: 700;
  color: var(--passed-fg) !important;
  padding: 0.375rem 0; /* Reduced padding */
  display: block;
}

.passed-mobile-group {
  margin: 0.25rem 0;
  display: flex;
  flex-direction: column; 
  gap: 0.25rem;
}

.passed-mobile-group-title {
  font-size: 1rem; /* Reduced from 1.125rem */
  color: var(--passed-primary); 
  font-weight: 500;
  margin-bottom: 0.25rem;
  display: block;
}

.passed-mobile-sublink {
  font-size: 0.875rem; /* Reduced from 1rem */
  font-weight: 400;
  color: #64748B !important;
  padding: 0.25rem 0;
  padding-left: 1rem; 
  display: block !important; 
  width: 100%; 
  line-height: 1.4;
  text-decoration: none; 
}

.passed-mobile-actions {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 2rem;
}

.passed-btn-outline {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid var(--passed-fg); /* Black border for Log in */
  padding: 0.75rem;
  border-radius: var(--passed-radius);
  font-weight: 600;
  color: var(--passed-fg) !important;
  width: 100%;
  background: transparent;
}

.passed-mobile-actions .passed-btn-primary {
  display: flex;
  width: 100%;
  height: auto;
  padding: 0.75rem;
  font-weight: 600;
  background-color: var(--passed-primary);
  color: white !important;
  border: none;
  justify-content: center;
  align-items: center;
}

/* --- 4. FOOTER STYLES (Matches Footer.tsx) --- */
.passed-footer {
  background-color: #fff;
  border-top: 1px solid var(--passed-border);
  padding-top: 4rem;
  padding-bottom: 2rem;
  margin-top: 4rem;
  width: 100%; /* Ensure full width */
}

.passed-container {
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Mimic Tailwind Container Breakpoints for Footer too */
@media (min-width: 640px) { .passed-container { max-width: 640px; } }
@media (min-width: 768px) { .passed-container { max-width: 768px; } }
@media (min-width: 1024px) { .passed-container { max-width: 1024px; } }
@media (min-width: 1280px) { .passed-container { max-width: 1280px; } }
@media (min-width: 1536px) { .passed-container { max-width: 1536px; } }

.passed-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Reduce gap on mobile */
@media (max-width: 768px) {
  .passed-footer-grid {
    gap: 1.5rem; /* Reduced from 2rem */
  }
  
  .passed-footer-col h4 {
    margin-bottom: 0.5rem !important; /* Tighter heading spacing */
  }
  
  .passed-footer-col ul li {
    margin-bottom: 0.5rem !important; /* Tighter item spacing */
  }
  
  .passed-brand-col p {
    margin-bottom: 1rem;
  }
}

@media (min-width: 768px) {
  .passed-footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .passed-footer-grid {
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  }
}

.passed-brand-col p {
  font-size: 1.125rem;
  color: var(--passed-muted-fg);
  max-width: 24rem;
  margin-bottom: 1.5rem;
}

.passed-logo-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.passed-social-links {
  display: flex;
  gap: 1rem;
}

.passed-social-links a {
  color: #9CA3AF;
}

.passed-social-links a:hover {
  color: var(--passed-primary);
}

.passed-footer-col h4 {
  font-size: 1rem;
  margin-bottom: 1rem;
}

.passed-footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.passed-footer-col ul li {
  margin-bottom: 0.75rem;
}

.passed-footer-col ul li a {
  color: var(--passed-muted-fg) !important;
  font-size: 0.875rem;
}

.passed-footer-col ul li a:hover {
  color: var(--passed-primary) !important;
}

.passed-footer-bottom {
  border-top: 1px solid var(--passed-border);
  padding-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--passed-muted-fg);
}

@media (min-width: 768px) {
  .passed-footer-bottom {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

.passed-footer-legal {
  display: flex;
  gap: 1.5rem;
}

.passed-footer-legal a {
  color: var(--passed-muted-fg) !important;
}

.passed-footer-legal a:hover {
  color: var(--passed-fg) !important;
}

/* --- 5. CONTENT & BLOG STYLES --- */
/* Push content down because of fixed header */
body {
  padding-top: 64px;
}

/* Typography for Blog Posts */
.entry-content, .wp-block-post-content {
  max-width: 800px;
  margin: 0 auto;
}

.entry-title, .wp-block-post-title {
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.entry-content p {
  font-size: 1.125rem;
  color: #334155; /* Slate 700 */
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

/* Buttons in content */
.wp-block-button__link {
  background-color: var(--passed-primary) !important;
  color: #fff !important;
  border-radius: var(--passed-radius) !important;
  font-weight: 600;
  padding: 0.75rem 1.5rem !important;
  transition: transform 0.2s;
}

.wp-block-button__link:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 207, 121, 0.3);
}

/* 6. Hero Section Tweaks */
/* Assuming user uses a Group block for hero */
.wp-block-group.hero-section {
  padding-top: 7rem !important; /* Account for fixed header - matches main site (112px) */
}

/* 7. Blog Index Layout (New) */
.passed-blog-index .passed-page-header {
  background-color: #0F172A; /* Dark bg like main site footer/hero */
  color: white;
  padding: 5rem 0; /* Equal padding to center vertically */
  margin-bottom: 4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.passed-blog-index .passed-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.passed-blog-index .page-title {
  color: white;
  font-size: 3rem;
  margin-bottom: 1rem;
  text-align: center;
}

.passed-blog-index .page-subtitle {
  color: #94A3B8;
  font-size: 1.25rem;
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.passed-blog-grid {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  max-width: 800px; /* Restrict width to standard blog post size */
  margin: 0 auto;
  width: 100%;
}

/* Removed grid media queries to enforce single column "standard" blog layout */

.passed-post-card {
  border: 1px solid var(--passed-border);
  border-radius: 1rem;
  padding: 2.5rem;
  transition: transform 0.2s, box-shadow 0.2s;
  background: white;
  width: 100%; /* Full width of container */
}

.passed-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05);
  border-color: #CBD5E1;
}

.passed-post-card .entry-meta {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--passed-muted-fg);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.passed-post-card .entry-title {
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.passed-post-card .entry-title a {
  color: var(--passed-fg) !important;
}

.passed-post-card .entry-title a:hover {
  color: var(--passed-primary) !important;
}

.passed-post-card .entry-summary p {
  color: #475569;
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.passed-read-more {
  display: inline-flex;
  align-items: center;
  font-weight: 600;
  font-size: 1rem;
  color: var(--passed-primary);
}

.passed-read-more .arrow {
  margin-left: 0.5rem;
  transition: transform 0.2s;
}

.passed-read-more:hover .arrow {
  transform: translateX(4px);
}

/* 8. Single Post & Page Layouts */
.passed-single-header {
  padding: 6rem 0 4rem 0;
  background-color: #F8FAFC; /* Light slate bg for header */
  border-bottom: 1px solid var(--passed-border);
  text-align: center;
  margin-bottom: 4rem;
}

.passed-header-content {
  max-width: 800px;
  margin: 0 auto;
}

.passed-single-header .entry-title {
  font-size: 3rem;
  line-height: 1.2;
  color: var(--passed-fg);
  margin-bottom: 1rem;
  margin-top: 1rem;
}

.passed-single-header .entry-meta {
  color: var(--passed-muted-fg);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.passed-single-header .separator {
  color: #CBD5E1;
}

.passed-content-wrapper {
  max-width: 800px; /* Constrain width to prevent stretching */
  margin: 0 auto;
  padding-bottom: 4rem;
}

.passed-prose {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #334155;
}

.passed-prose p {
  margin-bottom: 1.5rem;
}

.passed-prose h2 {
  font-size: 1.875rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
  color: var(--passed-fg);
}

.passed-prose h3 {
  font-size: 1.5rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--passed-fg);
}

.entry-footer {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--passed-border);
}

.cat-links {
  font-size: 0.875rem;
  color: var(--passed-muted-fg);
}

.cat-links .label {
  font-weight: 600;
  color: var(--passed-fg);
  margin-right: 0.5rem;
}

/* 9. Comments Section Styling */
.passed-comments-wrapper {
  background-color: #F8FAFC;
  padding: 4rem 0;
  border-top: 1px solid var(--passed-border);
}

.passed-comments-wrapper .passed-container {
  max-width: 800px;
  margin: 0 auto;
}

#respond {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  border: 1px solid var(--passed-border);
}

#reply-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-family: var(--passed-font-sans);
}

.comment-form-comment label,
.comment-form-author label,
.comment-form-email label,
.comment-form-url label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--passed-border);
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
  font-family: inherit;
  font-size: 1rem;
}

.comment-form textarea:focus,
.comment-form input:focus {
  outline: none;
  border-color: var(--passed-primary);
  box-shadow: 0 0 0 2px rgba(0, 207, 121, 0.1);
}

.form-submit .submit {
  background-color: var(--passed-primary);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.form-submit .submit:hover {
  background-color: var(--passed-primary-dark);
}

/* Hide logged in as text if it's annoying */
.logged-in-as {
  font-size: 0.875rem;
  color: var(--passed-muted-fg);
  margin-bottom: 1rem;
}
