/* ============================================================
   ARQPEDIA BLOG — CSS Principal
   Design: Sofisticado, Elegante, Ultra-Rápido
   Target: PageSpeed 100/100
   ============================================================ */

/* --- CSS Reset & Base --- */
*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px;scroll-behavior:smooth;-webkit-text-size-adjust:100%;text-size-adjust:100%}
body{font-family:'Inter',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;color:#1a1a2e;background:#fafafa;line-height:1.7;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}
img{max-width:100%;height:auto;display:block}
a{color:#0d7c5f;text-decoration:none;transition:color .2s}
a:hover{color:#0a5c47}
h1,h2,h3,h4,h5,h6{font-family:'Playfair Display',Georgia,'Times New Roman',serif;color:#1a1a2e;line-height:1.25;font-weight:700}

/* --- Utility --- */
.container{max-width:1200px;margin:0 auto;padding:0 24px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);border:0}
.text-center{text-align:center}

/* --- Skip Link (Accessibility) --- */
.skip-link{position:absolute;top:-100%;left:50%;transform:translateX(-50%);background:#0d7c5f;color:#fff;padding:12px 24px;z-index:9999;border-radius:0 0 8px 8px;font-weight:600}
.skip-link:focus{top:0}

/* --- Header --- */
.site-header{background:#fff;border-bottom:1px solid #e8e8e8;position:sticky;top:0;z-index:100;backdrop-filter:blur(12px);background:rgba(255,255,255,.97)}
.header-inner{display:flex;align-items:center;justify-content:space-between;height:72px}
.logo-link{display:flex;align-items:center;gap:12px}
.logo-link img{height:40px;width:auto}
.logo-text{font-family:'Playfair Display',Georgia,serif;font-size:1.5rem;font-weight:700;color:#1a1a2e;letter-spacing:.02em}

/* --- Navigation --- */
.main-nav{display:flex;align-items:center;gap:8px}
.main-nav a{padding:8px 16px;font-size:.875rem;font-weight:500;color:#555;border-radius:6px;transition:all .2s}
.main-nav a:hover,.main-nav a.active{color:#0d7c5f;background:rgba(13,124,95,.06)}
.nav-search{display:flex;align-items:center;gap:8px;background:#f5f5f5;border-radius:8px;padding:8px 16px;margin-left:16px;border:1px solid transparent;transition:border-color .2s}
.nav-search:focus-within{border-color:#0d7c5f;background:#fff}
.nav-search input{border:none;background:none;outline:none;font-size:.875rem;width:180px;color:#1a1a2e}
.nav-search svg{width:18px;height:18px;color:#999;flex-shrink:0}
.menu-toggle{display:none;background:none;border:none;cursor:pointer;padding:8px}
.menu-toggle svg{width:28px;height:28px;color:#1a1a2e}

/* --- Hero (Homepage) --- */
.hero{padding:64px 0 48px;text-align:center}
.hero h1{font-size:2.75rem;margin-bottom:16px;color:#1a1a2e}
.hero p{font-size:1.125rem;color:#666;max-width:640px;margin:0 auto 32px}
.hero .accent{color:#0d7c5f}

/* --- Post Grid --- */
.section-title{font-size:1.75rem;margin-bottom:32px;padding-bottom:16px;border-bottom:2px solid #0d7c5f;display:inline-block}
.posts-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:32px;margin-bottom:48px}
.post-card{background:#fff;border-radius:12px;overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,.06);transition:transform .25s,box-shadow .25s;border:1px solid #f0f0f0}
.post-card:hover{transform:translateY(-4px);box-shadow:0 12px 32px rgba(0,0,0,.1)}
.post-card-image{aspect-ratio:16/10;overflow:hidden;background:#e8e8e8}
.post-card-image img{width:100%;height:100%;object-fit:cover;transition:transform .4s}
.post-card:hover .post-card-image img{transform:scale(1.05)}
.post-card-body{padding:24px}
.post-card-category{display:inline-block;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.06em;color:#0d7c5f;background:rgba(13,124,95,.08);padding:4px 10px;border-radius:4px;margin-bottom:12px}
.post-card-title{font-size:1.125rem;line-height:1.4;margin-bottom:8px}
.post-card-title a{color:#1a1a2e;transition:color .2s}
.post-card-title a:hover{color:#0d7c5f}
.post-card-excerpt{font-size:.875rem;color:#777;line-height:1.6;margin-bottom:16px;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
.post-card-meta{display:flex;align-items:center;gap:12px;font-size:.8rem;color:#999}
.post-card-meta svg{width:14px;height:14px}

/* --- Featured Post --- */
.featured-post{display:grid;grid-template-columns:1.2fr 1fr;gap:48px;align-items:center;margin-bottom:64px;padding:48px;background:#fff;border-radius:16px;box-shadow:0 2px 8px rgba(0,0,0,.04);border:1px solid #f0f0f0}
.featured-post-image{border-radius:12px;overflow:hidden;aspect-ratio:16/10}
.featured-post-image img{width:100%;height:100%;object-fit:cover}
.featured-post-body .post-card-category{margin-bottom:16px}
.featured-post-body h2{font-size:2rem;margin-bottom:16px;line-height:1.3}
.featured-post-body p{color:#666;line-height:1.7;margin-bottom:24px}
.btn-primary{display:inline-flex;align-items:center;gap:8px;background:#0d7c5f;color:#fff;padding:12px 28px;border-radius:8px;font-weight:600;font-size:.9rem;transition:all .2s;border:none;cursor:pointer}
.btn-primary:hover{background:#0a5c47;color:#fff;transform:translateY(-1px)}
.btn-primary svg{width:16px;height:16px}

/* --- Article Page --- */
.article-header{padding:48px 0 32px;text-align:center;max-width:800px;margin:0 auto}
.article-header .post-card-category{margin-bottom:16px}
.article-header h1{font-size:2.5rem;margin-bottom:16px}
.article-header .article-meta{display:flex;justify-content:center;gap:24px;color:#888;font-size:.9rem;margin-bottom:32px}
.article-cover{max-width:960px;margin:0 auto 48px;border-radius:16px;overflow:hidden}
.article-cover img{width:100%;aspect-ratio:21/9;object-fit:cover}

/* --- Article Content --- */
.article-content{max-width:760px;margin:0 auto;padding-bottom:64px}
.article-content h2{font-size:1.75rem;margin:48px 0 16px;padding-top:24px;border-top:1px solid #f0f0f0}
.article-content h2:first-of-type{border-top:none;padding-top:0}
.article-content h3{font-size:1.35rem;margin:32px 0 12px}
.article-content p{margin-bottom:20px;color:#333;font-size:1.05rem;line-height:1.8}
.article-content ul,.article-content ol{margin:0 0 20px 24px;color:#444}
.article-content li{margin-bottom:8px;line-height:1.7}
.article-content blockquote{border-left:4px solid #0d7c5f;padding:16px 24px;margin:24px 0;background:rgba(13,124,95,.03);border-radius:0 8px 8px 0;font-style:italic;color:#555}
.article-content img{border-radius:12px;margin:24px 0}
.article-content table{width:100%;border-collapse:collapse;margin:24px 0;font-size:.95rem}
.article-content th{background:#1a1a2e;color:#fff;padding:12px 16px;text-align:left;font-weight:600}
.article-content td{padding:12px 16px;border-bottom:1px solid #eee}
.article-content tr:hover td{background:#f9f9f9}
.article-content code{background:#f5f5f5;padding:2px 6px;border-radius:4px;font-size:.9em}
.article-content pre{background:#1a1a2e;color:#e8e8e8;padding:24px;border-radius:12px;overflow-x:auto;margin:24px 0}
.article-content pre code{background:none;padding:0;color:inherit}

/* --- Table of Contents --- */
.toc{background:#fff;border:1px solid #e8e8e8;border-radius:12px;padding:24px 32px;margin-bottom:40px}
.toc-title{font-size:1rem;font-weight:700;margin-bottom:12px;color:#1a1a2e;font-family:'Inter',sans-serif}
.toc ol{counter-reset:toc;list-style:none;padding:0;margin:0}
.toc li{counter-increment:toc;padding:6px 0;border-bottom:1px solid #f5f5f5}
.toc li:last-child{border-bottom:none}
.toc li::before{content:counter(toc) ". ";color:#0d7c5f;font-weight:600}
.toc a{color:#555;font-size:.9rem;transition:color .2s}
.toc a:hover{color:#0d7c5f}

/* --- Ad Slots --- */
.ad-slot{text-align:center;padding:20px 0;margin:32px 0;min-height:90px;position:relative}
.ad-slot::before{content:'';display:block;position:absolute;top:0;left:50%;transform:translateX(-50%);width:60px;height:1px;background:#e0e0e0}
.ad-slot-label{font-size:.65rem;color:#bbb;text-transform:uppercase;letter-spacing:.1em;margin-bottom:8px}
.mobflix-banner{text-align:center;margin:40px 0;padding:24px;background:linear-gradient(135deg,#0a0f1a 0%,#1a2332 100%);border-radius:12px}
.mobflix-banner img{margin:0 auto;max-width:100%;height:auto}

/* --- CTA Box (Internal Linking) --- */
.cta-box{background:linear-gradient(135deg,#0d7c5f 0%,#0a5c47 100%);color:#fff;padding:32px;border-radius:12px;margin:40px 0;text-align:center}
.cta-box h3{color:#fff;font-size:1.25rem;margin-bottom:8px}
.cta-box p{color:rgba(255,255,255,.85);margin-bottom:16px;font-size:.95rem}
.cta-box .btn-cta{display:inline-block;background:#fff;color:#0d7c5f;padding:12px 28px;border-radius:8px;font-weight:700;transition:all .2s}
.cta-box .btn-cta:hover{background:#f0f0f0;transform:translateY(-1px)}

/* --- Sidebar --- */
.article-layout{display:grid;grid-template-columns:1fr 300px;gap:48px;max-width:1200px;margin:0 auto;padding:0 24px}
.sidebar{position:sticky;top:88px;align-self:start}
.sidebar-widget{background:#fff;border:1px solid #e8e8e8;border-radius:12px;padding:24px;margin-bottom:24px}
.sidebar-widget h3{font-size:1rem;font-weight:700;margin-bottom:16px;color:#1a1a2e;font-family:'Inter',sans-serif}
.sidebar-widget ul{list-style:none;padding:0}
.sidebar-widget li{padding:8px 0;border-bottom:1px solid #f5f5f5}
.sidebar-widget li:last-child{border-bottom:none}
.sidebar-widget li a{color:#555;font-size:.875rem}
.sidebar-widget li a:hover{color:#0d7c5f}

/* --- Footer --- */
.site-footer{background:#1a1a2e;color:#fff;padding:64px 0 32px;margin-top:80px}
.footer-grid{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:48px;margin-bottom:48px}
.footer-brand p{color:rgba(255,255,255,.6);font-size:.9rem;line-height:1.7;margin-top:16px}
.footer-col h4{font-size:.875rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;margin-bottom:16px;color:rgba(255,255,255,.9)}
.footer-col ul{list-style:none;padding:0}
.footer-col li{margin-bottom:10px}
.footer-col a{color:rgba(255,255,255,.55);font-size:.875rem;transition:color .2s}
.footer-col a:hover{color:#0d7c5f}
.footer-bottom{border-top:1px solid rgba(255,255,255,.1);padding-top:24px;display:flex;justify-content:space-between;align-items:center;font-size:.8rem;color:rgba(255,255,255,.4)}
.footer-social{display:flex;gap:16px}
.footer-social a{color:rgba(255,255,255,.5);transition:color .2s}
.footer-social a:hover{color:#0d7c5f}

/* --- Breadcrumbs --- */
.breadcrumbs{padding:16px 0;font-size:.8rem;color:#999}
.breadcrumbs a{color:#888}
.breadcrumbs a:hover{color:#0d7c5f}
.breadcrumbs span{margin:0 8px;color:#ccc}

/* --- Pagination --- */
.pagination{display:flex;justify-content:center;gap:8px;margin:48px 0}
.pagination a,.pagination span{display:flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:8px;font-size:.9rem;font-weight:500;border:1px solid #e0e0e0;color:#555;transition:all .2s}
.pagination a:hover{border-color:#0d7c5f;color:#0d7c5f}
.pagination .current{background:#0d7c5f;color:#fff;border-color:#0d7c5f}

/* --- Category Page --- */
.category-header{padding:48px 0 32px}
.category-header h1{font-size:2.25rem;margin-bottom:8px}
.category-header p{color:#666;font-size:1.05rem}

/* --- Related Posts --- */
.related-posts{padding:48px 0;border-top:1px solid #f0f0f0;margin-top:48px}
.related-posts h2{font-size:1.5rem;margin-bottom:32px;text-align:center}
.related-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:24px}

/* --- Responsive Design --- */
@media(max-width:1024px){
  .posts-grid{grid-template-columns:repeat(2,1fr);gap:24px}
  .featured-post{grid-template-columns:1fr;gap:32px;padding:32px}
  .article-layout{grid-template-columns:1fr;gap:32px}
  .sidebar{position:static}
  .footer-grid{grid-template-columns:1fr 1fr;gap:32px}
  .related-grid{grid-template-columns:repeat(2,1fr)}
}
@media(max-width:768px){
  html{font-size:15px}
  .header-inner{height:60px}
  .main-nav{display:none;position:absolute;top:60px;left:0;right:0;background:#fff;flex-direction:column;padding:16px;border-bottom:1px solid #e8e8e8;box-shadow:0 8px 24px rgba(0,0,0,.08)}
  .main-nav.open{display:flex}
  .menu-toggle{display:block}
  .nav-search{margin:8px 0 0;width:100%}
  .nav-search input{width:100%}
  .hero h1{font-size:2rem}
  .posts-grid{grid-template-columns:1fr}
  .article-header h1{font-size:1.75rem}
  .article-content{padding:0 4px}
  .article-content h2{font-size:1.4rem}
  .footer-grid{grid-template-columns:1fr}
  .footer-bottom{flex-direction:column;gap:12px;text-align:center}
  .related-grid{grid-template-columns:1fr}
  .featured-post-body h2{font-size:1.5rem}
}
@media(max-width:480px){
  .container{padding:0 16px}
  .hero{padding:40px 0 32px}
  .hero h1{font-size:1.75rem}
  .post-card-body{padding:16px}
  .article-header{padding:32px 0 24px}
}

/* --- Print Styles --- */
@media print{
  .site-header,.site-footer,.ad-slot,.mobflix-banner,.sidebar,.cta-box,.related-posts{display:none}
  .article-content{max-width:100%}
  body{color:#000;background:#fff}
}

/* --- Animations (reduced motion respected) --- */
@media(prefers-reduced-motion:no-preference){
  .post-card{transition:transform .25s ease,box-shadow .25s ease}
}
@media(prefers-reduced-motion:reduce){
  *{transition:none!important;animation:none!important}
}

/* --- Dark mode support (optional, progressive) --- */
@media(prefers-color-scheme:dark){
  body{background:#0f0f1a;color:#e0e0e0}
  .site-header{background:rgba(15,15,26,.97);border-bottom-color:#2a2a3e}
  .post-card,.featured-post,.toc,.sidebar-widget{background:#1a1a2e;border-color:#2a2a3e}
  .post-card-title a{color:#e0e0e0}
  .post-card-excerpt{color:#999}
  .article-content p{color:#ccc}
  .article-content h2{border-top-color:#2a2a3e}
  .article-content th{background:#0d7c5f}
  .article-content td{border-bottom-color:#2a2a3e}
  .breadcrumbs,.post-card-meta{color:#777}
  .hero p{color:#999}
  .nav-search{background:#1a1a2e;border-color:#2a2a3e}
  .nav-search input{color:#e0e0e0}
  .main-nav a{color:#aaa}
}
