/*
Theme Name: SoccorsoWP
Theme URI: https://soccorsowp.it
Author: G Tech Group S.R.L.S.
Author URI: https://gtechgroup.it
Description: Tema personalizzato per il blog di SoccorsoWP, con header e footer che replicano il sito principale.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: soccorsowp
*/

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #000222;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  background: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ===== Variables ===== */
:root {
  --primary-50: #e8f6fa;
  --primary-100: #d1eef5;
  --primary-200: #a3ddeb;
  --primary-300: #75cce1;
  --primary-400: #47bbd7;
  --primary-500: #1493B3;
  --primary-600: #11809c;
  --primary-700: #0e6d85;
  --primary-800: #0b5a6e;
  --primary-900: #084757;
  --dark: #000222;
  --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;
}

/* ===== Container ===== */
.swp-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1rem;
}

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

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

/* ===== Header ===== */
.swp-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
  transition: all 0.2s ease;
}

.swp-header.scrolled {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.swp-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

@media (min-width: 768px) {
  .swp-header-inner {
    height: 80px;
  }
}

.swp-header-logo img {
  height: 40px;
  width: auto;
}

.swp-header-nav {
  display: none;
  align-items: center;
  gap: 2rem;
}

@media (min-width: 768px) {
  .swp-header-nav {
    display: flex;
  }
}

.swp-header-nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: color 0.2s ease;
}

.swp-header-nav a:hover,
.swp-header-nav a.current {
  color: var(--primary-500);
}

.swp-header-cta {
  display: none;
}

@media (min-width: 768px) {
  .swp-header-cta {
    display: block;
  }
}

.swp-hamburger {
  display: block;
  padding: 0.5rem;
  color: var(--gray-600);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 0;
}

.swp-hamburger:hover {
  color: var(--gray-900);
}

@media (min-width: 768px) {
  .swp-hamburger {
    display: none;
  }
}

.swp-hamburger svg {
  width: 24px;
  height: 24px;
}

/* ===== Button ===== */
.swp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  font-weight: 600;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.swp-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--primary-500);
}

.swp-btn-primary {
  background: var(--primary-500);
  color: #fff;
  box-shadow: 0 4px 6px -1px rgba(20, 147, 179, 0.25);
}

.swp-btn-primary:hover {
  background: var(--primary-600);
  color: #fff;
}

.swp-btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.swp-btn-md {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
}

/* ===== Mobile Menu ===== */
.swp-mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.5);
}

.swp-mobile-overlay.open {
  display: block;
}

.swp-mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  bottom: 0;
  z-index: 50;
  width: 100%;
  max-width: 24rem;
  background: #fff;
  box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
  transition: right 0.3s ease;
}

.swp-mobile-menu.open {
  right: 0;
}

.swp-mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.swp-mobile-menu-header span {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary-500);
}

.swp-mobile-close {
  padding: 0.5rem;
  color: var(--gray-500);
  background: none;
  border: none;
  cursor: pointer;
  line-height: 0;
}

.swp-mobile-close:hover {
  color: var(--gray-700);
}

.swp-mobile-close svg {
  width: 24px;
  height: 24px;
}

.swp-mobile-nav {
  padding: 1.5rem 1rem;
}

.swp-mobile-nav a {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray-700);
  transition: all 0.15s ease;
}

.swp-mobile-nav a:hover {
  background: var(--gray-50);
  color: var(--primary-500);
}

.swp-mobile-nav .swp-btn {
  margin-top: 1rem;
  width: 100%;
}

/* ===== Footer ===== */
.swp-footer {
  background: var(--gray-900);
  color: var(--gray-300);
}

.swp-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 3rem 0 4rem;
}

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

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

.swp-footer-brand p {
  margin-top: 1rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--gray-400);
}

.swp-footer-brand img {
  height: 40px;
  width: auto;
  filter: brightness(2);
}

.swp-footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.swp-footer-social a {
  color: var(--gray-400);
  transition: color 0.2s ease;
}

.swp-footer-social a:hover {
  color: #fff;
}

.swp-footer-social svg {
  width: 20px;
  height: 20px;
}

.swp-footer h3 {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #fff;
  margin-bottom: 1rem;
}

.swp-footer-links {
  list-style: none;
  padding: 0;
}

.swp-footer-links li {
  margin-bottom: 0.75rem;
}

.swp-footer-links a {
  font-size: 0.875rem;
  color: var(--gray-400);
  transition: color 0.2s ease;
}

.swp-footer-links a:hover {
  color: #fff;
}

.swp-footer-contact {
  list-style: none;
  padding: 0;
  font-size: 0.875rem;
  color: var(--gray-400);
}

.swp-footer-contact li {
  margin-bottom: 0.75rem;
}

.swp-footer-contact a {
  color: var(--gray-400);
  transition: color 0.2s ease;
}

.swp-footer-contact a:hover {
  color: #fff;
}

.swp-footer-legal a {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-400);
  margin-top: 0.5rem;
  transition: color 0.2s ease;
}

.swp-footer-legal a:hover {
  color: #fff;
}

.swp-footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-500);
}

.swp-footer-bottom-legal {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--gray-600);
}

/* ===== Blog Content ===== */
.swp-content {
  min-height: 60vh;
}

/* ===== Hero Sections ===== */
.swp-hero {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 50%, var(--primary-800) 100%);
  padding: 3rem 0;
  position: relative;
  overflow: hidden;
}

.swp-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.swp-hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  pointer-events: none;
}

@media (min-width: 768px) {
  .swp-hero {
    padding: 4rem 0;
  }
}

.swp-hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.swp-hero-content.centered {
  margin: 0 auto;
  text-align: center;
}

.swp-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
  .swp-hero h1 {
    font-size: 2.5rem;
  }
}

.swp-hero p {
  font-size: 1.0625rem;
  color: var(--primary-100);
  line-height: 1.6;
}

/* ===== Breadcrumb ===== */
.swp-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 1rem;
}

.swp-breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease;
}

.swp-breadcrumb a:hover {
  color: #fff;
}

.swp-breadcrumb svg {
  width: 14px;
  height: 14px;
  opacity: 0.5;
}

/* ===== Category Bar ===== */
.swp-category-bar {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 64px;
  z-index: 20;
}

@media (min-width: 768px) {
  .swp-category-bar {
    top: 80px;
  }
}

.swp-category-nav {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.swp-category-nav::-webkit-scrollbar {
  display: none;
}

.swp-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  white-space: nowrap;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gray-600);
  background: #fff;
  border: 1px solid var(--gray-200);
  transition: all 0.2s ease;
  text-decoration: none;
}

.swp-category-chip:hover {
  border-color: var(--primary-300);
  color: var(--primary-600);
  background: var(--primary-50);
}

.swp-category-chip.active {
  background: var(--primary-500);
  color: #fff;
  border-color: var(--primary-500);
}

.swp-category-chip.active:hover {
  background: var(--primary-600);
  border-color: var(--primary-600);
  color: #fff;
}

.swp-category-count {
  font-size: 0.6875rem;
  font-weight: 600;
  background: rgba(0, 0, 0, 0.08);
  padding: 0.0625rem 0.375rem;
  border-radius: 9999px;
  min-width: 1.25rem;
  text-align: center;
}

.swp-category-chip.active .swp-category-count {
  background: rgba(255, 255, 255, 0.25);
}

/* ===== Blog Section (full width) ===== */
.swp-blog-section {
  padding: 2.5rem 0;
}

/* ===== Blog Layout (legacy, with sidebar) ===== */
.swp-blog-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 3rem 0;
}

@media (min-width: 1024px) {
  .swp-blog-layout {
    grid-template-columns: 1fr 320px;
    gap: 3rem;
  }
}

/* ===== Post Card Grid ===== */
.swp-post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

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

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

/* ===== Post Cards (Blog Listing) ===== */
.swp-post-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 1rem;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.swp-post-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  border-color: var(--primary-200);
  transform: translateY(-2px);
}

.swp-post-card-thumbnail {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.swp-post-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.swp-post-card:hover .swp-post-card-thumbnail img {
  transform: scale(1.05);
}

.swp-post-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

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

.swp-post-card-meta .category {
  display: inline-block;
  background: var(--primary-50);
  color: var(--primary-600);
  font-weight: 600;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.swp-post-card-meta .separator {
  color: var(--gray-300);
}

.swp-post-card h2 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}

.swp-post-card h2 a {
  color: var(--dark);
  transition: color 0.2s ease;
}

.swp-post-card h2 a:hover {
  color: var(--primary-500);
}

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

.swp-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary-500);
  transition: all 0.2s ease;
}

.swp-read-more:hover {
  gap: 0.625rem;
  color: var(--primary-600);
}

.swp-read-more svg {
  transition: transform 0.2s ease;
}

.swp-post-card:hover .swp-read-more svg {
  transform: translateX(3px);
}

/* ===== Featured Post (first post, larger) ===== */
.swp-featured-post {
  grid-column: 1 / -1;
}

@media (min-width: 640px) {
  .swp-featured-post {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .swp-featured-post .swp-post-card-thumbnail {
    aspect-ratio: auto;
    min-height: 280px;
  }

  .swp-featured-post .swp-post-card-body {
    padding: 2rem;
    justify-content: center;
  }

  .swp-featured-post h2 {
    font-size: 1.5rem;
  }
}

/* ===== Empty state ===== */
.swp-empty-state {
  padding: 4rem 0;
  text-align: center;
}

.swp-empty-state p {
  font-size: 1.125rem;
  color: var(--gray-600);
}

/* ===== Single Post Hero ===== */
.swp-single-hero {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
  padding: 2.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.swp-single-hero::before {
  content: '';
  position: absolute;
  top: -60%;
  right: -15%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

@media (min-width: 768px) {
  .swp-single-hero {
    padding: 3rem 0 4rem;
  }
}

.swp-single-hero-inner {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.swp-single-hero .category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: rgba(255, 255, 255, 0.15);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 1rem;
  backdrop-filter: blur(4px);
}

.swp-single-hero h1 {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.25;
  color: #fff;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .swp-single-hero h1 {
    font-size: 2.25rem;
  }
}

@media (min-width: 1024px) {
  .swp-single-hero h1 {
    font-size: 2.5rem;
  }
}

.swp-single-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--primary-100);
}

.swp-single-meta svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.swp-single-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
}

/* ===== Single Featured Image ===== */
.swp-single-featured {
  max-width: 800px;
  margin: -2rem auto 2.5rem;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 2;
}

.swp-single-featured img {
  width: 100%;
  height: auto;
}

/* ===== Post Navigation ===== */
.swp-post-nav {
  max-width: 800px;
  margin: 3rem auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

@media (min-width: 640px) {
  .swp-post-nav {
    grid-template-columns: 1fr 1fr;
  }
}

.swp-post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  padding: 1.25rem;
  background: var(--gray-50);
  border-radius: 0.75rem;
  border: 1px solid var(--gray-200);
  transition: all 0.2s ease;
}

.swp-post-nav-link:hover {
  background: var(--primary-50);
  border-color: var(--primary-200);
}

.swp-post-nav-link.next {
  text-align: right;
}

@media (min-width: 640px) {
  .swp-post-nav-link.next {
    grid-column: 2;
  }
}

.swp-post-nav-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-500);
}

.swp-post-nav-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--gray-800);
  line-height: 1.4;
}

/* ===== Share Bar ===== */
.swp-share-bar {
  max-width: 800px;
  margin: 2rem auto 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}

.swp-share-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--gray-600);
}

.swp-share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 0.5rem;
  background: var(--gray-100);
  color: var(--gray-600);
  transition: all 0.2s ease;
}

.swp-share-link:hover {
  background: var(--primary-500);
  color: #fff;
}

.swp-share-link svg {
  width: 18px;
  height: 18px;
}

/* ===== Post Content ===== */
.swp-entry-content {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--gray-700);
}

.swp-entry-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  margin: 2rem 0 1rem;
}

.swp-entry-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--dark);
  margin: 1.5rem 0 0.75rem;
}

.swp-entry-content p {
  margin-bottom: 1.25rem;
}

.swp-entry-content a {
  color: var(--primary-500);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.swp-entry-content a:hover {
  color: var(--primary-600);
}

.swp-entry-content ul,
.swp-entry-content ol {
  margin: 1rem 0 1.25rem 1.5rem;
}

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

.swp-entry-content blockquote {
  border-left: 4px solid var(--primary-500);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: var(--gray-50);
  border-radius: 0 0.5rem 0.5rem 0;
  font-style: italic;
  color: var(--gray-600);
}

.swp-entry-content img {
  border-radius: 0.5rem;
  margin: 1.5rem auto;
}

.swp-entry-content pre {
  background: var(--gray-900);
  color: var(--gray-100);
  padding: 1.25rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.875rem;
  line-height: 1.6;
}

.swp-entry-content code {
  background: var(--gray-100);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
}

.swp-entry-content pre code {
  background: none;
  padding: 0;
}

.swp-entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
}

.swp-entry-content th,
.swp-entry-content td {
  border: 1px solid var(--gray-200);
  padding: 0.75rem 1rem;
  text-align: left;
}

.swp-entry-content th {
  background: var(--gray-50);
  font-weight: 600;
}

/* ===== Sidebar ===== */
.swp-sidebar {
  display: none;
}

@media (min-width: 1024px) {
  .swp-sidebar {
    display: block;
  }
}

.swp-sidebar .widget {
  background: var(--gray-50);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.swp-sidebar .widget h3,
.swp-sidebar .widget-title {
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--dark);
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--primary-500);
}

.swp-sidebar .widget ul {
  list-style: none;
  padding: 0;
}

.swp-sidebar .widget ul li {
  margin-bottom: 0.5rem;
}

.swp-sidebar .widget ul li a {
  font-size: 0.9375rem;
  color: var(--gray-600);
  transition: color 0.2s ease;
}

.swp-sidebar .widget ul li a:hover {
  color: var(--primary-500);
}

/* ===== Pagination ===== */
.swp-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 2rem 0;
}

.swp-pagination a,
.swp-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.5rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.swp-pagination a {
  color: var(--gray-600);
  border: 1px solid var(--gray-200);
}

.swp-pagination a:hover {
  background: var(--primary-50);
  border-color: var(--primary-500);
  color: var(--primary-500);
}

.swp-pagination .current {
  background: var(--primary-500);
  color: #fff;
  border: 1px solid var(--primary-500);
}

/* ===== WordPress Specific ===== */
.wp-caption {
  max-width: 100%;
  margin: 1.5rem 0;
}

.wp-caption-text {
  font-size: 0.8125rem;
  color: var(--gray-500);
  text-align: center;
  margin-top: 0.5rem;
}

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

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

.aligncenter {
  display: block;
  margin: 1.5rem auto;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===== Comments ===== */
.swp-comments {
  max-width: 800px;
  margin: 3rem auto;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

.swp-comments h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1.5rem;
}

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

.comment-list .comment {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--gray-100);
}

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

.comment-metadata {
  font-size: 0.8125rem;
  color: var(--gray-500);
  margin-bottom: 0.5rem;
}

.comment-body p {
  color: var(--gray-700);
  line-height: 1.6;
}

.comment-respond {
  margin-top: 2rem;
}

.comment-respond label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.375rem;
}

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  font-family: inherit;
  margin-bottom: 1rem;
  transition: border-color 0.15s ease;
}

.comment-respond input:focus,
.comment-respond textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px rgba(20, 147, 179, 0.1);
}

.comment-respond .submit {
  background: var(--primary-500);
  color: #fff;
  font-weight: 600;
  padding: 0.625rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9375rem;
  transition: background 0.2s ease;
}

.comment-respond .submit:hover {
  background: var(--primary-600);
}

/* ===== 404 Redesigned ===== */
.swp-404-icon {
  margin-bottom: 1rem;
}

.swp-404-icon svg {
  color: rgba(255, 255, 255, 0.8);
}

.swp-404-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 0;
}

.swp-404-search {
  text-align: center;
  margin-bottom: 2.5rem;
}

.swp-404-search h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
}

.swp-404-search .swp-search-form {
  max-width: 480px;
  margin: 0 auto;
}

.swp-404-recent {
  margin-bottom: 2.5rem;
}

.swp-404-recent h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1rem;
}

.swp-404-recent-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 640px) {
  .swp-404-recent-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.swp-404-recent-card {
  display: block;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.2s ease;
}

.swp-404-recent-card:hover {
  border-color: var(--primary-200);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.swp-404-recent-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.swp-404-recent-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.swp-404-recent-info {
  padding: 1rem;
}

.swp-404-recent-info h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.swp-404-recent-info time {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.swp-404-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  padding-bottom: 2rem;
}

/* ===== Button Outline ===== */
.swp-btn-outline {
  background: transparent;
  color: var(--primary-500);
  border: 2px solid var(--primary-500);
}

.swp-btn-outline:hover {
  background: var(--primary-500);
  color: #fff;
}

/* ===== Search ===== */
.swp-search-form {
  display: flex;
  gap: 0.5rem;
}

.swp-search-form input[type="search"] {
  flex: 1;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-family: inherit;
}

.swp-search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--primary-500);
}

.swp-search-form button {
  padding: 0.5rem 1rem;
  background: var(--primary-500);
  color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
}

.swp-search-form button:hover {
  background: var(--primary-600);
}

/* ===== Archive Description ===== */
.swp-archive-description {
  font-size: 1.0625rem;
  color: var(--primary-100);
  margin-top: 0.5rem;
  line-height: 1.6;
}

/* ===== Blog CTA Banner ===== */
.swp-blog-cta {
  background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-700) 100%);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
  position: relative;
  overflow: hidden;
}

.swp-blog-cta::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.swp-blog-cta h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.swp-blog-cta p {
  font-size: 0.9375rem;
  color: var(--primary-100);
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

.swp-blog-cta .swp-btn {
  background: #fff;
  color: var(--primary-600);
  position: relative;
  z-index: 1;
}

.swp-blog-cta .swp-btn:hover {
  background: var(--primary-50);
}

/* ===== Tag Cloud in cards ===== */
.swp-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.swp-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--gray-600);
  background: var(--gray-100);
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  transition: all 0.2s ease;
}

.swp-tag:hover {
  background: var(--primary-50);
  color: var(--primary-600);
}

/* ===== Stats / Info Badges ===== */
.swp-stats-row {
  display: flex;
  gap: 1.5rem;
  margin-top: 1rem;
}

.swp-stat {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
}

.swp-stat svg {
  width: 16px;
  height: 16px;
}

/* ===== Sidebar Improvements ===== */
.swp-sidebar .widget {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 1rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ===== No Thumbnail Placeholder ===== */
.swp-no-thumbnail {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--primary-50) 0%, var(--primary-100) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.swp-no-thumbnail svg {
  width: 48px;
  height: 48px;
  color: var(--primary-300);
}

/* ===== Related Posts ===== */
.swp-related-posts {
  max-width: 800px;
  margin: 2.5rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

.swp-related-posts h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 1.25rem;
}

.swp-related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

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

.swp-related-card {
  display: block;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.2s ease;
}

.swp-related-card:hover {
  border-color: var(--primary-200);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateY(-2px);
}

.swp-related-thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.swp-related-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.swp-related-card:hover .swp-related-thumb img {
  transform: scale(1.05);
}

.swp-related-info {
  padding: 1rem;
}

.swp-related-info h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--dark);
  line-height: 1.4;
  margin-bottom: 0.25rem;
}

.swp-related-info time {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

/* ===== Page Content ===== */
.swp-page-content {
  padding: 3rem 0;
}
