/*
Theme Name: JPTheme
Author: Yiğit Ali Demir
Author URI: https://github.com/jpntr/
Description: A minimalist, dark-mode-ready WordPress blog theme with featured slider, Gutenberg review blocks, and SEO optimization. Built for developers and content creators.
Version: 1.1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: https://yigitali.com
Tags: blog, one-column, custom-menu, featured-images, threaded-comments, translation-ready, editor-style, block-styles, wide-blocks, dark-mode
Requires at least: 5.8
Tested up to: 6.5
Requires PHP: 7.4
*/

/* ===== CSS Variables ===== */
:root {
  --navy: #263D69;
  --blue: #1C4694;
  --cream: #FFEEC9;
  --light-blue: #B0CCFF;
  --dark: #212B3F;
  --pale-blue: #DAE7FF;
  --gold: #FADA93;
  --soft-cream: #FFF0CF;
  
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-heading: 'Inter', sans-serif;
  --max-width: 720px;
  --radius: 8px;
  
  --bg: #ffffff;
  --text: #212B3F;
  --text-muted: #4a5568;
  --text-light: #6b7a8f;
  --heading: #263D69;
  --link: #1C4694;
  --border: #DAE7FF;
  --card-bg: #FFF0CF;
  --shadow: rgba(33, 43, 63, 0.08);
  --header-shadow: 0 2px 12px rgba(33, 43, 63, 0.15);
  --header-shadow-scrolled: 0 4px 20px rgba(33, 43, 63, 0.2);
}

[data-theme="dark"] {
  --bg: #121420;
  --text: #E0E5EF;
  --text-muted: #9BA3B5;
  --text-light: #6B7285;
  --heading: #A8C4FF;
  --link: #8BB5FF;
  --border: #2A3247;
  --card-bg: #1A1F2E;
  --shadow: rgba(0, 0, 0, 0.25);
  --header-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
  --header-shadow-scrolled: 0 4px 20px rgba(0, 0, 0, 0.4);
  
  --navy: #1A1F2E;
  --blue: #6B9FFF;
  --cream: #FFEEC9;
  --light-blue: #4A5A75;
  --dark: #E0E5EF;
  --pale-blue: #2A3247;
  --gold: #D4A843;
  --soft-cream: #232838;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--link);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--heading);
}

/* ===== Typography ===== */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: var(--heading);
  margin-bottom: 0.5em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1.2em;
}

/* ===== Layout ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.site-header {
  background: var(--navy);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--header-shadow);
  transition: box-shadow 0.3s;
}

.site-header.is-scrolled {
  box-shadow: var(--header-shadow-scrolled);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--cream);
  letter-spacing: -0.02em;
}

.site-title a {
  color: var(--cream);
}

.site-title a:hover {
  color: var(--gold);
}

/* Navigation */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 28px;
}

.main-nav a {
  color: var(--pale-blue);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s;
}

.main-nav a:hover {
  color: var(--cream);
}

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

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--cream);
  margin: 5px 0;
  transition: 0.3s;
}

/* Theme Toggle */
.theme-toggle {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cream);
  transition: all 0.2s;
  padding: 0;
}

.theme-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--gold);
}

.theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.theme-icon-dark {
  display: none;
}

[data-theme="dark"] .theme-icon-light {
  display: none;
}

[data-theme="dark"] .theme-icon-dark {
  display: block;
}

[data-theme="dark"] .theme-toggle {
  border-color: rgba(255, 255, 255, 0.2);
}

/* ===== Hero (Homepage) ===== */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  padding: 80px 24px;
  text-align: center;
  margin-bottom: 60px;
}

.hero-title {
  font-size: 2.8rem;
  color: var(--cream);
  margin-bottom: 16px;
  font-weight: 800;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--light-blue);
  max-width: 500px;
  margin: 0 auto;
  font-weight: 400;
}

/* ===== Blog Posts List ===== */
.posts-list {
  margin-bottom: 80px;
}

.post-card {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--pale-blue);
}

.post-card:last-child {
  border-bottom: none;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--text-light);
}

.post-category {
  background: var(--soft-cream);
  color: var(--blue);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.post-date {
  color: var(--text-light);
}

.post-card h2 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.post-card h2 a {
  color: var(--heading);
  background-image: linear-gradient(var(--gold), var(--gold));
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: left bottom;
  transition: background-size 0.3s;
}

.post-card h2 a:hover {
  color: var(--link);
  background-size: 100% 2px;
}

.post-excerpt {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
}

.read-more {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--link);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.read-more::after {
  content: '→';
  transition: transform 0.2s;
}

.read-more:hover::after {
  transform: translateX(4px);
}

/* Featured image on list */
.post-thumbnail {
  margin-bottom: 20px;
  border-radius: var(--radius);
  overflow: hidden;
}

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

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

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin: 60px 0;
}

.pagination a,
.pagination span {
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
}

.pagination a {
  background: var(--pale-blue);
  color: var(--heading);
}

.pagination a:hover {
  background: var(--light-blue);
}

.pagination .current {
  background: var(--navy);
  color: var(--cream);
}

/* ===== Single Post / Page ===== */
.single-header {
  margin: 60px 0 40px;
}

.single-title {
  font-size: 2.4rem;
  margin-bottom: 16px;
  line-height: 1.2;
}

.single-meta {
  display: flex;
  gap: 16px;
  color: var(--text-light);
  font-size: 0.9rem;
}

.single-meta .author {
  color: var(--blue);
  font-weight: 600;
}

.single-thumbnail {
  margin-bottom: 40px;
  border-radius: var(--radius);
  overflow: hidden;
}

.single-thumbnail img {
  width: 100%;
  max-height: 450px;
  object-fit: cover;
}

/* Post content */
.post-content {
  font-size: 1.05rem;
  line-height: 1.8;
}

.post-content h2 {
  margin-top: 48px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--pale-blue);
}

.post-content h3 {
  margin-top: 36px;
  color: var(--blue);
}

.post-content p {
  margin-bottom: 1.6em;
}

.post-content a {
  color: var(--link);
  border-bottom: 1px solid var(--light-blue);
  transition: border-color 0.2s, color 0.2s;
}

.post-content a:hover {
  border-color: var(--link);
}

.post-content blockquote {
  border-left: 4px solid var(--gold);
  padding: 16px 24px;
  margin: 32px 0;
  background: var(--card-bg);
  font-style: italic;
  color: var(--heading);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.post-content ul,
.post-content ol {
  margin-bottom: 1.6em;
  padding-left: 24px;
}

.post-content li {
  margin-bottom: 8px;
}

.post-content code {
  background: var(--pale-blue);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.9em;
  color: var(--heading);
}

.post-content pre {
  background: var(--dark);
  color: var(--pale-blue);
  padding: 24px;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1.6em;
  font-size: 0.9rem;
  line-height: 1.6;
}

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

.post-content img {
  border-radius: var(--radius);
  margin: 32px 0;
}

.post-content hr {
  border: none;
  height: 2px;
  background: var(--pale-blue);
  margin: 48px 0;
}

/* Tags */
.post-tags {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--pale-blue);
}

.post-tags a {
  display: inline-block;
  background: var(--soft-cream);
  color: var(--heading);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-right: 8px;
  margin-bottom: 8px;
  font-weight: 500;
}

.post-tags a:hover {
  background: var(--gold);
  color: var(--dark);
}

/* Author box */
.author-box {
  display: flex;
  gap: 20px;
  margin-top: 48px;
  padding: 28px;
  background: var(--pale-blue);
  border-radius: var(--radius);
}

.author-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid var(--bg);
}

.author-info h4 {
  margin-bottom: 8px;
  color: var(--heading);
}

.author-info p {
  margin-bottom: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Post navigation */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 60px;
  padding-top: 32px;
  border-top: 2px solid var(--pale-blue);
}

.post-nav a {
  padding: 20px;
  background: var(--soft-cream);
  border-radius: var(--radius);
  transition: background 0.2s;
}

.post-nav a:hover {
  background: var(--gold);
}

.post-nav-label {
  display: block;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-light);
  margin-bottom: 8px;
}

.post-nav-title {
  font-weight: 600;
  color: var(--heading);
  font-size: 1rem;
}

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

/* ===== Page Template ===== */
.page-header {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  padding: 80px 24px;
  text-align: center;
  margin-bottom: 60px;
}

.page-title {
  font-size: 2.4rem;
  color: var(--cream);
  margin: 0;
}

.page-content {
  margin-bottom: 80px;
}

/* ===== Featured Slider ===== */
.featured-slider {
  margin-bottom: 60px;
  padding: 0 24px;
}

.slider-header {
  max-width: var(--max-width);
  margin: 0 auto 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-header h2 {
  font-size: 1.5rem;
  margin: 0;
}

.slider-controls {
  display: flex;
  gap: 8px;
}

.slider-controls button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--heading);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 1.1rem;
}

.slider-controls button:hover {
  background: var(--card-bg);
  border-color: var(--gold);
}

.slider-controls button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.slider-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.slider-wrapper::-webkit-scrollbar {
  display: none;
}

.slider-track {
  display: flex;
  gap: 24px;
}

.slider-slide {
  flex: 0 0 calc(33.333% - 16px);
  scroll-snap-align: start;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}

.slider-slide:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px var(--shadow);
}

.slide-image {
  position: relative;
  overflow: hidden;
}

.slide-image img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.4s;
}

.slider-slide:hover .slide-image img {
  transform: scale(1.05);
}

.slide-content {
  padding: 20px;
}

.slide-content .post-category {
  margin-bottom: 8px;
  display: inline-block;
}

.slide-content h3 {
  font-size: 1.15rem;
  margin-bottom: 8px;
  line-height: 1.3;
}

.slide-content h3 a {
  color: var(--heading);
}

.slide-content p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.slider-dots {
  max-width: var(--max-width);
  margin: 24px auto 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.slider-dots button {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: var(--border);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.slider-dots button.active {
  background: var(--heading);
  width: 24px;
  border-radius: 5px;
}

/* ===== Footer ===== */
.site-footer {
  background: var(--dark);
  color: var(--light-blue);
  padding: 48px 24px 24px;
  margin-top: 80px;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  font-weight: 700;
  color: var(--cream);
  font-size: 1.1rem;
}

.footer-links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.footer-links a {
  color: var(--light-blue);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--gold);
}

.footer-copy {
  width: 100%;
  text-align: center;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(176, 204, 255, 0.15);
  font-size: 0.85rem;
  color: var(--text-light);
}

/* ===== Utilities ===== */
.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }
  
  .single-title,
  .page-title {
    font-size: 1.8rem;
  }
  
  .header-inner {
    height: 56px;
  }
  
  .main-nav {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    background: var(--navy);
    padding: 24px;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 99;
  }
  
  .main-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: 16px;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .post-thumbnail img {
    height: 200px;
  }
  
  .author-box {
    flex-direction: column;
    text-align: center;
  }
  
  .post-nav {
    grid-template-columns: 1fr;
  }
  
  .post-nav-next {
    text-align: left;
  }
  
  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  
  .slider-slide {
    flex: 0 0 calc(50% - 12px);
  }
  
  .slider-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .slider-slide {
    flex: 0 0 100%;
  }
  
  .header-actions {
    gap: 8px;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .single-title,
  .page-title {
    font-size: 1.6rem;
  }
  
  .post-thumbnail img {
    height: 180px;
  }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--pale-blue);
}

::-webkit-scrollbar-thumb {
  background: var(--light-blue);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--blue);
}

html {
  scrollbar-color: var(--light-blue) var(--pale-blue);
}

/* ===== Selection ===== */
::selection {
  background: var(--gold);
  color: var(--dark);
}

/* ===== Dark Mode Overrides ===== */
[data-theme="dark"] .site-header {
  background: #1A2332;
}

[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #1A2332 0%, #263D69 100%);
}

[data-theme="dark"] .page-header {
  background: linear-gradient(135deg, #1A2332 0%, #263D69 100%);
}

[data-theme="dark"] .pagination .current {
  background: #1A2332;
}

[data-theme="dark"] .site-footer {
  background: #0D1117;
}

[data-theme="dark"] .main-nav a {
  color: #B0CCFF;
}

[data-theme="dark"] .main-nav a:hover {
  color: var(--cream);
}

[data-theme="dark"] .post-content pre {
  background: #0D1117;
  color: #A8C4FF;
}

[data-theme="dark"] .post-content code {
  background: #2A3247;
  color: #A8C4FF;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: #1A1F2E;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #3A4860;
}

/* ===== Responsive Images ===== */
.post-content img,
.single-thumbnail img,
.slide-image img,
.post-thumbnail img,
.author-avatar {
  max-width: 100%;
  height: auto;
  display: block;
}

.post-content figure,
.post-content .wp-block-image {
  margin: 1.6em 0;
}

.post-content figcaption {
  font-size: 0.875rem;
  color: var(--text-light);
  text-align: center;
  margin-top: 0.5em;
}

/* ===== Review Block ===== */
.wp-block-jpntr-review {
  --review-bg: var(--card-bg);
  --review-border: var(--border);
  --review-text: var(--text);
  --review-accent: #FFB800;
  background: var(--review-bg);
  border: 1px solid var(--review-border);
  border-radius: 14px;
  padding: 1.75rem 1.75rem 1.5rem;
  margin: 1.8em 0;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.wp-block-jpntr-review::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--review-accent), #FF8A00);
}

.wp-block-jpntr-review:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.08);
  transform: translateY(-2px);
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.review-place {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--heading);
  letter-spacing: -0.01em;
}

.review-location {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.review-location::before {
  content: '📍';
  font-size: 0.9rem;
}

.review-rating {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--review-border);
}

.review-stars {
  display: inline-flex;
  gap: 3px;
}

.review-star {
  color: rgba(0,0,0,0.15);
  font-size: 1.4rem;
  line-height: 1;
}

.review-star--filled {
  color: var(--review-accent);
}

.review-score {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--heading);
  background: rgba(255, 184, 0, 0.12);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.review-text {
  margin: 0;
  color: var(--review-text);
  line-height: 1.75;
  font-size: 1rem;
}

.review-text::before {
  content: '“';
  font-family: Georgia, serif;
  font-size: 2.5rem;
  line-height: 0;
  vertical-align: -0.4em;
  margin-right: 0.25rem;
  color: var(--review-accent);
  opacity: 0.6;
}

[data-theme="dark"] .wp-block-jpntr-review {
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

[data-theme="dark"] .review-star {
  color: rgba(255,255,255,0.15);
}

[data-theme="dark"] .review-star--filled {
  color: #FFD700;
}

[data-theme="dark"] .review-score {
  background: rgba(255, 215, 0, 0.15);
}

.review-maps-link {
  margin: 0.85rem 0 0;
  font-size: 0.875rem;
}

.review-maps-link a {
  color: var(--review-accent);
  font-weight: 600;
  text-decoration: none;
}

.review-maps-link a:hover {
  text-decoration: underline;
}

/* ===== Archive / Search ===== */
.archive-description {
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-size: 1rem;
}

.search-results-count {
  color: var(--text-muted);
  margin-top: 0.5rem;
  font-size: 1rem;
}

/* ===== 404 Search Form ===== */
.page-content .search-form {
  margin-top: 1.5rem;
  display: flex;
  gap: 0.5rem;
  max-width: 400px;
}

.page-content .search-form input[type="search"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
}

.page-content .search-form input[type="submit"] {
  padding: 0.75rem 1.25rem;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.page-content .search-form input[type="submit"]:hover {
  background: var(--navy);
}

/* ===== Prism.js Override ===== */
pre[class*="language-"] {
  border-radius: var(--radius);
  margin-bottom: 1.6em;
}

[data-theme="dark"] pre[class*="language-"] {
  background: #0D1117 !important;
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
}

.breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: var(--link);
}

.breadcrumbs-sep {
  margin: 0 0.5rem;
  color: var(--text-light);
}

.breadcrumbs-current {
  color: var(--text);
  font-weight: 500;
}

.breadcrumbs--inline {
  padding: 0;
  border-bottom: none;
  margin-top: 0.5rem;
  font-size: 0.8rem;
}

/* ===== Reading Progress Bar ===== */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  z-index: 1001;
}

.reading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--light-blue));
  width: 0%;
  transition: width 0.1s linear;
}

/* ===== Views Display ===== */
.post-views {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.views-icon {
  width: 16px;
  height: 16px;
  fill: currentColor;
  opacity: 0.7;
}

.views-trend {
  font-size: 0.75rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 500;
}

.views-trend--up {
  color: #2d8a3e;
  background: rgba(45, 138, 62, 0.12);
}

.views-trend--flat {
  color: var(--text-light);
  background: var(--border);
}

[data-theme="dark"] .views-trend--up {
  color: #4ade80;
  background: rgba(74, 222, 128, 0.1);
}

/* ===== Social Sharing ===== */
.social-share {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 2rem 0;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.social-share-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 0.5rem;
}

.social-share-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  transition: transform 0.2s, background 0.2s, border-color 0.2s;
}

.social-share-link svg {
  width: 18px;
  height: 18px;
  fill: var(--text-muted);
  transition: fill 0.2s;
}

.social-share-link:hover {
  transform: translateY(-2px);
  border-color: var(--link);
}

.social-share-link:hover svg {
  fill: var(--link);
}

.social-share--x:hover svg { fill: #000; }
.social-share--linkedin:hover svg { fill: #0A66C2; }
.social-share--whatsapp:hover svg { fill: #25D366; }
.social-share--email:hover svg { fill: var(--blue); }

[data-theme="dark"] .social-share--x:hover svg { fill: #fff; }

/* ===== Back to Top ===== */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 999;
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--navy);
}

.back-to-top svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* ===== Sticky Header ===== */
.site-header {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.site-header.is-hidden {
  transform: translateY(-100%);
}

/* ===== TOC Block ===== */
.wp-block-jpntr-toc {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin: 1.6em 0;
}

.wp-block-jpntr-toc h4 {
  margin: 0 0 1rem;
  font-size: 1rem;
  color: var(--heading);
}

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

.toc-list li {
  margin: 0.4rem 0;
}

.toc-list a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.toc-list a:hover {
  color: var(--link);
}

.toc-list .toc-h3 {
  padding-left: 1.25rem;
  font-size: 0.85rem;
}

/* ===== Newsletter Block ===== */
.wp-block-jpntr-newsletter {
  background: linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
  border-radius: var(--radius);
  padding: 2rem;
  margin: 1.6em 0;
  color: #fff;
  text-align: center;
}

.wp-block-jpntr-newsletter h4 {
  margin: 0 0 0.5rem;
  color: #fff;
  font-size: 1.25rem;
}

.wp-block-jpntr-newsletter p {
  margin: 0 0 1.25rem;
  opacity: 0.9;
  font-size: 0.95rem;
}

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

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.newsletter-form input[type="email"]::placeholder {
  color: rgba(255,255,255,0.7);
}

.newsletter-form button {
  padding: 0.75rem 1.5rem;
  background: var(--cream);
  color: var(--dark);
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.newsletter-form button:hover {
  background: var(--gold);
  transform: translateY(-1px);
}

[data-theme="dark"] .wp-block-jpntr-newsletter {
  background: linear-gradient(135deg, #1A1F2E 0%, #263D69 100%);
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  cursor: pointer;
  border: none;
  font-family: var(--font-body);
  font-size: 1rem;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--primary {
  background: var(--blue);
  color: #fff;
}

.btn--primary:hover {
  background: var(--navy);
  box-shadow: 0 4px 12px rgba(23, 45, 89, 0.25);
}

.btn--secondary {
  background: var(--card-bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--secondary:hover {
  border-color: var(--link);
  color: var(--link);
}

/* ===== 404 Page ===== */
.error-page {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  text-align: center;
}

.error-page__content {
  max-width: 560px;
}

.error-page__code {
  font-size: clamp(6rem, 15vw, 10rem);
  font-weight: 800;
  line-height: 1;
  color: var(--border);
  letter-spacing: -0.05em;
  user-select: none;
}

.error-page__title {
  font-size: 1.75rem;
  font-weight: 700;
  margin: 0.5rem 0 1rem;
  color: var(--heading);
}

.error-page__joke {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin: 0 0 2.5rem;
  line-height: 1.7;
  font-style: italic;
}

.error-page__search {
  margin-bottom: 2rem;
}

.error-page__hint {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 0.75rem;
}

.error-page .search-form {
  display: flex;
  gap: 0.5rem;
  max-width: 480px;
  margin: 0 auto;
}

.error-page .search-form input[type="search"] {
  flex: 1;
  padding: 1rem 1.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.error-page .search-form input[type="search"]:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 45, 89, 0.1);
}

.error-page .search-form input[type="submit"] {
  padding: 1rem 1.75rem;
  background: var(--blue);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.error-page .search-form input[type="submit"]:hover {
  background: var(--navy);
}

.error-page__actions {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== Post Rating ===== */
.post-rating {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 1.5rem 0 0.5rem;
}

.rating-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.rating-btn:hover {
  transform: translateY(-1px);
  border-color: var(--link);
  color: var(--text);
}

.rating-btn svg {
  fill: currentColor;
  transition: transform 0.2s;
}

.rating-btn:hover svg {
  transform: scale(1.1);
}

.rating-btn--up.is-active {
  background: rgba(45, 138, 62, 0.1);
  border-color: #2d8a3e;
  color: #2d8a3e;
}

.rating-btn--down.is-active {
  background: rgba(220, 38, 38, 0.1);
  border-color: #dc2626;
  color: #dc2626;
}

[data-theme="dark"] .rating-btn--up.is-active {
  background: rgba(74, 222, 128, 0.15);
  border-color: #4ade80;
  color: #4ade80;
}

[data-theme="dark"] .rating-btn--down.is-active {
  background: rgba(248, 113, 113, 0.15);
  border-color: #f87171;
  color: #f87171;
}

.rating-score {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-left: 0.25rem;
}

/* ===== Print Styles ===== */
@media print {
  /* Reset dark mode for print */
  html,
  body,
  .post-content,
  .post-content p,
  .post-content h1,
  .post-content h2,
  .post-content h3,
  .post-content h4,
  .post-content li {
    background: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
  }

  /* Hide non-content elements */
  .site-header,
  .site-footer,
  .breadcrumbs,
  .reading-progress,
  .back-to-top,
  .social-share,
  .post-rating,
  .post-tags,
  .post-nav,
  .author-box,
  .pagination,
  .slider-controls,
  .slider-dots,
  .menu-toggle,
  .theme-toggle,
  .wp-block-jpntr-newsletter,
  .newsletter-form,
  .comments-area,
  .comment-navigation,
  .no-comments {
    display: none !important;
  }

  /* Layout */
  body {
    font-size: 12pt;
    line-height: 1.6;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  main {
    margin: 0;
    padding: 0;
  }

  /* Post header */
  .single-header {
    text-align: left;
    margin-bottom: 1.5rem;
    border-bottom: 1pt solid #ccc;
    padding-bottom: 1rem;
  }

  .single-title {
    font-size: 22pt;
    margin-bottom: 0.5rem;
  }

  .single-meta {
    font-size: 10pt;
    color: #555;
  }

  /* Content */
  .post-content {
    max-width: 100%;
  }

  .post-content h2 {
    font-size: 16pt;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    page-break-after: avoid;
  }

  .post-content h3 {
    font-size: 14pt;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    page-break-after: avoid;
  }

  .post-content p {
    margin-bottom: 0.75rem;
    orphans: 3;
    widows: 3;
  }

  .post-content pre,
  .post-content code {
    background: #f5f5f5 !important;
    color: #333 !important;
    border: 1pt solid #ddd;
  }

  .post-content pre {
    padding: 0.75rem;
    border-radius: 4pt;
    page-break-inside: avoid;
  }

  .post-content blockquote {
    border-left: 3pt solid #ccc;
    padding-left: 1rem;
    margin-left: 0;
    font-style: italic;
    color: #333;
    page-break-inside: avoid;
  }

  .post-content img {
    max-width: 100%;
    page-break-inside: avoid;
  }

  .post-content figure {
    page-break-inside: avoid;
  }

  /* Links */
  a {
    color: #000 !important;
    text-decoration: underline;
  }

  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 9pt;
    color: #555;
    word-break: break-all;
  }

  a[href^="#"]:after,
  a[href^="javascript:"]:after {
    content: "";
  }

  /* Tables */
  .post-content table {
    border-collapse: collapse;
    width: 100%;
    page-break-inside: avoid;
  }

  .post-content th,
  .post-content td {
    border: 1pt solid #ccc;
    padding: 0.4rem;
  }

  /* Lists */
  .post-content ul,
  .post-content ol {
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
  }

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

  /* Page breaks */
  article,
  .post-content section {
    page-break-before: auto;
    page-break-inside: avoid;
  }
}