/*
 * Portal Destaques BS5 - Main Stylesheet
 * 
 * @package Portal_Destaques_BS5
 */

/* ==========================================================================
   CSS Variables (Custom Properties)
   ========================================================================== */

:root {
  /* Cores do tema */
  --primary-color: #dc3545;
  --primary-hover: #c82333;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --info-color: #0dcaf0;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-color: #f8f9fa;
  --dark-color: #212529;
  --accent-color: #dc3545;
  
  /* Cores de texto */
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-muted: #6c757d;
  --text-light: #ffffff;
  
  /* Cores de fundo */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-dark: #212529;
  --bg-light: #f8f9fa;
  
  /* Cores de borda */
  --border-color: #dee2e6;
  --border-light: #e9ecef;
  
  /* Sombras */
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
  
  /* Tipografia */
  --font-family-base: system-ui, -apple-system,  Roboto, 'Merriweather', 'Noto Sans', "Helvetica Neue", Arial, "Noto Sans", sans-serif;

  --font-size-base: 1.125rem;
  --line-height-base: 1.6;
  --font-weight-normal: 400;
  --font-weight-bold: 700;
  
  /* Espaçamentos */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 3rem;
  
  /* Transições */
  --transition-base: all 0.15s ease-in-out;
  --transition-fast: all 0.1s ease-in-out;
  --transition-slow: all 0.3s ease-in-out;
}

/* ==========================================================================
   Dark Mode Variables
   ========================================================================== */

.theme-dark {
  --text-primary: #ffffff;
  --text-secondary: #adb5bd;
  --text-muted: #6c757d;
  --text-light: #ffffff;
  
  --bg-primary: #212529;
  --bg-secondary: #343a40;
  --bg-dark: #000000;
  --bg-light: #495057;
  
  --border-color: #495057;
  --border-light: #6c757d;
}

/* Override Bootstrap text-dark class in dark mode */
.theme-dark .text-dark,
.theme-dark .text-dark:hover,
.theme-dark .text-dark:focus {
  color: var(--text-primary) !important;
}

/* Override any text color classes in dark mode */
.theme-dark .navbar-nav .nav-link,
.theme-dark .card-title,
.theme-dark .hero-title,
.theme-dark .section-title {
  color: var(--text-primary) !important;
}

.theme-dark .navbar-nav .nav-link:hover,
.theme-dark .card-title:hover,
.theme-dark .hero-title:hover {
  color: var(--primary-color) !important;
}



/* Dark mode hero adjustments */
.theme-dark .hero-section::before {
  background: linear-gradient(135deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.25) 100%);
}

.theme-dark .carousel::before {
  background: linear-gradient(135deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.3) 100%);
}

.theme-dark .carousel-item::before {
  background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.2) 100%);
}

.theme-dark .hero-image::before {
  background: linear-gradient(45deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.1) 100%);
}

.theme-dark .hero-image:hover::before {
  background: linear-gradient(45deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.05) 100%);
}

/* Dark mode text color overrides */
.theme-dark .text-dark {
  color: var(--text-primary) !important;
}

.theme-dark .hero-title a,
.theme-dark .card-title a,
.theme-dark h1,
.theme-dark h2,
.theme-dark h3,
.theme-dark h4,
.theme-dark h5,
.theme-dark h6 {
  color: var(--text-primary) !important;
}

.theme-dark .hero-title a:hover,
.theme-dark .card-title a:hover {
  color: var(--primary-color) !important;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  color: var(--text-primary);
  background-color: var(--bg-primary);
  transition: var(--transition-base);
}

/* Modo de leitura para posts */
.is-reading .entry-content {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.7;
}

.is-reading .entry-content p {
  margin-bottom: 1.5rem;
}

.is-reading .entry-content h2,
.is-reading .entry-content h3,
.is-reading .entry-content h4 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

/* ==========================================================================
   Typography
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary) !important;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  color: var(--text-primary);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-base);
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.text-muted {
  color: var(--text-muted) !important;
}

/* ==========================================================================
   Layout Components
   ========================================================================== */

/* Skip link */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  z-index: 999999;
  color: var(--text-light);
  background: var(--primary-color);
  padding: 8px 16px;
  text-decoration: none;
  border-radius: 0 0 4px 4px;
}

.skip-link:focus {
  top: 0;
}

/* Header */
.navbar {
  background-color: var(--bg-primary) !important;
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-base);
}

.navbar.scrolled {
  box-shadow: var(--shadow);
}

.navbar-brand img {
  transition: var(--transition-base);
}


/* Logo switching for dark mode */
.theme-dark .logo-light {
  display: none !important;
}

.theme-dark .logo-dark {
  display: inline-block !important;
}

.theme-light .logo-dark {
  display: none !important;
}

.theme-light .logo-light {
  display: inline-block !important;
}

/* Theme toggle button */
#theme-toggle {
  border: 1px solid var(--border-color);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: var(--transition-base);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

#theme-toggle:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-light);
  transform: scale(1.1);
}

#theme-toggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

#theme-toggle i {
  font-size: 1.1rem;
}

/* Header search */
.header-search {
  position: relative;
}

.header-search .search-form-wrapper {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  min-width: 300px;
  z-index: 1000;
}

.header-search .search-form {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.header-search .search-form .input-group {
  margin-bottom: 0;
}

.header-search .search-form .form-control {
  border-radius: 0.375rem 0 0 0.375rem;
}

.header-search .search-form .btn {
  border-radius: 0 0.375rem 0.375rem 0;
}

/* Header social links */
.header-social .social-links .btn {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-base);
}

.header-social .social-links .btn:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-light);
  transform: scale(1.1);
}

.header-social .social-links .btn i {
  font-size: 0.9rem;
}

/* Navbar mobile toggle */
.navbar-toggler {
  border: none;
  padding: 0.5rem;
  background: transparent;
  color: var(--text-primary);
  transition: var(--transition-base);
}

.navbar-toggler:hover {
  color: var(--primary-color);
  transform: scale(1.1);
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.navbar-toggler i {
  font-size: 1.2rem;
}

/* Menu items */
.navbar-nav .nav-link {
  color: var(--text-primary);
  font-weight: 500;
  padding: 0.75rem 1rem;
  transition: var(--transition-base);
  border-radius: 0.375rem;
  margin: 0 0.25rem;
}

.navbar-nav .nav-link:hover {
  color: var(--light-color);
  background-color: var( --bg-dark);
}

.navbar-nav .nav-link:focus {
  color: var(--primary-color);
  background-color: var(--bg-secondary);
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.navbar-nav .dropdown-toggle::after {
  margin-left: 0.5rem;
  vertical-align: 0.15em;
}

.navbar-nav .dropdown-menu {
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  background-color: var(--bg-primary);
  margin-top: 0.5rem;
  border-radius: 0.5rem;
}

.navbar-nav .dropdown-item {
  color: var(--text-primary);
  padding: 0.5rem 1rem;
  transition: var(--transition-base);
}

.navbar-nav .dropdown-item:hover {
  background-color: var(--bg-secondary);
  color: var(--primary-color);
}

.navbar-nav .dropdown-item:focus {
  background-color: var(--bg-secondary);
  color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Menu mobile */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background-color: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    margin-top: 1rem;
    padding: 1rem 0;
    border-radius: 0.5rem;
  }
  
  .navbar-nav {
    text-align: center;
  }
  
  .navbar-nav .nav-link {
    margin: 0.25rem 0;
    padding: 0.75rem 1rem;
  }
  
  .navbar-nav .dropdown-menu {
    position: static;
    float: none;
    width: auto;
    margin-top: 0;
    background-color: var(--bg-secondary);
    border: none;
    box-shadow: none;
    border-radius: 0.375rem;
  }
  
  /* Header elements mobile */
  .header-search .search-form-wrapper {
    position: fixed;
    top: 70px;
    left: 1rem;
    right: 1rem;
    min-width: auto;
    z-index: 1050;
  }
  
  .header-social {
    order: -1;
  }
  
  .header-social .social-links {
    gap: 0.5rem;
  }
  
  .header-social .social-links .btn {
    width: 32px;
    height: 32px;
  }
  
  .header-social .social-links .btn i {
    font-size: 0.8rem;
  }
}

/* Telas muito pequenas */
@media (max-width: 576px) {
  .header-search .search-form-wrapper {
    left: 0.5rem;
    right: 0.5rem;
  }
  
  .header-social .social-links {
    gap: 0.25rem;
  }
  
  .header-social .social-links .btn {
    width: 28px;
    height: 28px;
  }
  
  .header-social .social-links .btn i {
    font-size: 0.7rem;
  }
  
  .navbar .container {
    flex-wrap: wrap;
  }
  
  .navbar-brand {
    order: 1;
    flex: 1;
  }
  
  .header-search,
  .header-social,
  #theme-toggle {
    order: 2;
  }
  
  .navbar-toggler {
    order: 3;
  }
}

/* ==========================================================================
   Cards
   ========================================================================== */

.card {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  transition: var(--transition-base);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.card-img-top {
  overflow: hidden;
}

.card-img-top img {
  transition: var(--transition-slow);
}

.card:hover .card-img-top img {
  transform: scale(1.05);
}

.card-title a {
  color: var(--text-primary) !important;
  text-decoration: none;
}

.card-title a:hover {
  color: var(--primary-color) !important;
  text-decoration: none;
}

/* ==========================================================================
   Badges
   ========================================================================== */

.badge {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
}

.badge.bg-danger {
  background-color: var(--primary-color) !important;
}

.badge.bg-secondary {
  background-color: var(--secondary-color) !important;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  font-weight: 500;
  border-radius: 0.375rem;
  transition: var(--transition-base);
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-outline-primary {
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.form-control {
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  transition: var(--transition-base);
}

.form-control:focus {
  background-color: var(--bg-primary);
  border-color: var(--primary-color);
  color: var(--text-primary);
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control::placeholder {
  color: var(--text-muted);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */

.hero-section {
  background: var(--bg-primary);
  padding: 0.7rem 0;
  position: relative;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.15) 100%);
  z-index: 1;
}

.hero-section .container {
  position: relative;
  z-index: 2;
}

.min-vh-50 {
  min-height: 50vh;
}

.hero-title a {
  color: var(--text-primary) !important;
  text-decoration: none;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-title a:hover {
  color: var(--primary-color) !important;
  text-decoration: none;
}

.hero-excerpt {
  color: var(--text-muted);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.hero-meta {
  color: var(--text-muted);
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.hero-meta a {
  color: var(--text-muted);
  text-decoration: none;
}

.hero-meta a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

/* Hero image overlay */
.hero-image {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
}

.hero-image::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.05) 100%);
  z-index: 1;
  border-radius: 0.5rem;
}

.hero-image img {
  transition: var(--transition-slow);
}

.hero-image:hover img {
  transform: scale(1.05);
}

.hero-image:hover::before {
  background: linear-gradient(45deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.02) 100%);
}

/* ==========================================================================
   Carousel
   ========================================================================== */

.carousel {
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  margin: 1.2rem 0;
  padding: 1.2rem;
  background: var(--bg-primary);
}

.carousel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.2) 100%);
  z-index: 1;
  border-radius: 0.75rem;
}

.carousel-inner {
  position: relative;
  z-index: 2;
}

.carousel-item {
  background-color: var(--bg-primary);
  position: relative;
  padding: 2.75rem;
}

.carousel-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /*background: linear-gradient(135deg, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.15) 100%);*/
  z-index: 1;
  border-radius: 0.5rem;
}

.carousel-item .row {
  position: relative;
  z-index: 2;
  margin: 0;
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
  color: var(--text-light);
  background: rgba(0,0,0,0.3);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
}

.carousel-control-prev {
  left: 20px;
}

.carousel-control-next {
  right: 20px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  color: var(--primary-color);
  background: rgba(0,0,0,0.5);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 20px;
  height: 20px;
}

.carousel-indicators {
  bottom: 20px;
  z-index: 3;
}

.carousel-indicators [data-bs-target] {
  background-color: rgba(255,255,255,0.5);
  border-radius: 50%;
  width: 12px;
  height: 12px;
  margin: 0 4px;
  border: 2px solid rgba(255,255,255,0.3);
  transition: var(--transition-base);
}

.carousel-indicators .active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  transform: scale(1.2);
}

.carousel-indicators [data-bs-target]:hover {
  background-color: rgb(224, 138, 138);
  border-color: rgba(255,255,255,0.8);
}

/* ==========================================================================
   Breadcrumbs
   ========================================================================== */

.breadcrumb {
  background-color: transparent;
  padding: 0;
  margin-bottom: 1rem;
}

.breadcrumb-item a {
  color: var(--text-muted);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.breadcrumb-item.active {
  color: var(--text-primary);
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
  margin-bottom: 0;
}

.pagination .page-link {
  color: var(--text-primary);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-color);
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.pagination .page-link:hover {
  color: var(--primary-color);
  background-color: var(--bg-secondary);
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.pagination .page-link:focus {
  color: var(--primary-color);
  background-color: var(--bg-secondary);
  box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25);
}

.pagination .page-item.active .page-link {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: var(--text-light);
  font-weight: var(--font-weight-bold);
}

.pagination .page-item.disabled .page-link {
  color: var(--text-muted);
  background-color: var(--bg-primary);
  border-color: var(--border-color);
  opacity: 0.6;
}

.pagination .page-item:not(:first-child) .page-link {
  margin-left: -1px;
}

/* Pagination responsive */
@media (max-width: 576px) {
  .pagination .page-link {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
  }
}

/* ==========================================================================
   Comments
   ========================================================================== */

.comments-area {
  background-color: var(--bg-secondary);
  padding: 2rem;
  border-radius: 0.5rem;
  margin-top: 2rem;
}

.comment-item {
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 1rem;
}

.comment-item:last-child {
  border-bottom: none;
}

.comment-author a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
}

.comment-author a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.comment-date {
  color: var(--text-muted);
}

.comment-content {
  margin-top: 0.5rem;
  color: var(--text-primary);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background-color: var(--bg-dark) !important;
  color: var(--text-light);
}

.site-footer a {
  color: var(--text-light);
  text-decoration: none;
  transition: var(--transition-base);
}

.site-footer a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

.site-footer .text-muted {
  color: var(--text-secondary) !important;
}

.site-footer .widget-title {
  color: var(--text-light);
}

/* ==========================================================================
   Social Links
   ========================================================================== */

.social-links .btn {
  border-radius: 50%;
  width: 40px;
  height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-share .btn {
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Table of Contents
   ========================================================================== */

.table-of-contents {
  background-color: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 0.5rem;
  border-left: 4px solid var(--primary-color);
}

.table-of-contents h5 {
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.table-of-contents ul {
  margin: 0;
  padding-left: 1rem;
}

.table-of-contents li {
  margin-bottom: 0.5rem;
}

.table-of-contents a {
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition-base);
}

.table-of-contents a:hover {
  color: var(--primary-color);
  text-decoration: none;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
  .hero-section {
    padding: 2rem 0;
  }
  
  .min-vh-50 {
    min-height: 40vh;
  }
  
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
  
  .card-body {
    padding: 1rem;
  }
  
  .comments-area {
    padding: 1rem;
  }
  
  /* Hero mobile adjustments */
  .carousel {
    margin: 1rem 0;
    padding: 1rem;
  }
  
  .carousel-item {
    padding: 1rem;
  }
  
  .carousel-control-prev,
  .carousel-control-next {
    width: 40px;
    height: 40px;
  }
  
  .carousel-control-prev {
    left: 10px;
  }
  
  .carousel-control-next {
    right: 10px;
  }
  
  .carousel-indicators {
    bottom: 10px;
  }
  
  .carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    margin: 0 3px;
  }
}

@media (max-width: 576px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .hero-section {
    padding: 1.5rem 0;
  }
  
  .min-vh-50 {
    min-height: 30vh;
  }
  
  .card-title {
    font-size: 1rem;
  }
  
  .btn {
    font-size: 0.875rem;
  }
  
  /* Hero small mobile adjustments */
  .carousel {
    margin: 0.5rem 0;
    padding: 0.75rem;
  }
  
  .carousel-item {
    padding: 0.75rem;
  }
  
  .carousel-control-prev,
  .carousel-control-next {
    width: 35px;
    height: 35px;
  }
  
  .carousel-control-prev {
    left: 5px;
  }
  
  .carousel-control-next {
    right: 5px;
  }
  
  .carousel-indicators {
    bottom: 5px;
  }
  
  .carousel-indicators [data-bs-target] {
    width: 8px;
    height: 8px;
    margin: 0 2px;
  }
  
  .hero-title {
    font-size: 1.5rem;
  }
  
  .hero-excerpt {
    font-size: 0.9rem;
  }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Focus styles */
*:focus {
  /*outline: 2px solid var(--primary-color);*/
  outline-offset: 2px;
}

/* Skip link focus */
.skip-link:focus {
  outline: 2px solid var(--text-light);
  outline-offset: 2px;
}

/* Screen reader only content */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.sr-only-focusable:focus {
  position: static !important;
  width: auto !important;
  height: auto !important;
  padding: 0.5rem !important;
  margin: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
  .navbar,
  .site-footer,
  .comments-area,
  .social-share,
  .btn,
  .carousel-control-prev,
  .carousel-control-next,
  .carousel-indicators {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
    color: #000;
    background: #fff;
  }
  
  a {
    color: #000;
    text-decoration: underline;
  }
  
  .container {
    max-width: none;
    width: 100%;
  }
  
  .card {
    border: 1px solid #000;
    box-shadow: none;
  }
}

/* ==========================================================================
   Dark Mode Support with prefers-color-scheme
   ========================================================================== */

@media (prefers-color-scheme: dark) {
  :root:not(.theme-light) {
    --text-primary: #ffffff;
    --text-secondary: #adb5bd;
    --text-muted: #6c757d;
    --text-light: #ffffff;
    
    --bg-primary: #212529;
    --bg-secondary: #343a40;
    --bg-dark: #000000;
    --bg-light: #495057;
    
    --border-color: #495057;
    --border-light: #6c757d;
  }
}

/* Override prefers-color-scheme when user has explicitly chosen a theme */
.theme-light {
  --text-primary: #212529;
  --text-secondary: #6c757d;
  --text-muted: #6c757d;
  --text-light: #ffffff;
  
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-dark: #212529;
  --bg-light: #f8f9fa;
  
  --border-color: #dee2e6;
  --border-light: #e9ecef;
}

.theme-dark {
  --text-primary: #ffffff;
  --text-secondary: #adb5bd;
  --text-muted: #6c757d;
  --text-light: #ffffff;
  
  --bg-primary: #212529;
  --bg-secondary: #343a40;
  --bg-dark: #000000;
  --bg-light: #495057;
  
  --border-color: #495057;
  --border-light: #6c757d;
}

/* Override Bootstrap text-dark class in dark mode */
.theme-dark .text-dark,
.theme-dark .text-dark:hover,
.theme-dark .text-dark:focus {
  color: var(--text-primary) !important;
}

/* Override any text color classes in dark mode */
.theme-dark .navbar-nav .nav-link,
.theme-dark .card-title,
.theme-dark .hero-title,
.theme-dark .section-title {
  color: var(--text-primary) !important;
}

.theme-dark .navbar-nav .nav-link:hover,
.theme-dark .card-title:hover,
.theme-dark .hero-title:hover {
  color: var(--primary-color) !important;
}



/* Dark mode hero adjustments */
.theme-dark .hero-section::before {
  background: linear-gradient(135deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.25) 100%);
}

.theme-dark .carousel::before {
  background: linear-gradient(135deg, rgba(0,0,0,0.2) 0%, rgba(0,0,0,0.3) 100%);
}

.theme-dark .carousel-item::before {
  background: linear-gradient(135deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.2) 100%);
}

.theme-dark .hero-image::before {
  background: linear-gradient(45deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.1) 100%);
}

.theme-dark .hero-image:hover::before {
  background: linear-gradient(45deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.05) 100%);
}

/* Dark mode text color overrides */
.theme-dark .text-dark {
  color: var(--text-primary) !important;
}

.theme-dark .hero-title a,
.theme-dark .card-title a,
.theme-dark h1,
.theme-dark h2,
.theme-dark h3,
.theme-dark h4,
.theme-dark h5,
.theme-dark h6 {
  color: var(--text-primary) !important;
}

.theme-dark .hero-title a:hover,
.theme-dark .card-title a:hover {
  color: var(--primary-color) !important;
}

/* Reading Progress Bar */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent-color);
  z-index: 9999;
  transition: width 0.1s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Dark mode support for reading progress */
.theme-dark #reading-progress {
  background: var(--accent-color);
  box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}

/* Back to Top Button */
#back-to-top {
  transition: all 0.3s ease;
  opacity: 0.8;
}

#back-to-top:hover {
  opacity: 1;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.4) !important;
}

#back-to-top:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Table of Contents Links */
.toc-link {
  transition: color 0.2s ease;
}

.toc-link:hover {
  color: var(--primary-color) !important;
}

/* Smooth scroll behavior */
html {
  scroll-behavior: smooth;
}

/* Remover outline de links de títulos */
h1 a:focus,
h2 a:focus,
h3 a:focus,
h4 a:focus,
h5 a:focus,
h6 a:focus,
.entry-title a:focus,
.card-title a:focus,
.hero-title a:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Manter acessibilidade com hover */
h1 a:hover,
h2 a:hover,
h3 a:hover,
h4 a:hover,
h5 a:hover,
h6 a:hover,
.entry-title a:hover,
.card-title a:hover,
.hero-title a:hover {
  text-decoration: none;
}

/* Remover outline de todos os links de títulos */
a:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Manter outline apenas para elementos de navegação importantes */
.nav-link:focus,
.btn:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--primary-color) !important;
  outline-offset: 2px !important;
}

/* Header Search Desktop - Efeito de Deslizamento Fluido */
.header-right-elements {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-search-container {
  position: relative;
  display: flex;
  align-items: center;
  height: 38px; /* Altura fixa do botão */
}

/* Botão de busca fixo */
.search-toggle {
  position: relative;
  z-index: 30;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.search-toggle:hover {
  transform: scale(1.05);
}

.search-toggle.active {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

/* Container do input que desliza */
.search-form-slide {
  position: absolute;
  top: 0;
  left: 100%;
  width: 0;
  height: 38px;
  overflow: hidden;
  background: white;
  /*border: 1px solid var(--border-color);*/
  border-radius: 0.375rem;
 /* box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);*/
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 20;
  opacity: 0;
  transform: translateX(-10px);
}

.search-form-slide.active {
  width: 250px;
  opacity: 1;
  transform: translateX(0);
  margin-left: 8px; /* Espaço entre o botão e o input */
}

.search-form-wrapper {
  padding: 0 15px;
  height: 100%;
  display: flex;
  align-items: center;
  min-width: 220px;
}

.search-form-wrapper .search-field {
  border: none;
  border-bottom: 2px solid var(--primary-color);
  border-radius: 0;
  padding: 8px 0;
  font-size: 14px;
  background: transparent;
  outline: none;
  transition: border-color 0.3s ease;
  width: 100%;
  height: 100%;
}

.search-form-wrapper .search-field:focus {
  border-bottom-color: var(--accent-color);
  box-shadow: none;
}

.search-form-wrapper .search-submit {
  display: none;
}

/* Efeito de push nos elementos da direita */
.header-right-elements.search-open .header-social,
.header-right-elements.search-open #theme-toggle {
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: translateX(258px); /* 250px + 8px de margem */
  opacity: 0.8;
}

/* Animação suave para todos os elementos */
.header-right-elements .header-social,
.header-right-elements #theme-toggle {
  transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Responsividade para telas médias */
@media (max-width: 1199.98px) {
  .search-form-slide.active {
    width: 200px; /* Menor em telas médias */
  }
  
  .header-right-elements.search-open .header-social,
  .header-right-elements.search-open #theme-toggle {
    transform: translateX(208px); /* Ajustar para largura menor */
  }
}

/* Header Search Mobile */
@media (max-width: 991.98px) {
  .header-search-container {
    position: static;
  }
  
  .search-form-slide {
    position: static;
    width: 100%;
    opacity: 1;
    transform: none;
    border: none;
    box-shadow: none;
    background: transparent;
    margin-left: 0;
    height: auto;
  }
  
  .search-form-wrapper {
    padding: 0;
    min-width: auto;
    height: auto;
  }
  
  .search-form-wrapper .search-field {
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    padding: 10px 15px;
    background: white;
    height: auto;
  }
  
  /* Resetar transformações no mobile */
  .header-right-elements.search-open .header-social,
  .header-right-elements.search-open #theme-toggle {
    transform: none;
    opacity: 1;
  }
}

/* Redes sociais - esconder no mobile */
@media (max-width: 991.98px) {
  .header-social {
    display: none !important;
  }
}

/* Dark mode support for search */
.theme-dark .search-form-slide {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

.theme-dark .search-form-wrapper .search-field {
  background: transparent;
  color: var(--text-primary);
  border-bottom-color: var(--primary-color);
}

.theme-dark .search-form-wrapper .search-field:focus {
  border-bottom-color: var(--accent-color);
}

.theme-dark .search-form-wrapper .search-field::placeholder {
  color: var(--text-muted);
}

/* Melhorias no efeito de push */
.header-right-elements.search-open .header-social,
.header-right-elements.search-open #theme-toggle {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ajuste para o container do navbar */
.navbar .container {
  position: relative;
  overflow: visible;
}

/* Estilos para Anúncios */
.ad-banner {
  text-align: center;
  margin: 2rem 0;
}

.ad-container {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
}

.ad-container img {
  max-width: 100%;
  height: auto;
  border-radius: 0.375rem;
}

/* Anúncios específicos */
.ad-home-top-banner {
  margin-top: 0;
  margin-bottom: 3rem;
}

.ad-home-middle-banner,
.ad-archive-middle-banner {
  background: var(--bg-light);
  padding: 2rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
}

.ad-archive-top-banner {
  margin-bottom: 2rem;
}

/* Responsividade para anúncios */
@media (max-width: 768px) {
  .ad-banner {
    margin: 1.5rem 0;
  }
  
  .ad-home-middle-banner,
  .ad-archive-middle-banner {
    padding: 1rem;
  }
}

/* Dark mode para anúncios */
.theme-dark .ad-home-middle-banner,
.theme-dark .ad-archive-middle-banner {
  background: var(--bg-secondary);
  border-color: var(--border-color);
}

/* Estilos para anúncios com shortcodes */
.ad-container iframe {
  max-width: 100%;
  border: none;
  border-radius: 0.375rem;
}

.ad-container .adsbygoogle {
  display: block;
  text-align: center;
}

.ad-container .ad-inserter {
  text-align: center;
}

/* Responsividade para anúncios de shortcodes */
@media (max-width: 768px) {
  .ad-container iframe {
    width: 100%;
    height: auto;
    min-height: 250px;
  }
}

.post-content p {
  margin-bottom: 2rem;
  text-align: justify;
}