/* ================================================
   PRATOSH.AI RESOURCES - OBSIDIAN PUBLISH THEME
   Version: 2.1 - White Header with Logo (Fixed)
   Updated: September 3, 2025
   Based on WordPress Kadence Pro Theme
   ================================================ */

/* Import Google Fonts - Must be at the top */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&family=Source+Sans+Pro:wght@300;400;600;700&display=swap');

/* === SECTION 1: WORDPRESS BRAND VARIABLES === */
:root {
  /* Colors from WordPress - Extracted from pratosh.ai */
  --wp-primary: #2b3a67;        /* Dark Blue - Primary */
  --wp-secondary: #c4a962;      /* Gold - Secondary/Hover */
  --wp-heading: #1d2939;        /* Very Dark Blue - Headings */
  --wp-body-text: #344054;      /* Dark Gray - Body Text */
  --wp-text-light: #475467;     /* Medium Gray - Secondary Text */
  --wp-text-muted: #667085;     /* Light Gray - Footer BG */
  --wp-bg-light: #f9fafb;       /* Very Light Gray */
  --wp-white: #ffffff;          /* White */
  
  /* Typography from WordPress */
  --wp-font-body: 'Source Sans Pro', sans-serif;
  --wp-font-heading: Montserrat, sans-serif;
  --wp-font-size-base: 17px;
  --wp-line-height: 1.6;
  
  /* Spacing from WordPress */
  --wp-container: 1290px;
  --wp-edge-padding: 3rem;
  --wp-content-padding: 2rem;
  --wp-spacing-sm: 1.5rem;
  --wp-spacing-md: 2rem;
  --wp-spacing-lg: 2.5em;
  --wp-spacing-xl: 3.5em;
}

/* === SECTION 2: OBSIDIAN VARIABLE MAPPING === */
.theme-light {
  --background-primary: var(--wp-white);
  --background-primary-alt: var(--wp-bg-light);
  --background-secondary: var(--wp-bg-light);
  --background-modifier-border: #e5e5e5;
  
  --text-normal: var(--wp-body-text);
  --text-muted: var(--wp-text-light);
  --text-faint: var(--wp-text-muted);
  
  --text-accent: var(--wp-primary);
  --text-accent-hover: var(--wp-secondary);
  
  --interactive-accent: var(--wp-primary);
  --interactive-accent-hover: var(--wp-secondary);
  
  --text-highlight-bg: rgba(196, 169, 98, 0.2);
  --text-selection: rgba(43, 58, 103, 0.2);
}

.theme-dark {
  --background-primary: #1a1a1a;
  --background-primary-alt: #252525;
  --background-secondary: #2a2a2a;
  --background-modifier-border: #444;
  
  --text-normal: #e0e0e0;
  --text-muted: #999;
  --text-faint: #666;
  
  --text-accent: var(--wp-secondary);
  --text-accent-hover: var(--wp-primary);
  
  --interactive-accent: var(--wp-secondary);
  --interactive-accent-hover: var(--wp-primary);
  
  --text-highlight-bg: rgba(196, 169, 98, 0.3);
  --text-selection: rgba(196, 169, 98, 0.3);
}

/* Dark mode specific component styles */
.theme-dark .wp-header-bar {
  background: #1a1a1a;
  color: var(--wp-secondary);
  border-bottom: 1px solid #444;
}

.theme-dark .wp-back-link {
  background: var(--wp-secondary);
  color: #1a1a1a;
  border-color: var(--wp-secondary);
}

.theme-dark .wp-back-link:hover {
  background: var(--wp-primary);
  border-color: var(--wp-primary);
  color: #ffffff;
}

.theme-dark .site-header {
  background: #1a1a1a;
  border-bottom: 1px solid #444;
}

.theme-dark h1, .theme-dark h2, .theme-dark h3,
.theme-dark h4, .theme-dark h5, .theme-dark h6 {
  color: #e0e0e0;
}

.theme-dark .wp-footer-social {
  background: #252525;
  border-top: 1px solid #444;
}

.theme-dark .wp-footer-main {
  background: #1a1a1a;
}

.theme-dark .wp-footer-copyright {
  background: #1a1a1a;
  border-top: 1px solid #444;
}

.theme-dark .callout {
  background: rgba(196, 169, 98, 0.1);
  border-left-color: var(--wp-secondary);
}

.theme-dark .callout-title {
  color: var(--wp-secondary);
}

.theme-dark table th {
  background: #252525;
  color: var(--wp-secondary);
}

.theme-dark table td {
  border-bottom: 1px solid #444;
}

.theme-dark table tr:hover {
  background: #2a2a2a;
}

.theme-dark pre {
  background: #252525;
  border: 1px solid #444;
}

.theme-dark code {
  background: #252525;
  color: var(--wp-secondary);
}

.theme-dark .resource-list li,
.theme-dark .markdown-preview-view ul.resource-cards li {
  background: #252525;
  border: 1px solid #444;
}

.theme-dark .resource-list li:hover,
.theme-dark .markdown-preview-view ul.resource-cards li:hover {
  border-color: var(--wp-secondary);
}

/* === SECTION 3: GLOBAL STYLES === */
body {
  font-family: var(--wp-font-body, 'Source Sans Pro', sans-serif);
  font-size: var(--wp-font-size-base, 17px);
  line-height: var(--wp-line-height, 1.6);
  color: var(--wp-body-text, #344054);
}


/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--wp-font-heading, Montserrat, sans-serif);
  color: var(--wp-heading, #1d2939);
  line-height: 1.5;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

h1 { font-size: 1.7rem; font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 600; }
h3 { font-size: 1.375rem; font-weight: 600; }
h4 { font-size: 1.25rem; font-weight: 500; color: var(--wp-body-text, #344054); }
h5 { font-size: 1.125rem; font-weight: 500; color: var(--wp-body-text, #344054); }
h6 { font-size: 1rem; font-weight: 400; color: var(--wp-primary, #2b3a67); }

/* Links */
a {
  color: var(--wp-primary, #2b3a67);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--wp-secondary, #c4a962);
}

/* === SECTION 4: HEADER STYLES === */

/* Custom Branded Header Bar - WHITE BACKGROUND */
.wp-header-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: var(--wp-white, #ffffff);
  color: var(--wp-primary, #2b3a67);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 var(--wp-edge-padding, 3rem);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  border-bottom: 1px solid #e5e5e5;
}

.wp-header-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.wp-header-logo img {
  height: 50px;
  width: 50px;
  object-fit: contain;
}

.wp-back-link {
  position: absolute;
  right: var(--wp-edge-padding, 3rem);
  color: var(--wp-white, #ffffff);
  background: var(--wp-primary, #2b3a67);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border: 1px solid var(--wp-primary, #2b3a67);
  border-radius: 3px;
  transition: all 0.2s ease;
  font-size: 0.875rem;
  font-weight: 500;
}

.wp-back-link:hover {
  background: var(--wp-secondary, #c4a962);
  border-color: var(--wp-secondary, #c4a962);
  color: var(--wp-white, #ffffff);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Adjust Obsidian content for larger header */
.site-header {
  margin-top: 70px;
}

.publish-renderer {
  padding-top: 80px;
}

/* Fix content overlap - add proper spacing */
.markdown-preview-view {
  padding-top: 20px;
}

.nav-view {
  padding-top: 10px;
}

/* Style Obsidian's navigation */
.site-header {
  background: var(--wp-white);
  border-bottom: 1px solid #e5e5e5;
}

.nav-view {
  font-family: var(--wp-font-body);
}

/* === SECTION 5: FOOTER STYLES === */

.wp-footer {
  margin-top: 60px;
  font-family: var(--wp-font-body);
}

/* Social Icons Bar */
.wp-footer-social {
  background: var(--wp-primary);
  padding: 20px 0;
  text-align: center;
}

.wp-social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 20px;
}

.wp-social-icons a {
  color: var(--wp-white);
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.wp-social-icons a:hover {
  opacity: 1;
  color: var(--wp-secondary);
}

/* Main Footer Content */
.wp-footer-main {
  background: var(--wp-text-muted);
  color: var(--wp-white);
  padding: 40px var(--wp-edge-padding);
}

.wp-footer-content {
  max-width: var(--wp-container);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 40px;
  align-items: start;
}

.wp-footer-section h4 {
  color: var(--wp-white, #ffffff);
  font-family: var(--wp-font-heading, Montserrat, sans-serif);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.wp-footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.wp-footer-section ul li {
  margin-bottom: 0.625rem;
}

.wp-footer-section a {
  color: var(--wp-bg-light, #f9fafb);
  opacity: 0.8;
  text-decoration: none;
  font-size: 0.875rem;
}

.wp-footer-section a:hover {
  color: var(--wp-secondary);
  opacity: 1;
}

.wp-footer-logo {
  text-align: center;
}

.wp-footer-logo img {
  height: 80px;
  width: auto;
  opacity: 0.9;
}

/* Copyright */
.wp-footer-copyright {
  background: var(--wp-text-muted, #667085);
  color: var(--wp-bg-light, #f9fafb);
  text-align: center;
  padding: 1rem 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.875rem;
  opacity: 0.8;
}

/* === SECTION 6: CONTENT STYLES === */

/* Main Content Area */
.markdown-preview-view {
  max-width: var(--wp-container);
  margin: 0 auto;
  padding: 0 var(--wp-edge-padding);
}

/* Resource Cards - Target specific resource lists only */
.resource-list,
.markdown-preview-view ul.resource-cards {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin: 30px 0;
}

.resource-list li,
.markdown-preview-view ul.resource-cards li {
  background: var(--wp-white, #ffffff);
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 20px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.resource-list li:hover,
.markdown-preview-view ul.resource-cards li:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 25px -7px rgba(0,0,0,0.1);
  border-color: var(--wp-primary, #2b3a67);
}

/* Default list styles for regular content */
.markdown-preview-view ul:not(.resource-cards):not(.resource-list) {
  list-style: disc;
  padding-left: 2em;
  margin: 1em 0;
}

.markdown-preview-view ul:not(.resource-cards):not(.resource-list) li {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0.25em 0;
  box-shadow: none;
}

.markdown-preview-view ul:not(.resource-cards):not(.resource-list) li:hover {
  transform: none;
  box-shadow: none;
  border-color: transparent;
}

/* Buttons and CTAs */
.markdown-preview-view a[href*="download"],
.markdown-preview-view a[href*="gpt"],
.markdown-preview-view a[href*="resource"] {
  display: inline-block;
  padding: 0.4em 1em;
  background: var(--wp-primary, #2b3a67);
  color: var(--wp-white, #ffffff);
  border-radius: 3px;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
  margin: 0.625rem 0.3125rem;
}

.markdown-preview-view a[href*="download"]:hover,
.markdown-preview-view a[href*="gpt"]:hover,
.markdown-preview-view a[href*="resource"]:hover {
  background: var(--wp-secondary);
  box-shadow: 0px 15px 25px -7px rgba(0,0,0,0.1);
  transform: translateY(-1px);
}

/* Callouts/Admonitions */
.callout {
  border-left: 4px solid var(--wp-primary);
  background: rgba(43, 58, 103, 0.05);
  padding: 1em;
  margin: 1.5em 0;
  border-radius: 0 4px 4px 0;
}

.callout-title {
  color: var(--wp-primary);
  font-weight: 600;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

th {
  background: var(--wp-primary);
  color: var(--wp-white);
  padding: 12px;
  text-align: left;
  font-weight: 600;
}

td {
  padding: 12px;
  border-bottom: 1px solid #e5e5e5;
}

tr:hover {
  background: var(--wp-bg-light);
}

/* Code blocks */
pre {
  background: #f6f8fa;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  padding: 16px;
  overflow-x: auto;
}

code {
  background: #f6f8fa;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 0.9em;
  color: var(--wp-primary);
}

/* === SECTION 7: RESPONSIVE DESIGN === */

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --wp-edge-padding: 2rem;
    --wp-container: 960px;
  }
  
  .wp-footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  
  .wp-footer-logo {
    grid-column: 1 / -1;
    order: -1;
  }
  
  .resource-grid {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  }
  
  .hero-content h1 {
    font-size: 2.5rem;
  }
  
  .hero-content p {
    font-size: 1.25rem;
  }
}

/* Mobile styles */
@media (max-width: 768px) {
  :root {
    --wp-edge-padding: 1.5rem;
    --wp-content-padding: 1rem;
  }
  
  .wp-header-bar {
    padding: 0 1.5rem;
    height: 60px;
  }
  
  .wp-header-logo img {
    height: 40px;
    width: 40px;
  }
  
  .wp-back-link {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    right: 1.5rem;
  }
  
  .publish-renderer {
    padding-top: 70px;
  }
  
  .wp-footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }
  
  .wp-footer-section {
    text-align: center;
  }
  
  .markdown-preview-view ul {
    grid-template-columns: 1fr;
  }
  
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.375rem; }
  h3 { font-size: 1.25rem; }
}

/* === SECTION 8: POLISH & ANIMATIONS === */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Selection colors */
::selection {
  background: var(--wp-primary);
  color: var(--wp-white);
}

/* Focus styles for accessibility - improved */
*:focus {
  outline: 2px solid var(--wp-secondary, #c4a962);
  outline-offset: 2px;
}

/* Skip to content link for accessibility */
.skip-to-content {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--wp-primary, #2b3a67);
  color: var(--wp-white, #ffffff);
  padding: 8px;
  z-index: 100;
  text-decoration: none;
}

.skip-to-content:focus {
  top: 0;
}

/* Ensure sufficient color contrast */
a:visited {
  color: var(--wp-primary, #2b3a67);
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .wp-header-bar {
    border-bottom: 2px solid currentColor;
  }
  
  .wp-back-link {
    border-width: 2px;
  }
  
  .resource-list li,
  .markdown-preview-view ul.resource-cards li {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Loading animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.markdown-preview-view {
  animation: fadeIn 0.5s ease-in;
}

/* Hide Obsidian's default footer if exists */
.site-footer {
  display: none;
}

/* ================================================
   HERO SECTION STYLES - NO OVERLAY, BOTTOM ALIGNED
   ================================================ */

.hero-section {
  position: relative;
  max-width: 1200px;
  margin: 0 auto 40px;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  min-height: 400px; /* Ensures consistent height */
}

.hero-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.hero-content {
  position: absolute;
  bottom: 40px; /* Positioned at bottom */
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: white;
  z-index: 2;
  width: 90%; /* Responsive width */
  max-width: 800px;
}

.hero-content h1 {
  font-size: 3rem; /* Bigger text */
  font-weight: 700;
  margin-bottom: 16px;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7); /* Text shadow for readability */
  line-height: 1.2;
  color: white; /* Force white color */
}

.hero-content p {
  font-size: 1.4rem; /* Bigger subtitle */
  font-weight: 400;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
  opacity: 0.95;
  color: white; /* Force white color */
}

/* Optional: Add a subtle dark gradient at bottom for better text readability */
.hero-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 150px;
  background: linear-gradient(to top, rgba(0,0,0,0.4), transparent);
  z-index: 1;
  pointer-events: none;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .hero-section {
    min-height: 300px;
  }
  
  .hero-image {
    height: 300px;
  }
  
  .hero-content {
    bottom: 30px;
    width: 95%;
  }
  
  .hero-content h1 {
    font-size: 2.2rem;
  }
  
  .hero-content p {
    font-size: 1.1rem;
  }
  
  .hero-section::after {
    height: 120px;
  }
}

@media (max-width: 480px) {
  .hero-section {
    min-height: 250px;
  }
  
  .hero-image {
    height: 250px;
  }
  
  .hero-content h1 {
    font-size: 1.8rem;
  }
  
  .hero-content p {
    font-size: 1rem;
  }
}


.resource-grid {
  /* 4-column grid, responsive to 2-col on tablet, 1-col on mobile */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.resource-card {
  /* Equal height cards, entire card clickable */
  display: flex;
  flex-direction: column;
  height: 100%; /* Equal height */
  text-decoration: none;
  transition: transform 0.3s ease;
}

.resource-image-container {
  /* 2:3 aspect ratio container with overlay */
  position: relative;
  aspect-ratio: 2/3;
  overflow: hidden;
  border-radius: 8px;
}

.resource-overlay {
  /* Text positioned at bottom with shadow background */
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  padding: 24px 16px 16px;
}

.resource-overlay h3 {
  /* White text with shadow for readability */
  color: white;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
  margin: 0;
}

