/*
Theme Name: ManagePH Blog Theme
Description: A WordPress theme matching the ManagePH React app design
Version: 1.0
Author: ManagePH
*/

:root {
  /* ManagePH Brand Colors - matching React app */
  --primary-purple: #6366f1;
  --primary-purple-light: #8b5cf6;
  --secondary-gray: #6b7280;
  --text-dark: #111827;
  --text-light: #6b7280;
  --background-light: #f9fafb;
  --background-white: #ffffff;
  --border-light: #e5e7eb;
  --hover-purple: #5048e5;
  --orange-accent: #f97316;
  --orange-hover: #ea580c;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Remove underlines from all links */
a {
  text-decoration: none !important;
}

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--background-light);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles - matching React app exactly */
.text-primary {
  color: var(--primary-purple);
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.font-bold {
  font-weight: 700;
}

.max-w-7xl {
  max-width: 80rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.sm\:px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.lg\:px-8 {
  padding-left: 2rem;
  padding-right: 2rem;
}

.h-16 {
  height: 4rem;
}

.h-8 {
  height: 2rem;
}

.w-8 {
  width: 2rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-8 {
  gap: 2rem;
}

.flex {
  display: flex;
}

.items-center {
  align-items: center;
}

.justify-between {
  justify-content: space-between;
}

.fixed {
  position: fixed;
}

.top-0 {
  top: 0;
}

.w-full {
  width: 100%;
}

.bg-white\/80 {
  background-color: rgba(255, 255, 255, 0.8);
}

.backdrop-blur-sm {
  backdrop-filter: blur(4px);
}

.border-b {
  border-bottom-width: 1px;
  border-color: var(--border-light);
}

.z-50 {
  z-index: 50;
}

.hidden {
  display: none;
}

@media (min-width: 768px) {
  .md\:flex {
    display: flex;
  }
  .md\:hidden {
    display: none;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Button Styles */
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  background: transparent;
  color: var(--text-dark);
  text-decoration: none;
  padding: 0.5rem 1rem;
}

.btn-ghost:hover {
  background: var(--background-light);
  color: var(--text-dark);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  background: var(--primary-purple);
  color: white;
  text-decoration: none;
  padding: 0.5rem 1rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
  background: var(--hover-purple);
  color: white;
}

.btn-outline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
  border: 1px solid var(--primary-purple);
  background: var(--background-white);
  color: var(--primary-purple);
  width: 2.25rem;
  height: 2.25rem;
  cursor: pointer;
}

.btn-outline-icon:hover {
  background: var(--background-light);
  color: var(--primary-purple);
}

.btn-ghost-mobile {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  color: var(--text-dark);
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  transition: background-color 0.2s;
}

.btn-ghost-mobile:hover {
  background: var(--background-light);
  color: var(--text-dark);
}

/* Mobile menu spacing */
.space-y-1 > * + * {
  margin-top: 0.25rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 200px);
  background: var(--background-white);
}

/* Homepage Styles */
.homepage-hero {
  background: var(--background-white);
  padding: 4rem 0;
  text-align: center;
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.1;
  color: var(--text-dark);
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-light);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.nav-buttons {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-top: 2rem;
}

.nav-button {
  padding: 1.5rem 3rem;
  font-size: 1.25rem;
  font-weight: 600;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 200px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.nav-button.help {
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-light) 100%);
  color: white;
}

.nav-button.blog {
  background: var(--background-white);
  color: var(--text-dark);
  border: 2px solid var(--border-light);
}

.nav-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Blog Listing Styles */
.blog-listing {
  padding: 4rem 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-dark);
  text-align: center;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-light);
  margin-bottom: 3rem;
  text-align: center;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 3rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 1200px) {
  .posts-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

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

/* Main content padding to account for fixed header */
.main-content {
  padding-top: 4rem;
}

/* Post category badges */
.post-category-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}

.post-category-badge.help {
  background: var(--primary-purple);
  color: white;
}

.post-category-badge.blog {
  background: var(--orange-accent);
  color: white;
}


/* Social Share Section */
.social-share-section {
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
  padding: 2rem 0;
  margin-bottom: 3rem;
  text-align: center;
}

.social-share-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.social-share-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.share-button {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.share-button.twitter {
  background: #1da1f2;
  color: white;
}

.share-button.twitter:hover {
  background: #1a91da;
  color: white;
}

.share-button.linkedin {
  background: #0077b5;
  color: white;
}

.share-button.linkedin:hover {
  background: #005885;
  color: white;
}

.share-button.email {
  background: var(--secondary-gray);
  color: white;
}

.share-button.email:hover {
  background: #4b5563;
  color: white;
}

/* Author Bio Section */
.author-bio-section {
  display: flex;
  gap: 1.5rem;
  padding: 2rem;
  background: var(--background-light);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  margin-bottom: 3rem;
}

.author-avatar img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info {
  flex: 1;
}

.author-name {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0 0 0.5rem 0;
}

.author-description {
  color: var(--text-light);
  line-height: 1.6;
  margin: 0;
}

/* Newsletter Signup Section */
.newsletter-signup-section {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  padding: 3rem 2rem;
  border-radius: 12px;
  text-align: center;
  margin-bottom: 3rem;
}

.newsletter-content h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 1rem 0;
}

.newsletter-content p {
  color: var(--text-light);
  margin: 0 0 2rem 0;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-form .form-group {
  display: flex;
  gap: 1rem;
  max-width: 400px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 1rem;
}

.newsletter-form button {
  background: var(--orange-accent);
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
}

.newsletter-form button:hover {
  background: var(--orange-hover);
}

/* Back to Blog */
.back-to-blog {
  text-align: center;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary-purple);
  text-decoration: none;
  font-weight: 500;
  padding: 0.75rem 1.5rem;
  border: 2px solid var(--border-light);
  border-radius: 8px;
  transition: all 0.2s;
}

.back-button:hover {
  background: var(--background-light);
  color: var(--primary-purple);
}

/* Single Post Mobile Responsive */
@media (max-width: 768px) {
  
  .social-share-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .share-button {
    min-width: 200px;
    justify-content: center;
  }
  
  .author-bio-section {
    flex-direction: column;
    text-align: center;
  }
  
  .newsletter-form .form-group {
    flex-direction: column;
  }
  
  .newsletter-form input,
  .newsletter-form button {
    width: 100%;
  }
}

/* WordPress Admin Bar compatibility */
.admin-bar nav {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar nav {
    top: 46px;
  }
}

/* Adjust main content when admin bar is present */
.admin-bar .main-content {
  padding-top: calc(4rem + 32px);
}

@media (max-width: 782px) {
  .admin-bar .main-content {
    padding-top: calc(4rem + 46px);
  }
}

.post-card {
  background: var(--background-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s;
  border: 1px solid var(--border-light);
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.post-thumbnail {
  height: 200px;
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-purple-light) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 3rem;
}

.post-content {
  padding: 1.5rem;
}

.post-category {
  display: inline-block;
  background: var(--primary-purple);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.post-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

.post-title a {
  color: var(--text-dark);
  text-decoration: none;
}

.post-title a:hover {
  color: var(--primary-purple);
}

.post-excerpt {
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.post-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-light);
  font-size: 0.875rem;
}

.post-date {
  font-weight: 500;
}

.read-more {
  color: var(--primary-purple);
  text-decoration: none;
  font-weight: 600;
}

.read-more:hover {
  color: var(--hover-purple);
}



/* Footer Styles - matching React app exactly */
.bg-accent\/20 {
  background-color: rgba(99, 102, 241, 0.05);
}

.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.grid {
  display: grid;
}

.grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .md\:grid-cols-12 {
    grid-template-columns: repeat(12, minmax(0, 1fr));
  }
  .md\:col-span-4 {
    grid-column: span 4 / span 4;
  }
  .md\:col-span-2 {
    grid-column: span 2 / span 2;
  }
  .md\:col-start-7 {
    grid-column-start: 7;
  }
  .md\:flex-row {
    flex-direction: row;
  }
  .md\:mt-0 {
    margin-top: 0;
  }
  .md\:ml-2 {
    margin-left: 0.5rem;
  }
}

.space-y-4 > * + * {
  margin-top: 1rem;
}

.space-y-2 > * + * {
  margin-top: 0.5rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.font-medium {
  font-weight: 500;
}

.mb-4 {
  margin-bottom: 1rem;
}

.text-muted-foreground {
  color: var(--text-light);
}

.hover\:text-primary:hover {
  color: var(--primary-purple);
}

.transition-colors {
  transition: color 0.2s;
}

.border-t {
  border-top-width: 1px;
  border-color: var(--border-light);
}

.mt-12 {
  margin-top: 3rem;
}

.pt-8 {
  padding-top: 2rem;
}

.flex-col {
  flex-direction: column;
}

.mt-4 {
  margin-top: 1rem;
}

.p-0 {
  padding: 0;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

li {
  margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .nav-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  
  .flex-col {
    flex-direction: column;
  }
  
  .mt-4 {
    margin-top: 1rem;
  }
}