/*
Theme Name: GeneratePress Child - Professional
Description: Professional, SEO-optimized, responsive child theme with dark mode
Version: 2.0
Template: generatepress
*/

/* CSS Variables for consistent theming */
:root {
  /* Light Theme Colors */
  --primary-color: #2563eb;
  --primary-dark: #1e40af;
  --secondary-color: #f59e0b;
  --accent-color: #10b981;
  --text-color: #1f2937;
  --text-light: #6b7280;
  --text-muted: #9ca3af;
  --bg-color: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --border-color: #e5e7eb;
  --border-light: #f3f4f6;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
  
  /* Spacing */
  --container-max-width: 1200px;
  --section-padding: 4rem 0;
  --element-spacing: 1.5rem;
  
  /* Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
  
  /* Border radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

/* Dark Theme Colors */
body.dark-mode {
  --primary-color: #3b82f6;
  --primary-dark: #2563eb;
  --secondary-color: #fbbf24;
  --accent-color: #34d399;
  --text-color: #f9fafb;
  --text-light: #d1d5db;
  --text-muted: #9ca3af;
  --bg-color: #111827;
  --bg-secondary: #1f2937;
  --bg-tertiary: #374151;
  --border-color: #374151;
  --border-light: #4b5563;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.4);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5), 0 4px 6px -4px rgb(0 0 0 / 0.5);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.6), 0 8px 10px -6px rgb(0 0 0 / 0.6);
}

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

*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  font-family: var(--font-primary);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: background-color var(--transition-normal), color var(--transition-normal);
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 1rem 0;
  color: var(--text-color);
}

h1 { font-size: clamp(2rem, 4vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin: 0 0 1.5rem 0;
  color: var(--text-light);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Utility Classes */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

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

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

.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  word-wrap: normal !important;
}

.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 999999;
  padding: 8px 16px;
  background: var(--primary-color);
  color: white;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius-md);
}

.skip-link:focus {
  left: 6px;
  top: 7px;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-color);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-normal), visibility var(--transition-normal);
}

.loading-overlay.active {
  opacity: 1;
  visibility: visible;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid var(--border-color);
  border-top: 4px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Dark Mode Toggle */
.dark-mode-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--primary-color);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  transition: all var(--transition-normal);
}

.dark-mode-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.dark-mode-btn:active {
  transform: translateY(0);
}

.dark-mode-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sun-icon,
.moon-icon {
  position: absolute;
  transition: all var(--transition-normal);
}

body:not(.dark-mode) .moon-icon {
  opacity: 0;
  transform: rotate(180deg) scale(0);
}

body.dark-mode .sun-icon {
  opacity: 0;
  transform: rotate(-180deg) scale(0);
}

/* Header Styles */
.site-header {
  background: var(--bg-color);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all var(--transition-normal);
}

.header-top {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
}

.header-top-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
}

.header-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-email {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-light);
}

.social-icons {
  display: flex;
  gap: 1rem;
}

.social-icons a {
  color: var(--text-light);
  transition: color var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.social-icons a:hover {
  color: var(--primary-color);
  background: var(--bg-tertiary);
}

.header-main {
  padding: 1rem 0;
}

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

/* Site Branding */
.site-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-logo img {
  max-height: 50px;
  width: auto;
}

.site-title {
  margin: 0;
}

.site-title a {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-color);
  text-decoration: none;
}

.site-description {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Navigation */
.main-navigation {
  display: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.nav-menu li {
  position: relative;
}

.nav-menu a {
  color: var(--text-color);
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width var(--transition-fast);
}

.nav-menu a:hover::after,
.nav-menu .current-menu-item a::after {
  width: 100%;
}

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

/* Mobile Menu */
.mobile-menu-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--text-color);
  transition: all var(--transition-normal);
}

.mobile-menu-toggle.active .hamburger span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

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

.search-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: var(--text-color);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.search-toggle:hover {
  background: var(--bg-secondary);
  color: var(--primary-color);
}

/* Search Overlay */
.search-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

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

.search-container {
  background: var(--bg-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  width: 90%;
  max-width: 600px;
  position: relative;
  box-shadow: var(--shadow-xl);
}

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

.search-field {
  flex: 1;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1.125rem;
  background: var(--bg-color);
  color: var(--text-color);
  transition: border-color var(--transition-fast);
}

.search-field:focus {
  outline: none;
  border-color: var(--primary-color);
}

.search-submit {
  padding: 1rem 1.5rem;
  background: var(--primary-color);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.search-submit:hover {
  background: var(--primary-dark);
}

.search-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.search-close:hover {
  background: var(--bg-secondary);
  color: var(--text-color);
}

/* Footer Styles */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  margin-top: 4rem;
}

.footer-widgets {
  padding: 3rem 0;
}

.footer-widget-area {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.widget {
  margin-bottom: 2rem;
}

.widget-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.widget p {
  color: var(--text-light);
}

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

.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-tertiary);
  color: var(--text-light);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.footer-social a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

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

.footer-menu li {
  margin-bottom: 0.5rem;
}

.footer-menu a {
  color: var(--text-light);
  transition: color var(--transition-fast);
}

.footer-menu a:hover {
  color: var(--primary-color);
}

.contact-info {
  margin-top: 1rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  color: var(--text-light);
  font-size: 0.875rem;
}

.contact-item svg {
  flex-shrink: 0;
  color: var(--primary-color);
}

/* Footer Bottom */
.footer-bottom {
  background: var(--bg-tertiary);
  padding: 1.5rem 0;
  border-top: 1px solid var(--border-color);
}

.footer-bottom-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.copyright {
  flex: 1;
}

.copyright p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-navigation {
  flex: 1;
  display: flex;
  justify-content: center;
}

.footer-nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

.footer-nav-menu a {
  color: var(--text-light);
  font-size: 0.875rem;
  transition: color var(--transition-fast);
}

.footer-nav-menu a:hover {
  color: var(--primary-color);
}

/* Back to Top Button */
.back-to-top {
  width: 44px;
  height: 44px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  opacity: 0;
  visibility: hidden;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Responsive Design */
@media (min-width: 640px) {
  .header-info {
    display: flex;
  }
  
  .footer-widget-area {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 768px) {
  .main-navigation {
    display: block;
  }
  
  .mobile-menu-toggle {
    display: none;
  }
  
  .footer-widget-area {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .header-top {
    display: block;
  }
}

@media (max-width: 767px) {
  .header-top {
    display: none;
  }
  
  .header-content {
    gap: 1rem;
  }
  
  .site-branding {
    flex: 1;
  }
  
  .site-title a {
    font-size: 1.5rem;
  }
  
  .dark-mode-btn {
    bottom: 1rem;
    right: 1rem;
    width: 48px;
    height: 48px;
  }
  
  .footer-bottom-content {
    flex-direction: column;
    text-align: center;
  }
  
  .footer-navigation {
    order: -1;
  }
  
  .footer-nav-menu {
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  
  .header-main {
    padding: 0.75rem 0;
  }
  
  .search-container {
    padding: 1.5rem;
    margin: 1rem;
  }
  
  .footer-widget-area {
    grid-template-columns: 1fr;
  }
}

/* Mobile Navigation Overlay */
@media (max-width: 767px) {
  .main-navigation {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background: var(--bg-color);
    box-shadow: var(--shadow-xl);
    padding: 2rem;
    transition: left var(--transition-normal);
    z-index: 999;
    overflow-y: auto;
  }
  
  .main-navigation.active {
    left: 0;
  }
  
  .nav-menu {
    flex-direction: column;
    gap: 0;
  }
  
  .nav-menu li {
    border-bottom: 1px solid var(--border-color);
  }
  
  .nav-menu a {
    display: block;
    padding: 1rem 0;
  }
  
  .nav-menu a::after {
    display: none;
  }
  
  /* Mobile menu backdrop */
  .nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
  }
  
  .nav-backdrop.active {
    opacity: 1;
    visibility: visible;
  }
}

/* Content Styles */
.site-main {
  min-height: 60vh;
  padding: var(--section-padding);
}

/* Blog and Post Styles */
.entry-header {
  margin-bottom: 2rem;
}

.entry-title {
  margin-bottom: 1rem;
}

.entry-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.entry-content {
  line-height: 1.8;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 1rem 0;
}

.entry-content blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-style: italic;
  color: var(--text-light);
}

.entry-content code {
  background: var(--bg-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--primary-color);
}

.entry-content pre {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 2rem 0;
}

.entry-content pre code {
  background: none;
  padding: 0;
  color: var(--text-color);
}

/* Button Styles */
.btn,
button[type="submit"],
input[type="submit"],
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
  font-size: 1rem;
}

.btn:hover,
button[type="submit"]:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: white;
}

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

.btn-secondary:hover {
  background: var(--bg-tertiary);
  color: var(--text-color);
}

/* Form Styles */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="number"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-color);
  color: var(--text-color);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--transition-fast);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea {
  resize: vertical;
  min-height: 120px;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-color);
}

/* WordPress Block Styles */
.wp-block-group {
  margin: 2rem 0;
}

.wp-block-columns {
  display: flex;
  gap: 2rem;
  margin: 2rem 0;
}

.wp-block-column {
  flex: 1;
}

@media (max-width: 767px) {
  .wp-block-columns {
    flex-direction: column;
    gap: 1rem;
  }
}

.wp-block-image {
  margin: 2rem 0;
}

.wp-block-image img {
  border-radius: var(--radius-md);
}

.wp-block-separator {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 3rem 0;
}

/* Accessibility Improvements */
.skip-link:focus,
.screen-reader-text:focus {
  clip: auto;
  height: auto;
  width: auto;
  display: block;
  font-size: 1em;
  font-weight: bold;
  padding: 15px 23px 14px;
  background: var(--primary-color);
  color: white;
  z-index: 100000;
  text-decoration: none;
  border-radius: var(--radius-md);
}

/* Focus styles for better accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .dark-mode-btn,
  .back-to-top,
  .mobile-menu-toggle,
  .search-toggle,
  .header-top {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .site-header {
    box-shadow: none;
    border-bottom: 1px solid #ccc;
  }
}

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

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-sm);
}

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

/* Selection styles */
::selection {
  background: var(--primary-color);
  color: white;
}

::-moz-selection {
  background: var(--primary-color);
  color: white;
}

/* Animation for page transitions */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-main {
  animation: fadeIn 0.5s ease-out;
}

/* Performance optimizations */
img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

svg {
  fill: currentColor;
  vertical-align: middle;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ================================
   BLOG PAGE STYLES
   ================================ */

.blog-container {
  padding: 2rem 0;
}

/* Ad Spaces */
.ad-space {
  margin: 2rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.ad-placeholder {
  background: var(--bg-secondary);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  transition: all var(--transition-fast);
}

.ad-placeholder:hover {
  border-color: var(--primary-color);
  background: var(--bg-tertiary);
}

.ad-top .ad-placeholder {
  width: 100%;
  max-width: 728px;
  height: 90px;
}

.ad-center .ad-placeholder {
  width: 100%;
  max-width: 728px;
  height: 90px;
}

.ad-inline .ad-placeholder {
  width: 100%;
  height: 250px;
  grid-column: 1 / -1;
  margin: 1rem 0;
}

.ad-placeholder.vertical {
  width: 160px;
  height: 600px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* Featured Posts Slider */
.featured-posts-slider {
  margin: 3rem 0;
  background: var(--bg-secondary);
  border-radius: var(--radius-xl);
  padding: 3rem 0;
  position: relative;
  overflow: hidden;
}

.featured-posts-slider::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.title-text {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-color);
  position: relative;
  display: inline-block;
  padding: 0 2rem;
  background: var(--bg-secondary);
  z-index: 2;
}

.title-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
  z-index: 1;
}

/* Slider Container */
.slider-container {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.slider-container.slider-loading .posts-slider {
  opacity: 0.7;
}

.posts-slider {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.slider-post {
  flex: 0 0 100%;
  padding: 0 1rem;
  box-sizing: border-box;
}

/* Slider Post Card */
.slider-post .post-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 1.5rem;
  aspect-ratio: 16/9;
}

.slider-post .post-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.slider-post .no-image-placeholder {
  width: 100%;
  height: 100%;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.slider-post .post-category {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
}

.category-badge {
  background: var(--primary-color);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.slider-post .post-content {
  background: var(--bg-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.slider-post:hover .post-content {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.slider-post .post-meta {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.slider-post .post-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.slider-post .post-title {
  margin-bottom: 1rem;
}

.slider-post .post-title a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  transition: color var(--transition-fast);
}

.slider-post .post-title a:hover {
  color: var(--primary-color);
}

.slider-post .post-excerpt {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.slider-post .post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.slider-post .author-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.slider-post .author-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
}

.slider-post .author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-post .author-name {
  font-size: 0.875rem;
  color: var(--text-light);
  font-weight: 500;
}

.slider-post .read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.slider-post .read-more-btn:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Slider Controls */
.slider-controls {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 10;
}

.slider-btn {
  position: absolute;
  width: 50px;
  height: 50px;
  background: white;
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
  pointer-events: auto;
  box-shadow: var(--shadow-md);
}

.slider-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

.slider-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.prev-btn {
  left: -25px;
}

.next-btn {
  right: -25px;
}

/* Slider Dots */
.slider-dots {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.slider-dot:hover,
.slider-dot.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
}

/* Main Content Grid */
.main-content-area {
  margin-top: 4rem;
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.main-posts-area {
  order: 2;
}

.sidebar-left,
.sidebar-right {
  order: 3;
}

/* Blog Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

/* Blog Post Card */
.blog-post-card {
  background: var(--bg-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  border: 1px solid var(--border-light);
}

.blog-post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

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

.blog-post-card .post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

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

.blog-post-card .no-image-placeholder {
  width: 100%;
  height: 100%;
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 1rem;
}

.post-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.3) 100%);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.blog-post-card:hover .post-overlay {
  opacity: 1;
}

.post-category-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 2;
}

.post-category-badge span {
  background: var(--primary-color);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.post-card-content {
  padding: 2rem;
}

.post-meta-info {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.post-meta-info span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-card-title {
  margin-bottom: 1rem;
}

.post-card-title a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  transition: color var(--transition-fast);
}

.post-card-title a:hover {
  color: var(--primary-color);
}

.post-card-excerpt {
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 2rem;
}

.post-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-light);
}

.author-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.author-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--border-light);
}

.author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.author-details {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-color);
}

.author-title {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.read-more-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--primary-color);
  color: white;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
  transition: all var(--transition-fast);
}

.read-more-button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  color: white;
}

/* Sidebar Widgets */
.widget {
  background: var(--bg-color);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

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

.popular-post-item {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}

.popular-post-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.popular-post-thumbnail {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.popular-post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popular-post-content h4 {
  margin: 0 0 0.5rem 0;
  font-size: 0.875rem;
  line-height: 1.4;
}

.popular-post-content h4 a {
  color: var(--text-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.popular-post-content h4 a:hover {
  color: var(--primary-color);
}

.popular-post-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Pagination */
.pagination-wrapper {
  margin: 4rem 0;
  display: flex;
  justify-content: center;
}

.pagination-wrapper .page-numbers {
  display: inline-flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.5rem;
}

.pagination-wrapper .page-numbers li {
  margin: 0;
}

.pagination-wrapper .page-numbers a,
.pagination-wrapper .page-numbers span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1rem;
  min-width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-fast);
  border: 1px solid var(--border-color);
  background: var(--bg-color);
  color: var(--text-color);
}

.pagination-wrapper .page-numbers a:hover {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.pagination-wrapper .page-numbers .current {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.pagination-wrapper .page-numbers .prev,
.pagination-wrapper .page-numbers .next {
  padding: 0.75rem 1.25rem;
  gap: 0.5rem;
}

/* No Posts Found */
.no-posts-found {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  margin: 2rem 0;
}

.no-posts-icon {
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.no-posts-found h2 {
  color: var(--text-color);
  margin-bottom: 1rem;
}

.no-posts-found p {
  color: var(--text-light);
  margin-bottom: 2rem;
}

/* Responsive Design */
@media (min-width: 640px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .slider-post {
    flex: 0 0 50%;
  }
}

@media (min-width: 768px) {
  .content-grid {
    grid-template-columns: 200px 1fr 200px;
  }
  
  .main-posts-area {
    order: 2;
  }
  
  .sidebar-left {
    order: 1;
  }
  
  .sidebar-right {
    order: 3;
  }
  
  .prev-btn {
    left: 1rem;
  }
  
  .next-btn {
    right: 1rem;
  }
}

@media (min-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .content-grid {
    grid-template-columns: 250px 1fr 300px;
    gap: 3rem;
  }
  
  .slider-post {
    flex: 0 0 33.333%;
  }
}

@media (min-width: 1200px) {
  .content-grid {
    grid-template-columns: 300px 1fr 350px;
  }
}

/* Loading States */
.blog-post-card.loading {
  background: var(--bg-secondary);
  animation: pulse 1.5s ease-in-out infinite;
}

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