:root {
  --primary: #ff6b35;
  --secondary: #ffb088;
  --bg-start: #020617;
  --bg-end: #0f172a;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --card: rgba(30, 41, 59, 0.8);
  --radius: 22px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background: #020617;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at top, rgba(29, 39, 59, 0.4), transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(255, 107, 53, 0.08), transparent 50%),
    radial-gradient(ellipse at bottom right, rgba(255, 107, 53, 0.05), transparent 50%),
    linear-gradient(180deg, #0f172a, #020617);
  z-index: 0;
  pointer-events: none;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 70px;
  padding: 8px 24px;
  backdrop-filter: blur(12px);
  background: rgba(15, 23, 42, 0.8);
  border-bottom: 1px solid rgba(51, 65, 85, 0.5);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.header .logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
}

.header .logo img {
  height: 60px;
  width: auto;
  object-fit: contain;
}

.site-btn {
  position: absolute;
  left: 24px;
  background: rgba(30, 41, 59, 0.8);
  border: 1px solid rgba(51, 65, 85, 0.6);
  color: #fff;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
}

.site-btn:hover {
  border-color: var(--primary);
  background: rgba(255, 107, 53, 0.2);
  color: var(--primary);
}

.social-links {
  position: absolute;
  right: 24px;
  display: flex;
  gap: 16px;
  align-items: center;
}

.social-links a {
  color: var(--text);
  font-size: 20px;
  transition: all 0.3s ease;
}

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

.wrap {
  position: relative;
  z-index: 2;
  padding-top: 70px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

.hero-blog {
  padding: 60px 24px 40px;
  text-align: center;
  max-width: 800px;
}

.hero-content {
  animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.12), rgba(255, 107, 53, 0.05));
  border: 1px solid rgba(255, 107, 53, 0.35);
  border-radius: 999px;
  padding: 10px 18px;
  margin-bottom: 20px;
  font-size: 13px;
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.15);
}

h1 {
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.15;
  margin: 0 0 20px;
  font-weight: 800;
  text-shadow: 0 2px 30px rgba(255, 107, 53, 0.18);
}

.subtitle {
  font-size: clamp(17px, 1.35vw, 20px);
  color: #cbd5e1;
  line-height: 1.6;
  margin-bottom: 0;
  max-width: 700px;
  margin: 0 auto;
}

.search-section {
  margin-bottom: 40px;
}

.search-box {
  position: relative;
  max-width: 600px;
  margin: 0 auto 24px;
}

.search-box i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 18px;
}

#searchInput {
  width: 100%;
  padding: 14px 20px 14px 48px;
  background: linear-gradient(145deg, rgba(20, 30, 50, 0.95), rgba(12, 20, 35, 0.85));
  border: 1px solid rgba(226, 232, 240, 0.12);
  border-radius: 16px;
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  transition: all 0.3s ease;
}

#searchInput:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.15);
}

#searchInput::placeholder {
  color: var(--muted);
}

.filter-tags {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.tag-filter {
  padding: 8px 16px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.4));
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 20px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tag-filter:hover,
.tag-filter.active {
  background: linear-gradient(135deg, var(--primary), #e65100);
  color: #fff;
  border-color: transparent;
  transform: translateY(-2px);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 28px;
  margin-bottom: 60px;
}

.post-card {
  background: linear-gradient(145deg, rgba(40, 52, 72, 0.95), rgba(24, 32, 48, 0.9));
  backdrop-filter: blur(16px);
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  animation: fadeIn 0.6s ease-out;
  box-shadow: 0 16px 40px rgba(2, 6, 23, 0.45);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.post-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 107, 53, 0.35);
  box-shadow: 0 16px 48px rgba(2, 6, 23, 0.4), 0 0 40px rgba(255, 107, 53, 0.18);
}

.post-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.post-content {
  padding: 24px;
}

.post-category {
  display: inline-block;
  padding: 6px 14px;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(255, 107, 53, 0.1));
  border: 1px solid rgba(255, 107, 53, 0.45);
  border-radius: 20px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--muted);
}

.post-meta i {
  margin-right: 6px;
  color: var(--primary);
}

.post-title {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.3;
  margin-bottom: 12px;
  color: var(--text);
}

.post-excerpt {
  font-size: 16px;
  line-height: 1.6;
  color: #cbd5e1;
  margin-bottom: 16px;
}

.read-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.read-more:hover {
  gap: 12px;
}

.read-more i {
  transition: transform 0.3s ease;
}

.post-card:hover .read-more i {
  transform: translateX(4px);
}

.loading {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.loading i {
  font-size: 48px;
  margin-bottom: 16px;
  color: var(--primary);
}

.loading p {
  font-size: 18px;
  font-weight: 600;
}

.no-results {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}

.no-results i {
  font-size: 64px;
  margin-bottom: 20px;
  color: var(--muted);
  opacity: 0.5;
}

.no-results p {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 24px;
}

.clear-btn {
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--primary), #e65100);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.clear-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
}

.footer-main {
  text-align: left;
  padding: 32px 24px 48px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid rgba(51, 65, 85, 0.5);
  margin-top: 60px;
}

.footer-social {
  margin-bottom: 20px;
}

.footer-social a {
  color: var(--text);
  font-size: 24px;
  transition: all 0.3s ease;
  display: inline-block;
}

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

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.footer-links a {
  color: #e2e8f0;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-block;
  font-size: 15px;
}

.footer-links a:hover {
  color: var(--primary);
  padding-left: 4px;
}

.footer-copy {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

/* Modal do Post */
.post-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.post-modal.show {
  opacity: 1;
}

.post-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.92);
  backdrop-filter: blur(8px);
}

.post-modal-content {
  position: relative;
  max-width: 1000px !important;
  max-height: 90vh;
  margin: 5vh auto;
  background: linear-gradient(145deg, rgba(20, 30, 50, 0.98), rgba(12, 20, 35, 0.95));
  border: 1px solid rgba(226, 232, 240, 0.15);
  border-radius: 24px;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.8);
  animation: modalSlideIn 0.4s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.post-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(20, 30, 50, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.post-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #ef4444;
  transform: rotate(90deg);
}

.post-modal-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.post-modal-body {
  padding: 40px 48px 48px;
}

.post-modal-body .post-category {
  margin-bottom: 16px;
}

.post-modal-body .post-meta {
  margin-bottom: 20px;
}

.post-modal-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 32px;
  color: var(--text);
}

.post-modal-text {
  font-size: 18px;
  line-height: 1.8;
  color: #cbd5e1;
}

.post-modal-text h1,
.post-modal-text h2,
.post-modal-text h3 {
  color: var(--text) !important;
  font-weight: 700 !important;
  margin: 80px 0 24px 0 !important;
  line-height: 1.3 !important;
}

.post-modal-text h1:first-child,
.post-modal-text h2:first-child,
.post-modal-text h3:first-child {
  margin-top: 0 !important;
}

.post-modal-text h2 {
  font-size: 34px !important;
  color: var(--primary) !important;
  margin-top: 80px !important;
}

.post-modal-text h3 {
  font-size: 22px !important;
  margin-top: 60px !important;
}

.post-modal-text p {
  margin-bottom: 20px;
}

.post-modal-text strong {
  color: var(--text);
  font-weight: 700;
}

.post-modal-text em {
  font-style: italic;
  color: var(--secondary);
}

.post-modal-text a {
  color: var(--primary);
  text-decoration: underline;
  transition: all 0.3s ease;
}

.post-modal-text a:hover {
  color: var(--primary);
}

.post-modal-text ul,
.post-modal-text ol {
  margin: 12px 0;
  padding-left: 28px;
  line-height: 1.4;
}

.post-modal-text li {
  margin-bottom: 4px;
  line-height: 1.5;
}

.post-modal-text li:last-child {
  margin-bottom: 0;
}

.post-modal-text ul li {
  list-style-type: disc;
}

.post-modal-text ol li {
  list-style-type: decimal;
}

.post-modal-text ul li::marker {
  color: var(--secondary);
}

.post-modal-text ol li::marker {
  color: var(--primary);
  font-weight: 700;
}

/* Imagens dentro do conteúdo do post - CONTROLE CENTRALIZADO */
.post-modal-text img {
  width: 100% !important;
  max-width: 300px;
  height: auto;
  margin: 32px auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(2, 6, 23, 0.3);
}

@media (max-width: 768px) {
  .post-modal-content {
    max-width: 95%;
    margin: 2vh auto;
    max-height: 96vh;
    border-radius: 16px;
  }

  .post-modal-image {
    height: 250px;
  }

  .post-modal-body {
    padding: 28px 24px 32px;
  }

  .post-modal-title {
    font-size: clamp(24px, 6vw, 32px);
    margin-bottom: 24px;
  }

  .post-modal-text {
    font-size: 16px;
    line-height: 1.7;
  }

  .post-modal-text h2 {
    font-size: 24px;
  }

  .post-modal-text h3 {
    font-size: 20px;
  }

  .post-modal-close {
    width: 36px;
    height: 36px;
    top: 16px;
    right: 16px;
  }

  /* Imagens responsivas no mobile */
  .post-modal-text img {
    max-width: 100%;
    margin: 24px auto;
  }
}

@media (max-width: 768px) {
  .site-btn span {
    display: none;
  }

  .hero-blog {
    padding: 40px 16px 30px;
  }

  h1 {
    font-size: clamp(28px, 7vw, 40px);
  }

  .posts-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .search-box {
    margin-bottom: 20px;
  }

  #searchInput {
    font-size: 15px;
    padding: 12px 16px 12px 44px;
  }

  .post-content {
    padding: 20px;
  }

  .post-title {
    font-size: 20px;
  }

  .post-excerpt {
    font-size: 15px;
  }
}

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

  .hero-blog {
    padding: 32px 12px 24px;
  }

  .post-image {
    height: 175px;
  }

  .footer-main {
    padding: 24px 16px 32px;
  }
}
