/*
Theme Name: React Style
Theme URI: https://ideipro.ru/
Author: Ideipro Team
Author URI: https://ideipro.ru/
Description: Minimalistic theme in React/Next.js style. Dark mode, grid layout, clean design.
Version: 1.0.0
Requires PHP: 7.4
License: MIT
Text Domain: react-style
*/

/* ===== CSS VARIABLES ===== */
:root {
  --background: 0 0% 100%;
  --foreground: 222.2 84% 4.9%;
  --card: 0 0% 100%;
  --card-foreground: 222.2 84% 4.9%;
  --primary: 221.2 83.2% 53.3%;
  --primary-foreground: 210 40% 98%;
  --secondary: 210 40% 96.1%;
  --secondary-foreground: 222.2 47.4% 11.2%;
  --muted: 210 40% 96.1%;
  --muted-foreground: 215.4 16.3% 46.9%;
  --accent: 210 40% 96.1%;
  --accent-foreground: 222.2 47.4% 11.2%;
  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;
  --border: 214.3 31.8% 91.4%;
  --input: 214.3 31.8% 91.4%;
  --ring: 221.2 83.2% 53.3%;
  --radius: 0.5rem;
}

.dark-theme {
  --background: 222.2 84% 4.9%;
  --foreground: 210 40% 98%;
  --card: 222.2 84% 4.9%;
  --card-foreground: 210 40% 98%;
  --primary: 217.2 91.2% 59.8%;
  --primary-foreground: 222.2 47.4% 11.2%;
  --secondary: 217.2 32.6% 17.5%;
  --secondary-foreground: 210 40% 98%;
  --muted: 217.2 32.6% 17.5%;
  --muted-foreground: 215 20.2% 65.1%;
  --accent: 217.2 32.6% 17.5%;
  --accent-foreground: 210 40% 98%;
  --destructive: 0 62.8% 30.6%;
  --destructive-foreground: 210 40% 98%;
  --border: 217.2 32.6% 17.5%;
  --input: 217.2 32.6% 17.5%;
  --ring: 224.3 76.3% 48%;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.6;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  transition: background-color 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}

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

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: hsl(var(--primary));
}

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

/* ===== HEADER ===== */
.site-header {
  padding: 0.625rem 0;
  border-bottom: 1px solid hsl(var(--border));
  position: sticky;
  top: 0;
  background-color: hsl(var(--background));
  z-index: 50;
  backdrop-filter: blur(10px);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-title {
  font-size: 2.5rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -0.025em;
  line-height: 1;
}

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

/* ===== NAVIGATION ===== */
.main-nav ul {
  display: flex;
  list-style: none;
  gap: 1rem;
}

.main-nav a {
  color: hsl(var(--muted-foreground));
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
}

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

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

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

/* ===== MAIN GRID ===== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 2rem;
  padding: 3rem 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 ===== */
.post-card {
  background: hsl(var(--card));
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  padding: 1.5rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-card:hover {
  border-color: hsl(var(--primary));
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.post-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, hsl(var(--primary)), hsl(var(--accent)));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.post-card:hover::before {
  opacity: 1;
}

/* Post thumbnail in cards */
.post-card .post-thumbnail {
  margin: -1.5rem -1.5rem 1.5rem -1.5rem;
  overflow: hidden;
  border-radius: var(--radius) var(--radius) 0 0;
  height: 200px;
  position: relative;
}

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

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

.post-date {
  color: hsl(var(--muted-foreground));
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  display: block;
}

.post-card h2 {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 1rem;
}

.post-excerpt {
  color: hsl(var(--muted-foreground));
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  flex-grow: 1;
}

/* Post meta with category tag */
.post-card .post-meta {
  margin-top: auto;
}

/* ===== PAGINATION ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin: 3rem 0;
}

.pagination a,
.pagination span {
  padding: 0.75rem 1.25rem;
  background: hsl(var(--card));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  color: hsl(var(--foreground));
  font-weight: 600;
  transition: all 0.2s;
}

.pagination a:hover {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

.pagination .current {
  background: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  border-color: hsl(var(--primary));
}

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

.post-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  color: hsl(var(--muted-foreground));
  font-size: 0.9rem;
}

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

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

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

/* ===== CATEGORY PAGE ===== */
.category-header {
  margin-bottom: 3rem;
  text-align: center;
}

.category-header h1 {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
}

.category-header p {
  color: hsl(var(--muted-foreground));
  font-size: 1.125rem;
}

/* ===== FOOTER ===== */
.site-footer {
  margin-top: 4rem;
  padding: 3rem 0;
  border-top: 1px solid hsl(var(--border));
  color: hsl(var(--muted-foreground));
  text-align: center;
}

/* ===== HIDE UNNECESSARY ===== */
/* .widget-area,
.comments-area,
.post-navigation,
.sidebar {
  display: none !important;
} */

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-card {
  animation: fadeIn 0.5s ease forwards;
}

.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.3s; }
.post-card:nth-child(5) { animation-delay: 0.3s; }

/* ===== SLIDER ===== */
.slider-section {
  margin: 3rem 0;
}

.slider-container {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
}

.slider {
  position: relative;
  height: 70vh;
  min-height: 500px;
  max-height: 800px;
}

.slider-track {
  display: flex;
  height: 100%;
  transition: transform 0.5s ease;
}

.slide {
  flex: 0 0 100%;
  position: relative;
  height: 100%;
}

.slide-background {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 1;
}

.slide-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.7), rgba(0,0,0,0.3));
  z-index: 2;
}

.slide-content {
  position: relative;
  z-index: 3;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 3rem;
  color: white;
  max-width: 800px;
}

.slide-category {
  background: #0b57d0;
  color: #ffffff;
  border: 1px solid #0b57d0;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  align-self: flex-start;
  margin-bottom: 1rem;
  text-decoration: none;
  text-shadow: none;
  opacity: 1;
  transition: all 0.2s;
}

.slide-category:hover {
  background: #0847aa;
  color: #ffffff;
  border-color: #0847aa;
  transform: translateY(-2px);
}

.slide-title {
  font-size: 3rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.slide-title a {
  color: white;
  text-decoration: none;
}

.slide-title a:hover {
  color: hsl(var(--primary));
}

.slide-excerpt {
  font-size: 1.25rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  opacity: 0.9;
  max-width: 600px;
}

.slide-date {
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 1.5rem;
}

.slide-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.slide-read-more {
  background: #ff6a00;
  color: #ffffff;
  border: 1px solid #ff6a00;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  text-shadow: none;
  opacity: 1;
  transition: all 0.2s;
}

.slide-read-more:hover {
  background: #e55f00;
  color: #ffffff;
  border-color: #e55f00;
  transform: translateY(-2px);
}

.slide-speak {
  background: transparent;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid white;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.slide-speak:hover {
  background: white;
  color: black;
  transform: translateY(-2px);
}

.slider-controls {
  position: absolute;
  bottom: 2rem;
  left: 0;
  right: 0;
  z-index: 4;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
}

.slider-prev,
.slider-next {
  background: rgba(255,255,255,0.2);
  color: white;
  border: none;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slider-prev:hover,
.slider-next:hover {
  background: white;
  color: black;
  transform: scale(1.1);
}

.slider-dots {
  display: flex;
  gap: 0.5rem;
}

.slider-dot {
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  border: none;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}

.slider-dot.active,
.slider-dot:hover {
  background: white;
  transform: scale(1.2);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .site-title {
    font-size: 1.5rem;
  }
  
  .header-container {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
  }
  
  .main-nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
  }
  
  .posts-grid {
    grid-template-columns: 1fr;
  }
  
  .category-header h1 {
    font-size: 2.5rem;
  }

  .custom-logo { max-height: 50px; width: auto; }
  /* Slider responsive */
  .slider {
    height: 60vh;
    min-height: 400px;
  }

  .slide-content {
    padding: 2rem;
  }

  .slide-title {
    font-size: 2rem;
  }

  .slide-excerpt {
    font-size: 1rem;
  }

  .slider-controls {
    bottom: 1rem;
  }
}
/* FULL‑WIDTH HOME SLIDER (safe) */
.slider-section {
    margin: 0 0 3rem 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    position: relative !important;
    left: 50% !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    right: auto !important;
    overflow: hidden !important;
}

.slider-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
    border-radius: 0 !important;
    overflow: hidden !important;
}
/* ===== КНОПКИ ОЗВУЧИВАНИЯ ===== */
.post-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    align-items: center;
}

.read-more {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.read-more:hover {
    background: hsl(var(--primary-foreground));
    color: hsl(var(--primary));
    transform: translateY(-2px);
}

.speak-button {
    background: transparent;
    color: hsl(var(--muted-foreground));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.speak-button:hover {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
    transform: translateY(-2px);
}

.speak-button.compact {
    padding: 0.5rem;
    font-size: 0.9rem;
}

.speak-button.large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.speak-button.speaking {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    animation: pulse 1.5s infinite;
}

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

.post-speak-section {
    margin-top: 3rem;
    padding: 2rem;
    background: hsl(var(--card));
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    text-align: center;
}

.speak-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.speak-pause,
.speak-stop {
    background: transparent;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.speak-pause:hover,
.speak-stop:hover {
    background: hsl(var(--muted));
}

.speak-voice {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 0.5rem;
    color: hsl(var(--foreground));
}

/* ===== COMPACT SPEAK BLOCK ===== */
.post-speak-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.speak-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.speak-button-compact {
    background: transparent;
    color: hsl(var(--primary));
    border: 2px solid hsl(var(--primary));
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.speak-button-compact:hover {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    transform: translateY(-2px);
}

.speak-button-compact.speaking {
    background: hsl(var(--accent));
    color: hsl(var(--accent-foreground));
    border-color: hsl(var(--accent));
    animation: pulse 1.5s infinite;
}

.speak-language {
    flex-shrink: 0;
}

.speak-voice-compact {
    background: hsl(var(--card));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 0.4rem 0.6rem;
    color: hsl(var(--foreground));
    font-size: 0.9rem;
    cursor: pointer;
}

.speak-controls-compact {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.speak-pause-compact,
.speak-stop-compact {
    background: transparent;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.speak-pause-compact:hover,
.speak-stop-compact:hover {
    background: hsl(var(--muted));
    border-color: hsl(var(--primary));
}

/* ===== CATEGORY TAGS ===== */
/* Color variables for different category tags */
.category-tag,
.post-tags a {
    background: transparent;
    color: hsl(var(--tag-color, var(--primary)));
    border: 2px solid hsl(var(--border));
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.category-tag:hover,
.post-tags a:hover {
    background: hsl(var(--tag-color, var(--primary)));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--tag-color, var(--primary)));
    transform: translateY(-2px);
}

.category-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1rem 0;
}

/* ===== SOCIAL SHARE BUTTONS ===== */
.post-share {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.share-button {
    background: transparent;
    color: hsl(var(--primary));
    border: 2px solid hsl(var(--primary));
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.share-button:hover {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    transform: translateY(-2px);
}

.share-button.copied {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
}

/* ===== POST TAGS ===== */
.post-tags {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid hsl(var(--border));
}

.post-tags .tags-label {
    font-weight: 600;
    margin-right: 0.5rem;
    color: hsl(var(--muted-foreground));
}

.post-tags a {
    background: transparent;
    color: hsl(var(--primary));
    border: 2px solid hsl(var(--border));
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    display: inline-block;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.post-tags a:hover {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
    transform: translateY(-2px);
}

/* ===== COMMENT FORM ===== */
#respond, .comment-respond {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid hsl(var(--border));
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: hsl(var(--foreground));
}

.comment-form .required {
    color: hsl(0 84.2% 60.2%);
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    padding: 0.75rem 1rem;
    background: hsl(var(--card));
    border: 2px solid hsl(var(--border));
    border-radius: var(--radius);
    color: hsl(var(--foreground));
    font-size: 1rem;
    transition: all 0.2s;
    margin-bottom: 1.5rem;
}

.comment-form textarea:focus,
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.comment-form .form-submit {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.comment-form input[type="submit"],
#commentform input[type="submit"],
.form-submit input[type="submit"],
.submit {
    background: transparent;
    color: hsl(var(--primary));
    border: 2px solid hsl(var(--primary));
    border-radius: var(--radius);
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.comment-form input[type="submit"]:hover,
#commentform input[type="submit"]:hover,
.form-submit input[type="submit"]:hover,
.submit:hover {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    transform: translateY(-2px);
}

/* ===== HOME ACCORDION ===== */
.home-accordion {
    margin: 2rem 0 3rem 0;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    overflow: hidden;
    background: hsl(var(--card));
}

.accordion-toggle {
    width: 100%;
    background: hsl(var(--card));
    border: none;
    padding: 1.5rem 2rem;
    font-size: 1.2rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s;
}

.accordion-toggle:hover {
    background: hsl(var(--muted));
}

.accordion-toggle[aria-expanded="true"] .accordion-icon {
    transform: rotate(180deg);
}

.accordion-title {
    flex: 1;
    margin-right: 1rem;
}

.accordion-icon {
    transition: transform 0.3s ease;
    font-size: 0.9em;
}

.accordion-content {
    border-top: 1px solid hsl(var(--border));
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-content[hidden] {
    display: block;
    max-height: 0;
    padding: 0 2rem;
}

.accordion-content:not([hidden]) {
    max-height: 1000px;
    padding: 2rem;
}

.accordion-text {
    line-height: 1.6;
    font-size: 1.1rem;
    color: hsl(var(--muted-foreground));
}

.accordion-text p {
    margin: 0;
}

/* ===== CATEGORY ACCORDION ===== */
.category-accordion {
    margin: 1.5rem 0 2rem 0;
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    overflow: hidden;
    background: hsl(var(--card));
}

.category-accordion .accordion-toggle {
    font-size: 1.1rem;
    padding: 1.25rem 1.5rem;
}

.category-accordion .accordion-icon {
    font-size: 1.5rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.category-accordion .accordion-arrow {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.category-accordion .accordion-toggle[aria-expanded="true"] .accordion-arrow {
    transform: rotate(180deg);
}

.category-accordion .accordion-description {
    padding: 1.5rem;
    line-height: 1.6;
    color: hsl(var(--muted-foreground));
    font-size: 1rem;
}

.category-accordion .accordion-description p {
    margin-bottom: 1rem;
}

.category-accordion .accordion-description p:last-child {
    margin-bottom: 0;
}

/* ===== NEWS TICKER ===== */
.news-ticker-section {
    margin: 3rem 0;
    background: hsl(var(--muted));
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid hsl(var(--border));
}

.ticker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.ticker-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.ticker-pause {
    background: transparent;
    border: 1px solid hsl(var(--primary-foreground));
    color: hsl(var(--primary-foreground));
    border-radius: var(--radius);
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.ticker-pause:hover {
    background: hsl(var(--primary-foreground));
    color: hsl(var(--primary));
}

.ticker-container {
    overflow: hidden;
    padding: 1rem 0;
    background: hsl(var(--card));
}

.ticker-track {
    display: flex;
    animation: ticker-scroll 30s linear infinite;
    white-space: nowrap;
    width: max-content;
}

.ticker-track.paused {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 2rem;
    border-right: 1px solid hsl(var(--border));
    text-decoration: none;
    color: hsl(var(--foreground));
    transition: all 0.2s;
}

.ticker-item:hover {
    background: hsl(var(--muted));
    color: hsl(var(--primary));
}

.ticker-category {
    font-weight: 600;
    color: hsl(var(--primary));
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.ticker-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.news-ticker-fullwidth {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.news-ticker-fullwidth .news-ticker-section {
    margin: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

/* ===== POST NAVIGATION ===== */
.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid hsl(var(--border));
    border-bottom: 1px solid hsl(var(--border));
    padding-bottom: 1.5rem;
}

.post-navigation-empty {
    margin-top: 3rem;
    padding: 2rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    text-align: center;
    color: hsl(var(--muted-foreground));
    font-style: italic;
    background: hsl(var(--muted) / 0.3);
}

.nav-previous,
.nav-next {
    flex: 1;
    min-width: 0;
}

.nav-previous a,
.nav-next a {
    display: block;
    padding: 1.25rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background: hsl(var(--card));
    color: hsl(var(--foreground));
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    height: 100%;
    position: relative;
    padding-left: 2.5rem;
    padding-right: 2.5rem;
}

.nav-next a {
    padding-left: 1.25rem;
    padding-right: 2.5rem;
    text-align: right;
}

.nav-previous a {
    padding-left: 2.5rem;
    padding-right: 1.25rem;
    text-align: left;
}

.nav-previous a:hover,
.nav-next a:hover {
    background: hsl(var(--primary) / 0.08);
    border-color: hsl(var(--primary));
    transform: translateY(-2px);
    box-shadow: 0 4px 12px hsl(var(--primary) / 0.1);
}

.nav-previous a::before {
    content: "←";
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: hsl(var(--primary));
    font-weight: normal;
}

.nav-next a::after {
    content: "→";
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    color: hsl(var(--primary));
    font-weight: normal;
}

.nav-previous .nav-label,
.nav-next .nav-label {
    display: block;
    font-size: 0.85rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.nav-previous .nav-title,
.nav-next .nav-title {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: hsl(var(--foreground));
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ===== SINGLE LAYOUT ===== */
.single-layout {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.post-content-wrapper {
    flex: 3;
    min-width: 0; /* For text overflow */
    width: 100%;
    padding-left: 30px;
    padding-right: 30px;
}

.post-sidebar {
    flex: 1;
    min-width: 280px;
    max-width: 320px;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    background: hsl(var(--card));
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
    padding: 1.5rem;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

@media (max-width: 1024px) {
    .single-layout {
        flex-direction: column;
        gap: 2rem;
    }
    
    .post-content-wrapper,
    .post-sidebar {
        flex: none;
        max-width: 100%;
        width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .post-sidebar {
        position: static;
        max-height: none;
    }
}

/* ===== SIDEBAR BLOCKS ===== */
.sidebar-block {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid hsl(var(--border));
}

.sidebar-block:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.sidebar-title {
    font-size: 1.1rem;
    margin: 0 0 1rem 0;
    color: hsl(var(--foreground));
    padding-bottom: 0.5rem;
    border-bottom: 2px solid hsl(var(--primary));
}

.sidebar-list,
.sidebar-categories,
.sidebar-comments {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li,
.sidebar-categories li,
.sidebar-comments li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid hsl(var(--border));
}

.sidebar-list li:last-child,
.sidebar-categories li:last-child,
.sidebar-comments li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.sidebar-list a,
.sidebar-categories a,
.sidebar-comments a {
    color: hsl(var(--foreground));
    text-decoration: none;
    transition: color 0.2s;
    display: block;
}

.sidebar-list a:hover,
.sidebar-categories a:hover,
.sidebar-comments a:hover {
    color: hsl(var(--primary));
    text-decoration: underline;
}

.sidebar-categories .category-count {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
    margin-left: 0.25rem;
}

.sidebar-comments .comment-item {
    font-size: 0.9rem;
}

.sidebar-comments .comment-excerpt {
    display: block;
    color: hsl(var(--muted-foreground));
    margin-top: 0.25rem;
    font-size: 0.85rem;
    line-height: 1.4;
}

.sidebar-empty {
    color: hsl(var(--muted-foreground));
    font-style: italic;
    font-size: 0.9rem;
}

.sidebar-telegram {
    text-align: center;
    padding: 1rem 0;
}

.sidebar-telegram p {
    margin: 0 0 1rem 0;
    color: hsl(var(--foreground));
    font-size: 0.95rem;
}

.telegram-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0088cc;
    color: white;
    border-radius: var(--radius);
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    margin-bottom: 1rem;
    width: 100%;
}

.telegram-button:hover {
    background: #0077b5;
    transform: translateY(-2px);
    color: white;
}

.telegram-note {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.75rem;
}

/* Telegram QR Block */
.sidebar-telegram-qr {
    text-align: center;
    padding: 1rem 0;
}

.sidebar-telegram-qr p {
    margin: 0 0 1rem 0;
    color: hsl(var(--foreground));
    font-size: 0.95rem;
}

.telegram-qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.telegram-qr-placeholder {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, hsl(var(--primary) / 0.1), hsl(var(--accent) / 0.1));
    border: 2px dashed hsl(var(--primary) / 0.3);
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}

.qr-placeholder-text {
    font-weight: 600;
    color: hsl(var(--primary));
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.qr-placeholder-instruction {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
    line-height: 1.3;
}

.telegram-qr {
    width: 180px;
    height: 180px;
    border-radius: var(--radius);
    border: 2px solid hsl(var(--border));
    object-fit: cover;
}

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

.telegram-button-qr {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0088cc;
    color: white;
    border-radius: var(--radius);
    padding: 1rem 2rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    gap: 0.75rem;
    font-size: 1.1rem;
}

.telegram-button-qr:hover {
    background: #0077b5;
    transform: translateY(-2px);
    color: white;
}

.telegram-button-qr svg {
    width: 24px;
    height: 24px;
}

.telegram-description {
    font-size: 0.9rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.75rem;
    line-height: 1.4;
}

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

.sidebar-subscribe p {
    margin: 0 0 1rem 0;
    color: hsl(var(--foreground));
    font-size: 0.95rem;
}

.subscribe-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.subscribe-form input {
    background: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    color: hsl(var(--foreground));
    font-size: 1rem;
}

.subscribe-form input:focus {
    outline: none;
    border-color: hsl(var(--primary));
}

.subscribe-form button {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border: none;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.subscribe-form button:hover {
    background: hsl(var(--primary) / 0.9);
}

.subscribe-note {
    font-size: 0.8rem;
    color: hsl(var(--muted-foreground));
    margin-top: 0.75rem;
}

/* ===== THEME TOGGLE ===== */
.theme-toggle {
    background: transparent;
    border: 2px solid hsl(var(--primary));
    border-radius: var(--radius);
    color: hsl(var(--primary));
    width: 3rem;
    height: 3rem;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
}

.theme-toggle:hover {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    transform: scale(1.1);
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    margin: 1rem 0 2rem 0;
    font-size: 0.9rem;
    color: hsl(var(--muted-foreground));
}

.breadcrumbs a {
    color: hsl(var(--primary));
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .current {
    color: hsl(var(--foreground));
    font-weight: 600;
}

.breadcrumbs .separator {
    margin: 0 0.5rem;
    color: hsl(var(--border));
}

/* ===== UTILITY ===== */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mt-3 { margin-top: 1.5rem; }
/* ===== MOBILE SMALL (phones) ===== */
@media (max-width: 480px) {
  .custom-logo {
    max-height: 35px !important;
    width: auto;
  }
  
  .site-title {
    font-size: 1.25rem;
  }
  
  .header-container {
    gap: 0.25rem;
    flex-wrap: wrap;
  }
  
  .main-nav ul {
    gap: 0.5rem;
    margin-top: 0.25rem;
    font-size: 0.9rem;
  }
  
  .main-nav a {
    font-size: 0.9rem;
  }
}
/* ==== COMPACT MOBILE HEADER (MENU VISIBLE) ==== */
@media (max-width: 768px) {
    /* Compact header */
    .site-header { padding: 0.4rem 0 !important; }
    .header-container { 
        padding: 0.4rem 0.6rem !important;
        gap: 0.3rem !important;
    }
    
    /* Smaller logo */
    .custom-logo { max-height: 22px !important; }
    .site-title { font-size: 0.9rem !important; }
    
    /* Smaller theme toggle */
    .theme-toggle { 
        width: 2rem !important;
        height: 2rem !important;
        font-size: 1rem !important;
        margin-left: 0.3rem !important;
    }
    
    /* Menu - visible and compact */
    .main-nav { margin-top: 0.5rem !important; }
    .main-nav ul { 
        gap: 0.3rem !important;
        font-size: 0.8rem !important;
        flex-wrap: wrap !important;
    }
    
    .main-nav li { 
        flex: 0 0 calc(33.333% - 0.2rem) !important;
        text-align: center;
    }
    
    .main-nav a { 
        font-size: 0.8rem !important;
        padding: 0.3rem 0.5rem !important;
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        background: hsl(var(--card));
        border: 1px solid hsl(var(--border));
        border-radius: 4px;
    }
}

@media (max-width: 480px) {
    /* Extra small screens */
    .custom-logo { max-height: 18px !important; }
    .theme-toggle { 
        width: 1.8rem !important;
        height: 1.8rem !important;
        font-size: 0.9rem !important;
    }
    
    /* Menu in 2 rows */
    .main-nav li { 
        flex: 0 0 calc(50% - 0.2rem) !important;
    }
    
    /* Horizontal scroll for many menu items */
    .main-nav ul {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.3rem;
    }
}

/* ==== MOBILE SLIDER FIXES ==== */
@media (max-width: 768px) {
    .slider-section { margin: 1.5rem 0 !important; }
    .slider { 
        height: 50vh !important;
        min-height: 300px !important;
        max-height: 500px !important;
    }
    .slide-content { 
        padding: 1.5rem !important;
        text-align: center !important;
    }
    .slide-title { 
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
    .slide-excerpt { 
        font-size: 0.9rem !important;
        line-height: 1.4 !important;
    }
}

@media (max-width: 480px) {
    .slider { 
        height: 40vh !important;
        min-height: 250px !important;
    }
    .slide-title { font-size: 1.2rem !important; }
    .slide-excerpt { font-size: 0.8rem !important; }
}

/* ==== IMPROVED PAGINATION ==== */
.pagination {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin: 3rem auto;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    text-decoration: none;
}

.pagination .current {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
}

/* ==== HAMBURGER MENU ==== */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: space-evenly;
        width: 36px;
        height: 36px;
        background: hsl(var(--card));
        border: 2px solid hsl(var(--border));
        border-radius: 6px;
        padding: 8px;
        cursor: pointer;
        margin-left: auto;
        z-index: 100;
    }
    
    .mobile-menu-toggle span {
        display: block;
        width: 100%;
        height: 3px;
        background: hsl(var(--foreground));
        border-radius: 2px;
        transition: all 0.3s ease;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Initially hide menu on mobile */
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: hsl(var(--background));
        border: 1px solid hsl(var(--border));
        border-radius: 0 0 var(--radius) var(--radius);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        z-index: 99;
    }
    
    .main-nav.active {
        max-height: 400px !important;
        padding: 1rem;
    }
    
    .main-nav ul {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .main-nav li {
        width: 100%;
    }
    
    .main-nav a {
        display: block;
        padding: 0.75rem !important;
        text-align: center;
        border-radius: var(--radius);
    }
}

/* ==== FALLBACK FOR MENU OVERFLOW ==== */
@media (max-width: 768px) {
    .main-nav:not(.active) ul {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        white-space: nowrap !important;
        flex-wrap: nowrap !important;
        padding-bottom: 0.5rem !important;
    }
    
    .main-nav:not(.active) li {
        display: inline-block !important;
        flex: 0 0 auto !important;
        margin-right: 0.5rem !important;
    }
}

/* ==== DESKTOP HEADER IMPROVEMENTS ==== */
@media (min-width: 769px) {
    /* Move menu closer to theme toggle */
    .main-nav {
        margin-right: 1rem !important;
        margin-left: auto !important;
    }
    
    /* Smaller theme toggle button */
    .theme-toggle {
        width: 2.5rem !important;
        height: 2.5rem !important;
        font-size: 1.2rem !important;
    }
    
    /* Menu text in uppercase */
    .main-nav a {
        text-transform: uppercase !important;
        font-size: 0.9rem !important;
        letter-spacing: 0.5px;
    }
    
    /* Better spacing between menu items */
    .main-nav ul {
        gap: 1.5rem !important;
    }
}

/* Larger screens - even better spacing */
@media (min-width: 1024px) {
    .main-nav ul {
        gap: 2rem !important;
    }
    
    .theme-toggle {
        width: 2.8rem !important;
        height: 2.8rem !important;
    }
}

/* ==== FULL-WIDTH SLIDER ==== */


/* Ensure slider content stays centered within full width */
.slide-content {
    max-width: 1200px !important;
    margin: 0 auto !important;
    position: relative !important;
    z-index: 2 !important;
}

/* On mobile, keep full width but adjust height */
@media (max-width: 768px) {
    .slider-section {
        margin-left: -50vw !important;
        margin-right: -50vw !important;
    }
    
    .slider {
        height: 50vh !important;
        min-height: 300px !important;
    }
}

@media (max-width: 480px) {
    .slider {
        height: 40vh !important;
        min-height: 250px !important;
    }
}

/* ==== BETTER LINK STYLES ==== */
/* Make links stand out in post content */
.post-content a,
.entry-content a,
.page-content a {
    color: hsl(var(--primary)) !important;
    text-decoration: underline !important;
    text-decoration-color: hsl(var(--primary) / 0.3) !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 0.2em !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
}

.post-content a:hover,
.entry-content a:hover,
.page-content a:hover {
    color: hsl(var(--primary) / 0.8) !important;
    text-decoration-color: hsl(var(--primary)) !important;
    text-decoration-thickness: 3px !important;
}

/* Links in post excerpts */
.post-excerpt a {
    color: hsl(var(--primary)) !important;
    text-decoration: underline !important;
    text-decoration-color: hsl(var(--primary) / 0.3) !important;
}

.post-excerpt a:hover {
    color: hsl(var(--primary) / 0.8) !important;
    text-decoration-color: hsl(var(--primary)) !important;
}

/* Links in text widgets and sidebars */
.widget a,
.sidebar a {
    color: hsl(var(--primary)) !important;
    text-decoration: underline !important;
    text-decoration-color: hsl(var(--primary) / 0.3) !important;
}

.widget a:hover,
.sidebar a:hover {
    color: hsl(var(--primary) / 0.8) !important;
    text-decoration-color: hsl(var(--primary)) !important;
}

/* Keep existing link styles for navigation untouched */
.main-nav a,
.site-title a,
.pagination a,
.post-tags a {
    /* These already have custom styles, don't override */
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .post-content a,
    .entry-content a,
    .page-content a {
        text-decoration-thickness: 1.5px !important;
    }
}

/* ==== FIX POSTS GRID ALIGNMENT ==== */
.posts-grid {
    align-items: start !important;
    grid-auto-rows: 1fr !important;
}

.post-card {
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
}

/* Fix grid columns for large screens */
@media (min-width: 1024px) {
    .posts-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* Fix pagination visibility */
.pagination {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Ensure pagination works on all pages */
.page-special .pagination,
.archive .pagination,
.search .pagination,
.home .pagination {
    display: flex !important;
    justify-content: center !important;
    margin: 3rem 0 !important;
}

/* ==== FIX ACCORDION - HIDE CONTENT COMPLETELY ==== */
.accordion-content[hidden] {
    display: none !important;
    padding: 0 !important;
    max-height: 0 !important;
    border-top: none !important;
}

.accordion-content:not([hidden]) {
    display: block !important;
    max-height: 1000px !important;
    padding: 2rem !important;
    border-top: 1px solid hsl(var(--border)) !important;
}

/* Ensure accordion toggle stands out */
.accordion-toggle {
    padding: 1.5rem 2rem !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
}

.accordion-title {
    font-size: 1.1rem !important;
    text-align: left !important;
}

/* ==== MOBILE SLIDER IMPROVEMENTS ==== */
@media (max-width: 768px) {
    .slider {
        height: 45vh !important;
        min-height: 280px !important;
    }
    
    .slide-content {
        padding: 1.2rem !important;
    }
    
    .slide-title {
        font-size: 1.4rem !important;
        line-height: 1.3 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .slide-excerpt {
        font-size: 0.85rem !important;
        line-height: 1.4 !important;
        max-height: 3.5em !important;
        overflow: hidden !important;
    }
}

@media (max-width: 480px) {
    .slider {
        height: 38vh !important;
        min-height: 220px !important;
    }
    
    .slide-title {
        font-size: 1.2rem !important;
    }
    
    .slide-excerpt {
        font-size: 0.8rem !important;
        max-height: 3em !important;
    }
}

/* ==== URGENT FIXES - FORCE VISIBILITY ==== */

/* 1. PAGINATION - FORCE DISPLAY EVERYWHERE */
body .pagination,
nav.pagination,
.pagination {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    width: auto !important;
    position: static !important;
    z-index: 9999 !important;
    pointer-events: auto !important;
    user-select: auto !important;
    margin: 3rem 0 !important;
    padding: 1rem 0 !important;
    border-top: 1px solid hsl(var(--border)) !important;
    border-bottom: 1px solid hsl(var(--border)) !important;
}

/* 2. GRID FIX - OVERRIDE ALL INLINE STYLES */
body .posts-grid,
.posts-grid {
    grid-template-columns: repeat(1, 1fr) !important;
    align-items: start !important;
    justify-content: start !important;
}

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

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

/* 3. SLIDER FULL WIDTH EVERYWHERE */


/* 5. LINK VISIBILITY FOR DEBUGGING */
.pagination a,
.pagination span,
.pagination .current {
    color: hsl(var(--primary)) !important;
    background: hsl(var(--card)) !important;
    padding: 0.5rem 1rem !important;
    border: 2px solid hsl(var(--primary)) !important;
    border-radius: 0.5rem !important;
    font-weight: bold !important;
    text-decoration: none !important;
    margin: 0 0.25rem !important;
}

.pagination .current {
    background: hsl(var(--primary)) !important;
    color: white !important;
}

/* 6. POST CARD HEIGHT FIX */
body .post-card,
.post-card {
    height: 100% !important;
    min-height: 300px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

.post-card .post-thumbnail {
    flex-shrink: 0 !important;
}

.post-card .post-excerpt {
    flex-grow: 1 !important;
}
/* Тёмная тема — основной текст и заголовки */
body.dark-mode .entry-content,
body.dark-mode .entry-content p,
body.dark-mode .entry-content li,
body.dark-mode .entry-content blockquote,
body.dark-mode .entry-content strong,
body.dark-mode .entry-content span,
body.dark-mode article,
body.dark-mode article p {
  color: #d9e0ea !important;
}

body.dark-mode .entry-title,
body.dark-mode .entry-content h1,
body.dark-mode .entry-content h2,
body.dark-mode .entry-content h3,
body.dark-mode .entry-content h4,
body.dark-mode .entry-content h5,
body.dark-mode .entry-content h6,
body.dark-mode article h1,
body.dark-mode article h2,
body.dark-mode article h3 {
  color: #f5f7fb !important;
}

/* Ограничение размера картинок в записи */
body.single-post .entry-content img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 560px;
  height: auto;
  margin: 24px auto;
  border-radius: 14px;
}

body.single-post .entry-content figure {
  margin: 24px auto;
  text-align: center;
}

body.single-post .entry-content figure img {
  margin: 0 auto;
}
/* Темная тема — основной текст записи */
body.dark-theme .entry-content,
body.dark-theme .entry-content p,
body.dark-theme .entry-content li,
body.dark-theme .entry-content span,
body.dark-theme .entry-content strong,
body.dark-theme .entry-content blockquote,
body.dark-theme article,
body.dark-theme article p,
body.dark-theme .post-content,
body.dark-theme .single-post-content {
  color: #d9e0ea !important;
}

/* Темная тема — заголовки */
body.dark-theme .entry-title,
body.dark-theme .post-title,
body.dark-theme .single-post-title,
body.dark-theme .entry-content h1,
body.dark-theme .entry-content h2,
body.dark-theme .entry-content h3,
body.dark-theme .entry-content h4,
body.dark-theme .entry-content h5,
body.dark-theme .entry-content h6,
body.dark-theme article h1,
body.dark-theme article h2,
body.dark-theme article h3 {
  color: #f5f7fb !important;
}

/* Картинки в одиночной записи */
body.single-post .entry-content img,
body.single-post article img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 560px;
  height: auto;
  margin: 24px auto;
  border-radius: 14px;
}

body.single-post .entry-content figure,
body.single-post article figure {
  margin: 24px auto;
  text-align: center;
}

body.single-post .entry-content figure img,
body.single-post article figure img {
  margin: 0 auto;
}

/* Главное изображение записи — увеличиваем */
.single-post .post-thumbnail img,
.single .post-thumbnail img {
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 16px;
}

.single-post .post-thumbnail,
.single .post-thumbnail {
  margin: 0 0 32px;
}

/* Главное изображение — принудительно на всю ширину */
.single-post .post-thumbnail,
.single .post-thumbnail {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 0 32px !important;
}

.single-post .post-thumbnail img,
.single .post-thumbnail img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  object-fit: cover !important;
  border-radius: 16px !important;
}


/* Одиночная запись — нормальное большое главное изображение */
body.single-post .post-thumbnail,
.single-post .post-thumbnail,
.single .post-thumbnail {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 0 0 32px !important;
  border-radius: 16px !important;
}

body.single-post .post-thumbnail img,
.single-post .post-thumbnail img,
.single .post-thumbnail img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 720px !important;
  object-fit: contain !important;
  border-radius: 16px !important;
}
/* Одиночная запись — нормальное большое главное изображение */
body.single-post .post-thumbnail,
.single-post .post-thumbnail,
.single .post-thumbnail {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 0 0 32px !important;
  border-radius: 16px !important;
}

body.single-post .post-thumbnail img,
.single-post .post-thumbnail img,
.single .post-thumbnail img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 720px !important;
  object-fit: contain !important;
  border-radius: 16px !important;
}

cat <<'EOF' >> wp-content/themes/react-style-perfect/style.css

/* Single post — расширяем контейнеры для большого изображения */
.single-layout .post-content-wrapper {
  max-width: 100% !important;
}

body.single-post .post-header .post-thumbnail,
.single-post .post-header .post-thumbnail {
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  margin: 0 0 32px !important;
  border-radius: 16px !important;
  width: 100% !important;
  max-width: 100% !important;
}

body.single-post .post-header .post-thumbnail img,
.single-post .post-header .post-thumbnail img {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 720px !important;
  object-fit: contain !important;
  border-radius: 16px !important;
}

/* Исправление пагинации */
.pagination a.prev,
.pagination a.next,
.pagination span.current,
.pagination a {
  display: inline-block !important;
}

.pagination a.prev,
.pagination a.next,
.pagination span.current {
  padding: 0.5rem 1rem !important;
  border: 1px solid #d1d5db !important;
  border-radius: 0.375rem !important;
  text-decoration: none !important;
}

/* Центрирование пагинации */
.pagination {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  width: 100% !important;
  margin: 32px auto !important;
  text-align: center !important;
}

.pagination a,
.pagination span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 42px !important;
}

/* Скрыть fallback-картинку у постов без миниатюры */
.post-card .post-thumbnail img[src*="blank-2-grids-collage"] {
  display: none !important;
}

.post-card .post-thumbnail:has(img[src*="blank-2-grids-collage"]) {
  display: none !important;
}
/* ===== TELEGRAM PAGE GRID ONLY ===== */
.telegram-posts-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 24px !important;
    align-items: start !important;
    margin-top: 32px !important;
}

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

@media (min-width: 1200px) {
    body.page-id-11265 .telegram-posts-grid,
    body.page-template-page-special .telegram-posts-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
}

.telegram-posts-grid > article.post-card {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    margin: 0 !important;
}

.telegram-posts-grid .post-thumbnail {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.telegram-posts-grid .post-thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.telegram-posts-grid .post-excerpt {
    flex-grow: 1 !important;
}
/* ===== TELEGRAM PAGE HARD OVERRIDE ===== */
.page-template-page-special .telegram-posts-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 24px !important;
    align-items: start !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 32px !important;
}

.page-template-page-special .telegram-posts-grid > article.post-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.page-template-page-special .telegram-posts-grid .post-thumbnail {
    width: 100% !important;
    height: 180px !important;
    min-height: 180px !important;
    max-height: 180px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

.page-template-page-special .telegram-posts-grid .post-thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

.page-template-page-special .telegram-posts-grid .post-title,
.page-template-page-special .telegram-posts-grid h2 {
    min-height: 2.8em !important;
}

.page-template-page-special .telegram-posts-grid .post-excerpt {
    flex-grow: 1 !important;
}

@media (max-width: 1399px) {
    .page-template-page-special .telegram-posts-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1023px) {
    .page-template-page-special .telegram-posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767px) {
    .page-template-page-special .telegram-posts-grid {
        grid-template-columns: 1fr !important;
    }
}

body.page-id-11265 .telegram-posts-grid > article.post-card {
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

body.page-id-11265 .telegram-posts-grid .post-thumbnail {
    width: 100% !important;
    height: 220px !important;
    min-height: 220px !important;
    max-height: 220px !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
}

body.page-id-11265 .telegram-posts-grid .post-thumbnail img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

body.page-id-11265 .telegram-posts-grid .post-title,
body.page-id-11265 .telegram-posts-grid h2 {
    min-height: 3.2em !important;
}

body.page-id-11265 .telegram-posts-grid .post-excerpt {
    flex-grow: 1 !important;
}

@media (max-width: 1399px) {
    body.page-id-11265 .telegram-posts-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 1023px) {
    body.page-id-11265 .telegram-posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767px) {
    body.page-id-11265 .telegram-posts-grid {
        grid-template-columns: 1fr !important;
    }
}
/* ===== PAGE-SPECIAL FULL WIDTH FOR TELEGRAM GRID ===== */
.page-template-page-special .container {
    max-width: 1800px !important;
    width: 100% !important;
    padding-left: 24px !important;
    padding-right: 24px !important;
}

.page-template-page-special article.page-content {
    max-width: 100% !important;
    width: 100% !important;
}

.page-template-page-special .page-content {
    max-width: 100% !important;
    width: 100% !important;
}

.page-template-page-special .telegram-posts-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.page-template-page-special .telegram-posts-grid > *:not(article.post-card) {
    display: none !important;
}
.home-category-row {
    margin-top: 42px;
    margin-bottom: 52px;
}

.home-category-row:first-of-type {
    margin-top: 28px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.section-title {
    margin: 0;
    font-size: 28px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.section-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    opacity: 0.9;
    transition: opacity .2s ease, transform .2s ease;
}

.section-link:hover {
    opacity: 1;
    transform: translateX(2px);
}

.category-posts-grid {
    margin-top: 0;
}

@media (max-width: 768px) {
    .home-category-row {
        margin-top: 32px;
        margin-bottom: 38px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 18px;
    }

    .section-title {
        font-size: 24px;
    }
}
.home-subscribe-block {
    margin: 56px 0 24px;
}
.home-subscribe-block .subscribe-form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.home-subscribe-block .subscribe-form input {
    flex: 1 1 260px;
    max-width: 420px;
}

.home-subscribe-block .subscribe-form button {
    width: auto;
    min-width: 160px;
    padding: 12px 22px;
    flex: 0 0 auto;
}
.footer-section-logo {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.footer-logo svg {
    width: 160px;
    height: auto;
    display: block;
    margin-bottom: 6px;
}

.footer-slogan {
    font-size: 0.75rem;
    color: #6b7280;
    text-align: center;
    margin: 0;
    font-style: italic;
}
.footer-top {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) minmax(0, 1.2fr);
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .footer-top {
        grid-template-columns: 1fr;
    }
    .footer-section-logo {
        text-align: center;
        align-items: center;
        margin-bottom: 16px;
    }
}
cat >> style.css <<'CSS'

/* Audit Landing template: full width without sidebar */
.audit-landing-layout{
  max-width:1240px;
  margin:0 auto;
  padding-left:16px;
  padding-right:16px;
}
.audit-landing-content{
  width:100%;
  max-width:100%;
}
.audit-landing-content .entry-content,
.audit-landing-content .page-content,
.audit-landing-content .post-content,
.audit-landing-content .wp-block-group,
.audit-landing-content .wp-block-columns{
  width:100%;
  max-width:100%;
}
CSS
/* Mobile fix for audit landing hero */
@media (max-width: 768px) {
  .audit-page .container {
    width: min(100% - 20px, 100%) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .audit-page .hero {
    padding: 34px 0 24px !important;
    overflow-x: hidden !important;
  }

  .audit-page .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .audit-page .hero-copy,
  .audit-page .hero-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .audit-page .hero-copy {
    padding-top: 18px !important;
    padding-bottom: 12px !important;
  }

  .audit-page .hero-card {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }

  .audit-page .hero h1,
  .audit-page .hero p.lead,
  .audit-page .hero-actions,
  .audit-page .meta-note {
    text-align: left !important;
  }

  .audit-page .hero-actions {
    justify-content: flex-start !important;
  }

  .audit-page {
    overflow-x: hidden !important;
  }
}

/* Mobile fix for audit landing hero */
@media (max-width: 768px) {
  .audit-page .container {
    width: min(100% - 20px, 100%) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .audit-page .hero {
    padding: 34px 0 24px !important;
    overflow-x: hidden !important;
  }

  .audit-page .hero-grid {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .audit-page .hero-copy,
  .audit-page .hero-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .audit-page .hero-copy {
    padding-top: 18px !important;
    padding-bottom: 12px !important;
  }

  .audit-page .hero-card {
    padding-top: 18px !important;
    padding-bottom: 18px !important;
  }

  .audit-page .hero h1,
  .audit-page .hero p.lead,
  .audit-page .hero-actions,
  .audit-page .meta-note {
    text-align: left !important;
  }

  .audit-page .hero-actions {
    justify-content: flex-start !important;
  }

  .audit-page .hero-points,
  .audit-page .mini-list,
  .audit-page form,
  .audit-page .price-tag {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .audit-page {
    overflow-x: hidden !important;
  }
}

/* Compact mobile hero for audit landing */
@media (max-width: 768px) {
  .audit-page .hero {
    padding-top: 24px !important;
    padding-bottom: 18px !important;
  }

  .audit-page .eyebrow {
    margin-bottom: 12px !important;
    padding: 7px 12px !important;
    font-size: 11px !important;
  }

  .audit-page .hero h1 {
    margin-bottom: 12px !important;
    font-size: clamp(28px, 8vw, 36px) !important;
    line-height: 1.08 !important;
    letter-spacing: -0.03em !important;
    max-width: 11ch !important;
  }

  .audit-page .hero p.lead {
    margin-bottom: 14px !important;
    font-size: 15px !important;
    line-height: 1.58 !important;
    max-width: 36ch !important;
  }

  .audit-page .hero-points {
    gap: 10px !important;
    margin: 14px 0 18px !important;
  }

  .audit-page .hero-points li {
    padding: 10px 12px !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    border-radius: 12px !important;
  }

  .audit-page .hero-actions {
    gap: 10px !important;
    margin-top: 4px !important;
  }

  .audit-page .btn,
  .audit-page .pay-btn {
    min-height: 48px !important;
    font-size: 15px !important;
  }

  .audit-page .hero-card {
    border-radius: 18px !important;
  }

  .audit-page .hero-card h2 {
    font-size: 22px !important;
    margin-bottom: 6px !important;
  }

  .audit-page .hero-card p {
    font-size: 14px !important;
    line-height: 1.5 !important;
    margin-bottom: 12px !important;
  }

  .audit-page .price-tag {
    margin: 4px 0 10px !important;
  }

  .audit-page .price-tag strong {
    font-size: 46px !important;
  }

  .audit-page .price-tag span {
    font-size: 16px !important;
    padding-bottom: 5px !important;
  }

  .audit-page .mini-list li {
    padding: 7px 0 !important;
    font-size: 13px !important;
  }

  .audit-page .safe-note,
  .audit-page .meta-note {
    font-size: 12px !important;
    line-height: 1.45 !important;
  }
}


/* Fix 4-column grid specifically for page "Новости из Телеграм" */
.page-template-page-special .posts-grid,
.page-template-page-special .category-posts-grid,
.page-template-page-special .telegram-posts-grid,
body.page .telegram-posts-grid {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

@media (max-width: 1100px) {
  .page-template-page-special .posts-grid,
  .page-template-page-special .category-posts-grid,
  .page-template-page-special .telegram-posts-grid,
  body.page .telegram-posts-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  .page-template-page-special .posts-grid,
  .page-template-page-special .category-posts-grid,
  .page-template-page-special .telegram-posts-grid,
  body.page .telegram-posts-grid {
    grid-template-columns: 1fr !important;
  }
}
/* ===== MENU / SUBMENU FIX ===== */

/* базово */
.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li {
    position: relative;
}

/* только первый уровень */
.main-nav > ul {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* подменю */
.main-nav ul ul {
    display: none !important;
    position: absolute !important;
    top: calc(100% + 8px) !important;
    left: 0 !important;
    min-width: 220px !important;
    padding: 0.5rem 0 !important;
    background: hsl(var(--card)) !important;
    border: 1px solid hsl(var(--border)) !important;
    border-radius: var(--radius) !important;
    box-shadow: 0 12px 32px rgba(0,0,0,0.12) !important;
    z-index: 9999 !important;
    flex-direction: column !important;
    gap: 0 !important;
}

.main-nav ul ul li {
    width: 100% !important;
    display: block !important;
}

.main-nav ul ul a {
    display: block !important;
    width: 100% !important;
    padding: 0.75rem 1rem !important;
    text-align: left !important;
    white-space: normal !important;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    text-transform: none !important;
}

.main-nav ul li:hover > ul,
.main-nav ul li:focus-within > ul {
    display: flex !important;
}

/* стрелка у пунктов с подменю */
.main-nav .menu-item-has-children > a::before {
    content: "▾";
    display: inline-block;
    margin-right: 0.4rem;
    font-size: 0.75em;
    opacity: 0.7;
}

/* мобильная версия */
@media (max-width: 768px) {
    .main-nav > ul {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }

    .main-nav > ul > li {
        width: 100% !important;
    }

    .main-nav > ul > li > a {
        display: block !important;
        width: 100% !important;
        text-align: left !important;
    }

    .main-nav ul ul {
        display: block !important;
        position: static !important;
        top: auto !important;
        left: auto !important;
        min-width: 100% !important;
        margin-top: 0.35rem !important;
        padding: 0.35rem 0 0.35rem 0.75rem !important;
        box-shadow: none !important;
        border: 0 !important;
        border-left: 2px solid hsl(var(--border)) !important;
        background: transparent !important;
    }

    .main-nav ul ul li {
        width: 100% !important;
    }

    .main-nav ul ul a {
        padding: 0.55rem 0.75rem !important;
        font-size: 0.92rem !important;
        color: hsl(var(--muted-foreground)) !important;
    }

    .main-nav ul li:hover > ul,
    .main-nav ul li:focus-within > ul {
        display: block !important;
    }
}
function ideipro_archive_sidebar_css() {
    $css = "
    .archive-layout {
        display: flex;
        gap: 3rem;
        align-items: flex-start;
    }

    .archive-main {
        flex: 1 1 auto;
        min-width: 0;
    }

    .archive-sidebar {
        flex: 0 0 320px;
        width: 320px;
        position: sticky;
        top: 100px;
        align-self: flex-start;
        background: hsl(var(--card));
        border: 1px solid hsl(var(--border));
        border-radius: var(--radius);
        padding: 1.5rem;
    }

    .archive-ad-placeholder {
        min-height: 260px;
        border: 2px dashed hsl(var(--border));
        border-radius: var(--radius);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
        background: hsl(var(--muted) / 0.35);
    }

    .archive-ad-placeholder p {
        margin: 0 0 0.75rem 0;
    }

    .archive-ad-note {
        color: hsl(var(--muted-foreground));
        font-size: 0.9rem;
    }

    @media (max-width: 1024px) {
        .archive-layout {
            flex-direction: column;
        }

        .archive-sidebar {
            position: static;
            width: 100%;
            flex: none;
        }
    }
    ";

    wp_add_inline_style( 'react-style-main', $css );
}
add_action( 'wp_enqueue_scripts', 'ideipro_archive_sidebar_css', 1200 );
.page-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 2rem;
    align-items: start;
}

.page-main {
    min-width: 0;
}

.page-sidebar-wrap {
    width: 100%;
}

.page-sidebar-wrap .post-sidebar {
    position: sticky;
    top: 2rem;
}

@media (max-width: 1024px) {
    .page-layout {
        grid-template-columns: 1fr;
    }

    .page-sidebar-wrap .post-sidebar {
        position: static;
        top: auto;
        margin-top: 2rem;
    }
}
/* SLIDER FIX CLEAN */
.slider-section {
    margin: 2rem 0 3rem 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
}

.slider-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    overflow: hidden !important;
    border-radius: var(--radius) !important;
    position: relative !important;
}

.slider {
    position: relative !important;
    width: 100% !important;
    height: 70vh !important;
    min-height: 420px !important;
    max-height: 800px !important;
    overflow: hidden !important;
}

.slider-track {
    display: flex !important;
    height: 100% !important;
    transition: transform 0.5s ease !important;
}

.slide {
    flex: 0 0 100% !important;
    position: relative !important;
    height: 100% !important;
    overflow: hidden !important;
    background: #111 !important;
}

.slide-background {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    z-index: 1 !important;
}

.slide-overlay {
    position: absolute !important;
    inset: 0 !important;
    background: linear-gradient(to right, rgba(0,0,0,.72), rgba(0,0,0,.28)) !important;
    z-index: 2 !important;
}

.slide-content {
    position: relative !important;
    z-index: 3 !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    padding: 3rem !important;
    color: white !important;
    max-width: 900px !important;
}

.slide-title {
    font-size: 3rem !important;
    line-height: 1.2 !important;
    margin-bottom: 1rem !important;
}

.slide-excerpt,
.slide-date,
.speak-button {
    display: none !important;
}

@media (max-width: 768px) {
    .slider {
        height: 50vh !important;
        min-height: 300px !important;
    }

    .slide-content {
        padding: 1.5rem !important;
    }

    .slide-title {
        font-size: 1.6rem !important;
    }
}
/* ===== PAGE-SPECIAL LAYOUT WITH SIDEBAR ===== */

.page-layout {
    display: flex !important;
    align-items: flex-start !important;
    gap: 2rem !important;
}

.page-layout .page-main {
    flex: 1 1 auto !important;
    min-width: 0 !important;
}

.page-layout .page-sidebar-wrap {
    flex: 0 0 320px !important;
    width: 320px !important;
    min-width: 280px !important;
    max-width: 320px !important;
}

.page-layout .post-sidebar {
    position: sticky !important;
    top: 100px !important;
    background: hsl(var(--card)) !important;
    border: 1px solid hsl(var(--border)) !important;
    border-radius: var(--radius) !important;
    padding: 1.5rem !important;
    max-height: calc(100vh - 120px) !important;
    overflow-y: auto !important;
}

.page-layout .sidebar-block {
    margin-bottom: 1.5rem !important;
    padding-bottom: 1.25rem !important;
    border-bottom: 1px solid hsl(var(--border)) !important;
}

.page-layout .sidebar-block:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

.page-layout .sidebar-title {
    margin: 0 0 1rem 0 !important;
    font-size: 1.1rem !important;
    color: hsl(var(--foreground)) !important;
}

@media (max-width: 1024px) {
    .page-layout {
        flex-direction: column !important;
    }

    .page-layout .page-sidebar-wrap {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .page-layout .post-sidebar {
        position: static !important;
        max-height: none !important;
        overflow: visible !important;
    }
}
/* ===== PAGE SPECIAL: SIDEBAR ONLY FOR NEWS CARDS ===== */

.page-layout {
    display: block !important;
}

.page-main {
    width: 100% !important;
    max-width: 100% !important;
}

.page-main > .page-content {
    width: 100% !important;
}

.page-sidebar-wrap {
    margin: 2rem 0 2.5rem 0 !important;
    width: 100% !important;
}

.page-sidebar-wrap .post-sidebar {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 1.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    position: static !important;
    max-height: none !important;
    overflow: visible !important;
}

.page-sidebar-wrap .sidebar-block {
    background: hsl(var(--card)) !important;
    border: 1px solid hsl(var(--border)) !important;
    border-radius: var(--radius) !important;
    padding: 1.25rem !important;
    margin: 0 !important;
}

.page-sidebar-wrap .sidebar-title {
    margin: 0 0 1rem 0 !important;
    font-size: 1.05rem !important;
}

.page-sidebar-wrap .sidebar-categories,
.page-sidebar-wrap .sidebar-comments {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.page-sidebar-wrap .sidebar-categories li,
.page-sidebar-wrap .sidebar-comments li {
    margin-bottom: 0.75rem !important;
    padding-bottom: 0.75rem !important;
    border-bottom: 1px solid hsl(var(--border)) !important;
}

.page-sidebar-wrap .sidebar-categories li:last-child,
.page-sidebar-wrap .sidebar-comments li:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

@media (max-width: 768px) {
    .page-sidebar-wrap .post-sidebar {
        grid-template-columns: 1fr !important;
    }
}
/* ===== FIX POST THUMBNAIL VISIBILITY ===== */
.post-card .post-thumbnail {
    display: block !important;
    width: 100% !important;
    overflow: hidden !important;
    aspect-ratio: 16 / 9 !important;
    background: hsl(var(--muted)) !important;
}

.post-card .post-thumbnail a {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
}

.post-card .post-thumbnail img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    min-height: 180px !important;
}

/* Fallback placeholder for post cards without thumbnail block */
.post-card:not(:has(.post-thumbnail))::before {
  content: "";
  display: block;
  width: calc(100% + 3rem);
  height: 200px;
  margin: -1.5rem -1.5rem 1.5rem -1.5rem;
  background-image: url("https://storage.yandexcloud.net/ideipro-media/2026/04/Snimok-ekrana-2026-04-29-v-00.07.21.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--radius) var(--radius) 0 0;
}

/* Better contrast for slider blue buttons and category tags */
.hero-slider .slide-category,
.hero-slider .slide-category a,
.hero-slider .category-tag,
.hero-slider .category-tag a,
.hero-slider .slide-button,
.hero-slider .slide-button a,
.hero-slider .read-more,
.hero-slider .read-more a,
.hero-slider .btn,
.hero-slider .btn-primary {
  color: #ffffff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.35) !important;
}

.hero-slider .slide-category,
.hero-slider .category-tag {
  background: #0b5ed7 !important;
  border: 1px solid rgba(255,255,255,.18) !important;
}

.hero-slider .slide-button,
.hero-slider .read-more,
.hero-slider .btn,
.hero-slider .btn-primary {
  background: #0b5ed7 !important;
  border-color: #0b5ed7 !important;
}

.hero-slider .slide-button:hover,
.hero-slider .read-more:hover,
.hero-slider .btn:hover,
.hero-slider .btn-primary:hover {
  background: #084298 !important;
  border-color: #084298 !important;
}

/* Force readable text in slider controls, buttons and category tags */
.hero-slider a,
.hero-slider button,
.hero-slider [class*="btn"],
.hero-slider [class*="button"],
.hero-slider [class*="tag"],
.hero-slider [class*="badge"],
.hero-slider [class*="category"],
.hero-slider .swiper-slide a,
.hero-slider .swiper-slide button,
.hero-slider .swiper-slide [class*="btn"],
.hero-slider .swiper-slide [class*="button"],
.hero-slider .swiper-slide [class*="tag"],
.hero-slider .swiper-slide [class*="badge"],
.hero-slider .swiper-slide [class*="category"] {
  color: #fff !important;
  text-shadow:
    0 1px 2px rgba(0,0,0,.6),
    0 0 1px rgba(0,0,0,.7) !important;
}

.hero-slider [class*="btn"],
.hero-slider [class*="button"],
.hero-slider [class*="tag"],
.hero-slider [class*="badge"],
.hero-slider [class*="category"],
.hero-slider .swiper-slide [class*="btn"],
.hero-slider .swiper-slide [class*="button"],
.hero-slider .swiper-slide [class*="tag"],
.hero-slider .swiper-slide [class*="badge"],
.hero-slider .swiper-slide [class*="category"] {
  background: #0a58ca !important;
  border-color: #0a58ca !important;
}

.hero-slider [class*="btn"]:hover,
.hero-slider [class*="button"]:hover,
.hero-slider [class*="tag"]:hover,
.hero-slider [class*="badge"]:hover,
.hero-slider [class*="category"]:hover,
.hero-slider .swiper-slide [class*="btn"]:hover,
.hero-slider .swiper-slide [class*="button"]:hover,
.hero-slider .swiper-slide [class*="tag"]:hover,
.hero-slider .swiper-slide [class*="badge"]:hover,
.hero-slider .swiper-slide [class*="category"]:hover {
  background: #084298 !important;
  border-color: #084298 !important;
}

/* Strong contrast fix for /moe-mnenie/ hero slider links */
body.page-id-97 a[href*="/category/obovsem"],
body.page-id-97 a[href*="/obovsem/"],
body.page-id-97 a[href*="/po-mere-priblizhenija-k-smerti-nashi-sny-s/"],
body.page-id-97 .swiper a,
body.page-id-97 .swiper button,
body.page-id-97 .swiper [class*="btn"],
body.page-id-97 .swiper [class*="button"],
body.page-id-97 .swiper [class*="tag"],
body.page-id-97 .swiper [class*="badge"],
body.page-id-97 .swiper [class*="category"],
body.page-id-97 .hero a,
body.page-id-97 .hero button,
body.page-id-97 .hero [class*="btn"],
body.page-id-97 .hero [class*="button"],
body.page-id-97 .hero [class*="tag"],
body.page-id-97 .hero [class*="badge"],
body.page-id-97 .hero [class*="category"] {
  color: #fff !important;
  background-color: #0a58ca !important;
  border: 1px solid #0a58ca !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.55) !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.18) !important;
}

body.page-id-97 a[href*="/category/obovsem"]:hover,
body.page-id-97 a[href*="/obovsem/"]:hover,
body.page-id-97 a[href*="/po-mere-priblizhenija-k-smerti-nashi-sny-s/"]:hover,
body.page-id-97 .swiper a:hover,
body.page-id-97 .swiper button:hover,
body.page-id-97 .swiper [class*="btn"]:hover,
body.page-id-97 .swiper [class*="button"]:hover,
body.page-id-97 .swiper [class*="tag"]:hover,
body.page-id-97 .swiper [class*="badge"]:hover,
body.page-id-97 .swiper [class*="category"]:hover,
body.page-id-97 .hero a:hover,
body.page-id-97 .hero button:hover,
body.page-id-97 .hero [class*="btn"]:hover,
body.page-id-97 .hero [class*="button"]:hover,
body.page-id-97 .hero [class*="tag"]:hover,
body.page-id-97 .hero [class*="badge"]:hover,
body.page-id-97 .hero [class*="category"]:hover {
  background-color: #084298 !important;
  border-color: #084298 !important;
  color: #fff !important;
}

/* Reset title links in /moe-mnenie/ so only buttons/tags stay blue */
body.page-id-97 h1 a,
body.page-id-97 h2 a,
body.page-id-97 h3 a,
body.page-id-97 .entry-title a,
body.page-id-97 .post-title a,
body.page-id-97 .slide-title a,
body.page-id-97 .swiper h1 a,
body.page-id-97 .swiper h2 a,
body.page-id-97 .swiper h3 a,
body.page-id-97 .hero h1 a,
body.page-id-97 .hero h2 a,
body.page-id-97 .hero h3 a {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  text-shadow: none !important;
  color: inherit !important;
  text-decoration: none !important;
}

/* Fix title links: never style big slider/article headings like blue buttons */
body.page-id-97 .entry-title a,
body.page-id-97 .post-title a,
body.page-id-97 .slide-title a,
body.page-id-97 h1 a,
body.page-id-97 h2 a,
body.page-id-97 h3 a,
body.page-id-97 a[href*="/po-mere-priblizhenija-k-smerti-nashi-sny-s/"] {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
  color: inherit !important;
  text-decoration: underline !important;
}

/* Keep readable style only for small CTA/tag links */
body.page-id-97 a[href*="/category/obovsem"],
body.page-id-97 a[href*="/obovsem/"],
body.page-id-97 a[href*="/po-mere-priblizhenija-k-smerti-nashi-sny-s/"] + a,
body.page-id-97 .post-meta a,
body.page-id-97 .category-link,
body.page-id-97 .archive-link,
body.page-id-97 .read-more,
body.page-id-97 .read-more a,
body.page-id-97 .btn-read-more,
body.page-id-97 .btn-read-more a {
  display: inline-block !important;
  color: #fff !important;
  background: #0a58ca !important;
  border: 1px solid #0a58ca !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.45) !important;
  text-decoration: none !important;
}

/* Global readable slider/card controls without touching title links */
a.btn,
a.button,
a.read-more,
a.category-tag,
a.archive-link,
a.post-tag,
a.badge,
button.btn,
button.button,
[class*="slider"] a[class*="btn"],
[class*="slider"] a[class*="button"],
[class*="slider"] a[class*="tag"],
[class*="slider"] a[class*="badge"],
[class*="slider"] a[class*="category"],
[class*="hero"] a[class*="btn"],
[class*="hero"] a[class*="button"],
[class*="hero"] a[class*="tag"],
[class*="hero"] a[class*="badge"],
[class*="hero"] a[class*="category"],
[class*="swiper"] a[class*="btn"],
[class*="swiper"] a[class*="button"],
[class*="swiper"] a[class*="tag"],
[class*="swiper"] a[class*="badge"],
[class*="swiper"] a[class*="category"] {
  color: #fff !important;
  background-color: #0a58ca !important;
  border: 1px solid #0a58ca !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.45) !important;
  text-decoration: none !important;
  box-shadow: 0 2px 8px rgba(0,0,0,.18) !important;
}

a.btn:hover,
a.button:hover,
a.read-more:hover,
a.category-tag:hover,
a.archive-link:hover,
a.post-tag:hover,
a.badge:hover,
button.btn:hover,
button.button:hover,
[class*="slider"] a[class*="btn"]:hover,
[class*="slider"] a[class*="button"]:hover,
[class*="slider"] a[class*="tag"]:hover,
[class*="slider"] a[class*="badge"]:hover,
[class*="slider"] a[class*="category"]:hover,
[class*="hero"] a[class*="btn"]:hover,
[class*="hero"] a[class*="button"]:hover,
[class*="hero"] a[class*="tag"]:hover,
[class*="hero"] a[class*="badge"]:hover,
[class*="hero"] a[class*="category"]:hover,
[class*="swiper"] a[class*="btn"]:hover,
[class*="swiper"] a[class*="button"]:hover,
[class*="swiper"] a[class*="tag"]:hover,
[class*="swiper"] a[class*="badge"]:hover,
[class*="swiper"] a[class*="category"]:hover {
  color: #fff !important;
  background-color: #084298 !important;
  border-color: #084298 !important;
}

/* Never turn headings into blue buttons */
h1 a,
h2 a,
h3 a,
.entry-title a,
.post-title a,
.slide-title a {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  text-shadow: none !important;
}
