/*
 Theme Name:   TinyTech Child
 Theme URI:    https://thetinytech.com
 Description:  TinyTech Child Theme for Elementor — replicates the TinyTech magazine layout
 Author:       TinyTech
 Author URI:   https://thetinytech.com
 Template:     hello-elementor
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  tinytech-child
*/

/* ============================================================
   GLOBAL VARIABLES & RESET
   ============================================================ */
:root {
  --color-primary:    #f5c400;   /* Yellow accent */
  --color-dark:       #1a1a2e;   /* Deep navy/dark */
  --color-nav-bg:     #1e1e30;
  --color-body-bg:    #f4f4f4;
  --color-white:      #ffffff;
  --color-text:       #333333;
  --color-muted:      #777777;
  --color-border:     #e0e0e0;
  --color-tag-tech:   #0066cc;
  --color-tag-cyber:  #cc0000;
  --font-heading:     'Oswald', 'Arial Black', sans-serif;
  --font-body:        'Source Sans Pro', 'Segoe UI', sans-serif;
  --max-width:        1200px;
}

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

body {
  font-family: var(--font-body);
  background: var(--color-body-bg);
  color: var(--color-text);
  font-size: 15px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--color-primary); }
img { max-width: 100%; display: block; }

/* ============================================================
   TOP BAR (date + subscribe)
   ============================================================ */
.tinytech-topbar {
  background: var(--color-dark);
  color: #aaa;
  font-size: 12px;
  padding: 6px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tinytech-topbar .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.tinytech-topbar .subscribe-btn {
  background: var(--color-primary);
  color: var(--color-dark);
  font-weight: 700;
  font-size: 11px;
  padding: 4px 14px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================================
   HEADER / LOGO + SEARCH
   ============================================================ */
.tinytech-header {
  background: var(--color-white);
  padding: 14px 0;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.tinytech-header .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tinytech-logo img { height: 50px; width: auto; }
.tinytech-logo .logo-text-wrap { display: flex; flex-direction: column; line-height: 1; }
.tinytech-logo .logo-tiny {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  color: var(--color-primary);
  letter-spacing: 1px;
}
.tinytech-logo .logo-tech {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 900;
  color: var(--color-dark);
  letter-spacing: 1px;
}
.tinytech-search {
  display: flex;
  align-items: center;
  border: 1.5px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  width: 280px;
}
.tinytech-search input {
  border: none;
  outline: none;
  padding: 7px 12px;
  font-size: 13px;
  width: 100%;
  font-family: var(--font-body);
}
.tinytech-search button {
  background: none;
  border: none;
  padding: 7px 12px;
  cursor: pointer;
  color: var(--color-muted);
  font-size: 15px;
}

/* ============================================================
   NAVIGATION BAR
   ============================================================ */
.tinytech-nav {
  background: var(--color-dark);
  position: sticky;
  top: 0;
  z-index: 1000;
}
.tinytech-nav .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tinytech-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0;
}
.tinytech-nav ul li a {
  display: block;
  padding: 12px 16px;
  color: #ccc;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: var(--font-heading);
  transition: color 0.2s, background 0.2s;
}
.tinytech-nav ul li a:hover,
.tinytech-nav ul li.active a {
  color: var(--color-primary);
  background: rgba(255,255,255,0.05);
}
.tinytech-nav ul li.current_page_item > a { color: var(--color-primary); }
.tinytech-nav .nav-subscribe {
  background: var(--color-primary);
  color: var(--color-dark) !important;
  font-weight: 900 !important;
  padding: 8px 18px !important;
  border-radius: 4px;
  margin-left: 10px;
}
.tinytech-nav .nav-subscribe:hover { background: #e0b000 !important; }

/* ============================================================
   CATEGORY TAGS
   ============================================================ */
.post-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 8px;
  border-radius: 2px;
  margin-bottom: 6px;
  color: #fff;
}
.post-tag.technology  { background: var(--color-tag-tech); }
.post-tag.cyber-security { background: var(--color-tag-cyber); }
.post-tag.mobile      { background: #009900; }
.post-tag.software    { background: #9900cc; }

/* ============================================================
   HERO / FEATURED POST
   ============================================================ */
.tinytech-hero { padding: 24px 0 10px; }
.tinytech-hero .container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 24px;
}
.hero-main { position: relative; overflow: hidden; border-radius: 4px; }
.hero-main img { width: 100%; height: 320px; object-fit: cover; border-radius: 4px; }
.hero-main .hero-content { padding: 14px 0 6px; }
.hero-main h2 { font-family: var(--font-heading); font-size: 22px; font-weight: 700; line-height: 1.3; margin-bottom: 8px; }
.hero-main p { font-size: 14px; color: var(--color-muted); margin-bottom: 10px; }
.hero-meta { font-size: 12px; color: var(--color-muted); }
.hero-meta .author { font-weight: 700; color: var(--color-primary); text-transform: uppercase; font-size: 11px; }
.read-more-btn {
  display: inline-block;
  padding: 6px 16px;
  border: 1.5px solid var(--color-border);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 3px;
  margin-top: 8px;
  color: var(--color-text);
  transition: all 0.2s;
}
.read-more-btn:hover { background: var(--color-dark); color: #fff; border-color: var(--color-dark); }

/* ============================================================
   SIDEBAR TRENDING
   ============================================================ */
.tinytech-sidebar-trending {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}
.trending-tabs { display: flex; border-bottom: 2px solid var(--color-border); }
.trending-tabs button {
  flex: 1; padding: 10px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.5px; border: none; background: none;
  cursor: pointer; color: var(--color-muted); border-bottom: 2px solid transparent;
  margin-bottom: -2px; transition: all 0.2s;
}
.trending-tabs button.active { color: var(--color-dark); border-bottom-color: var(--color-primary); }
.trending-list { padding: 10px; }
.trending-item { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.trending-item:last-child { border-bottom: none; }
.trending-item img { width: 75px; height: 55px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.trending-item .trending-title { font-size: 13px; font-weight: 600; line-height: 1.4; }
.trending-item .trending-meta { font-size: 11px; color: var(--color-muted); margin-top: 4px; }

/* ============================================================
   EDITOR'S PICK GRID
   ============================================================ */
.section-title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}
.editors-pick { padding: 28px 0; background: var(--color-white); margin: 20px 0; }
.editors-pick .container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.posts-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card { background: var(--color-white); border-radius: 4px; overflow: hidden; transition: box-shadow 0.2s; }
.post-card:hover { box-shadow: 0 4px 18px rgba(0,0,0,0.10); }
.post-card img { width: 100%; height: 180px; object-fit: cover; }
.post-card .card-body { padding: 12px 0 6px; }
.post-card h3 { font-family: var(--font-heading); font-size: 15px; font-weight: 700; line-height: 1.4; margin-bottom: 6px; }
.post-card .card-meta { font-size: 11px; color: var(--color-muted); }

/* ============================================================
   NEWS INDEX (left) + POPULAR NEWS (right)
   ============================================================ */
.news-section { padding: 28px 0; }
.news-section .container {
  max-width: var(--max-width); margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: 1fr 300px; gap: 28px;
}
.news-list-item { display: flex; gap: 16px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--color-border); }
.news-list-item:first-of-type { border-top: 1px solid var(--color-border); }
.news-list-item img { width: 200px; height: 130px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.news-list-item .news-body {}
.news-list-item h3 { font-family: var(--font-heading); font-size: 17px; font-weight: 700; line-height: 1.4; margin-bottom: 8px; }
.news-list-item p { font-size: 13px; color: var(--color-muted); margin-bottom: 10px; line-height: 1.5; }
.news-list-item .news-meta { font-size: 11px; color: var(--color-muted); }
.news-list-item .news-meta .author { font-weight: 700; color: var(--color-primary); text-transform: uppercase; }

/* Popular news sidebar */
.popular-news-sidebar {}
.popular-news-sidebar .section-title { display: block; }
.popular-item { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--color-border); }
.popular-item:last-child { border-bottom: none; }
.popular-num { font-family: var(--font-heading); font-size: 28px; font-weight: 900; color: #ddd; line-height: 1; flex-shrink: 0; width: 30px; }
.popular-item .popular-info {}
.popular-item h4 { font-size: 13px; font-weight: 700; line-height: 1.4; margin-bottom: 4px; }
.popular-item .shares { font-size: 11px; color: var(--color-muted); }
.popular-featured { margin-bottom: 16px; }
.popular-featured img { width: 100%; height: 160px; object-fit: cover; border-radius: 4px; margin-bottom: 10px; }
.popular-featured h3 { font-family: var(--font-heading); font-size: 15px; font-weight: 700; margin-bottom: 4px; }

/* Pagination */
.pagination { display: flex; align-items: center; gap: 8px; padding: 20px 0; }
.pagination a, .pagination span {
  padding: 6px 13px; border: 1.5px solid var(--color-border); border-radius: 3px;
  font-size: 12px; font-weight: 700; color: var(--color-text); text-transform: uppercase;
}
.pagination a:hover { background: var(--color-dark); color: #fff; border-color: var(--color-dark); }
.pagination .current { background: var(--color-primary); color: var(--color-dark); border-color: var(--color-primary); }

/* ============================================================
   FEATURED ON STRIP
   ============================================================ */
.featured-on { background: var(--color-white); padding: 32px 0; border-top: 1px solid var(--color-border); }
.featured-on .container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; text-align: center; }
.featured-on h3 { font-family: var(--font-heading); font-size: 16px; color: var(--color-muted); margin-bottom: 20px; letter-spacing: 1px; text-transform: uppercase; }
.featured-logos { display: flex; justify-content: center; align-items: center; gap: 20px; flex-wrap: wrap; }
.featured-logos .logo-badge {
  padding: 12px 24px; border-radius: 4px; font-weight: 900;
  font-size: 15px; letter-spacing: 0.5px; display: flex; align-items: center; gap: 8px;
}
.logo-badge.goodfirms  { background: #1a5cf0; color: #fff; }
.logo-badge.crunchbase { background: #0288d1; color: #fff; }
.logo-badge.prnews     { border: 2px solid #e53935; color: #e53935; }
.logo-badge.hackernoon { border: 2px solid #333; color: #333; }

/* ============================================================
   FOOTER
   ============================================================ */
.tinytech-footer {
  background: var(--color-dark);
  color: #bbb;
  padding: 48px 0 0;
}
.footer-grid {
  max-width: var(--max-width); margin: 0 auto; padding: 0 20px;
  display: grid; grid-template-columns: 1.2fr 1.5fr 1fr; gap: 36px;
  padding-bottom: 36px;
}
.footer-col h4 {
  font-family: var(--font-heading); font-size: 14px; font-weight: 700;
  color: var(--color-white); text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 16px; padding-bottom: 8px; border-bottom: 2px solid var(--color-primary);
  display: inline-block;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 7px; }
.footer-col ul li a { font-size: 13px; color: #999; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--color-primary); }
.footer-categories { columns: 2; gap: 12px; }

/* Footer recent news */
.footer-news-item { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.footer-news-item:last-child { border-bottom: none; }
.footer-news-item img { width: 60px; height: 45px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }
.footer-news-item .fn-title { font-size: 12px; color: #ccc; line-height: 1.4; font-weight: 600; }
.footer-news-item .fn-meta { font-size: 11px; color: #777; margin-top: 3px; }

/* Contact */
.footer-contact { font-size: 13px; color: #999; margin-top: 8px; }
.footer-contact strong { color: #ccc; }

/* Footer bottom bar */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 14px 20px;
  max-width: var(--max-width); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
}
.footer-bottom p { font-size: 12px; color: #666; }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 30px; height: 30px; border-radius: 50%; background: rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: center; font-size: 13px;
  color: #aaa; transition: background 0.2s, color 0.2s;
}
.footer-social a:hover { background: var(--color-primary); color: var(--color-dark); }
.footer-wrap { background: var(--color-dark); }

/* ============================================================
   ELEMENTOR OVERRIDES — keep Elementor sections full-width
   ============================================================ */
.elementor-section.elementor-section-boxed > .elementor-container {
  max-width: var(--max-width);
}
.elementor-widget-heading .elementor-heading-title { font-family: var(--font-heading); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .tinytech-hero .container,
  .news-section .container { grid-template-columns: 1fr; }
  .posts-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .posts-grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .tinytech-nav ul { flex-wrap: wrap; }
  .news-list-item { flex-direction: column; }
  .news-list-item img { width: 100%; height: 180px; }
}
