/*
Theme Name: TechFixer GP
Theme URI: https://fixtechly.com/
Description: GeneratePress child theme — TechFixer magazine homepage (hero stories, category sections, latest guides with AJAX load more, AdSense ad slots). Header, colors, typography and layout are controlled from the Customizer (Appearance > Customize), just like SupportMeIndia.
Author: Kai for Galib
Template: generatepress
Version: 1.0.7
License: GNU General Public License v2 or later
Text Domain: techfixer-gp
*/

/* ============================================================
   TechFixer magazine modules (homepage). Colors follow the
   Customizer via GeneratePress variables, with fallbacks.
   ============================================================ */
:root{
	--tfg-accent:var(--accent,#1a73e8);
	--tfg-accent-dark:#0d5bca;
	--tfg-text:var(--contrast,#1a1a1a);
	--tfg-muted:#6b7280;
	--tfg-border:#e8e8e8;
	--tfg-soft:#f7f8fa;
	--tfg-radius:8px;
}

/* ---------- Hero ---------- */
.tfg-hero{padding:28px 0 8px}
.tfg-hero-grid{display:grid;gap:20px}
@media(min-width:900px){.tfg-hero-grid{grid-template-columns:1.6fr 1fr}}
.tfg-hero-featured{background:var(--tfg-soft);border:1px solid var(--tfg-border);border-radius:var(--tfg-radius);padding:28px}
.tfg-hero-featured h2{font-size:clamp(24px,3.4vw,34px);margin:.4em 0 .5em;letter-spacing:-.5px}
.tfg-hero-featured h2 a{color:var(--tfg-text)}
.tfg-hero-featured h2 a:hover{color:var(--tfg-accent);text-decoration:none}
.tfg-hero-featured .tfg-excerpt{color:#374151;font-size:16px}
.tfg-hero-side{display:flex;flex-direction:column;gap:0;background:#fff;border:1px solid var(--tfg-border);border-radius:var(--tfg-radius);overflow:hidden}
.tfg-hero-side article{padding:16px 18px;border-bottom:1px solid var(--tfg-border)}
.tfg-hero-side article:last-child{border-bottom:0}
.tfg-hero-side h3{font-size:16px;margin:0 0 6px}
.tfg-hero-side h3 a{color:var(--tfg-text)}
.tfg-hero-side h3 a:hover{color:var(--tfg-accent);text-decoration:none}

/* ---------- Badges + meta ---------- */
.tfg-badge{display:inline-block;background:var(--tfg-accent);color:#fff;font-size:11px;font-weight:700;letter-spacing:.6px;text-transform:uppercase;padding:4px 10px;border-radius:20px;margin-bottom:8px}
.tfg-badge:hover{color:#fff;text-decoration:none;background:var(--tfg-accent-dark)}
.tfg-meta{font-size:13px;color:var(--tfg-muted);display:flex;flex-wrap:wrap;gap:6px 14px;align-items:center}
.tfg-meta .tfg-dot::before{content:"\2022";margin-right:14px;color:#cbd5e1}

/* ---------- Category sections ---------- */
.tfg-cat-section{padding:26px 0 6px}
.tfg-section-head{display:flex;align-items:center;justify-content:space-between;border-bottom:3px solid var(--tfg-text);margin-bottom:20px;padding-bottom:10px}
.tfg-section-head h2{font-size:21px;margin:0;text-transform:uppercase;letter-spacing:.4px}
.tfg-section-head h2 span{border-bottom:3px solid var(--tfg-accent);padding-bottom:10px}
.tfg-view-all{font-size:14px;font-weight:700;white-space:nowrap}

/* ---------- Cards ---------- */
.tfg-card-grid{display:grid;gap:18px}
@media(min-width:600px){.tfg-card-grid{grid-template-columns:repeat(2,1fr)}}
@media(min-width:1024px){.tfg-card-grid.tfg-cols-4{grid-template-columns:repeat(4,1fr)}}
.tfg-post-card{background:#fff;border:1px solid var(--tfg-border);border-radius:var(--tfg-radius);padding:20px;display:flex;flex-direction:column;transition:box-shadow .18s ease,transform .18s ease}
.tfg-post-card:hover{box-shadow:0 10px 28px rgba(0,0,0,.08);transform:translateY(-2px)}
.tfg-post-card h3{font-size:17px;margin:0 0 8px}
.tfg-post-card h3 a{color:var(--tfg-text)}
.tfg-post-card h3 a:hover{color:var(--tfg-accent);text-decoration:none}
.tfg-post-card .tfg-excerpt{font-size:14px;color:#4b5563;flex:1}
.tfg-post-card .tfg-meta{margin-top:12px;padding-top:12px;border-top:1px solid var(--tfg-border)}

/* ---------- Latest + load more ---------- */
.tfg-latest-section{padding:26px 0}
.tfg-load-more-wrap{text-align:center;margin-top:26px}
.tfg-load-more-btn{background:#fff;border:2px solid var(--tfg-accent);color:var(--tfg-accent);font-size:15px;font-weight:700;padding:12px 42px;border-radius:30px;cursor:pointer;min-height:48px;transition:all .18s ease}
.tfg-load-more-btn:hover{background:var(--tfg-accent);color:#fff}
.tfg-load-more-btn:disabled{opacity:.6;cursor:wait}
.tfg-load-more-spinner{display:none;text-align:center;color:var(--tfg-muted);padding:10px}

/* ---------- Ad slots ---------- */
.tfg-ad-slot{margin:0 auto;text-align:center;max-width:100%;overflow:hidden}
.tfg-ad-slot:empty{display:none}
.tfg-ad-below-header{padding:16px 0 0}
.tfg-ad-above-footer{padding:24px 0 0}
.tfg-ad-in-article{margin:24px auto;clear:both}

/* ---------- v1.0.1: front-page layout fixes ---------- */
/* Wrapper keeps every magazine module in one block so GeneratePress'
 * flex content wrappers can't squeeze them side-by-side. */
.tfg-front{flex:1 1 100%;min-width:0;width:100%}
/* Magazine homepage is full-width: no sidebar on the front page. */
body.home #primary{width:100%}
body.home #secondary{display:none}
/* Sane default logo size (Customizer > Site Identity > Logo Width overrides this). */
.site-header .site-logo img{max-width:180px;height:auto}

/* ---------- v1.0.6: SMI-style dark footer inside a rounded container box ---------- */
.tfg-footer{background:#0b0b0c;color:#d4d4d4;padding:30px 18px}
.tfg-footer-box{background:#161617;border:1px solid #262628;border-radius:20px;max-width:1160px;margin:0 auto;padding:50px 46px 0;overflow:hidden}
.tfg-footer-grid{display:grid;gap:36px;padding-bottom:46px}
@media(min-width:700px){.tfg-footer-grid{grid-template-columns:1fr 1fr}}
@media(min-width:1000px){.tfg-footer-grid{grid-template-columns:1.45fr 1fr 1fr 1.25fr}}
.tfg-footer-col h4{color:#fff;font-size:17px;font-weight:700;margin:0}
.tfg-footer-col h4::after{content:"";display:block;width:34px;height:3px;background:var(--tfg-accent);margin-top:10px;border-radius:2px}
.tfg-footer-col p{font-size:14px;line-height:1.75;color:#b5b5b5;margin:14px 0 0}
.tfg-footer-col p a{color:#d4d4d4}
.tfg-footer-col ul{list-style:none;margin:14px 0 0;padding:0}
.tfg-footer-col li{margin:0 0 11px}
.tfg-footer-col ul a{color:#d4d4d4;font-size:14.5px;text-decoration:none}
.tfg-footer-col ul a:hover{color:#fff;text-decoration:underline}
/* Social icons: dark circles, accent on hover. */
.tfg-social-row{display:flex;gap:10px;margin-top:20px}
.tfg-social-row a{width:36px;height:36px;border-radius:50%;background:#2c2c2c;color:#fff;display:inline-flex;align-items:center;justify-content:center;text-decoration:none}
.tfg-social-row a:hover{background:var(--tfg-accent);color:#fff}
.tfg-social-row svg{width:16px;height:16px;display:block}
/* Bottom bar (rendered inside the footer box, edge to edge). */
.tfg-footer-bottom{border-top:1px solid #2b2b2c;margin:0 -46px;padding:18px 46px;display:flex;justify-content:space-between;align-items:center;gap:10px 24px;flex-wrap:wrap}
.tfg-footer-bottom .tfg-copyright-text{font-size:13px;color:#9a9a9a}
.tfg-footer-bottom .tfg-legal-links{font-size:13px}
.tfg-footer-bottom .tfg-legal-links a{color:#d4d4d4;margin:0 9px;text-decoration:none}
.tfg-footer-bottom .tfg-legal-links a:last-child{margin-right:0}
.tfg-footer-bottom .tfg-legal-links a:hover{color:#fff;text-decoration:underline}
/* Mobile: tighter box, single column, centered bottom bar. */
@media(max-width:699px){
.tfg-footer{padding:22px 12px}
.tfg-footer-box{padding:38px 26px 0;border-radius:16px}
.tfg-footer-grid{gap:30px;padding-bottom:36px}
.tfg-footer-bottom{margin:0 -26px;padding:16px 26px;flex-direction:column;justify-content:center;text-align:center}
}
/* Hide GeneratePress' native footer bar — we render our own bottom bar. */
.site-footer .copyright-bar{display:none!important}

/* ---------- v1.0.3: SMI-style single article page ---------- */
/* Layout: article card + right sidebar, same anti-squeeze wrapper trick. */
.tfg-single{flex:1 1 100%;min-width:0;width:100%;padding:26px 0 10px}
.tfg-single-grid{display:grid;gap:26px}
@media(min-width:960px){.tfg-single-grid{grid-template-columns:minmax(0,1fr) 340px}}
body.single #primary{width:100%}
body.single #secondary{display:none}

/* Article card. */
.tfg-article-card{background:#fff;border:1px solid var(--tfg-border);border-radius:12px;padding:clamp(20px,4vw,38px);min-width:0}
.tfg-article-title{font-size:clamp(24px,3.4vw,30px);font-weight:800;color:#0f172a;line-height:1.35;margin:0 0 12px;letter-spacing:-.3px}
.tfg-article-meta{font-size:13.5px;color:var(--tfg-muted);display:flex;flex-wrap:wrap;gap:4px 8px;align-items:center;padding-bottom:18px;border-bottom:1px solid var(--tfg-border)}
.tfg-meta-label{color:#9ca3af}
.tfg-meta-link{color:var(--tfg-accent);font-weight:600}
.tfg-meta-link:hover{text-decoration:underline}
.tfg-meta-date{color:var(--tfg-muted)}

/* Featured image, contained with rounded corners. */
.tfg-article-featured{margin:22px 0}
.tfg-article-featured img{width:100%;height:auto;border-radius:8px;display:block}

/* "In This Guide" jump box (auto-built from H2s). */
.tfg-guide-box{border:1px solid var(--tfg-border);border-radius:8px;margin:0 0 24px;overflow:hidden;background:#fff}
.tfg-guide-toggle{width:100%;display:flex;align-items:center;justify-content:space-between;background:#f1f5ff;border:0;padding:13px 18px;font-size:15px;font-weight:700;color:#0f172a;cursor:pointer}
.tfg-guide-chevron{transition:transform .2s ease;color:var(--tfg-accent)}
.tfg-collapsed .tfg-guide-chevron{transform:rotate(-90deg)}
.tfg-guide-list{list-style:none;margin:0;padding:6px 18px 14px;counter-reset:tfg-guide}
.tfg-collapsed .tfg-guide-list{display:none}
.tfg-guide-list li{padding:7px 0;border-bottom:1px dashed #e5e7eb;display:flex;gap:10px;align-items:baseline}
.tfg-guide-list li:last-child{border-bottom:0}
.tfg-guide-list li::before{counter-increment:tfg-guide;content:counter(tfg-guide);font-size:12px;font-weight:700;color:var(--tfg-accent);min-width:18px}
.tfg-guide-list a{color:var(--tfg-accent);font-size:14.5px;font-weight:600}
.tfg-guide-list a:hover{text-decoration:underline}

/* Article body typography. */
.tfg-article-body{font-size:17px;line-height:1.8;color:#1f2937;overflow-wrap:break-word}
.tfg-article-body p{margin:0 0 1.25em}
.tfg-article-body h2{font-size:25px;font-weight:800;color:#111;margin:1.6em 0 .7em;letter-spacing:-.3px;scroll-margin-top:90px}
.tfg-article-body h3{font-size:20px;font-weight:700;color:#111;margin:1.4em 0 .6em}
.tfg-article-body h4{font-size:17px;font-weight:700;color:#111;margin:1.2em 0 .5em}
.tfg-article-body a{color:#1a73e8}
.tfg-article-body a:hover{text-decoration:underline}
.tfg-article-body img{max-width:100%;height:auto;border-radius:8px}
.tfg-article-body figure{margin:1.5em 0}
.tfg-article-body ul,.tfg-article-body ol{margin:0 0 1.25em;padding-left:1.4em}
.tfg-article-body li{margin-bottom:.45em}
.tfg-article-body blockquote{border-left:4px solid var(--tfg-accent);background:#f1f5ff;margin:1.5em 0;padding:14px 20px;border-radius:0 8px 8px 0}
.tfg-article-body blockquote p{margin:0}

/* Tags row: teal keywords with tag icon. */
.tfg-article-tags{display:flex;flex-wrap:wrap;gap:10px;margin:26px 0 6px;padding-top:20px;border-top:1px solid var(--tfg-border)}
.tfg-tag{display:inline-flex;align-items:center;gap:6px;color:#0d9488;font-size:13.5px;font-weight:700;text-decoration:none}
.tfg-tag:hover{color:#0b7c72;text-decoration:underline}

/* Author box. */
.tfg-author-box{display:flex;gap:18px;background:var(--tfg-soft);border:1px solid var(--tfg-border);border-radius:10px;padding:22px;margin:26px 0 6px}
.tfg-author-avatar img{border-radius:50%;display:block}
.tfg-author-heading{font-size:17px;font-weight:700;color:#0f172a;margin:0 0 8px}
.tfg-author-bio{font-size:14.5px;color:#4b5563;line-height:1.7;margin:0}

/* Recommended For You. */
.tfg-related{margin-top:30px}
.tfg-related-title{font-size:20px;font-weight:800;color:#0f172a;margin:0 0 4px}
.tfg-related-title::after{content:"";display:block;width:44px;height:3px;background:var(--tfg-accent);margin-top:8px;border-radius:2px}
.tfg-related-grid{display:grid;gap:18px;margin-top:18px}
@media(min-width:640px){.tfg-related-grid{grid-template-columns:repeat(3,1fr)}}
.tfg-related-card{background:#fff;border:1px solid var(--tfg-border);border-radius:8px;overflow:hidden;transition:box-shadow .18s ease,transform .18s ease}
.tfg-related-card:hover{box-shadow:0 10px 28px rgba(0,0,0,.08);transform:translateY(-2px)}
.tfg-related-thumb img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;display:block}
.tfg-related-card-title{font-size:15.5px;font-weight:700;line-height:1.45;margin:0;padding:14px 16px 18px}
.tfg-related-card-title a{color:var(--tfg-accent)}
.tfg-related-card-title a:hover{text-decoration:underline}

/* Archive card (v1.0.7): category/tag/date archives use the same
 * article card + sidebar layout as posts and pages. */
.tfg-archive-head{border-bottom:1px solid var(--tfg-border);margin-bottom:6px}
.tfg-archive-desc{font-size:15px;color:var(--tfg-muted);line-height:1.7;margin:0 0 4px}
.tfg-archive-desc p{margin:0 0 .8em}
.tfg-archive-list{margin:0}
.tfg-archive-item{padding:22px 0;border-bottom:1px solid var(--tfg-border)}
.tfg-archive-item:last-child{border-bottom:0}
.tfg-archive-item-title{font-size:20px;font-weight:700;line-height:1.45;margin:0 0 8px;letter-spacing:-.2px}
.tfg-archive-item-title a{color:#0f172a}
.tfg-archive-item-title a:hover{color:var(--tfg-accent)}
.tfg-archive-item-meta{font-size:13px;color:var(--tfg-muted);display:flex;gap:8px;align-items:center;margin-bottom:10px}
.tfg-archive-item-meta .tfg-dot{color:#cbd5e1}
.tfg-archive-item-excerpt{font-size:15px;line-height:1.7;color:#4b5563;margin:0}
.tfg-archive-pagination{margin-top:26px}
.tfg-archive-pagination .nav-links{display:flex;gap:10px;flex-wrap:wrap}
.tfg-archive-pagination a,.tfg-archive-pagination span{font-size:14px;font-weight:600;padding:9px 16px;border:1px solid var(--tfg-border);border-radius:8px;color:var(--tfg-accent);text-decoration:none;background:#fff}
.tfg-archive-pagination a:hover{border-color:var(--tfg-accent)}
.tfg-archive-pagination span.current{background:var(--tfg-accent);border-color:var(--tfg-accent);color:#fff}
.tfg-archive-empty{font-size:16px;color:var(--tfg-muted);padding:20px 0}

/* Single-post sidebar widgets. */
.tfg-side-col{min-width:0}
.tfg-widget{background:#fff;border:1px solid var(--tfg-border);border-radius:10px;padding:20px 20px 14px;margin-bottom:24px}
.tfg-widget-title{font-size:18px;font-weight:800;color:#0f172a;margin:0 0 6px}
.tfg-widget-title::after{content:"";display:block;width:38px;height:3px;background:var(--tfg-accent);margin-top:8px;border-radius:2px}
.tfg-widget-list{list-style:none;margin:6px 0 0;padding:0}
.tfg-widget-list li{display:flex;gap:12px;align-items:flex-start;padding:10px 0;border-bottom:1px solid #f1f5f9}
.tfg-widget-list li:last-child{border-bottom:0}
.tfg-widget-thumb{flex:0 0 64px}
.tfg-widget-thumb img{width:64px;height:64px;object-fit:cover;border-radius:6px;display:block}
.tfg-widget-link{font-size:14px;font-weight:600;color:#1f2937;line-height:1.5}
.tfg-widget-link:hover{color:var(--tfg-accent);text-decoration:none}
.tfg-trend-num{flex:0 0 34px;font-size:17px;font-weight:800;color:var(--tfg-accent);border:2px solid var(--tfg-accent);border-radius:8px;text-align:center;line-height:30px;height:34px}
.tfg-topics-box{border:1px solid var(--tfg-border);border-radius:8px;max-height:300px;overflow-y:auto;margin-top:10px;padding:6px 16px}
.tfg-topics-list{list-style:none;margin:0;padding:0}
.tfg-topics-list li{padding:8px 0;border-bottom:1px solid #f1f5f9;font-size:14px;font-weight:600}
.tfg-topics-list li:last-child{border-bottom:0}
.tfg-topics-list li::before{content:"";display:inline-block;width:8px;height:8px;background:var(--tfg-accent);border-radius:2px;margin-right:10px}
.tfg-topics-list a{color:#1f2937}
.tfg-topics-list a:hover{color:var(--tfg-accent);text-decoration:none}

/* Sidebar ad slot spacing. */
.tfg-side-col .tfg-ad-in-sidebar{margin:0 0 24px}

@media(max-width:959px){
	.tfg-author-box{flex-direction:column;align-items:flex-start}
}
@media(min-width:640px) and (max-width:959px){
	.tfg-side-col{display:grid;grid-template-columns:1fr 1fr;gap:0 24px}
	.tfg-side-col .tfg-widget:last-of-type{grid-column:1/-1}
}
