/*
Theme Name: Blog IM
Theme URI: https://example.com/blog-im
Author: Antigravity
Description: Um tema desenvolvido em Full Site Editing (FSE) baseado no layout do Blog IM. Onde a sua criatividade acontece com as melhores dicas, estratégias e estudos para provas e educação.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blog-im
Tags: custom-colors, custom-typography, full-site-editing, block-patterns, blog, education
*/

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg-cream: #FAF3E8;
  --text-dark: #0a0a0a;
  --text-muted: #666666;
  --brand-green: #88e310;
  --brand-pink: #FCAFC8;
  --brand-orange: #F65D13;
  --brand-yellow: #F8B608;
  --brand-blue: #0E66DA;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background-color: var(--bg-cream);
  color: var(--text-dark);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Header */

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  position: sticky;
  top: 0;
  background-color: var(--bg-cream);
  z-index: 50;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--brand-orange);
  text-decoration: none;
}

.logo-star {
  display: inline-block;
  color: var(--brand-orange);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
}

nav a {
  text-decoration: none;
  color: var(--text-dark);
  transition: color 0.2s;
}

nav a:hover {
  color: var(--brand-orange);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.search-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  background-color: var(--brand-orange);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  text-decoration: none;
  display: inline-block;
}

.btn-primary:hover {
  opacity: 0.9;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary span {
  display: block;
  font-size: 0.7rem;
  font-weight: 400;
  opacity: 0.8;
  margin-top: 2px;
}

.header-cta {
  display: inline-block;
}

.hamburger-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  padding: 0.5rem;
  z-index: 60;
}

.hamburger-btn span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-dark);
  transition: 0.3s;
}

.hamburger-btn.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-btn.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Main Layout */

main {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem 4rem 2rem;
  width: 100%;
}

/* Featured Post Banner */

.featured-banner {
  background-color: var(--brand-pink);
  border-radius: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
  margin-bottom: 4rem;
  min-height: 400px;
  position: relative;
}

.featured-content {
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.featured-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-dark);
  letter-spacing: -0.02em;
}

.featured-excerpt {
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 2rem;
  font-size: 1.05rem;
  opacity: 0.9;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dark);
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.post-meta a {
  color: inherit;
  text-decoration: none;
}

.featured-graphic {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* Grid Posts */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 3rem;
  margin-bottom: 3rem;
}

.post-card {
  display: flex;
  flex-direction: column;
  transition: transform 0.2s;
}

.post-card a {
  text-decoration: none;
  color: inherit;
}

.post-card:hover {
  transform: translateY(-5px);
}

.post-thumbnail {
  border-radius: 16px;
  height: 280px;
  margin-bottom: 1.5rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.thumb-green {
  background-color: var(--brand-green);
}

.thumb-yellow {
  background-color: var(--brand-yellow);
}

.post-category-time {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.post-category {
  color: var(--text-dark);
  text-decoration: none;
}

.post-time {
  color: var(--text-muted);
  font-weight: 400;
}

.post-card h3 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.post-card p {
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.post-author {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.post-author strong {
  color: var(--text-dark);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 4rem;
}

.page-link {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.5rem;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 600;
  transition: background-color 0.2s;
  background-color: rgba(0, 0, 0, 0.05);
}

.page-link:hover {
  background-color: rgba(0, 0, 0, 0.1);
}

.page-link.active {
  background-color: var(--brand-orange);
  color: white;
}

/* Single Post */
.single-post {
  max-width: 800px;
  margin: 0 auto;
}

.post-header-info {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  font-size: 0.95rem;
  margin-bottom: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,0,0,0.05);
}

.post-header-info .post-category {
  font-weight: 700;
  color: var(--text-dark);
}

.post-header-info span {
  font-weight: 600;
  color: var(--brand-orange);
}

.single-post h1 {
  font-family: var(--font-display);
  font-size: 3.5rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  letter-spacing: -0.03em;
}

.single-post-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--text-dark);
  margin-bottom: 3rem;
  font-weight: 500;
}

.single-post-meta span {
  color: var(--text-muted);
}

.single-post .post-content {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #333;
}

.single-post .post-content h2 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin: 3rem 0 1rem;
  color: var(--text-dark);
}

.single-post .post-content p {
  margin-bottom: 1.5rem;
}

.single-post .post-content ul {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.single-post .post-content li {
  margin-bottom: 0.5rem;
}


.related-posts {
  margin-top: 5rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.related-posts h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 2.5rem;
}

.related-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

@media (max-width: 992px) {
  .featured-banner {
    grid-template-columns: 1fr;
  }
  .featured-graphic {
    min-height: 300px;
  }
  .single-post h1 {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .main-header {
    padding: 1.5rem 1rem;
  }
  .header-actions {
    gap: 1rem;
  }
  .header-actions .header-cta {
    display: none;
  }
  .hamburger-btn {
    display: flex;
  }
  nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 250px;
    height: 100vh;
    background-color: var(--bg-cream);
    box-shadow: -5px 0 15px rgba(0,0,0,0.05);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
    padding: 6rem 2rem 2rem;
    z-index: 55;
  }
  nav.open {
    right: 0;
  }
  nav ul {
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
  }
  .posts-grid {
    grid-template-columns: 1fr;
  }
  .featured-content {
    padding: 2rem 1.5rem;
  }
  .featured-title {
    font-size: 2rem;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
}

/* Footer */
.main-footer {
  background-color: #ffffff;
  border-top: 1px solid rgba(0,0,0,0.05);
  padding: 4rem 2rem 2rem 2rem;
  margin-top: auto;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-top: 1rem;
  max-width: 300px;
}

.footer-links-group h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.footer-links-group ul {
  list-style: none;
  padding: 0;
}

.footer-links-group li {
  margin-bottom: 0.75rem;
}

.footer-links-group a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer-links-group a:hover {
  color: var(--brand-orange);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(0,0,0,0.05);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Back to Top */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background-color: var(--brand-orange);
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(246, 93, 19, 0.3);
  z-index: 99;
  transition: transform 0.2s, background-color 0.2s;
}

.back-to-top:hover {
  transform: translateY(-3px);
  background-color: #d84d0b;
}

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
