/**
 * DashMaster — Mobile Responsiveness Overrides
 * Centralizes all mobile-first responsive adjustments
 *
 * @package DashMaster
 */

/* ============================================================
   FOOTER SIDEBAR OFF-CANVAS (Mobile Navigation)
   ============================================================ */

/* --- Sidebar Overlay --- */
.dm-sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99998;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

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

/* --- Sidebar Panel --- */
.dm-footer-sidebar {
  position: fixed;
  top: 0;
  right: -320px;
  width: 300px;
  max-width: 85vw;
  height: 100%;
  background: linear-gradient(180deg, #1a0f4e 0%, #291584 40%, #1e1067 100%);
  z-index: 99999;
  overflow-y: auto;
  transition: right 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  box-shadow: -8px 0 30px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
}

.dm-footer-sidebar.open {
  right: 0;
}

/* --- Sidebar Header --- */
.dm-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 24px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dm-sidebar-logo {
  max-width: 160px;
  height: auto;
  filter: brightness(0) invert(1);
}

.dm-sidebar-close {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.dm-sidebar-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* --- Sidebar Navigation --- */
.dm-sidebar-nav {
  padding: 20px 0;
  flex: 1;
}

.dm-sidebar-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.dm-sidebar-nav li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.dm-sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 28px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  position: relative;
}

.dm-sidebar-nav li a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(108, 99, 255, 0.3), transparent);
  transition: width 0.3s ease;
}

.dm-sidebar-nav li a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.dm-sidebar-nav li a:hover::before {
  width: 100%;
}

.dm-sidebar-nav li a i {
  font-size: 18px;
  width: 22px;
  text-align: center;
  color: rgba(108, 99, 255, 0.9);
}

.dm-sidebar-nav li.dm-sidebar-cta a {
  margin: 10px 20px;
  padding: 12px 20px;
  background: linear-gradient(135deg, #6c63ff, #4834d4);
  border-radius: 10px;
  color: #fff;
  font-weight: 600;
  justify-content: center;
  text-align: center;
}

.dm-sidebar-nav li.dm-sidebar-cta a::before {
  display: none;
}

.dm-sidebar-nav li.dm-sidebar-cta a:hover {
  box-shadow: 0 6px 25px rgba(108, 99, 255, 0.5);
  transform: translateY(-1px);
}

/* --- Sidebar Social --- */
.dm-sidebar-social {
  padding: 20px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dm-sidebar-social-title {
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  font-weight: 600;
}

.dm-sidebar-social-links {
  display: flex;
  gap: 12px;
}

.dm-sidebar-social-links a {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  text-decoration: none;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.dm-sidebar-social-links a:hover {
  background: rgba(108, 99, 255, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.4);
}

/* --- Sidebar Legal --- */
.dm-sidebar-legal {
  padding: 16px 28px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dm-sidebar-legal a {
  color: rgba(255, 255, 255, 0.4);
  text-decoration: none;
  font-size: 12px;
  transition: color 0.3s;
}

.dm-sidebar-legal a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.dm-sidebar-legal span {
  color: rgba(255, 255, 255, 0.2);
  margin: 0 6px;
}

/* --- FAB Hamburger Button --- */
.dm-footer-fab {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 24px;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #6c63ff 0%, #4834d4 100%);
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  z-index: 9990;
  box-shadow: 0 6px 25px rgba(108, 99, 255, 0.5);
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
}

.dm-footer-fab:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 35px rgba(108, 99, 255, 0.6);
}

.dm-footer-fab .dm-fab-icon {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}

.dm-footer-fab .dm-fab-icon span {
  display: block;
  width: 22px;
  height: 2.5px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.dm-footer-fab .dm-fab-icon span:nth-child(2) {
  width: 16px;
}

/* Hide sidebar on desktop */
@media (min-width: 992px) {
  .dm-footer-sidebar,
  .dm-sidebar-overlay,
  .dm-footer-fab {
    display: none !important;
  }
}

/* Show FAB on mobile/tablet */
@media (max-width: 991px) {
  .dm-footer-fab {
    display: flex !important;
  }

  .dm-footer-sidebar {
    display: flex !important;
  }
}


/* ============================================================
   HEADER — HIDE NAVBAR MENU ON MOBILE (use FAB sidebar instead)
   ============================================================ */
@media (max-width: 991px) {
  /* Hide the Bootstrap hamburger toggler */
  .navbar-toggler {
    display: none !important;
  }

  /* Hide the collapsible nav menu */
  .navbar-collapse {
    display: none !important;
  }

  /* Keep the navbar clean — just the logo */
  .navbar {
    padding: 15px 0;
    justify-content: center;
  }

  .navbar-brand {
    margin: 0 auto;
  }

  .navbar-brand img {
    max-height: 40px;
    width: auto;
  }

  /* Reduce header shadow for cleaner look */
  .header_navbar {
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.06);
  }
}

/* ============================================================
   FOOTER — MOBILE LAYOUT IMPROVEMENTS
   ============================================================ */
@media (max-width: 767px) {
  .footer_area {
    padding: 50px 0 40px;
  }

  .footer_subscribe .subscribe_title {
    font-size: 24px;
    line-height: 1.3;
  }

  .footer_subscribe p {
    font-size: 14px;
    line-height: 1.6;
  }

  .subscribe_form {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .subscribe_form input {
    height: 50px;
    padding: 0 20px;
    font-size: 14px;
    border-radius: 8px;
    width: 100%;
  }

  .subscribe_form .main-btn {
    position: static;
    width: 100%;
    height: 48px;
    line-height: 48px;
    font-size: 15px;
    border-radius: 8px;
  }

  .footer_social {
    margin-top: 30px !important;
  }

  .footer_social ul {
    display: flex;
    justify-content: center;
    gap: 12px;
  }

  .footer_social ul li {
    margin: 0;
  }

  .footer_social ul li a {
    width: 42px;
    height: 42px;
    line-height: 38px;
    font-size: 16px;
  }

  .footer_copyright {
    margin-top: 30px !important;
  }

  .footer_copyright p {
    font-size: 13px;
    line-height: 1.6;
  }

  /* Extra bottom padding for FAB button */
  .footer_area {
    padding-bottom: 90px;
  }
}


/* ============================================================
   COURSES LISTING PAGE — MOBILE
   ============================================================ */
@media (max-width: 767px) {
  /* Hero */
  .cursos_hero {
    padding: 120px 0 50px;
  }

  .cursos_hero_content h1 {
    font-size: 26px;
    line-height: 1.3;
  }

  .cursos_hero_content h1 i {
    display: block;
    margin-bottom: 8px;
    font-size: 32px;
  }

  .cursos_hero_content p {
    font-size: 15px;
    line-height: 1.6;
  }

  /* Filters — horizontal scroll */
  .cursos_filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    gap: 8px;
    margin-bottom: 30px;
    padding-bottom: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .cursos_filter::-webkit-scrollbar {
    display: none;
  }

  .cursos_filter_btn {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 10px 16px;
    font-size: 13px;
    border-radius: 20px;
  }

  /* Grid */
  .cursos_grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .curso_grid_item .course_card {
    border-radius: 16px;
  }

  .curso_grid_item .course_card_image {
    height: 160px;
  }

  .curso_grid_item .course_card_content {
    padding: 20px;
  }

  .curso_grid_item .course_card_title {
    font-size: 18px;
  }

  .curso_grid_item .course_card_description {
    font-size: 13px;
    margin-bottom: 16px;
  }

  .curso_grid_item .course_card_footer {
    flex-direction: row;
    align-items: center;
    padding-top: 16px;
  }

  .curso_grid_item .course_price {
    font-size: 20px;
  }

  .curso_grid_item .course_btn {
    padding: 10px 20px;
    font-size: 13px;
  }

  /* Counter */
  .cursos_counter {
    margin-top: 30px;
    padding: 12px 20px;
    font-size: 14px;
    border-radius: 20px;
  }

  /* Listing area */
  .cursos_listing_area {
    padding: 50px 0;
  }

  /* CTA */
  .cursos_cta {
    padding: 50px 0;
  }

  .cursos_cta h2 {
    font-size: 22px;
    line-height: 1.3;
  }

  .cursos_cta p {
    font-size: 15px;
  }

  .cursos_cta .main-btn {
    font-size: 14px;
    padding: 0 20px;
  }
}


/* ============================================================
   SINGLE COURSE PAGE (page-curso.php) — MOBILE
   ============================================================ */
@media (max-width: 767px) {
  /* Override inline padding-top */
  .blog-post-container[style*="padding-top"] {
    padding-top: 80px !important;
  }

  /* Course content overflow prevention */
  main.blog-post-container {
    overflow-x: hidden;
    padding-left: 0;
    padding-right: 0;
  }

  main.blog-post-container > * {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Course embedded content */
  main.blog-post-container img,
  main.blog-post-container table,
  main.blog-post-container iframe,
  main.blog-post-container video,
  main.blog-post-container pre {
    max-width: 100% !important;
    height: auto !important;
  }

  main.blog-post-container table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* ---- Course Header / Hero ---- */
  .curso-header {
    height: 220px !important;
    padding: 0 1rem !important;
    background-attachment: scroll !important;
  }

  .curso-header h1 {
    font-size: 1.6rem !important;
    line-height: 1.3 !important;
  }

  /* ---- Guia Container ---- */
  .guia-container {
    padding: 0 12px !important;
    margin: 1rem auto !important;
  }

  .guia-container > h1 {
    font-size: 1.5rem !important;
    margin-top: 1rem !important;
  }

  /* ---- Icon Menu (Category Buttons) ---- */
  .icon-menu {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
    flex-wrap: wrap !important;
    max-width: 100% !important;
  }

  .icon-button {
    max-width: none !important;
    flex: none !important;
    padding: 0.6rem 0.5rem !important;
    font-size: 0.75rem !important;
    border-radius: 8px !important;
    min-height: 60px;
  }

  .icon-button-icon {
    font-size: 1.3rem !important;
    width: 26px !important;
    height: 26px !important;
  }

  .icon-button-img {
    width: 22px !important;
    height: 22px !important;
  }

  /* ---- Section Buttons (Subsection Tabs) ---- */
  .button-grid {
    flex-wrap: wrap !important;
    gap: 0.4rem !important;
    justify-content: flex-start !important;
  }

  .section-button {
    padding: 0.5rem 0.7rem !important;
    font-size: 0.75rem !important;
    border-radius: 6px !important;
  }

  /* ---- Content Sections ---- */
  .content-section {
    padding: 1rem !important;
    margin-top: 1rem !important;
    border-radius: 8px !important;
  }

  .section-header h2 {
    font-size: 1.3rem !important;
  }

  /* ---- Subsections ---- */
  .subsection {
    padding: 1rem !important;
    border-radius: 8px !important;
    margin-top: 0.8rem !important;
  }

  .subsection h3 {
    font-size: 1.1rem !important;
    padding-bottom: 0.4rem !important;
  }

  .subsection h4 {
    font-size: 1rem !important;
    margin-top: 1rem !important;
  }

  .subsection p {
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
  }

  .subsection ul {
    padding-left: 1.2rem !important;
  }

  .subsection li {
    font-size: 0.9rem !important;
    margin-bottom: 0.6rem !important;
  }

  /* ---- SEO Introduction ---- */
  .seo-introduction {
    padding: 1rem !important;
    border-radius: 10px !important;
    margin-bottom: 1.5rem !important;
  }

  .seo-introduction h2 {
    font-size: 1.3rem !important;
    line-height: 1.3 !important;
  }

  .seo-introduction h3 {
    font-size: 1.1rem !important;
  }

  .seo-introduction p {
    font-size: 0.9rem !important;
  }

  /* ---- Highlight Box ---- */
  .highlight-box {
    padding: 0.8rem !important;
    margin: 0.8rem 0 !important;
    font-size: 0.9rem !important;
  }

  /* ---- Course CTA Section ---- */
  .cta-section {
    padding: 40px 0 100px !important;
  }

  .cta-section h2 {
    font-size: 22px !important;
    line-height: 1.3 !important;
  }

  .cta-section p {
    font-size: 15px !important;
    margin-bottom: 20px !important;
  }

  .cta-section .btn {
    font-size: 14px;
    padding: 12px 24px !important;
    height: auto !important;
    line-height: 1.4 !important;
    border-radius: 8px;
  }
}

/* ---- Tablet adjustments for courses ---- */
@media (min-width: 768px) and (max-width: 991px) {
  .curso-header {
    height: 300px;
    background-attachment: scroll !important;
  }

  .curso-header h1 {
    font-size: 2.2rem;
  }

  .icon-menu {
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .icon-button {
    max-width: none;
    flex: 0 1 auto;
  }

  .guia-container {
    padding: 0 1rem;
  }
}


/* ============================================================
   COURSES LISTING PAGE (page-cursos.php) — MOBILE ENHANCED
   ============================================================ */
@media (max-width: 767px) {
  /* Hero */
  .cursos_hero {
    padding: 110px 0 45px !important;
  }

  .cursos_hero_content h1 {
    font-size: 24px !important;
    line-height: 1.3 !important;
  }

  .cursos_hero_content h1 i {
    display: block !important;
    margin-bottom: 8px !important;
    margin-right: 0 !important;
    font-size: 28px !important;
  }

  .cursos_hero_content p {
    font-size: 14px !important;
    line-height: 1.6 !important;
  }

  .cursos_hero .breadcrumb_nav {
    margin-top: 14px;
    font-size: 13px;
  }

  /* Filters — horizontal scroll */
  .cursos_filter {
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start !important;
    gap: 8px !important;
    margin-bottom: 30px !important;
    padding-bottom: 10px;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .cursos_filter::-webkit-scrollbar {
    display: none;
  }

  .cursos_filter_btn {
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 10px 16px !important;
    font-size: 13px !important;
    border-radius: 20px !important;
  }

  /* Grid — single column */
  .cursos_grid {
    grid-template-columns: 1fr !important;
    gap: 18px !important;
  }

  /* Cards */
  .course_card {
    border-radius: 14px !important;
  }

  .course_card_image {
    height: 150px !important;
  }

  .course_card_content {
    padding: 18px !important;
  }

  .course_card_category {
    font-size: 11px !important;
    margin-bottom: 6px !important;
  }

  .course_card_title {
    font-size: 17px !important;
    margin-bottom: 10px !important;
  }

  .course_meta {
    gap: 10px !important;
    margin-bottom: 10px !important;
    font-size: 12px !important;
  }

  .course_card_description {
    font-size: 13px !important;
    margin-bottom: 14px !important;
    line-height: 1.6 !important;
  }

  .course_card_footer {
    padding-top: 14px !important;
    flex-direction: row !important;
    align-items: center !important;
  }

  .course_price {
    font-size: 20px !important;
  }

  .course_btn {
    padding: 10px 18px !important;
    font-size: 13px !important;
    border-radius: 20px !important;
  }

  /* Counter */
  .cursos_counter {
    margin-top: 24px !important;
    padding: 12px 18px !important;
    font-size: 14px !important;
    border-radius: 20px !important;
  }

  /* Listing area */
  .cursos_listing_area {
    padding: 40px 0 !important;
  }

  /* CTA — extra bottom padding to clear FAB */
  .cursos_cta {
    padding: 45px 0 100px !important;
  }

  .cursos_cta h2 {
    font-size: 22px !important;
    line-height: 1.3 !important;
  }

  .cursos_cta p {
    font-size: 14px !important;
    margin-bottom: 20px !important;
  }

  .cursos_cta .main-btn {
    font-size: 14px !important;
    padding: 0 20px !important;
  }

  /* Empty state */
  .cursos_empty {
    padding: 40px 16px !important;
  }

  .cursos_empty h3 {
    font-size: 20px !important;
  }

  .cursos_empty p {
    font-size: 14px !important;
  }
}


/* ============================================================
   BLOG INDEX — MOBILE
   ============================================================ */
@media (max-width: 767px) {
  /* Hero */
  .blog_hero {
    padding: 120px 0 50px;
  }

  .blog_hero_content h1 {
    font-size: 26px;
    line-height: 1.3;
  }

  .blog_hero_content p {
    font-size: 15px;
    line-height: 1.6;
  }

  /* Featured Post */
  .featured_post {
    border-radius: 16px;
    margin-bottom: 30px;
  }

  .featured_post .row {
    flex-direction: column;
  }

  .featured_post_image {
    height: 200px;
  }

  .featured_post_content {
    padding: 24px 20px;
  }

  .featured_post_content h2 {
    font-size: 20px;
    margin-bottom: 12px;
  }

  .featured_badge {
    padding: 6px 16px;
    font-size: 11px;
    margin-bottom: 14px;
  }

  .blog_card_excerpt {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 14px;
  }

  .blog_card_meta {
    gap: 14px;
    margin-bottom: 12px;
    font-size: 13px;
  }

  /* Blog Cards */
  .blog_grid_area .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .blog_card {
    border-radius: 16px;
    margin-bottom: 20px;
  }

  .blog_card_image {
    height: 180px;
  }

  .blog_card_content {
    padding: 20px;
  }

  .blog_card_title {
    font-size: 18px;
    margin-bottom: 10px;
  }

  /* Sidebar below content */
  .blog_grid_area .col-lg-4 {
    margin-top: 30px;
  }

  .blog_sidebar {
    position: static;
  }

  .sidebar_widget {
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
  }

  .sidebar_widget_title {
    font-size: 18px;
    margin-bottom: 18px;
    padding-bottom: 12px;
  }

  /* Pagination */
  .blog_pagination {
    gap: 8px;
    flex-wrap: wrap;
  }

  .blog_pagination a,
  .blog_pagination span {
    width: 40px;
    height: 40px;
    font-size: 14px;
    border-radius: 8px;
  }

  /* Blog Grid */
  .blog_grid_area {
    padding: 50px 0;
  }

  /* Courses section on blog page */
  .courses_section {
    padding: 50px 0;
  }

  .courses_section .section_title h2 {
    font-size: 26px;
  }

  .courses_section .section_title p {
    font-size: 14px;
  }

  .courses_carousel_wrapper {
    padding: 0 35px;
  }

  .carousel_arrow {
    width: 34px;
    height: 34px;
    font-size: 14px;
  }
}


/* ============================================================
   BLOG SINGLE / ARTICLES — MOBILE
   ============================================================ */
@media (max-width: 767px) {
  /* Header */
  .blog-header {
    padding: 110px 0 40px;
    margin-bottom: 30px;
  }

  .blog-title {
    font-size: 26px !important;
    line-height: 1.3;
  }

  .blog-header-content p {
    font-size: 14px;
    line-height: 1.6;
  }

  .blog-meta {
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
    margin-top: 18px;
  }

  /* Article Content */
  .blog-content {
    padding: 24px 18px;
    border-radius: 14px;
    margin-bottom: 30px;
  }

  .article-body {
    font-size: 15px;
    line-height: 1.75;
  }

  .article-body h2 {
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 16px;
  }

  .article-body h3 {
    font-size: 19px;
    margin-top: 24px;
    margin-bottom: 14px;
  }

  .article-body h4 {
    font-size: 17px;
  }

  .article-body img {
    border-radius: 10px;
  }

  /* Featured image */
  .article-featured-image {
    margin-bottom: 24px;
    border-radius: 10px;
  }

  /* Elements grid */
  .elements-grid,
  .trends-grid,
  .resources-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 24px 0;
  }

  .element-card,
  .trend-card,
  .resource-card {
    padding: 22px;
    border-radius: 12px;
  }

  /* Boxes */
  .intro-box,
  .conversion-tip,
  .guide-box,
  .trend-highlight,
  .tip-box {
    padding: 18px;
    margin: 20px 0;
  }

  .checklist-container {
    padding: 18px;
    border-radius: 10px;
  }

  /* Stats */
  .conversion-stat,
  .stat-box {
    padding: 18px;
    margin: 16px 0;
    border-radius: 10px;
  }

  .stat-number {
    font-size: 30px;
  }

  /* A/B testing */
  .ab-testing {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Code snippet */
  .code-snippet {
    padding: 14px;
    font-size: 12px;
    border-radius: 10px;
  }

  /* Share + Tags */
  .article-footer {
    padding-top: 24px;
    margin-top: 30px;
  }

  .tags {
    gap: 8px;
    margin-bottom: 20px;
  }

  .tag {
    padding: 6px 14px;
    font-size: 13px;
  }

  .share-article {
    margin-bottom: 24px;
    padding-bottom: 24px;
  }

  .share-article h4 {
    font-size: 18px;
  }

  /* Author bio */
  .author-bio {
    flex-direction: column;
    text-align: center;
    padding: 20px;
    gap: 16px;
    border-radius: 14px;
    margin: 24px 0;
  }

  .author-avatar {
    width: 80px;
    height: 80px;
  }

  .author-info h4 {
    font-size: 18px;
    margin-bottom: 8px;
  }

  .author-info p {
    font-size: 14px;
  }

  /* Related Posts */
  .related-posts {
    margin-top: 40px !important;
    margin-bottom: 30px !important;
  }

  .related-posts h2 {
    font-size: 22px !important;
    margin-bottom: 24px !important;
  }

  .related-posts .col-md-4 {
    flex: 0 0 100%;
    max-width: 100%;
    margin-bottom: 20px !important;
  }

  .related-posts .col-md-4 > div {
    border-radius: 14px !important;
  }

  .related-posts .col-md-4 > div > div:first-child {
    height: 160px !important;
  }

  /* Buttons */
  .btn {
    padding: 0 18px;
    height: 46px;
    line-height: 46px;
    font-size: 14px;
    border-radius: 8px;
  }
}


/* ============================================================
   ARCHIVE PAGE — MOBILE
   ============================================================ */
@media (max-width: 767px) {
  /* Archive Hero */
  section[style*="padding: 160px"] {
    padding: 120px 0 50px !important;
  }

  section[style*="padding: 160px"] h1 {
    font-size: 28px !important;
  }

  section[style*="padding: 160px"] p {
    font-size: 14px !important;
  }

  /* Archive Cards */
  section[style*="padding: 60px 0 80px"] .col-md-6 {
    flex: 0 0 100%;
    max-width: 100%;
  }

  section[style*="padding: 60px 0 80px"] .col-md-6 > div {
    border-radius: 16px !important;
  }

  /* Archive Sidebar */
  section[style*="padding: 60px 0 80px"] .col-lg-4 {
    margin-top: 30px;
  }

  /* Archive pagination */
  section[style*="padding: 60px 0 80px"] [style*="display: flex; justify-content: center"] {
    flex-wrap: wrap;
    gap: 8px;
  }
}


/* ============================================================
   GLOBAL MOBILE — CONTENT OVERFLOW PREVENTION
   ============================================================ */
@media (max-width: 767px) {
  body {
    overflow-x: hidden;
  }

  .container {
    padding-left: 16px;
    padding-right: 16px;
  }

  /* Ensure images never exceed viewport */
  img {
    max-width: 100%;
    height: auto;
  }

  /* Ensure tables scroll horizontally */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Ensure iframes responsive */
  iframe {
    max-width: 100%;
  }

  /* Breadcrumb mobile */
  .breadcrumb_nav {
    font-size: 14px;
  }

  .breadcrumb_nav a,
  .breadcrumb_nav span {
    font-size: 14px;
  }
}

/* ============================================================
   TABLET ADJUSTMENTS (768px - 991px)
   ============================================================ */
@media (min-width: 768px) and (max-width: 991px) {
  /* Footer */
  .footer_area {
    padding-bottom: 80px;
  }

  .subscribe_form {
    display: flex;
    flex-direction: row;
  }

  .subscribe_form .main-btn {
    position: absolute;
    top: 5px;
    right: 5px;
  }

  /* Courses filters */
  .cursos_filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    justify-content: flex-start;
    scrollbar-width: none;
    padding-bottom: 10px;
  }

  .cursos_filter::-webkit-scrollbar {
    display: none;
  }

  .cursos_filter_btn {
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Blog featured post */
  .featured_post_image {
    height: 250px;
  }

  .featured_post_content {
    padding: 25px;
  }

  /* Blog sidebar below content on tablet */
  .blog_sidebar {
    position: static;
  }
}
