/**
 * Theme Name: DIMA WORLD
 * Theme URI: https://dimasamusicworld.com/dima-world
 * Author: Bhabandao Hojai
 * Author URI: https://dimasamusicworld.com/bhabandao-hojai
 * Description: A modern music WordPress theme with dark mode, AJAX search, sidebars, and responsive grid layout.
 * Version: 1.2.0
 * License: GNU General Public License v2 or later
 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: dima-world
 * Tags: music, responsive, dark-mode, ajax-search, sidebar, grid-layout
 */

/* ==========================================================================
   TABLE OF CONTENTS
   ========================================================================== */

/*
 * 1. GLOBAL STYLES.......................Base styles and CSS variables
 * 2. LAYOUT STRUCTURE....................Main layout containers
 * 3. SIDEBAR STYLES......................Sidebar components
 * 4. POST GRID STYLES....................Post grid system
 * 5. SHARED COMPONENTS...................Reusable UI components
 * 6. HEADER STYLES.......................Header and navigation
 * 7. CATEGORY NAVIGATION.................Category tabs
 * 8. FOOTER STYLES.......................Footer components
 * 9. PAGINATION STYLES..................Pagination controls
 * 10. PAGE TEMPLATE STYLES...............Page template layouts
 * 11. SINGLE POST TEMPLATE STYLES........Single post layouts
 * 12. RESPONSIVE STYLES..................Responsive breakpoints
 */


/* ==========================================================================
   1. GLOBAL STYLES
   ========================================================================== */

:root {
  /* Base colors */
  --bg-color: #ffffff;
  --text-color: #222222;
  --text-muted-color: #666666;
  --border-color: #dddddd;
  
  /* Accent colors */
  --accent-color: #0073aa;
  --accent-color-rgb: 0, 115, 170;
  --accent-light: #4adef5;
  
  /* Card styles */
  --card-bg: #ffffff;
  --card-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  
  /* Layout measurements */
  --header-height: 100px;
  --sidebar-width: 250px;
  --search-height: 40px;
  
  /* UI elements */
  --transition-base: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --border-radius-base: 12px;
  
  /* Additional colors */
  --primary: #181818;
  --primary-light: #282828;
  --medium-gray: #666666;
  --dark-gray: #444444;
  --error-red: #FF4D4D;
  --success-green: #1db954;
  --heart-color: #24d5f0;
  --white: #ffffff;
  
  /* Header/Footer */
  --header-bg: #f8f8f8;
  --footer-bg: #f8f8f8;
  --footer-text-color: #666666;
}

[data-theme="dark"] {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --text-muted-color: #999999;
  --accent-color: #1e90ff;
  --accent-color-rgb: 30, 144, 255;
  --card-bg: #1e1e1e;
  --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  --header-bg: #1a1a1a;
  --footer-bg: #1a1a1a;
  --footer-text-color: #999999;
  --border-color: #333333;
  --primary: #121212;
  --primary-light: #282828;
  --medium-gray: #888888;
}

@keyframes slideInLeft {
  from { transform: translateX(-100%); }
  to { transform: translateX(0); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Roboto', Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
  transition: var(--transition-base);
  overflow-x: hidden;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover,
a:focus {
  color: color-mix(in srgb, var(--accent-color), black 15%);
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   2. LAYOUT STRUCTURE
   ========================================================================== */

body.sidebar-active {
  overflow: hidden;
}

body.sidebar-active::after {
  content: '';
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.sidebar-left.active ~ .sidebar-toggle-left,
.sidebar-right.active ~ .sidebar-toggle-right {
  z-index: 1002;
}

.layout-wrapper {
  display: flex;
  flex-direction: column;
  width: 100vw;
  max-width: 100%;
  margin-top: calc(var(--header-height) + 60px);
  padding: 0;
  overflow-x: hidden;
}

.main-content-container {
  width: 100%;
  padding: 0 1rem;
  transition: var(--transition-base);
}

/* ==========================================================================
   3. SIDEBAR STYLES
   ========================================================================== */

.sidebar-toggle {
  display: flex;
  position: fixed;
  top: calc(var(--header-height) + 20px);
  z-index: 3001;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: var(--transition-base);
  align-items: center;
  justify-content: center;
}

.sidebar-toggle:hover {
  background: color-mix(in srgb, var(--accent-color), black 15%);
  transform: scale(1.1);
}

.sidebar-toggle .hamburger-icon {
  display: block;
}

.sidebar-toggle .close-icon {
  display: none;
}

.sidebar-left.active ~ .sidebar-toggle-left .hamburger-icon,
.sidebar-right.active ~ .sidebar-toggle-right .hamburger-icon {
  display: none;
}

.sidebar-left.active ~ .sidebar-toggle-left .close-icon,
.sidebar-right.active ~ .sidebar-toggle-right .close-icon {
  display: block;
}

.sidebar-toggle svg {
  width: 20px;
  height: 20px;
}

.sidebar-toggle-left {
  left: 20px;
}

.sidebar-toggle-right {
  right: 20px;
}

.sidebar-left,
.sidebar-right {
  width: 100vw;
  height: calc(100vh - var(--header-height));
  padding: 1.5rem;
  background: var(--card-bg);
  position: fixed;
  top: var(--header-height);
  transition: transform 0.3s ease;
  z-index: 1000;
  border-right: 1px solid var(--border-color);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.sidebar-left::-webkit-scrollbar,
.sidebar-right::-webkit-scrollbar {
  display: none;
}

.sidebar-left {
  left: 0;
  transform: translateX(-100%);
}

.sidebar-right {
  right: 0;
  transform: translateX(100%);
  border-right: none;
  border-left: 1px solid var(--border-color);
}

.sidebar-left.active,
.sidebar-right.active {
  transform: translateX(0);
}

.sidebar-left.active ~ .sidebar-toggle-left {
  left: calc(100vw - 60px);
}

.sidebar-right.active ~ .sidebar-toggle-right {
  right: calc(100vw - 60px);
}

.mobile-social-icons {
  display: flex;
  margin-top: auto;
  padding: 1rem 0;
  border-top: 1px solid var(--border-color);
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.mobile-social-icons a {
  width: 40px;
  height: 40px;
  background: rgba(var(--accent-color-rgb), 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
}

.mobile-social-icons a:hover {
  background: rgba(var(--accent-color-rgb), 0.2);
  transform: translateY(-2px);
}

.mobile-social-icons img {
  width: 20px;
  height: 20px;
}

/* ==========================================================================
   4. POST GRID STYLES
   ========================================================================== */

.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-top: 1.5rem;
  width: 100%;
}

.home .post-grid {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}

.post-card {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-base);
  background-color: var(--card-bg);
  overflow: hidden;
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: var(--accent-color);
}

.post-thumbnail {
  position: relative;
  overflow: hidden;
  height: 0;
  padding-bottom: 56.25%;
  border-bottom: 1px solid var(--border-color);
}

.post-thumbnail img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card:hover .post-thumbnail img {
  transform: scale(1.05);
}

.post-content {
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.post-title {
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-title a {
  color: var(--text-color);
  transition: color 0.3s ease;
}

.post-title a:hover {
  color: var(--accent-color);
}

.post-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.65rem;
  color: var(--text-muted-color);
}

.post-date {
  display: none;
}

.post-categories {
  color: var(--accent-color);
  font-weight: 600;
  font-size: 0.6rem;
}

/* ==========================================================================
   5. SHARED COMPONENTS
   ========================================================================== */

.dark-mode-toggle-container {
  margin: 1.5rem 0;
  display: flex;
  justify-content: center;
}

.dark-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(var(--accent-color-rgb), 0.1);
  border: none;
  cursor: pointer;
  transition: var(--transition-base);
  padding: 0;
  position: relative;
}

.dark-mode-toggle:hover {
  background: rgba(var(--accent-color-rgb), 0.2);
  transform: translateY(-2px);
}

.dark-mode-toggle svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: var(--transition-base);
  opacity: 1;
}

.dark-mode-toggle .moon-icon {
  opacity: 0;
}

[data-theme="dark"] .dark-mode-toggle .sun-icon {
  opacity: 0;
}

[data-theme="dark"] .dark-mode-toggle .moon-icon {
  opacity: 1;
}

.auth-section {
  margin: 1rem 0;
  padding: 1rem;
  border-radius: var(--border-radius-base);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
}

.guest-auth-buttons {
  display: flex;
  gap: 0.5rem;
  width: 100%;
}

.auth-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.5rem;
  border-radius: var(--border-radius-base);
  font-weight: 600;
  font-size: 0.8rem;
  transition: var(--transition-base);
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

.auth-button svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.login-button {
  background: rgba(var(--accent-color-rgb), 0.1);
  color: var(--accent-color);
  border: 1px solid rgba(var(--accent-color-rgb), 0.3);
}

.login-button:hover {
  background: rgba(var(--accent-color-rgb), 0.2);
  transform: translateY(-2px);
}

.signup-button {
  background: var(--accent-color);
  color: white;
  border: 1px solid var(--accent-color);
}

.signup-button:hover {
  background: color-mix(in srgb, var(--accent-color), black 15%);
  transform: translateY(-2px);
}

.user-profile-mini {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: var(--border-radius-base);
  background: rgba(var(--accent-color-rgb), 0.05);
  border: 1px solid var(--border-color);
}

.user-avatar-mini img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.user-info-mini {
  flex: 1;
  min-width: 0;
}

.user-name-mini {
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
  color: var(--text-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-button-mini {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  color: var(--text-muted-color);
  transition: var(--transition-base);
}

.logout-button-mini:hover {
  color: var(--accent-color);
}

.logout-button-mini svg {
  width: 14px;
  height: 14px;
}

.vertical-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.vertical-menu ul li {
  margin-bottom: 0.5rem;
  position: relative;
}

.vertical-menu ul li a {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: var(--text-color);
  font-weight: 500;
  border-radius: 8px;
  transition: var(--transition-base);
}

.vertical-menu ul li a:hover {
  background: rgba(var(--accent-color-rgb), 0.1);
  color: var(--accent-color);
  transform: translateX(4px);
}

.vertical-menu ul li.current-menu-item a {
  background: rgba(var(--accent-color-rgb), 0.1);
  color: var(--accent-color);
  font-weight: 600;
}

.vertical-menu ul li .sub-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding-left: 1rem;
}

.vertical-menu ul li:hover .sub-menu,
.vertical-menu ul li:focus-within .sub-menu {
  max-height: 500px;
}

.vertical-menu ul li .sub-menu li a {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

.user-profile-card {
  background: var(--card-bg);
  border-radius: var(--border-radius-base);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
  border: 1px solid var(--border-color);
  transition: var(--transition-base);
  overflow: visible;
  min-height: fit-content;
}

.user-avatar {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  overflow: visible;
}

.user-avatar img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent-color);
  margin: 0 auto;
  max-width: none;
}

.user-info {
  margin-bottom: 1.5rem;
}

.user-name {
  font-size: 1.2rem;
  margin-bottom: 0.25rem;
  color: var(--text-color);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 0.8rem;
  color: var(--text-muted-color);
  text-transform: capitalize;
}

.user-actions {
  margin-top: 1rem;
}

.user-panel-menu {
  margin-bottom: 1.5rem;
}

.user-panel-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.user-panel-list li {
  margin-bottom: 0.5rem;
}

.user-panel-list a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: var(--border-radius-base);
  color: var(--text-color);
  transition: var(--transition-base);
  font-size: 0.9rem;
}

.user-panel-list a:hover {
  background: rgba(var(--accent-color-rgb), 0.1);
  color: var(--accent-color);
  transform: translateX(4px);
}

.user-panel-list .icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.quick-action-button {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(var(--accent-color-rgb), 0.1);
  color: var(--accent-color);
  border-radius: var(--border-radius-base);
  font-size: 0.9rem;
  transition: var(--transition-base);
  border: 1px dashed var(--border-color);
}

.quick-action-button:hover {
  background: rgba(var(--accent-color-rgb), 0.2);
  transform: translateY(-2px);
  border-style: solid;
}

.action-icon {
  width: 16px;
  height: 16px;
}

/* ==========================================================================
   6. HEADER STYLES
   ========================================================================== */

.header {
  background: var(--header-bg);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 3.5rem 2rem;
  transition: var(--transition-base);
  height: var(--header-height);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100vw;
}

[data-theme="dark"] .header {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-top-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

.logo-title-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  grid-column: 2;
  padding: 0.5rem 0;
}

.logo-title-container .custom-logo {
  height: 50px;
  width: auto;
  max-width: 180px;
  transition: transform 0.3s ease;
  object-fit: contain;
}

.logo-title-container .custom-logo:hover {
  transform: scale(1.05);
}

.logo-title-container h1 {
  margin: 0;
  font-size: 1.6rem;
  color: var(--accent-color);
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  text-align: center;
}

.social-icons {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-self: start;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(var(--accent-color-rgb), 0.1);
  transition: var(--transition-base);
  opacity: 0.8;
}

.social-icons a:hover {
  transform: translateY(-2px);
  opacity: 1;
  background: rgba(var(--accent-color-rgb), 0.2);
}

.social-icons img {
  width: 20px;
  height: 20px;
  object-fit: contain;
  filter: var(--social-icon-filter, none);
}

.search-container {
  display: flex;
  z-index: 1101;
  justify-content: flex-end;
  max-width: 300px;
  justify-self: end;
  --search-icon-color: var(--text-muted-color);
  --search-icon-hover: var(--accent-color);
  --search-border-radius: 28px;
  --search-transition: var(--transition-base);
}

.search-form {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.search-input {
  width: 100%;
  padding: 12px 20px 12px 48px;
  font-size: 0.95rem;
  border: 2px solid var(--border-color);
  border-radius: var(--search-border-radius);
  background-color: var(--card-bg);
  color: var(--text-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: var(--search-transition);
  appearance: none;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  padding-left: 52px;
}

.search-input::placeholder {
  color: var(--text-muted-color);
  opacity: 0.8;
}

.search-icon {
  position: absolute;
  left: 18px;
  color: var(--search-icon-color);
  transition: var(--search-transition);
  pointer-events: none;
  display: flex;
}

.search-input:focus + .search-icon {
  color: var(--search-icon-hover);
  transform: scale(1.1);
}

.search-button {
  position: absolute;
  right: 8px;
  background: var(--accent-color);
  color: white;
  border: none;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--search-transition);
  opacity: 0;
  transform: scale(0.8);
}

.search-input:focus ~ .search-button {
  opacity: 1;
  transform: scale(1);
}

.search-button:hover {
  background: color-mix(in srgb, var(--accent-color), black 15%);
  transform: scale(1.05) !important;
}

.search-button svg {
  width: 16px;
  height: 16px;
}

.search-results-container {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: var(--card-bg);
  border-radius: var(--border-radius-base);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  max-height: 400px;
  overflow-y: auto;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--search-transition);
  border: 1px solid var(--border-color);
}

.search-input:focus ~ .search-results-container {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.search-results-list {
  list-style: none;
  padding: 8px 0;
  margin: 0;
}

.search-result-item {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  transition: background-color 0.2s ease;
  cursor: pointer;
  gap: 12px;
}

.search-result-item:hover {
  background-color: rgba(var(--accent-color-rgb), 0.08);
}

.search-result-thumbnail {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}

.search-result-content {
  flex-grow: 1;
  min-width: 0;
}

.search-result-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-color);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-excerpt {
  font-size: 0.8rem;
  color: var(--text-muted-color);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-type {
  display: inline-block;
  padding: 2px 8px;
  background-color: rgba(var(--accent-color-rgb), 0.1);
  color: var(--accent-color);
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 600;
  margin-left: 8px;
  flex-shrink: 0;
}

.no-results {
  padding: 16px 20px;
  text-align: center;
  color: var(--text-muted-color);
}

.search-loading {
  display: none;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 2px solid rgba(var(--accent-color-rgb), 0.2);
  border-top-color: var(--accent-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* ==========================================================================
   7. CATEGORY NAVIGATION
   ========================================================================== */

.category-tabs {
  background: var(--header-bg);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: 1099;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  width: 100vw;
}

.nav-tabs {
  display: flex;
  justify-content: center;
  list-style: none;
  margin: 0 auto;
  padding: 0 1rem;
  gap: 0.75rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
  max-width: 1200px;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.nav-tabs li {
  margin: 0;
  padding: 0;
  position: relative;
}

.nav-tabs li a {
  display: block;
  padding: 0.75rem 1.5rem;
  color: var(--text-color);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--border-radius-base);
  transition: var(--transition-base);
  text-decoration: none;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
}

.nav-tabs li a:hover {
  color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.nav-tabs li.current-menu-item a {
  background: var(--accent-color);
  color: white;
  box-shadow: 0 4px 12px rgba(var(--accent-color-rgb), 0.2);
  border-color: var(--accent-color);
}

.nav-tabs li .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--card-bg);
  border-radius: var(--border-radius-base);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition-base);
  z-index: 999;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
}

.nav-tabs li:hover .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-tabs li .sub-menu li {
  display: block;
  margin: 0;
}

.nav-tabs li .sub-menu li a {
  padding: 0.75rem 1rem;
  border-radius: 0;
  border: none;
  box-shadow: none;
  font-size: 0.9rem;
  font-weight: 500;
  background: transparent;
  text-align: left;
}

.nav-tabs li .sub-menu li a:hover {
  background: rgba(var(--accent-color-rgb), 0.1);
  transform: none;
  color: var(--accent-color);
}

/* ==========================================================================
   8. FOOTER STYLES
   ========================================================================== */

.music-footer {
  background: var(--footer-bg);
  padding: 4rem 0 0;
  color: var(--text-color);
  font-family: 'Inter', 'Roboto', Arial, sans-serif;
  font-weight: 400;
  line-height: 1.6;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  border-top: 1px solid var(--border-color);
}

.footer-container {
  width: 100%;
  margin: 0 auto;
  padding: 0;
  max-width: 1440px;
}

.footer-content-wrapper {
  width: 100%;
  margin: 0 auto;
}

.footer-brand {
  max-width: 350px;
  text-align: center;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-logo-container {
  margin-bottom: 1rem;
}

.footer-logo-img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 8px;
  transition: var(--transition-base);
  margin: 0 auto;
}

.footer-logo-img:hover {
  transform: scale(1.1);
}

.footer-logo-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent-color);
  transition: var(--transition-base);
  margin-bottom: 1rem;
  text-align: center;
}

.footer-logo-text:hover {
  color: var(--accent-light);
}

.footer-description {
  color: var(--text-muted-color);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  text-align: center;
}

.footer-social {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
}

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.8rem;
  height: 2.8rem;
  background: rgba(var(--accent-color-rgb), 0.1);
  color: var(--accent-color);
  border-radius: 50%;
  transition: var(--transition-base);
}

.footer-social a:hover {
  background: var(--accent-color);
  color: white;
  transform: translateY(-3px);
}

.footer-main {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  gap: 4rem;
  padding: 0 3rem 4rem;
  align-items: start;
  justify-content: center;
  max-width: 100%;
  margin: 0 auto;
}

.footer-nav-row {
  display: flex;
  justify-content: center;
  gap: 3rem;
  width: 100%;
  padding: 0 1rem;
}

.footer-nav-column {
  flex: 1;
  min-width: 0;
  max-width: 200px;
}

.footer-nav-column h3 {
  font-size: 1rem;
  margin-bottom: 1.5rem;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
  text-align: center;
}

.footer-nav-column ul {
  list-style: none;
  padding: 0;
  text-align: center;
}

.footer-nav-column ul li {
  margin-bottom: 1rem;
}

.footer-nav-column ul li a {
  color: var(--text-muted-color);
  text-decoration: none;
  font-size: 0.95rem;
  transition: var(--transition-base);
}

.footer-nav-column ul li a:hover {
  color: var(--accent-color);
  padding-left: 5px;
}

.footer-newsletter {
  max-width: 300px;
  margin: 0 auto;
  text-align: center;
  padding: 0 0.5rem;
}

.newsletter-title {
  font-size: 1.15rem;
  margin-bottom: 1.2rem;
  color: var(--text-color);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}

.newsletter-title i {
  color: var(--accent-color);
  margin-right: 0.6rem;
}

.footer-newsletter p {
  color: var(--text-muted-color);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 1.75rem;
  text-align: center;
}

.newsletter-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.newsletter-form input {
  padding: 0.9rem 1.3rem;
  border: none;
  border-radius: 30px;
  background: rgba(var(--accent-color-rgb), 0.05);
  color: var(--text-color);
  font-size: 0.95rem;
  transition: var(--transition-base);
  width: 100%;
  border: 1px solid var(--border-color);
}

.newsletter-form input::placeholder {
  color: var(--text-muted-color);
}

.newsletter-form input:focus {
  outline: none;
  background: rgba(var(--accent-color-rgb), 0.1);
  box-shadow: 0 0 0 2px var(--accent-color);
}

.newsletter-form button {
  position: relative;
  padding: 0.9rem 1.3rem;
  background: var(--accent-color);
  color: var(--white);
  border: none;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  overflow: hidden;
  width: 100%;
}

.newsletter-form button:hover {
  background: color-mix(in srgb, var(--accent-color), black 15%);
  transform: translateY(-2px);
}

.newsletter-form button .loading-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 1s ease-in-out infinite;
}

.newsletter-form button.is-loading .button-text,
.newsletter-form button.is-loading .fa-arrow-right {
  visibility: hidden;
}

.newsletter-form button.is-loading .loading-spinner {
  display: block;
  position: absolute;
}

.newsletter-message {
  margin-top: 1rem;
  font-size: 0.9rem;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  display: none;
  text-align: center;
}

.newsletter-message.error {
  background: rgba(255, 77, 77, 0.15);
  color: var(--error-red);
  display: block;
}

.newsletter-message.success {
  background: rgba(29, 185, 84, 0.15);
  color: var(--success-green);
  display: block;
}

.footer-bottom {
  padding: 2.5rem 3rem;
  color: var(--text-muted-color);
  border-top: 1px solid var(--border-color);
  width: 100%;
}

.footer-bottom-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  width: 100%;
  max-width: 100%;
}

.footer-bottom-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  width: 100%;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  align-items: center;
}

.footer-legal-links a {
  color: var(--text-muted-color);
  text-decoration: none;
  transition: var(--transition-base);
  white-space: nowrap;
}

.footer-legal-links a:hover {
  color: var(--accent-color);
}

.developer-tagline {
  font-size: 0.9rem;
  color: var(--text-muted-color);
  text-align: center;
  flex: 1;
  padding: 0 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.footer-apps {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  justify-content: center;
}

.footer-apps span {
  color: var(--text-muted-color);
  font-size: 0.9rem;
}

.footer-apps a {
  color: var(--text-color);
  font-size: 1.6rem;
  transition: var(--transition-base);
}

.footer-apps a:hover {
  color: var(--accent-color);
  transform: translateY(-3px);
}

.developer-credit {
  font-size: 0.9rem;
  color: var(--text-muted-color);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.24rem;
  margin: 0.5rem 0;
}

.developer-credit a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition-base);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.developer-credit a:hover {
  color: var(--accent-color);
}

.developer-credit .heart {
  color: var(--heart-color);
  font-size: 0.95rem;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); }
}

.footer-copyright {
  font-size: 0.9rem;
  color: var(--text-muted-color);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.25rem;
}

.copyright-line, .rights-line {
  display: block;
  line-height: 1.3;
}

/* ==========================================================================
   9. PAGINATION STYLES
   ========================================================================== */

.pagination-wrapper {
  margin: 3rem 0;
  display: flex;
  justify-content: center;
  width: 100%;
  padding-bottom: 3rem;
}

.pagination {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: center;
}

.pagination li {
  display: inline-block;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.75rem;
  border-radius: var(--border-radius-base);
  font-weight: 600;
  transition: var(--transition-base);
  text-decoration: none;
}

.pagination a {
  color: var(--text-color);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  box-shadow: var(--card-shadow);
}

.pagination a:hover {
  background: var(--accent-color);
  color: white;
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(var(--accent-color-rgb), 0.2);
}

.pagination .current {
  background: var(--accent-color);
  color: #fff;
  border-color: var(--accent-color);
  box-shadow: 0 4px 12px rgba(var(--accent-color-rgb), 0.2);
}

.pagination .prev,
.pagination .next {
  padding: 0 1.25rem;
}

.pagination .disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* ==========================================================================
   10. PAGE TEMPLATE STYLES
   ========================================================================== */

.page-wrapper {
  width: 100%;
  max-width: 100vw;
  margin-top: calc(var(--header-height) + 20px);
  padding: 0;
  background: var(--bg-color);
  overflow-x: hidden;
  box-sizing: border-box;
}

.page-layout-container {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: 100%;
  min-height: calc(100vh - var(--header-height) - 20px);
  margin: 0 auto;
  padding: 0;
}

.page-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 0px);
  height: calc(100vh - var(--header-height) - 20px);
  padding: 2rem 1.5rem;
  background: var(--card-bg);
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  box-sizing: border-box;
  min-width: 200px;
  max-width: 300px;
}

.page-sidebar::-webkit-scrollbar {
  display: none;
}

.left-sidebar {
  border-right: 1px solid var(--border-color);
}

.right-sidebar {
  border-left: 1px solid var(--border-color);
}

.page-main-content {
  width: 100%;
  padding: 2.5rem;
  background: var(--card-bg);
  box-sizing: border-box;
}

.page-article {
  width: 100%;
  max-width: 100%;
}

.page-content {
  line-height: 1.7;
  font-size: 1.1rem;
  color: var(--text-color);
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

/* ==========================================================================
   11. SINGLE POST TEMPLATE STYLES
   ========================================================================== */

.single-post-wrapper {
  width: 100%;
  max-width: 100vw;
  margin-top: calc(var(--header-height) + 40px);
  padding: 0;
  background: var(--bg-color);
  overflow-x: hidden;
  box-sizing: border-box;
}

.single-post-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  width: 100%;
  margin: 0 auto;
  padding: 0;
  min-height: calc(100vh - var(--header-height) - 20px);
}

.single-sidebar {
  position: sticky;
  top: 0px;
  height: auto;
  padding: 2rem 1.5rem;
  background: var(--card-bg);
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
  box-sizing: border-box;
  min-width: 200px;
  max-width: 300px;
}

.single-sidebar::-webkit-scrollbar {
  display: none;
}

.left-sidebar {
  border-right: 1px solid var(--border-color);
}

.right-sidebar {
  border-left: 1px solid var(--border-color);
}

.single-main-content {
  width: 100%;
  padding: 2.5rem;
  background: var(--card-bg);
  box-sizing: border-box;
  display: flex;
  justify-content: center;
}

.content-centering-wrapper {
  width: 100%;
  max-width: 1060px;
}

.single-article {
  width: 100%;
}

.single-featured-image {
  margin: 0 auto 1.5rem;
  border-radius: var(--border-radius-base);
  overflow: hidden;
  max-width: 1060px;
}

.single-featured-image img {
  width: 100%;
  height: auto;
  display: block;
}

.single-post-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.single-post-title {
  font-size: 2rem;
  line-height: 1.3;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.post-artists {
  display: block;
  font-size: 1rem;
  color: var(--accent-color);
  margin-bottom: 0.5rem;
}

.artist-label {
  font-weight: 600;
  color: var(--text-muted-color);
}

.single-post-meta {
  font-size: 0.9rem;
  color: var(--text-muted-color);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
}

.single-post-content {
  line-height: 1.7;
  font-size: 1.1rem;
  color: var(--text-color);
  text-align: justify;
  text-justify: inter-word;
  hyphens: auto;
}

.single-post-footer {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
}

.post-tags {
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}

.tags-label {
  font-weight: 600;
  color: var(--text-muted-color);
}

.post-social-share {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.share-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted-color);
}

.social-share-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: white;
  transition: var(--transition-base);
}

.social-share-link.facebook {
  background: #3b5998;
}

.social-share-link.twitter {
  background: #1da1f2;
}

.social-share-link.linkedin {
  background: #0077b5;
}

.social-share-link.email {
  background: var(--accent-color);
}

.social-share-link:hover {
  transform: translateY(-2px);
  opacity: 0.9;
}

.single-comments-section {
  margin-top: 3rem;
}

/* ==========================================================================
   12. RESPONSIVE STYLES
   ========================================================================== */

/* ==========================================================================
   MOBILE STYLES (up to 767px) - OPTIMIZED VERSION
   ========================================================================== */
@media (max-width: 767px) {
  /* Base Mobile Optimizations */
  html {
    overflow-x: hidden;
    width: 100%;
    scroll-behavior: smooth;
    text-size-adjust: 100%;
  }

  img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
    loading: lazy;
  }

  body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }

  @media (prefers-reduced-motion: reduce) {
    * {
      animation-duration: 0.01ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 0.01ms !important;
      scroll-behavior: auto !important;
    }
  }

  :root {
    --header-height: 70px;
    --sidebar-width: 85vw;
    --sticky-search-height: 50px;
    --dropdown-icon-size: 24px;
    --dropdown-click-area: 44px;
    --dropdown-icon-position: calc((var(--dropdown-click-area) - var(--dropdown-icon-size)) / 2);
    --dropdown-transition: 0.25s ease;
    --sidebar-z-index: 1000;
    --overlay-z-index: 900;
    --toggle-z-index: 100;
    --close-btn-z-index: 1010;
    --card-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  /* Layout Structure */
  .layout-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    padding: 0;
  }

  .main-content-container {
    width: 100%;
    padding: 1rem;
    margin-top: calc(var(--header-height) + var(--sticky-search-height));
  }

  /* Header & Navigation */
  .header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    padding: 0.5rem 1rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--header-bg);
  }

  .header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .logo-title-container {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .logo-title-container .custom-logo {
    height: 36px;
    width: auto;
    margin-bottom: 0;
  }

  .logo-title-container h1 {
    font-size: 1rem;
    margin: 0.25rem 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80vw;
  }

  .social-icons {
    display: none;
  }

  /* Search Container */
  .search-container {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    padding: 0.5rem 1rem;
    background: var(--header-bg);
    z-index: 999;
    border-bottom: 1px solid var(--border-color);
  }

  .search-form {
    width: 100%;
  }

  .search-input {
    padding: 0.75rem 1rem 0.75rem 3rem;
    font-size: 1rem;
  }

  /* Category Tabs */
  .category-tabs {
    position: fixed;
    top: calc(var(--header-height) + var(--sticky-search-height));
    left: 0;
    right: 0;
    z-index: 998;
    padding: 0.5rem 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border-color);
  }

  .nav-tabs {
    display: flex;
    gap: 0.5rem;
    padding-bottom: 0.5rem;
  }

  .nav-tabs li a {
    padding: 0.75rem;
    font-size: 0.85rem;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .menu-item-has-children {
    position: relative;
  }

  .menu-item-has-children .dropdown-toggle {
    position: absolute;
    right: 0;
    top: 0;
    width: var(--dropdown-click-area);
    height: 100%;
    opacity: 0;
    z-index: 2;
  }

  .menu-item-has-children > a::after {
    content: "";
    position: absolute;
    right: var(--dropdown-icon-position);
    top: 50%;
    transform: translateY(-50%);
    width: var(--dropdown-icon-size);
    height: var(--dropdown-icon-size);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    transition: transform var(--dropdown-transition);
    pointer-events: none;
  }

  .menu-item-has-children.active > a::after {
    transform: translateY(-50%) rotate(180deg);
  }

  .sub-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--dropdown-transition);
    padding-left: 1rem;
  }

  .sub-menu.show {
    max-height: 1000px;
  }

  /* Sidebars */
  .sidebar-toggle {
    position: fixed;
    width: 44px;
    height: 44px;
    background: var(--accent-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    top: calc(var(--header-height) + 1rem);
    z-index: var(--toggle-z-index);
  }

  .sidebar-toggle-left { left: 1rem; }
  .sidebar-toggle-right { right: 1rem; }

  .sidebar-left,
  .sidebar-right {
    position: fixed;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    padding: 1.5rem 1rem;
    background: var(--card-bg);
    z-index: var(--sidebar-z-index);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s ease-out;
  }

  .sidebar-right {
    left: auto;
    right: 0;
    transform: translateX(100%);
  }

  .sidebar-left.active,
  .sidebar-right.active {
    transform: translateX(0);
  }

  .sidebar-close-button {
    position: fixed;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    font-size: 1.5rem;
    z-index: var(--close-btn-z-index);
    padding: 0.5rem;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-content {
    height: calc(100% - 60px);
    overflow-y: auto;
    padding-top: 1rem;
  }

  .sidebar .widget {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-base);
  }

  /* Vertical Menu */
  .vertical-menu li a {
    padding: 0.75rem 1rem;
    min-height: 44px;
    display: block;
  }

  .vertical-menu .menu-item-has-children > a {
    padding-right: 2.5rem !important;
  }

  .vertical-menu .menu-item-has-children > a::after {
    right: 1rem;
  }

  .vertical-menu .sub-menu li a {
    padding-left: 1.5rem;
  }

  /* Post Grid */
  .post-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
  }

  .post-card {
    border-radius: 10px;
    box-shadow: var(--card-shadow);
  }

  .post-title {
    font-size: 0.8rem;
  }

  /* Page Content */
  .page-wrapper,
  .single-post-wrapper {
    margin-top: calc(var(--header-height) + var(--sticky-search-height) + 50px);
    padding: 0 0.5rem;
    width: 100%;
    overflow-x: hidden;
  }

  .page-main-content,
  .single-main-content {
    padding: 1rem;
    width: 100%;
  }

  .page-content,
  .single-post-content {
    font-size: 1rem;
    line-height: 1.6;
    hyphens: auto;
    word-wrap: break-word;
  }

  .single-post-title {
    font-size: 1.5rem;
    line-height: 1.3;
  }

  .single-post-meta {
    flex-direction: column;
    font-size: 0.85rem;
  }

  /* Footer */
  .footer-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .footer-nav-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .footer-nav-column ul li a {
    display: block;
    padding: 0.5rem 0;
    min-height: 44px;
  }

  .footer-bottom-top,
  .footer-legal-links,
  .footer-bottom-bottom {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
  }

  /* Auth & User Components */
  .auth-section {
    margin: 1rem 0;
    padding: 1rem;
  }

  .guest-auth-buttons {
    flex-direction: column;
  }

  .user-profile-card {
    padding: 1rem;
  }

  .user-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
  }

  /* Social Icons */
  .sidebar-left .mobile-social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
  }

  .sidebar-left .mobile-social-icons a {
    display: flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
  }

  .sidebar-left .mobile-social-icons a:hover {
    transform: scale(1.1);
  }

  .sidebar-left .mobile-social-icons img {
    width: 28px;
    height: 28px;
  }

  /* Overlay for sidebar active state */
  body.sidebar-active {
    overflow: hidden;
    position: fixed;
    height: 100%;
    width: 100%;
    touch-action: none;
  }

  body.sidebar-active::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: var(--overlay-z-index);
  }
}

/* TABLET (768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  :root {
    --header-height: 150px;
    --sidebar-width: 280px;
  }
  
  .header-top-row {
    grid-template-columns: auto 1fr auto;
  }
  
  .social-icons {
    display: none;
  }
  
  .logo-title-container {
    grid-column: 2;
  }
  
  .logo-title-container .custom-logo {
    height: 35px;
  }
  
  .logo-title-container h1 {
    font-size: 1rem;
  }
  
  .search-container {
    grid-column: 3;
    max-width: 200px;
  }
  
  .post-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
  
  .guest-auth-buttons {
    flex-direction: row;
  }
  
  .auth-button {
    font-size: 0.7rem;
    padding: 0.5rem;
  }

  /* Sidebar enhancements */
  .sidebar-toggle {
    width: 44px;
    height: 44px;
    top: 15px;
  }
  
  .sidebar-left.active ~ .sidebar-toggle-left {
    left: calc(100vw - 50px);
  }
  
  .sidebar-right.active ~ .sidebar-toggle-right {
    right: calc(100vw - 50px);
  }

  .sidebar-left,
  .sidebar-right {
    width: 85vw;
    max-width: 320px;
    padding: 1.25rem;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    border: none;
  }

  .vertical-menu ul li a {
    padding: 0.85rem 1rem;
    font-size: 0.95rem;
  }

  .user-profile-card {
    padding: 1.25rem;
  }

  .user-avatar img {
    width: 80px;
    height: 80px;
  }

  .page-layout-container,
  .single-post-layout {
    grid-template-columns: 1fr;
    grid-template-areas: 
      "left-sidebar"
      "main-content"
      "right-sidebar";
  }
  
  .page-wrapper,
  .single-post-wrapper {
    margin-top: calc(var(--header-height) + 15px);
  }
  
  .page-sidebar,
  .single-sidebar {
    position: static;
    height: auto;
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    padding: 2rem;
    border-right: none;
    border-left: none;
  }
  
  .left-sidebar {
    border-bottom: 1px solid var(--border-color);
  }
  
  .right-sidebar {
    border-top: 1px solid var(--border-color);
  }
  
  .page-main-content,
  .single-main-content {
    padding: 1.5rem;
  }
  
  .single-post-title {
    font-size: 1.8rem;
  }

  .footer-main {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    padding: 0 2rem 2rem;
  }
  
  .footer-nav-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .footer-bottom-top {
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
  }
  
  .footer-legal-links {
    justify-content: center;
    order: 1;
  }
  
  .developer-tagline {
    order: 2;
    padding: 0;
  }
  
  .footer-apps {
    order: 3;
    justify-content: center;
  }

  .footer-legal-links a {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
  }

  .footer-copyright {
    font-size: 0.8rem;
  }

  .developer-credit {
    font-size: 0.8rem;
  }
}

/* LAPTOP (992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
  .logo-title-container .custom-logo {
    height: 45px;
  }
  
  .logo-title-container h1 {
    font-size: 1.3rem;
  }
  
  /* Hide mobile social icons on desktop */
  .mobile-social-icons {
    display: none;
  }
  
  .post-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
  }

  .page-sidebar,
  .single-sidebar {
    padding: 1.5rem;
    min-width: 180px;
  }

  .page-main-content,
  .single-main-content {
    padding: 2rem;
  }
}

/* DESKTOP (1200px and up) */
@media (min-width: 1200px) {
  .layout-wrapper {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr var(--sidebar-width);
    gap: 2rem;
    max-width: 100vw;
    margin: calc(var(--header-height) + 60px) auto 0;
    padding: 0 2rem;
    min-height: calc(100vh - var(--header-height) - 60px);
  }

  .header {
    z-index: 1100;
  }

  .sidebar-toggle {
    display: none;
  }

  .mobile-social-icons {
    display: none;
  }

  .sidebar-left,
  .sidebar-right {
    position: sticky;
    top: 0px;
    transform: none;
    height: auto;
    max-height: auto;
    padding: 1rem;
    background: transparent;
    border: none;
    box-shadow: none;
    overflow-y: auto;
    z-index: 100;
    width: var(--sidebar-width);
    max-width: var(--sidebar-width);
  }

  .sidebar-left {
    order: 1;
    left: auto;
  }

  .main-content-container {
    order: 2;
    margin-top: 0;
    padding: 0;
    width: 100%;
  }

  .sidebar-right {
    order: 3;
    right: auto;
  }

  .social-icons {
    display: flex;
  }
  
  /* Hide mobile social icons on desktop */
  .mobile-social-icons {
    display: none;
  }

  .post-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
  }

  .home .post-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .post-content {
    padding: 0.5rem;
  }

  .post-title {
    font-size: 0.8rem;
  }

  /* Footer desktop layout */
  .footer-main {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 4rem;
    padding: 0 3rem 4rem;
    align-items: start;
    max-width: 1440px;
    margin: 0 auto;
  }

  .footer-brand {
    grid-column: 1;
  }

  .footer-nav-row {
    grid-column: 2;
  }

  .footer-bottom-top {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 4rem;
    max-width: 1440px;
    padding: 0 3rem;
  }

  .footer-legal-links {
    grid-column: 1;
  }

  .footer-newsletter {
    grid-column: 3;
  }

  .footer-apps {
    grid-column: 3;
  }

  .developer-tagline {
    grid-column: 2;
  }

  .footer-bottom-bottom {
    grid-column: 1 / -1;
    max-width: 1440px;
    padding: 0 3rem;
  }

  .footer-bottom {
    padding: 2.5rem 0;
  }
}