/*
Theme Name: Techy TitBits
Theme URI: https://techytitbits.co.uk
Author: Techy TitBits
Author URI: https://techytitbits.co.uk
Description: Custom theme for Techy TitBits - Snackable Tech Tips
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: techy-titbits
*/

/* ============================================
   GOOGLE FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
  --navy: #1B2B6B;
  --orange: #FF6B00;
  --yellow: #FFD700;
  --blue: #00AAFF;
  --white: #FFFFFF;
  --light-bg: #F8F9FA;
  --dark-text: #1a1a2e;
  --grey-text: #6c757d;
  --border: #e9ecef;
  --shadow: 0 4px 20px rgba(0,0,0,0.08);
  --shadow-hover: 0 8px 30px rgba(0,0,0,0.15);
  --radius: 12px;
  --radius-lg: 20px;
  --transition: all 0.3s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--dark-text);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--orange); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--navy); }

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  line-height: 1.3;
  color: var(--dark-text);
}

p { margin-bottom: 1rem; }
ul { list-style: none; }

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

.section { padding: 80px 0; }
.section-sm { padding: 50px 0; }

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-size: 2.2rem;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--grey-text);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

.section-tag {
  display: inline-block;
  background: rgba(255, 107, 0, 0.1);
  color: var(--orange);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 50px;
  margin-bottom: 16px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
  text-decoration: none;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
}

.btn-primary:hover {
  background: #e55f00;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 107, 0, 0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,0.5);
}

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

.btn-outline {
  background: transparent;
  color: var(--navy);
  border: 2px solid var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
#masthead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(27, 43, 107, 0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  transition: var(--transition);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 1200px;
  margin: 0 auto;
}

.site-logo img {
  height: 52px;
  width: auto;
}

.site-logo .logo-text {
  display: flex;
  flex-direction: column;
}

.site-logo .logo-text span:first-child {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--white);
  line-height: 1;
}

.site-logo .logo-text span:last-child {
  font-size: 0.7rem;
  color: var(--yellow);
  letter-spacing: 1px;
  text-transform: uppercase;
}

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

.main-nav ul li a {
  color: rgba(255,255,255,0.85);
  font-family: 'Poppins', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: 8px;
  transition: var(--transition);
}

.main-nav ul li a:hover {
  color: var(--white);
  background: rgba(255,255,255,0.1);
}

.nav-cta a {
  background: var(--orange) !important;
  color: var(--white) !important;
  border-radius: 50px !important;
  padding: 10px 24px !important;
}

.nav-cta a:hover {
  background: #e55f00 !important;
  transform: translateY(-1px);
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, #0d1a4a 60%, #162268 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 90px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(0, 170, 255, 0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 107, 0, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 215, 0, 0.15);
  border: 1px solid rgba(255, 215, 0, 0.3);
  color: var(--yellow);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 50px;
  margin-bottom: 24px;
}

.hero-badge::before {
  content: '✦';
  font-size: 0.7rem;
}

.hero-content h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--white);
  margin-bottom: 20px;
  line-height: 1.2;
}

.hero-content h1 span {
  color: var(--orange);
  position: relative;
}

.hero-content p {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.75);
  margin-bottom: 36px;
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.hero-stats {
  display: flex;
  gap: 32px;
}

.stat {
  text-align: left;
}

.stat-number {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--white);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-logo-wrap {
  position: relative;
}

.hero-logo-wrap img {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.15);
  box-shadow: 0 0 80px rgba(0, 170, 255, 0.25), 0 0 40px rgba(255, 107, 0, 0.15);
}

.hero-logo-wrap::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  border: 2px dashed rgba(255,215,0,0.3);
  animation: spin 20s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   TRUST BAR
   ============================================ */
.trust-bar {
  background: var(--light-bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}

.trust-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--grey-text);
  font-size: 0.9rem;
  font-weight: 500;
}

.trust-item .icon {
  font-size: 1.2rem;
}

/* ============================================
   FEATURED TOOLS
   ============================================ */
.tools-section { background: var(--white); }

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}

.tool-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--orange), var(--yellow));
  transform: scaleX(0);
  transition: var(--transition);
}

.tool-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-4px);
  border-color: transparent;
}

.tool-card:hover::before {
  transform: scaleX(1);
}

.tool-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--navy), #2d4ab0);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 20px;
}

.tool-badge {
  display: inline-block;
  background: rgba(255, 107, 0, 0.1);
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 50px;
  margin-bottom: 10px;
}

.tool-card h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.tool-card p {
  color: var(--grey-text);
  font-size: 0.92rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.tool-commission {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #28a745;
  font-weight: 600;
  margin-bottom: 20px;
}

.tool-commission::before { content: '💰'; }

.tool-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--navy);
  font-weight: 600;
  font-size: 0.92rem;
  font-family: 'Poppins', sans-serif;
}

.tool-link:hover {
  color: var(--orange);
  gap: 10px;
}

.tool-link::after { content: '→'; }

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-section { background: var(--light-bg); }

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 70px;
  align-items: center;
}

.about-image {
  position: relative;
}

.about-image img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  width: 100%;
}

.about-image-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--orange);
  color: var(--white);
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  padding: 16px 20px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  text-align: center;
  box-shadow: 0 8px 25px rgba(255, 107, 0, 0.4);
}

.about-image-badge span {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1;
}

.about-content .section-tag { margin-bottom: 16px; }

.about-content h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.about-content p {
  color: var(--grey-text);
  margin-bottom: 16px;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 28px 0;
}

.about-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.about-feature .check {
  width: 22px;
  height: 22px;
  background: linear-gradient(135deg, var(--orange), var(--yellow));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  color: white;
  flex-shrink: 0;
  margin-top: 2px;
}

.about-feature p {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--dark-text);
  margin: 0;
}

/* ============================================
   LATEST POSTS
   ============================================ */
.posts-section { background: var(--white); }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.post-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

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

.post-card-img {
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--navy), #2d4ab0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  overflow: hidden;
}

.post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card-body { padding: 24px; }

.post-category {
  display: inline-block;
  background: rgba(255, 107, 0, 0.1);
  color: var(--orange);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 50px;
  margin-bottom: 12px;
}

.post-card-body h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  line-height: 1.4;
}

.post-card-body h3 a {
  color: var(--dark-text);
}

.post-card-body h3 a:hover { color: var(--orange); }

.post-card-body p {
  color: var(--grey-text);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--grey-text);
}

.read-more {
  color: var(--orange);
  font-weight: 600;
}

.read-more:hover { color: var(--navy); }

/* ============================================
   NEWSLETTER CTA
   ============================================ */
.newsletter-section {
  background: linear-gradient(135deg, var(--navy) 0%, #0d1a4a 100%);
  position: relative;
  overflow: hidden;
}

.newsletter-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,107,0,0.1) 0%, transparent 70%);
  border-radius: 50%;
}

.newsletter-inner {
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 auto;
}

.newsletter-inner h2 {
  color: var(--white);
  font-size: 2rem;
  margin-bottom: 16px;
}

.newsletter-inner p {
  color: rgba(255,255,255,0.7);
  margin-bottom: 32px;
  font-size: 1.05rem;
}

.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto 16px;
}

.newsletter-form input {
  flex: 1;
  padding: 14px 20px;
  border: none;
  border-radius: 50px;
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  outline: none;
}

.newsletter-disclaimer {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}

/* ============================================
   FOOTER
   ============================================ */
#colophon {
  background: #0d1225;
  color: rgba(255,255,255,0.7);
  padding: 60px 0 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand img {
  height: 50px;
  width: auto;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-link {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: rgba(255,255,255,0.7);
  transition: var(--transition);
}

.social-link:hover {
  background: var(--orange);
  color: var(--white);
  transform: translateY(-2px);
}

.footer-col h4 {
  color: var(--white);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 20px;
  font-family: 'Poppins', sans-serif;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--orange);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.footer-bottom p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.4);
  margin: 0;
}

.footer-disclaimer {
  background: rgba(255,255,255,0.04);
  padding: 16px 24px;
  border-radius: var(--radius);
  margin-bottom: 24px;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.6;
}

/* ============================================
   BLOG PAGES
   ============================================ */
.page-header {
  background: linear-gradient(135deg, var(--navy), #0d1a4a);
  padding: 120px 0 60px;
  text-align: center;
}

.page-header h1 { color: var(--white); font-size: 2.5rem; }
.page-header p { color: rgba(255,255,255,0.7); margin-top: 12px; }

.content-area {
  padding: 60px 0;
}

.content-inner {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.main-content article {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 32px;
  transition: var(--transition);
}

.main-content article:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.entry-header { padding: 28px 28px 0; }

.entry-header h2 {
  font-size: 1.4rem;
  margin: 10px 0;
}

.entry-header h2 a { color: var(--dark-text); }
.entry-header h2 a:hover { color: var(--orange); }

.entry-meta {
  font-size: 0.82rem;
  color: var(--grey-text);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.entry-content { padding: 16px 28px 28px; color: var(--grey-text); }

.sidebar .widget {
  background: var(--light-bg);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-bottom: 28px;
}

.sidebar .widget h3 {
  font-size: 1rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--orange);
  display: inline-block;
}

/* Single Post */
.single-post-header {
  background: linear-gradient(135deg, var(--navy), #0d1a4a);
  padding: 120px 0 60px;
}

.single-post-header h1 {
  color: var(--white);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  max-width: 800px;
}

.single-post-header .entry-meta { color: rgba(255,255,255,0.6); margin-top: 16px; }

.single-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 60px 24px;
}

.single-content h2 { margin: 36px 0 16px; font-size: 1.6rem; }
.single-content h3 { margin: 28px 0 12px; font-size: 1.3rem; }
.single-content p { color: #444; line-height: 1.8; margin-bottom: 20px; }
.single-content ul, .single-content ol { padding-left: 24px; margin-bottom: 20px; }
.single-content li { margin-bottom: 8px; color: #444; }
.single-content img { border-radius: var(--radius); margin: 28px 0; }

.affiliate-box {
  background: linear-gradient(135deg, rgba(27,43,107,0.05), rgba(255,107,0,0.05));
  border: 1px solid rgba(255,107,0,0.2);
  border-left: 4px solid var(--orange);
  border-radius: var(--radius);
  padding: 24px;
  margin: 32px 0;
}

.affiliate-box p { color: var(--grey-text); margin: 0 0 8px; font-size: 0.9rem; }
.affiliate-box strong { color: var(--dark-text); }

/* ============================================
   TOOLS / RESOURCES PAGE
   ============================================ */
.resources-intro {
  background: linear-gradient(135deg, var(--navy), #0d1a4a);
  padding: 120px 0 60px;
  text-align: center;
}

.resources-intro h1 { color: var(--white); font-size: 2.5rem; }
.resources-intro p { color: rgba(255,255,255,0.7); margin-top: 12px; font-size: 1.1rem; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-visual { display: none; }
  .hero-buttons { justify-content: center; }
  .hero-stats { justify-content: center; }
  .about-inner { grid-template-columns: 1fr; }
  .about-image { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .content-inner { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

@media (max-width: 768px) {
  .main-nav { display: none; }
  .menu-toggle { display: flex; }
  .main-nav.open { display: block; position: absolute; top: 100%; left: 0; right: 0; background: var(--navy); padding: 16px; }
  .main-nav.open ul { flex-direction: column; }
  .section { padding: 50px 0; }
  .section-header h2 { font-size: 1.7rem; }
  .newsletter-form { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .about-features { grid-template-columns: 1fr; }
  .trust-bar-inner { gap: 24px; }
}

@media (max-width: 480px) {
  .hero-content h1 { font-size: 1.8rem; }
  .hero-stats { flex-wrap: wrap; gap: 20px; }
  .tools-grid { grid-template-columns: 1fr; }
}

/* ============================================
   WORDPRESS DEFAULTS
   ============================================ */
.aligncenter { display: block; margin: 0 auto; }
.alignleft { float: left; margin: 0 20px 20px 0; }
.alignright { float: right; margin: 0 0 20px 20px; }
.wp-caption { max-width: 100%; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
