/*
Theme Name: InstantRights Blog
Theme URI: https://instantrights.com
Author: InstantRights
Author URI: https://instantrights.com
Description: A beautiful, modern blog theme optimized for Pinterest traffic and monetization. Perfect for digital product sellers and content creators.
Version: 1.0.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: instantrights-blog
Domain Path: /languages
Requires at least: 5.0
Requires PHP: 7.4
*/

/* ========================================
   RESET & BASE STYLES
   ======================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #2d3748;
  background-color: #ffffff;
}

a {
  color: #16a34a;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #15803d;
}

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

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0.5em;
  color: #1a202c;
}

h1 {
  font-size: 2.5rem;
}

h2 {
  font-size: 2rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

p {
  margin-bottom: 1em;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.site-header {
  background: linear-gradient(135deg, #16a34a 0%, #0d9488 100%);
  color: white;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
}

.site-logo a {
  color: white;
}

.site-nav {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.site-nav a {
  color: white;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.site-nav a:hover {
  opacity: 0.8;
  color: white;
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
  background: linear-gradient(135deg, rgba(22, 163, 74, 0.9) 0%, rgba(13, 148, 136, 0.9) 100%), url('images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  padding: 6rem 2rem;
  text-align: center;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: white;
}

.hero p {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  max-width: 600px;
}

.hero-cta {
  display: inline-block;
  background: white;
  color: #16a34a;
  padding: 0.75rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  color: #16a34a;
}

/* ========================================
   MAIN CONTENT
   ======================================== */

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

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 3rem;
  margin: 3rem 0;
}

.main-content {
  flex: 1;
}

.sidebar {
  background: #f7fafc;
  padding: 2rem;
  border-radius: 0.5rem;
  height: fit-content;
  position: sticky;
  top: 100px;
}

/* ========================================
   BLOG POST GRID
   ======================================== */

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.blog-card {
  background: white;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

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

.blog-card-content {
  padding: 1.5rem;
}

.blog-card-category {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.blog-card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #1a202c;
}

.blog-card-title a {
  color: #1a202c;
}

.blog-card-title a:hover {
  color: #16a34a;
}

.blog-card-excerpt {
  color: #718096;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.blog-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: #a0aec0;
}

.read-more {
  color: #16a34a;
  font-weight: 600;
  transition: color 0.3s ease;
}

.read-more:hover {
  color: #15803d;
}

/* ========================================
   SINGLE POST
   ======================================== */

.single-post {
  background: white;
  padding: 3rem 2rem;
  border-radius: 0.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.post-header {
  margin-bottom: 2rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 2rem;
}

.post-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: #1a202c;
}

.post-meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  color: #718096;
  font-size: 0.95rem;
}

.post-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-featured-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 0.5rem;
  margin: 2rem 0;
}

.post-content {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #2d3748;
}

.post-content h2 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: #1a202c;
}

.post-content h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #1a202c;
}

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

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

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

.post-content blockquote {
  border-left: 4px solid #16a34a;
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: #4a5568;
}

.post-content code {
  background: #f7fafc;
  padding: 0.2rem 0.4rem;
  border-radius: 0.25rem;
  font-family: 'Courier New', monospace;
  color: #d63384;
}

.post-content pre {
  background: #1a202c;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 2rem 0;
}

/* ========================================
   SIDEBAR WIDGETS
   ======================================== */

.widget {
  margin-bottom: 2rem;
}

.widget-title {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid #16a34a;
  color: #1a202c;
}

.widget-content {
  font-size: 0.95rem;
}

/* Email Signup Widget */
.email-signup {
  background: linear-gradient(135deg, #16a34a 0%, #0d9488 100%);
  color: white;
  padding: 1.5rem;
  border-radius: 0.5rem;
}

.email-signup h3 {
  color: white;
  margin-bottom: 0.5rem;
}

.email-signup p {
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.email-signup input {
  width: 100%;
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border: none;
  border-radius: 0.25rem;
  font-size: 0.9rem;
}

.email-signup button {
  width: 100%;
  padding: 0.75rem;
  background: white;
  color: #16a34a;
  border: none;
  border-radius: 0.25rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.email-signup button:hover {
  background: #f0fdf4;
}

/* Recent Posts Widget */
.recent-posts-list {
  list-style: none;
}

.recent-posts-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #e2e8f0;
}

.recent-posts-list li:last-child {
  border-bottom: none;
}

.recent-posts-list a {
  font-size: 0.95rem;
  color: #1a202c;
}

.recent-posts-list a:hover {
  color: #16a34a;
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  padding: 0.5rem 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.25rem;
  color: #16a34a;
  transition: all 0.3s ease;
}

.pagination a:hover {
  background: #16a34a;
  color: white;
  border-color: #16a34a;
}

.pagination .current {
  background: #16a34a;
  color: white;
  border-color: #16a34a;
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
  background: #1a202c;
  color: #cbd5e0;
  padding: 3rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h3 {
  color: white;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
}

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

.footer-section a {
  color: #cbd5e0;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #16a34a;
}

.footer-bottom {
  border-top: 1px solid #2d3748;
  padding-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
  .site-header-inner {
    flex-direction: column;
    gap: 1rem;
  }

  .site-nav {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .hero {
    padding: 3rem 1rem;
    min-height: 300px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .content-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .sidebar {
    position: static;
  }

  .blog-grid {
    grid-template-columns: 1fr;
  }

  .post-title {
    font-size: 1.75rem;
  }

  .post-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }

  .hero {
    padding: 2rem 1rem;
  }

  .hero h1 {
    font-size: 1.5rem;
  }

  .blog-card-content {
    padding: 1rem;
  }

  .post-content {
    font-size: 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   AD PLACEMENT STYLES
   ======================================== */

.ad-space {
  background: #f7fafc;
  border: 2px dashed #cbd5e0;
  padding: 1rem;
  text-align: center;
  color: #a0aec0;
  margin: 2rem 0;
  border-radius: 0.5rem;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-space.sidebar-ad {
  margin: 2rem 0;
  min-height: 300px;
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

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

.text-muted {
  color: #718096;
}

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

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

.py-2 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}
