/*
Theme Name: TechEarths
Theme URI: https://techearths.com
Author: TechEarths
Author URI: https://techearths.com
Description: A clean, professional blog theme for Tech and Business niche. Features hero banner, category sections, and auto-publish ready structure.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: techearths
Tags: blog, technology, business, news, clean, responsive
*/

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

:root {
    --dark:    #1a1a2e;
    --accent:  #e8a020;
    --white:   #ffffff;
    --bg:      #f8f7f4;
    --border:  #e0ddd6;
    --text:    #1a1a2e;
    --muted:   #888888;
    --green:   #1a5c1a;
    --blue:    #1a3c8e;
    --orange:  #8a4000;
    --purple:  #5a1a8e;
    --red:     #8e1a1a;
}

body {
    font-family: 'DM Sans', 'Segoe UI', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 16px;
    line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* =============================================
   TOPBAR
   ============================================= */
.te-topbar {
    background: var(--dark);
    color: #f8f7f4;
    text-align: center;
    padding: 7px 20px;
    font-size: 12px;
    letter-spacing: 0.5px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.te-topbar .breaking { color: var(--accent); font-weight: 600; margin-right: 6px; }

/* =============================================
   HEADER
   ============================================= */
.te-header {
    background: var(--white);
    border-bottom: 2px solid var(--dark);
    padding: 18px 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.te-logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 36px;
    font-weight: 800;
    color: var(--dark);
    letter-spacing: -1px;
}
.te-logo span { color: var(--accent); }

/* =============================================
   NAVIGATION
   ============================================= */
.te-nav {
    background: var(--dark);
    padding: 0 40px;
}
.te-nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0;
}
.te-nav ul li a {
    display: block;
    padding: 13px 22px;
    color: #d0d0e0;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}
.te-nav ul li a:hover,
.te-nav ul li.current-menu-item a,
.te-nav ul li.current-cat a {
    color: var(--white);
    border-bottom-color: var(--accent);
}

/* =============================================
   HERO SECTION
   ============================================= */
.te-hero { padding: 32px 40px; }

.hero-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 16px;
    min-height: 480px;
}

.hero-main {
    grid-row: 1 / 3;
    background: var(--dark);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: opacity 0.2s;
}
.hero-main:hover { opacity: 0.92; }

.hero-main .post-thumb {
    width: 100%;
    height: 300px;
    object-fit: cover;
}
.hero-main .thumb-placeholder {
    height: 300px;
    background: linear-gradient(160deg, #0d1b3e 0%, #1a1a2e 50%, #2d1a40 100%);
}
.hero-main-body { padding: 24px; }
.hero-main-body .cat-badge {
    display: inline-block;
    background: var(--accent);
    color: var(--dark);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 2px;
    margin-bottom: 12px;
}
.hero-main-body h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--white);
    line-height: 1.35;
    margin-bottom: 10px;
}
.hero-main-body .post-meta {
    font-size: 12px;
    color: #9090b0;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.hero-main-body .post-meta .date { color: var(--accent); }

.hero-side {
    background: var(--white);
    border: 0.5px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: border-color 0.2s;
}
.hero-side:hover { border-color: var(--dark); }
.hero-side .post-thumb { width: 100%; height: 130px; object-fit: cover; }
.hero-side .thumb-placeholder {
    height: 130px;
    background: linear-gradient(135deg, #0a2640, #1a4060);
}
.hero-side:nth-child(3) .thumb-placeholder {
    background: linear-gradient(135deg, #1a0a2e, #3a1a5e);
}
.hero-side-body { padding: 14px; flex: 1; }
.hero-side-body h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--dark);
    margin-bottom: 6px;
}
.hero-side-body .meta-s { font-size: 11px; color: var(--muted); }

/* =============================================
   CATEGORY BADGES
   ============================================= */
.cat-badge-s {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 2px 8px;
    border-radius: 2px;
    margin-bottom: 8px;
}
.cat-business   { background: #e8f4e8; color: #1a5c1a; }
.cat-technology { background: #e8f0fe; color: #1a3c8e; }
.cat-fintech    { background: #fff3e0; color: #8a4000; }
.cat-ai         { background: #f3e8fe; color: #5a1a8e; }
.cat-startups   { background: #fce8e8; color: #8e1a1a; }
.cat-markets    { background: #e8f4f8; color: #0a4a6e; }

/* =============================================
   ACCENT DIVIDER
   ============================================= */
.te-accent-line {
    height: 2px;
    background: var(--accent);
    margin: 0 40px;
}

/* =============================================
   CATEGORY SECTIONS
   ============================================= */
.te-section { padding: 32px 40px; }

.section-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1.5px solid var(--dark);
}
.section-head .label-pill {
    color: var(--white);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 3px 10px;
    border-radius: 2px;
}
.label-business   { background: var(--green); }
.label-technology { background: var(--blue); }
.label-fintech    { background: var(--orange); }
.label-ai         { background: var(--purple); }
.label-startups   { background: var(--red); }
.label-markets    { background: #0a4a6e; }

.section-head h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
}
.view-all {
    margin-left: auto;
    font-size: 12px;
    color: var(--accent);
    font-weight: 600;
    border: 1px solid var(--accent);
    padding: 4px 12px;
    border-radius: 2px;
    transition: all 0.2s;
}
.view-all:hover {
    background: var(--accent);
    color: var(--dark);
}

/* =============================================
   POSTS GRID
   ============================================= */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.post-card {
    background: var(--white);
    border: 0.5px solid var(--border);
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    transition: border-color 0.2s, transform 0.15s;
}
.post-card:hover {
    border-color: #aaa;
    transform: translateY(-2px);
}
.post-card .post-thumb { width: 100%; height: 120px; object-fit: cover; }
.post-card .thumb-placeholder { height: 120px; background: linear-gradient(135deg, #0d1a3e, #1a3c8e); }
.post-card-body { padding: 12px; }
.post-card-body h4 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--dark);
    margin-bottom: 6px;
}
.post-card-body .card-meta {
    font-size: 11px;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
}

/* =============================================
   SECTION DIVIDER
   ============================================= */
.te-divider {
    height: 1px;
    background: var(--border);
    margin: 0 40px;
}

/* =============================================
   FOOTER
   ============================================= */
.te-footer {
    background: var(--dark);
    color: #d0d0e0;
    padding: 40px 40px 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 32px;
}

.footer-brand .footer-logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 26px;
    font-weight: 800;
    color: var(--white);
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}
.footer-brand .footer-logo span { color: var(--accent); }
.footer-about { font-size: 13px; line-height: 1.7; color: #9090b0; }

.footer-col h4 {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--accent);
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a {
    font-size: 13px;
    color: #9090b0;
    transition: color 0.2s;
}
.footer-col ul li a::before { content: '→ '; color: var(--accent); font-size: 11px; }
.footer-col ul li a:hover { color: var(--white); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    padding: 16px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #606070;
    flex-wrap: wrap;
    gap: 8px;
}
.footer-bottom .copy-logo {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    color: #888;
}
.footer-bottom .copy-logo span { color: var(--accent); }

/* =============================================
   SINGLE POST PAGE
   ============================================= */
.single-wrap { max-width: 780px; margin: 40px auto; padding: 0 20px; }
.single-wrap .post-header { margin-bottom: 24px; }
.single-wrap .post-header h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.25;
    color: var(--dark);
    margin-bottom: 14px;
}
.single-wrap .post-header .post-meta { font-size: 13px; color: var(--muted); display: flex; gap: 12px; flex-wrap: wrap; }
.single-wrap .featured-image { width: 100%; border-radius: 4px; margin-bottom: 28px; }
.single-wrap .post-content { font-size: 17px; line-height: 1.8; color: #2a2a3e; }
.single-wrap .post-content h2 { font-family: 'Playfair Display', serif; font-size: 24px; margin: 28px 0 14px; }
.single-wrap .post-content h3 { font-size: 20px; margin: 22px 0 10px; }
.single-wrap .post-content p { margin-bottom: 18px; }
.single-wrap .post-content ul, .single-wrap .post-content ol { margin: 0 0 18px 24px; }

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 900px) {
    .te-header { padding: 14px 20px; }
    .te-nav { padding: 0 10px; }
    .te-nav ul li a { padding: 10px 12px; font-size: 12px; }
    .te-hero, .te-section { padding: 20px; }
    .te-accent-line, .te-divider { margin: 0 20px; }
    .hero-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .hero-main { grid-row: auto; }
    .posts-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .te-footer { padding: 28px 20px 0; }
}
@media (max-width: 560px) {
    .te-logo { font-size: 26px; }
    .hero-main-body h2 { font-size: 18px; }
    .posts-grid { grid-template-columns: 1fr; }
    .footer-bottom { flex-direction: column; text-align: center; }
}
