/*
Theme Name: Giba Blog
Theme URI: https://gilbergantunes.com.br
Author: Gilberg Antunes
Description: Blog pessoal sobre fotografia, IA, vídeo generativo, cinema e storytelling.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: giba-blog
*/

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black: #000000;
  --dark: #0a0a0a;
  --dark-card: #111111;
  --blue: #0000ff;
  --blue-hover: #1a1aff;
  --white: #ffffff;
  --gray: #888888;
  --gray-light: #cccccc;
  --font-sans: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --radius: 4px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background-color: var(--black);
  color: var(--white);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-logo {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.site-logo span {
  color: var(--blue);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}

.main-nav a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--gray-light);
  transition: color 0.2s, background 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--white);
  background: rgba(255,255,255,0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-outline {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--white);
  transition: border-color 0.2s, background 0.2s;
}

.btn-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.06);
}

.btn-primary {
  font-size: 13px;
  font-weight: 600;
  padding: 9px 22px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  transition: background 0.2s, transform 0.1s;
}

.btn-primary:hover {
  background: var(--blue-hover);
  transform: translateY(-1px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s;
}

/* ============================================
   BLOG PAGE TITLE
   ============================================ */
.blog-heading {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 32px 32px;
}

.blog-heading h1 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1;
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.blog-heading h1 .icon {
  font-style: normal;
  color: var(--white);
}

.blog-heading h1 .word-blog {
  color: var(--white);
}

.blog-heading .subtitle {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray);
  margin-top: 6px;
}

/* ============================================
   HERO SECTION (Featured Posts)
   ============================================ */
.hero-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px 48px;
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
}

/* Main featured post */
.featured-main {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  min-height: 420px;
  cursor: pointer;
}

.featured-main img,
.featured-main .post-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.5s ease;
}

.featured-main:hover img,
.featured-main:hover .post-thumbnail {
  transform: scale(1.04);
}

.featured-main .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 60%);
  z-index: 1;
}

.featured-main .card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 28px;
  z-index: 2;
}

/* Secondary column */
.hero-secondary {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.featured-secondary {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  flex: 1;
  min-height: 200px;
  cursor: pointer;
}

.featured-secondary img,
.featured-secondary .post-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  transition: transform 0.5s ease;
}

.featured-secondary:hover img,
.featured-secondary:hover .post-thumbnail {
  transform: scale(1.04);
}

.featured-secondary .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 60%);
  z-index: 1;
}

.featured-secondary .card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  z-index: 2;
}

/* Blue CTA card */
.cta-card {
  background: var(--blue);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 160px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.cta-card:hover {
  background: var(--blue-hover);
}

.cta-card .cta-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.cta-card .cta-text {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.5px;
}

/* ============================================
   CATEGORY TAGS (Pills)
   ============================================ */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(4px);
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.2);
}

.tag::before {
  content: '+ ';
}

/* ============================================
   CARD TITLES
   ============================================ */
.card-title {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.3px;
  color: var(--white);
}

.card-title-sm {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--white);
}

.card-excerpt {
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  line-height: 1.5;
  margin-top: 8px;
}

/* ============================================
   POSTS GRID
   ============================================ */
.posts-section {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.post-card {
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--dark-card);
  transition: transform 0.3s ease;
}

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

.post-card-image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.post-card-image img,
.post-card-image .post-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card:hover .post-card-image img,
.post-card:hover .post-card-image .post-thumbnail {
  transform: scale(1.06);
}

.post-card-image .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
}

.post-card-image .tag-list {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  margin: 0;
}

.post-card-body {
  padding: 16px 18px 20px;
}

.post-meta {
  font-size: 12px;
  color: var(--gray);
  margin-top: 8px;
  display: flex;
  gap: 12px;
}

/* ============================================
   CATEGORY FILTER BAR
   ============================================ */
.category-filter {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 32px 32px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  font-size: 13px;
  font-weight: 500;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--gray-light);
  background: transparent;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--white);
  color: var(--black);
  border-color: var(--white);
}

/* ============================================
   NO THUMBNAIL PLACEHOLDER
   ============================================ */
.no-thumb {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #111 0%, #1a1a2e 50%, #111 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: rgba(255,255,255,0.1);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 48px 32px;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-logo {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.footer-logo span {
  color: var(--blue);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: 13px;
  color: var(--gray);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-copy {
  font-size: 12px;
  color: var(--gray);
  width: 100%;
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 12px;
}

/* ============================================
   SINGLE POST
   ============================================ */
.single-hero {
  position: relative;
  height: 500px;
  overflow: hidden;
}

.single-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-hero .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.3) 60%);
}

.single-hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 860px;
  margin: 0 auto;
  padding: 48px 32px;
}

.single-title {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-top: 16px;
}

.post-content {
  max-width: 860px;
  margin: 56px auto;
  padding: 0 32px;
}

.post-content p {
  font-size: 17px;
  line-height: 1.8;
  color: rgba(255,255,255,0.85);
  margin-bottom: 24px;
}

.post-content h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 40px 0 16px;
  letter-spacing: -0.5px;
}

.post-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 32px 0 12px;
}

.post-content img {
  width: 100%;
  border-radius: 10px;
  margin: 32px 0;
}

.post-content blockquote {
  border-left: 3px solid var(--blue);
  padding: 12px 24px;
  margin: 32px 0;
  font-size: 19px;
  font-style: italic;
  color: rgba(255,255,255,0.7);
  background: rgba(0,0,255,0.05);
  border-radius: 0 8px 8px 0;
}

.post-content ul,
.post-content ol {
  padding-left: 24px;
  margin-bottom: 24px;
  color: rgba(255,255,255,0.85);
  font-size: 17px;
  line-height: 1.8;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 40px 32px;
}

.pagination a,
.pagination span {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--gray-light);
  transition: all 0.2s;
}

.pagination a:hover,
.pagination .current {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

/* ============================================
   MOBILE NAV OVERLAY
   ============================================ */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.97);
  z-index: 99;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.mobile-nav a {
  font-size: 24px;
  font-weight: 700;
  padding: 12px 32px;
  letter-spacing: -0.5px;
  color: var(--white);
  transition: color 0.2s;
}

.mobile-nav a:hover {
  color: var(--blue);
}

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

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1100px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
  }

  .hero-secondary {
    flex-direction: row;
  }

  .featured-secondary {
    min-height: 200px;
  }
}

@media (max-width: 768px) {
  .header-inner {
    padding: 0 20px;
  }

  .main-nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero-section,
  .posts-section,
  .blog-heading,
  .category-filter {
    padding-left: 20px;
    padding-right: 20px;
  }

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

  .hero-secondary {
    flex-direction: column;
  }

  .featured-main {
    min-height: 320px;
  }
}
