/*
Theme Name: NerdDevs Custom
Description: Custom WordPress theme matching the NerdDevs Astro site design
Author: NerdDevs Team
Version: 1.0.0
License: GPL v2 or later
Text Domain: nerddevs-custom
*/

/* CSS Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Design System - Colors */
:root {
  /* Primary Orange Colors */
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-200: #fed7aa;
  --orange-300: #fdba74;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --orange-accessible-400: #B8590C;
  --orange-accessible-500: #A0520B;
  --orange-accessible-600: #8F470A;
  
  /* Gray Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --gray-accessible-50: #fafafa;
  --gray-accessible-100: #f5f5f5;
  
  /* Gradient Colors */
  --gradient-primary: linear-gradient(to right, #FE3F4B, #F58220);
  --gradient-orange: linear-gradient(to right, #fb923c, #f97316);
  --gradient-hero: linear-gradient(to right, #ff8a00, #e52e71);
  
  /* Green for success states */
  --green-50: #f0fdf4;
  --green-200: #bbf7d0;
  --green-500: #22c55e;
  --green-700: #15803d;
  
  /* Background Gradients */
  --bg-about-section: linear-gradient(180deg, #FFFFFF 70.77%, #FFB466 99.72%);
  --bg-mission-vision: linear-gradient(180deg, #FFFFFF 82.32%, #FFE4CD 100%);
  --bg-membership-section: linear-gradient(180deg, rgba(255, 255, 255, 0) 41.61%, #FF9D4A 100%);
}

/* Typography */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-display: swap;
  line-height: 1.6;
  color: var(--gray-900);
  background-color: #ffffff;
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h1 {
  font-size: 3.5rem;
  font-weight: 800;
}

h2 {
  font-size: 2.5rem;
}

h3 {
  font-size: 1.875rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1.125rem;
}

/* Responsive Typography */
@media (max-width: 768px) {
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  h3 {
    font-size: 1.5rem;
  }
}

/* Text Gradient Utility */
.text-gradient-primary {
  background: var(--gradient-primary);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Container and Layout */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container {
    padding: 0 2rem;
  }
}

/* Section Spacing */
.section {
  padding: 4rem 0;
}

@media (min-width: 1024px) {
  .section {
    padding: 6rem 0;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease-in-out;
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.875rem;
}

.btn-primary {
  background-color: var(--orange-accessible-500);
  color: white;
  border-color: var(--orange-accessible-500);
}

.btn-primary:hover {
  background-color: var(--orange-accessible-600);
  border-color: var(--orange-accessible-600);
  color: white;
}

.btn-secondary {
  background-color: var(--gray-900);
  color: white;
  border-color: var(--gray-900);
}

.btn-secondary:hover {
  background-color: var(--gray-800);
  border-color: var(--gray-800);
  color: white;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: white;
  border: 1px solid var(--orange-200);
  color: var(--orange-accessible-400);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 9999px;
  margin-bottom: 2rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Cards */
.card {
  background-color: white;
  border-radius: 1.5rem;
  border: 1px solid var(--gray-200);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  padding: 2rem;
}

@media (min-width: 1024px) {
  .card {
    padding: 3rem;
  }
}

.card-gray {
  background-color: var(--gray-accessible-50);
}

/* WordPress Specific Styles */

/* Navigation */
.site-header {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--gray-200);
  border-radius: 1rem;
  max-width: 80rem;
  width: calc(100% - 0.5rem);
  margin: 0 0.25rem;
}

.site-header .container {
  padding: 0 1rem;
}

.site-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 4rem;
}

@media (min-width: 1024px) {
  .site-navigation {
    height: 5rem;
  }
}

.site-logo img {
  height: 2rem;
  width: auto;
}

@media (min-width: 1024px) {
  .site-logo img {
    height: 2.5rem;
  }
}

.main-menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 768px) {
  .main-menu {
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }
}

.main-menu a {
  padding: 0.5rem 0.75rem; /* Match Astro's px-3 py-2 */
  font-size: 0.875rem; /* text-sm */
  font-weight: 500; /* font-medium */
  color: var(--gray-600);
  text-decoration: none;
  border-radius: 0.5rem; /* rounded-lg */
  transition: all 0.2s ease-in-out; /* transition-all */
}

.main-menu a:hover {
  color: #D97914; /* Match Astro's hover:text-[#D97914] */
}

.main-menu a.current {
  color: #F58220; /* Match Astro's text-[#F58220] */
}

/* Main Content */
.site-main {
  margin-top: 6rem;
  min-height: calc(100vh - 6rem);
  padding-bottom: 4rem; /* Add bottom spacing since no footer */
}

/* Blog Styles */
.blog-container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 1rem;
}

.blog-header {
  text-align: center;
  padding: 4rem 0;
  background: linear-gradient(to bottom right, var(--gray-50), white, var(--orange-50));
}

.blog-title {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.blog-description {
  font-size: 1.25rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

/* Blog Posts */
.posts-grid {
  display: grid;
  gap: 2rem;
  margin: 4rem 0;
}

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

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

.post-card {
  background: white;
  border-radius: 1rem;
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: all 0.2s ease-in-out;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.post-featured-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-content {
  padding: 1.5rem;
}

.post-category {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--orange-100);
  color: var(--orange-accessible-500);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  border-radius: 9999px;
  margin-bottom: 1rem;
  text-decoration: none;
}

.post-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.post-title a {
  color: var(--gray-900);
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.post-title a:hover {
  color: var(--orange-accessible-500);
}

.post-excerpt {
  color: var(--gray-600);
  font-size: 0.875rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--gray-500);
}

.post-meta-date,
.post-meta-author {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Single Post */
.single-post {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.single-post-header {
  text-align: center;
  margin-bottom: 3rem;
}

.single-post-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.single-post-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  color: var(--gray-600);
  margin-bottom: 2rem;
}

.single-post-featured-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 1rem;
  margin-bottom: 3rem;
}

.single-post-content {
  font-size: 1.125rem;
  line-height: 1.8;
}

.single-post-content h2,
.single-post-content h3,
.single-post-content h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.single-post-content p {
  margin-bottom: 1.5rem;
}

.single-post-content ul,
.single-post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.single-post-content li {
  margin-bottom: 0.5rem;
}

.single-post-content blockquote {
  border-left: 4px solid var(--orange-accessible-500);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--gray-700);
}

.single-post-content code {
  background-color: var(--gray-100);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
}

.single-post-content pre {
  background-color: var(--gray-900);
  color: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 2rem 0;
}

.single-post-content pre code {
  background: none;
  padding: 0;
}

/* Footer removed for blog - inherits main site footer */

/* Utility Classes */
.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

.text-right {
  text-align: right;
}

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

/* Responsive utilities */
.hidden {
  display: none;
}

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

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Mobile Navigation Styles */
.mobile-menu-button {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 2.5rem;
  height: 2.5rem;
  background: none;
  border: none;
  cursor: pointer;
  gap: 0.25rem;
  transition: all 0.2s ease-in-out;
}

.hamburger-line {
  width: 1.5rem;
  height: 2px;
  background-color: var(--gray-700);
  transition: all 0.2s ease-in-out;
  border-radius: 1px;
}

.mobile-menu-button:hover .hamburger-line {
  background-color: var(--orange-accessible-500);
}

.mobile-menu-button.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-button.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-button.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: white;
  border: 1px solid var(--gray-200);
  border-top: none;
  border-radius: 0 0 1rem 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.mobile-menu-content {
  padding: 1rem;
}

.mobile-menu-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-menu-list a {
  display: block;
  padding: 0.5rem 0.75rem; /* Match Astro's px-3 py-2 for mobile */
  color: var(--gray-600);
  text-decoration: none;
  border-radius: 0.5rem; /* rounded-lg */
  transition: all 0.2s ease-in-out; /* transition-all */
  font-weight: 500; /* font-medium */
  font-size: 1rem; /* text-base for mobile */
}

.mobile-menu-list a:hover {
  background-color: var(--orange-50);
  color: #D97914; /* Match Astro's hover color */
}

.mobile-menu-list a.current {
  background-color: var(--orange-50);
  color: #F58220; /* Match Astro's active color */
}

.mobile-menu-cta {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--gray-200);
}

.mobile-menu-cta .btn {
  width: 100%;
  justify-content: center;
}

/* WordPress specific classes */
.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.875rem;
  color: var(--gray-600);
  text-align: center;
  padding: 0.5rem;
}

.aligncenter {
  display: block;
  margin: 0 auto;
}

.alignleft {
  float: left;
  margin: 0 1rem 1rem 0;
}

.alignright {
  float: right;
  margin: 0 0 1rem 1rem;
}

/* Comments */
.comments-area {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid var(--gray-200);
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background-color: var(--gray-50);
  border-radius: 0.5rem;
}

.comment-meta {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--gray-600);
}

.comment-author {
  font-weight: 600;
  color: var(--gray-900);
}

.screen-reader-text {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px !important;
  height: 1px !important;
  overflow: hidden;
}

/* Blog Pagination Styles */
.pagination-wrapper {
  margin: 4rem 0;
  display: flex;
  justify-content: center;
}

.pagination {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
  align-items: center;
}

.pagination .page-item {
  margin: 0;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  text-decoration: none;
  border: 1px solid var(--gray-200);
  border-radius: 0.5rem;
  color: var(--gray-700);
  font-weight: 500;
  transition: all 0.2s ease-in-out;
  gap: 0.5rem;
}

.pagination a:hover {
  background-color: var(--orange-accessible-500);
  border-color: var(--orange-accessible-500);
  color: white;
}

.pagination .current {
  background-color: var(--orange-accessible-500);
  border-color: var(--orange-accessible-500);
  color: white;
}

.pagination .dots {
  border: none;
  background: none;
  color: var(--gray-400);
}

/* Post Card Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-card {
  animation: fadeInUp 0.6s ease-out;
}

.post-card:nth-child(2) {
  animation-delay: 0.1s;
}

.post-card:nth-child(3) {
  animation-delay: 0.2s;
}

.post-card:nth-child(4) {
  animation-delay: 0.1s;
}

.post-card:nth-child(5) {
  animation-delay: 0.2s;
}

.post-card:nth-child(6) {
  animation-delay: 0.3s;
}

.post-card.animate-in {
  animation: fadeInUp 0.6s ease-out;
}

/* Single Post Styles */
.single-post-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-600);
  font-size: 0.875rem;
}

.post-tags {
  margin: 3rem 0;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

.post-tags h4 {
  margin-bottom: 1rem;
  font-size: 1rem;
  color: var(--gray-900);
}

.tags-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-link {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background-color: var(--gray-100);
  color: var(--gray-700);
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 9999px;
  transition: all 0.2s ease-in-out;
}

.tag-link:hover {
  background-color: var(--orange-accessible-500);
  color: white;
}

.author-bio {
  display: flex;
  gap: 1.5rem;
  margin: 3rem 0;
  padding: 2rem;
  background-color: var(--gray-50);
  border-radius: 1rem;
  border: 1px solid var(--gray-200);
}

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

.author-info {
  flex: 1;
}

.author-name {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  color: var(--gray-900);
}

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

.post-navigation {
  margin: 3rem 0;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

.nav-links {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .nav-links {
    grid-template-columns: 1fr 1fr;
  }
}

.nav-previous,
.nav-next {
  padding: 1.5rem;
  background-color: var(--gray-50);
  border-radius: 0.5rem;
  border: 1px solid var(--gray-200);
  transition: all 0.2s ease-in-out;
}

.nav-previous:hover,
.nav-next:hover {
  background-color: white;
  border-color: var(--orange-accessible-500);
}

.nav-previous a,
.nav-next a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.nav-subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--gray-500);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.nav-title {
  display: block;
  font-weight: 600;
  color: var(--gray-900);
  line-height: 1.4;
}

.nav-next {
  text-align: right;
}

.related-posts {
  background-color: var(--gray-50);
}

.related-posts-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--gray-900);
}

/* Mobile Responsive Adjustments for Single Post */
@media (max-width: 767px) {
  .single-post-meta {
    gap: 1rem;
  }
  
  .author-bio {
    flex-direction: column;
    text-align: center;
  }
  
  .single-post-title {
    font-size: 2rem;
  }
}

/* Lazy Loading Images */
img.lazy {
  opacity: 0;
  transition: opacity 0.3s;
}

img.lazy-loaded {
  opacity: 1;
}

/* Back to Top Button (Base styles, enhanced by JS) */
.back-to-top:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2) !important;
}

/* Search Form Enhancement */
.search-form.focused input {
  border-color: var(--orange-accessible-500);
  box-shadow: 0 0 0 2px var(--orange-accessible-500);
}

/* Enhanced Comment Form Styles */
.comment-form-author,
.comment-form-email,
.comment-form-url {
  margin-bottom: 1.5rem;
}

.comment-form-author label,
.comment-form-email label,
.comment-form-url label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--gray-700);
}

.comment-form-author input,
.comment-form-email input,
.comment-form-url input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.2s ease-in-out;
}

.comment-form-author input:focus,
.comment-form-email input:focus,
.comment-form-url input:focus {
  outline: none;
  border-color: var(--orange-accessible-500);
  box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.2);
}

.required {
  color: var(--orange-accessible-500);
}
