/**
Theme Name: TrocaCel Theme
Theme URI: https://trocacel.com.br/
Author: TrocaCel
Description: Tema proprietario da TrocaCel, sem dependencia de builders.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
Text Domain: trocacel-theme
*/

:root {
  --tc-blue: #304c7b;
  --tc-orange: #f57c00;
  --tc-dark: #0c0c0c;
  --tc-text: #202020;
  --tc-muted: #5d5d5d;
  --tc-bg: #ffffff;
  --tc-container: 1200px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--tc-bg);
  color: var(--tc-text);
  font-family: "Montserrat", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: var(--tc-blue);
}

a:hover,
a:focus {
  color: var(--tc-orange);
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  color: var(--tc-dark);
  line-height: 1.25;
}

.trocacel-container {
  width: 100%;
  max-width: var(--tc-container);
  margin: 0 auto;
  padding: 0 20px;
}

.trocacel-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.trocacel-site-header-inner {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.trocacel-logo-link {
  display: inline-flex;
  align-items: center;
}

.trocacel-logo {
  width: 200px;
  max-width: 40vw;
  height: auto;
}

.trocacel-header-nav {
  margin-left: auto;
}

.trocacel-header-nav .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 24px;
}

.trocacel-header-nav .menu a {
  text-decoration: none;
  color: var(--tc-dark);
  font-weight: 500;
}

.trocacel-header-nav .menu a:hover,
.trocacel-header-nav .menu .current-menu-item > a,
.trocacel-header-nav .menu .current-menu-ancestor > a {
  color: var(--tc-orange);
}

.trocacel-menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid #dbe6f6;
  border-radius: 999px;
  background: #f4f8ff;
  color: #17315b;
  font-size: 26px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.trocacel-menu-toggle:hover,
.trocacel-menu-toggle:focus {
  border-color: #bfd2f0;
  background: #eaf2ff;
  transform: translateY(-1px);
}

.trocacel-mobile-nav-head,
.trocacel-menu-close,
.trocacel-menu-backdrop {
  display: none;
}

.trocacel-main {
  min-height: 62vh;
}

.trocacel-page-main,
.trocacel-index-main {
  padding: 34px 0 50px;
}

.trocacel-page-article {
  max-width: 940px;
}

.trocacel-page-title {
  margin-bottom: 14px;
  font-size: 38px;
}

.trocacel-page-content {
  color: var(--tc-text);
}

.trocacel-page-content p {
  margin-top: 0;
  margin-bottom: 1em;
}

.trocacel-page-content h2,
.trocacel-page-content h3 {
  margin-top: 1.3em;
}

.trocacel-index-title {
  margin: 0 0 18px;
  font-size: 34px;
}

.trocacel-post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}

.trocacel-post-card {
  border: 1px solid #ececec;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.trocacel-post-card-thumb {
  display: block;
  aspect-ratio: 4 / 3;
  background: #f4f4f4;
}

.trocacel-post-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.trocacel-post-card-content {
  padding: 14px 16px 18px;
}

.trocacel-post-card-title {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.35;
}

.trocacel-post-card-title a {
  color: var(--tc-dark);
  text-decoration: none;
}

.trocacel-post-card-title a:hover,
.trocacel-post-card-title a:focus {
  color: var(--tc-orange);
}

.trocacel-post-card-excerpt {
  margin: 0;
  color: #444;
  font-size: 15px;
}

.trocacel-pagination-wrap {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

.trocacel-pagination-wrap .nav-links {
  display: flex;
  gap: 10px;
  align-items: center;
}

.trocacel-pagination-wrap .page-numbers {
  min-width: 48px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  border: 1px solid #e76f00;
  background: #f57c00;
  color: #111;
  text-decoration: none;
  font-weight: 600;
}

.trocacel-pagination-wrap .page-numbers.current {
  background: #d66800;
  border-color: #d66800;
  color: #fff;
}

.trocacel-site-footer {
  margin-top: 44px;
  border-top: 5px solid var(--tc-blue);
  background: linear-gradient(250deg, #f2f2f2 0%, #ffffff 100%);
}

.trocacel-footer-inner {
  padding: 36px 0 24px;
}

.trocacel-footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
}

.trocacel-footer-title {
  margin: 0 0 8px;
  font-size: 22px;
}

.trocacel-footer-text {
  margin: 0;
  color: #333;
}

.trocacel-footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}

.trocacel-footer-links a {
  color: rgba(0, 0, 0, 0.8);
  text-decoration: none;
  font-weight: 500;
}

.trocacel-footer-links a:hover,
.trocacel-footer-links a:focus {
  color: var(--tc-orange);
}

.trocacel-footer-copy {
  margin: 18px 0 0;
  text-align: center;
  font-size: 15px;
  color: #2a2a2a;
}

.trocacel-404 {
  padding: 60px 0;
  text-align: center;
}

@media (max-width: 1024px) {
  .trocacel-post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 921px) {
  body.trocacel-menu-open {
    overflow: hidden;
  }

  .trocacel-site-header-inner {
    min-height: 78px;
  }

  .trocacel-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .trocacel-header-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(88vw, 360px);
    margin-left: 0;
    padding: 16px 18px 24px;
    background: linear-gradient(160deg, #ffffff 0%, #f3f8ff 100%);
    border-left: 1px solid #e6edf8;
    box-shadow: -10px 0 35px rgba(7, 18, 36, 0.24);
    display: flex;
    flex-direction: column;
    transform: translateX(105%);
    visibility: hidden;
    transition: transform 0.34s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.34s;
    z-index: 80;
    pointer-events: none;
  }

  .trocacel-menu-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(8, 15, 30, 0.48);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.28s ease, visibility 0.28s ease;
    z-index: 75;
    pointer-events: none;
  }

  .trocacel-site-header.is-open .trocacel-header-nav {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
  }

  .trocacel-site-header.is-open .trocacel-menu-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .trocacel-mobile-nav-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e7edf7;
  }

  .trocacel-mobile-nav-title {
    margin: 0;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 700;
    color: #18305a;
  }

  .trocacel-menu-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid #d8e5f9;
    border-radius: 999px;
    background: #fff;
    color: #203b67;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
  }

  .trocacel-header-nav .menu {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 0;
    margin: 0;
  }

  .trocacel-header-nav .menu li {
    width: 100%;
    border-bottom: 1px solid #edf2fa;
  }

  .trocacel-header-nav .menu li:last-child {
    border-bottom: 0;
  }

  .trocacel-header-nav .menu a {
    display: block;
    padding: 14px 2px;
    font-size: 18px;
    font-weight: 600;
    color: #142847;
  }

  .trocacel-footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .trocacel-container {
    padding: 0 16px;
  }

  .trocacel-page-title {
    font-size: 30px;
  }

  .trocacel-index-title {
    font-size: 28px;
  }

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