/*
Theme Name: Sparx Reader Theme
Description: A custom WordPress theme replicating sparxreader.com design for sparxreaders.co.uk
Version: 1.0
Author: Custom Development
Text Domain: sparx-reader
*/

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background: #fff;
}

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

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1rem; }

a {
  text-decoration: none;
  color: #2563eb;
  transition: all 0.3s ease;
}

a:hover {
  color: #1d4ed8;
}

.social-share {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f9fafb;
  border-radius: 8px;
  border-left: 4px solid #2563eb;
}

.social-share h4 {
  margin-bottom: 1rem;
  color: #1f2937;
}

.share-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.share-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
}

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

.share-btn.facebook {
  background: #1877f2;
  color: white;
}

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

.share-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.comments-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid #e5e7eb;
}

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

/* Header Styles */
.site-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  min-height: 70px;
}

.site-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: #2563eb;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.main-navigation a {
  color: #374151;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: all 0.3s ease;
}

.main-navigation a:hover {
  color: #2563eb;
}

.main-navigation a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.main-navigation a:hover::after {
  width: 100%;
}

/* Dropdown Menu */
.menu-item-has-children {
  position: relative;
}

.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  min-width: 600px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
  padding: 0.5rem 0;
  display: flex;
  flex-wrap: wrap;
  max-height: 400px;
  overflow: hidden;
}

.menu-item-has-children:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sub-menu li {
  width: 33.333%;
  min-width: 180px;
  display: flex;
}

.sub-menu a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0;
  width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sub-menu a:hover {
  background: #f3f4f6;
}

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

.search-toggle, .signin-btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.search-toggle {
  background: #f3f4f6;
  color: #374151;
}

.search-toggle:hover {
  background: #e5e7eb;
  transform: translateY(-1px);
}

.signin-btn {
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: white;
  box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.signin-btn:hover {
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
  transform: translateY(-1px);
}

/* Search Modal */
.search-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10vh;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.search-modal.active {
  opacity: 1;
  visibility: visible;
}

.search-content {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  transform: translateY(-20px);
  transition: all 0.3s ease;
}

.search-modal.active .search-content {
  transform: translateY(0);
}

.search-form {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.search-input {
  flex: 1;
  padding: 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 1.1rem;
  outline: none;
  transition: all 0.3s ease;
}

.search-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.search-close {
  background: #f3f4f6;
  border: none;
  padding: 1rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-close:hover {
  background: #e5e7eb;
}

.search-results {
  max-height: 300px;
  overflow-y: auto;
}

.search-result-item {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.search-result-item:hover {
  background: #f9fafb;
}

.search-result-item:last-child {
  border-bottom: none;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
  color: white;
  padding: 120px 0 80px;
  margin-top: 70px;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="150" fill="url(%23a)"/><circle cx="800" cy="300" r="100" fill="url(%23a)"/><circle cx="600" cy="700" r="120" fill="url(%23a)"/></svg>');
  opacity: 0.3;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease-out;
}

.hero-description {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease-out 0.6s both;
}

.cta-button {
  padding: 1rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.cta-primary {
  background: white;
  color: #2563eb;
  box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
}

.cta-secondary {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.5);
}

.cta-secondary:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Feature Boxes Section */
.features-section {
  padding: 80px 0;
  background: #f9fafb;
}

.section-heading {
  text-align: center;
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.2rem;
  color: #6b7280;
  max-width: 600px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature-box {
  background: white;
  border-radius: 12px;
  padding: 3rem;
  min-height: 400px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.feature-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  transform: scaleX(0);
  transform-origin: left;
  transition: all 0.3s ease;
}

.feature-box:hover::before {
  transform: scaleX(1);
}

.feature-box:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.feature-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.feature-content h3 {
  font-size: 1.5rem;
  color: #1f2937;
  margin-bottom: 1rem;
}

.feature-content p {
  color: #6b7280;
  line-height: 1.6;
  font-size: 1.1rem;
}

/* Latest Posts Section */
.posts-section {
  padding: 80px 0;
  background: white;
}

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

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

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

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

.post-content {
  padding: 1.5rem;
}

.post-meta {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.post-title {
  font-size: 1.25rem;
.post-content h1 {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1f2937;
  margin: 2.5rem 0 1.5rem;
  line-height: 1.2;
}

.post-content h2 {
  font-size: 2rem;
  font-weight: 600;
  color: #1f2937;
  margin: 1.2rem 0 0.8rem;
  line-height: 1.4;
}

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

.post-content li {
  margin-bottom: 0.5rem;
  color: #374151;
  line-height: 1.6;
  line-height: 1.3;
}

.post-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #1f2937;
  margin: 1.8rem 0 1rem;
  line-height: 1.4;
}

.post-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1f2937;
  margin: 1.5rem 0 0.8rem;
  line-height: 1.4;
}

.post-content h5 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin: 1.3rem 0 0.8rem;
  line-height: 1.4;
}

.post-content h6 {
  font-size: 1rem;
  font-weight: 600;

.post-title a {
  color: inherit;
}

.post-title a:hover {
  color: #2563eb;
}

.post-excerpt {
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.read-more {
  color: #2563eb;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.read-more:hover {
  gap: 0.75rem;
}

/* Footer */
.site-footer {
  background: #1f2937;
  color: white;
  padding: 3rem 0 2rem;
}

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

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

.footer-section p,
.footer-section a {
  color: #d1d5db;
  line-height: 1.6;
}

.footer-section a:hover {
  color: #3b82f6;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 2rem;
  text-align: center;
  color: #9ca3af;
}

@media (max-width: 768px) {
  .site-footer {
    padding: 2rem 0 1rem;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1rem;
  }
  
  .footer-bottom {
    padding-top: 1rem;
    font-size: 0.9rem;
  }
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #374151;
  cursor: pointer;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .header-content {
    flex-wrap: wrap;
    padding: 1rem 0;
  }
  
  .site-logo {
    font-size: 1.3rem;
  }
  
  .main-navigation {
    width: 100%;
    order: 3;
    margin-top: 1rem;
  }
  
  .main-navigation ul {
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }
  
  .main-navigation a {
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 0.9rem;
  }
  
  .sub-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90vw;
    max-width: 400px;
    max-height: 70vh;
    overflow-y: auto;
    z-index: 9999;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 1rem;
  }
  
  .sub-menu li {
    width: 100%;
    margin-bottom: 0.5rem;
  }
  
  .sub-menu a {
    padding: 0.75rem;
    background: #f9fafb;
    border-radius: 6px;
    display: block;
  }
  
  .header-actions {
    gap: 0.75rem;
    flex-wrap: wrap;
  }
  
  .search-toggle, .signin-btn {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .site-logo {
    font-size: 1.5rem;
  }
  
  .main-navigation {
    width: 100%;
    margin-top: 0;
  }
  
  .main-navigation ul {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }
  
  .main-navigation a {
    padding: 0.75rem 1.5rem;
    width: 200px;
    text-align: center;
  }
  
  .header-actions {
    justify-content: center;
    width: 100%;
  }
  
  .search-toggle {
    order: 1;
  }
  
  .signin-btn {
    order: 2;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .cta-button {
    width: 200px;
    justify-content: center;
  }
  
  .features-grid,
  .posts-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .feature-box {
    padding: 2rem;
    min-height: 300px;
  }
  
  .post-card {
    margin: 0;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .site-footer {
    padding: 2rem 0 1rem;
  }
  
  .search-modal {
    padding: 1rem;
  }
  
  .search-content {
    width: 95%;
    padding: 1.5rem;
  }
  
  .search-input {
    font-size: 1rem;
    padding: 0.75rem;
  }
}

@media (max-width: 480px) {
  .hero-section {
    padding: 100px 0 60px;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .hero-description {
    font-size: 1.1rem;
  }
  
  .cta-button {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .section-description {
    font-size: 1rem;
  }
  
  .feature-box,
  .post-card {
    margin: 0;
  }
  
  .feature-box {
    padding: 1.5rem;
    min-height: 250px;
  }
  
  .main-navigation a {
    width: 180px;
    padding: 0.5rem 1rem;
  }
  
  .header-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .search-toggle, .signin-btn {
    width: 150px;
    justify-content: center;
  }
}

/* Animations */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-pulse {
  animation: pulse 2s infinite;
}

.animate-slide-in {
  animation: slideIn 0.5s ease-out;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mb-4 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1rem; }
.p-4 { padding: 1rem; }
.hidden { display: none; }
.block { display: block; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }