/* ================================================================
   THIRSTYBEAR - Responsive Breakpoints
   All media queries for blog, archive, single, page, 404, components
   ================================================================ */

/* ================================================================
   < 1200px - Minor layout adjustments
   ================================================================ */
@media (max-width: 1200px) {
  .tb-post-card--featured .tb-post-card__body {
    padding: 32px;
  }

  .single .inside-article .entry-content {
    padding: 40px 32px;
  }

  .page .inside-article .entry-content {
    padding: 0 32px 60px;
  }
}

/* ================================================================
   < 992px - Sidebar stacks, featured card unstacks, nav collapses
   ================================================================ */
@media (max-width: 992px) {
  /* Layout: sidebar stacks below content */
  .site-content .content-area,
  .is-right-sidebar {
    width: 100% !important;
  }

  .widget-area .inside-right-sidebar {
    position: static;
  }

  /* Homepage modules */
  .tb-modules-grid {
    grid-template-columns: 1fr;
  }

  .tb-module {
    min-height: 300px;
  }

  .tb-module--featured-image {
    min-height: 300px;
  }

  .tb-module--follow {
    min-height: 300px;
  }

  /* Featured post card unstacks */
  .tb-post-card--featured {
    grid-template-columns: 1fr;
  }

  .tb-post-card--featured .tb-post-card__image {
    min-height: 280px;
  }

  .tb-post-card--featured .tb-post-card__body {
    padding: 32px;
  }

  /* Blog preview grid */
  .tb-blog-preview__posts {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Related posts: 2 columns */
  .tb-related-posts__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Nav logo smaller */
  .tb-nav-logo__img {
    height: 60px;
  }

  /* Author bio stacks */
  .tb-author-bio {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* Top bar links shrink */
  .tb-top-bar__menu {
    gap: 16px;
  }

  .tb-top-bar__menu a {
    font-size: 11px;
  }

  /* Single post: post nav stacks */
  .post-navigation .nav-links {
    grid-template-columns: 1fr;
  }

  .tb-post-nav {
    grid-template-columns: 1fr;
  }

  /* Comments: reduce nested indent */
  .comments-area .children {
    margin-left: 32px;
  }

  /* Footer stacks */
  .site-footer .footer__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .site-footer .footer__contact {
    text-align: center;
  }

  .site-footer .footer__links {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Nav wraps */
  .main-navigation .main-nav > ul {
    flex-wrap: wrap;
    justify-content: center;
  }
}

/* ================================================================
   < 768px - Mobile: single column, smaller fonts, stacked buttons
   ================================================================ */
@media (max-width: 768px) {
  /* Site container padding */
  .site.grid-container,
  .site.grid-container.container {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  /* Top bar: hide links, center social */
  .tb-top-bar__menu {
    display: none;
  }

  .tb-top-bar__social-menu {
    margin: 0 auto;
  }

  /* Nav links smaller */
  .main-navigation .main-nav > ul > li > a {
    padding: 14px 16px !important;
    font-size: 12px !important;
  }

  /* Homepage hero */
  .tb-hero {
    min-height: 70vh;
  }

  .tb-hero__title {
    font-size: 1.8rem !important;
  }

  .tb-hero__buttons {
    flex-direction: column;
    align-items: center;
  }

  .tb-hero__buttons .brush-btn {
    width: 100%;
    max-width: 280px;
    text-align: center;
  }

  .tb-hero__scroll-indicator {
    display: none;
  }

  /* Primary sections */
  .tb-primary-section {
    min-height: 40vh;
  }

  .tb-primary-section__heading {
    font-size: 1.5rem !important;
  }

  /* Blog preview */
  .tb-blog-preview__posts {
    grid-template-columns: 1fr;
  }

  .tb-blog-preview {
    padding: 48px 0;
  }

  /* Related posts: single column */
  .tb-related-posts__grid {
    grid-template-columns: 1fr;
  }

  /* Newsletter stacks */
  .tb-newsletter-bar form {
    flex-direction: column;
  }

  /* Single post adjustments */
  .single .post-image {
    height: 40vh;
    min-height: 280px;
  }

  .single .inside-article .entry-header {
    padding: 24px 20px 12px;
    margin-top: -40px;
  }

  .single .entry-title {
    font-size: 1.5rem !important;
  }

  .single .entry-header .entry-meta {
    flex-wrap: wrap;
    gap: 8px;
    font-size: 11px;
  }

  .single .inside-article .entry-content {
    padding: 28px 20px;
  }

  .single .inside-article footer.entry-meta {
    padding: 16px 20px;
  }

  .single .comments-area {
    padding: 28px 20px;
  }

  /* Comment form: single column */
  .comments-area .comment-form-author,
  .comments-area .comment-form-email {
    display: block;
    width: 100%;
    margin-right: 0;
  }

  /* Archive page header */
  .archive .page-header,
  .search .page-header {
    padding: 36px 24px;
  }

  /* Page layout */
  .page .inside-article .entry-header {
    padding: 40px 24px 0;
  }

  .page .entry-title {
    font-size: 1.8rem !important;
  }

  .page .inside-article .entry-content {
    padding: 0 24px 60px;
  }

  .page .entry-content h2 {
    font-size: 1.3rem;
  }

  /* 404 page */
  .error404 .inside-article {
    padding: 60px 24px;
    min-height: 55vh;
  }

  .error404 .tb-404-number {
    font-size: 7rem;
  }

  .error404 .entry-title {
    font-size: 1.3rem !important;
  }

  .error404 .tb-popular-links__list {
    gap: 12px;
  }

  /* Footer: single column links */
  .site-footer .footer__links {
    grid-template-columns: 1fr;
  }
}

/* ================================================================
   < 480px - Tight mobile: reduced padding, minimal
   ================================================================ */
@media (max-width: 480px) {
  /* Homepage */
  .tb-hero {
    min-height: 60vh;
  }

  .tb-hero__title {
    font-size: 1.4rem !important;
  }

  .tb-hero__content {
    padding: 32px 16px;
  }

  .tb-primary-section__content {
    padding: 48px 16px;
  }

  .tb-primary-section__heading {
    font-size: 1.2rem !important;
  }

  /* Modules */
  .tb-modules-section {
    padding: 32px 0;
  }

  .tb-modules-grid {
    gap: 12px;
  }

  .tb-module--latest-post {
    padding: 20px;
  }

  .tb-module--follow {
    min-height: 250px;
  }

  /* Post cards: tighter padding */
  .tb-post-card--featured .tb-post-card__body {
    padding: 20px;
  }

  .tb-post-card__body {
    padding: 16px;
  }

  /* Brush buttons: full width on tight mobile */
  .brush-btn {
    display: block;
    text-align: center;
    width: 100%;
  }

  .brush-btn--small {
    display: inline-block;
    width: auto;
  }

  /* Container */
  .tb-container {
    padding: 0 16px;
  }

  /* Footer certifications */
  .tb-footer-credits__certifications {
    gap: 16px;
  }

  .tb-footer-credits__certifications img {
    height: 36px;
  }

  /* Author bio */
  .tb-author-bio {
    padding: 20px;
  }

  /* Single post */
  .single .inside-article .entry-content {
    padding: 20px 16px;
  }

  .single .entry-content > p:first-of-type::first-letter {
    font-size: 2.5rem;
  }

  /* Page */
  .page .inside-article .entry-header {
    padding: 28px 16px 0;
  }

  .page .inside-article .entry-content {
    padding: 0 16px 48px;
  }

  .page .entry-content blockquote {
    padding: 20px;
  }

  .tb-info-box {
    padding: 20px;
  }

  /* 404 */
  .error404 .inside-article {
    padding: 48px 16px;
  }

  .error404 .tb-404-number {
    font-size: 5rem;
  }

  .error404 .entry-content .search-form {
    flex-direction: column;
    border-radius: 6px;
  }

  .error404 .entry-content .search-form .search-submit {
    border-radius: 0;
  }

  .error404 .tb-popular-links__list {
    flex-direction: column;
    align-items: center;
  }

  /* Archive cards */
  .blog .inside-article .entry-header,
  .archive .inside-article .entry-header {
    padding: 16px 16px 0;
  }

  .blog .inside-article .entry-summary,
  .archive .inside-article .entry-summary {
    padding: 0 16px;
  }

  .blog .inside-article footer.entry-meta,
  .archive .inside-article footer.entry-meta {
    padding: 12px 16px;
  }

  /* Comments */
  .comments-area .children {
    margin-left: 16px;
    padding-left: 12px;
  }
}

/* ================================================================
   < 360px - Ultra-tight mobile
   ================================================================ */
@media (max-width: 360px) {
  .tb-top-bar {
    display: none;
  }

  .tb-hero {
    min-height: 50vh;
  }

  .tb-hero__title {
    font-size: 1.2rem !important;
  }

  .error404 .tb-404-number {
    font-size: 4rem;
  }
}

/* ================================================================
   PRINT STYLES
   ================================================================ */
@media print {
  /* Hide non-essential elements */
  .tb-top-bar,
  .tb-hero__grain,
  .tb-hero__scroll-indicator,
  .generate-back-to-top,
  .tb-newsletter-bar,
  .tb-modules-section,
  .main-navigation,
  .site-header,
  .site-footer,
  #right-sidebar,
  .post-navigation,
  .tb-post-nav,
  .tb-related-posts,
  .comments-area .comment-respond,
  .error404 .brush-btn,
  .tb-popular-links {
    display: none !important;
  }

  /* Reset backgrounds and colors */
  body {
    background: #fff !important;
    color: #000 !important;
  }

  .site-content {
    background: #fff !important;
  }

  .separate-containers .inside-article {
    box-shadow: none !important;
    border: none !important;
  }

  /* Full width content */
  .site-content .content-area {
    width: 100% !important;
  }

  /* Restore link visibility */
  a {
    color: #000 !important;
    text-decoration: underline !important;
  }

  /* Show URLs after links */
  .entry-content a[href]::after {
    content: ' (' attr(href) ')';
    font-size: 0.8em;
    color: #666;
  }

  /* Remove animations */
  .reveal-up,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
  }

  /* Reset page breaks */
  h2, h3 {
    page-break-after: avoid;
  }

  img {
    page-break-inside: avoid;
  }
}
