/* ================================================================
   THEME: tech-publisher — Modern AI / Tech Blog
   Fully integrated with Core CMS Architecture
   ================================================================ */

/* ── 1. CORE THEME OVERRIDES (Injecting Tech-Publisher Identity) ── */
/* Injecting theme colors into the core variables for harmony */
html[data-template="tech-publisher"],
html[data-template="tech-publisher"][data-theme="dark"] {
    --bg-base: #0b0e1a;
    --bg-card: #111827;
    --bg-hover: #1c2336;
    --bg-glass: rgba(11, 14, 26, 0.72);
    --text-1: #eef1fb;
    --text-2: #8b95b4;
    --text-3: #545d7a;
    --border: rgba(255, 255, 255, 0.07);
    --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.45);
}

html[data-template="tech-publisher"][data-theme="light"] {
    --bg-base: #f5f7ff;
    --bg-card: #ffffff;
    --bg-hover: #eef0fb;
    --bg-glass: rgba(245, 247, 255, 0.82);
    --text-1: #0b0e1a;
    --text-2: #384060;
    --text-3: #6b74a0;
    --border: rgba(0, 0, 0, 0.08);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.07);
}

/* ── 2. HERO SECTION (SLIDER OVERHAUL) ── */
.tpb-hero-slider-wrapper {
    position: relative;
    margin-bottom: 32px;
    overflow: hidden;
}
.tpb-hero-slides {
    position: relative;
    min-height: 540px;
}
.tpb-hero {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease, visibility 0.8s ease;
    z-index: 1;
}
.tpb-hero.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}
.tpb-hero-bg {
    position: absolute; inset: 0; background-size: cover;
    background-position: center; 
    transform: scale(1.1); /* Starts slightly zoomed in */
    transition: transform 6s ease-out;
}
/* Zoom effect triggers only on the active slide */
.tpb-hero.active .tpb-hero-bg { 
    transform: scale(1); 
}
.tpb-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, .92) 0%, rgba(0, 0, 0, .3) 60%, transparent 100%);
}
.tpb-hero-content { position: relative; z-index: 3; padding-block: 40px; }

.tpb-badge {
    display: inline-block; background: var(--accent); color: #000;
    font-size: .7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; padding: 4px 10px; border-radius: 99px; margin-bottom: 12px;
}
.tpb-hero-title {
    font-size: clamp(1.6rem, 4vw, 2.8rem); font-weight: 800; line-height: 1.25;
    color: #fff; max-width: 760px; margin-bottom: 14px;
}
.tpb-hero-title a { color: #fff; text-decoration: none; transition: opacity var(--transition); }
.tpb-hero-title a:hover { opacity: .85; }
.tpb-hero-excerpt {
    color: rgba(255, 255, 255, .65); font-size: .95rem; line-height: 1.7;
    max-width: 600px; margin-bottom: 16px;
}
.tpb-hero-meta { display: flex; gap: 20px; font-size: .8rem; color: rgba(255, 255, 255, .45); }

/* Slider Controls */
.tpb-slider-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 15px;
}
[dir="rtl"] .tpb-slider-controls {
    right: auto;
    left: 20px;
}
.tpb-slider-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    width: 36px; height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}
.tpb-slider-btn:hover { background: var(--accent); color: #000; border-color: var(--accent); }

.tpb-slider-dots { display: flex; gap: 6px; }
.tpb-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}
.tpb-dot.active {
    background: var(--accent);
    transform: scale(1.3);
}

/* ── 3. TRENDING ROW ── */
.tpb-trending-row {
    display: flex; align-items: center; gap: 14px; padding: 16px 0;
    border-block: 1px solid var(--border); margin-bottom: 28px;
    overflow-x: auto; scrollbar-width: none;
}
.tpb-trending-row::-webkit-scrollbar { display: none; }
.tpb-trending-label {
    font-size: .75rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .06em; color: var(--text-3); white-space: nowrap; flex-shrink: 0;
}
.tpb-trending-scroll { display: flex; gap: 8px; flex-wrap: nowrap; }
.tpb-trending-chip {
    background: var(--bg-card); border: 1px solid var(--border); color: var(--text-2);
    font-size: .8rem; font-weight: 600; padding: 5px 14px; border-radius: 99px;
    white-space: nowrap; transition: all var(--transition); flex-shrink: 0;
}
.tpb-trending-chip:hover {
    background: var(--accent); color: #000; border-color: var(--accent);
}

/* ── 4. FLOATING SHARE BAR ── */
.tpb-share-bar {
    position: fixed; inset-block: 50%; inset-inline-start: 0; transform: translateY(-50%);
    display: flex; flex-direction: column; gap: 4px; z-index: 90; padding: 4px;
}
.tpb-share-btn {
    width: 42px; height: 42px; display: grid; place-items: center;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-size: .9rem;
    color: #fff; transition: all var(--transition); border: none; cursor: pointer;
}
[dir="rtl"] .tpb-share-bar { inset-inline-start: auto; inset-inline-end: 0; }
[dir="rtl"] .tpb-share-btn { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }

.tpb-share-btn--x { background: #1a1a2e; }
.tpb-share-btn--fb { background: #1877f2; }
.tpb-share-btn--tg { background: #2ba3cf; }
.tpb-share-btn--copy { background: #374151; }

.tpb-share-btn:hover { transform: translateX(4px); box-shadow: 0 4px 16px rgba(0, 0, 0, .35); }
[dir="rtl"] .tpb-share-btn:hover { transform: translateX(-4px); }

/* ── 5. FOOTER ── */
.tpb-footer {
    background: #070a14; margin-top: 60px; padding: 48px 0 24px;
    border-top: 1px solid var(--border);
}
.tpb-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 36px; }
.tpb-footer-desc {
    font-size: .85rem; color: rgba(255, 255, 255, .35); margin-top: 10px; line-height: 1.6;
}
.tpb-footer-socials { display: flex; gap: 12px; margin-top: 16px; }
.tpb-social { color: rgba(255, 255, 255, .45); font-size: 1rem; transition: color var(--transition); }
.tpb-social:hover { color: var(--accent); }
.tpb-footer-heading {
    font-size: .74rem; font-weight: 800; text-transform: uppercase;
    letter-spacing: .08em; color: rgba(255, 255, 255, .7); margin-bottom: 14px;
    padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.tpb-footer-links { display: flex; flex-direction: column; gap: 8px; }
.tpb-footer-links a { color: rgba(255, 255, 255, .35); font-size: .85rem; transition: color var(--transition); }
.tpb-footer-links a:hover { color: var(--accent); }
.tpb-footer-bottom {
    display: flex; justify-content: space-between; align-items: center; padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .05); font-size: .78rem;
    color: rgba(255, 255, 255, .22); flex-wrap: wrap; gap: 8px;
}

/* ── 6. RESPONSIVE / MOBILE ARTICLE WRAP ── */
.tpb-article-wrap { max-width: 760px; margin-inline: auto; padding-block: 40px; }

@media(max-width:1024px) {
    .tpb-footer-grid { grid-template-columns: 1fr 1fr; }
    .tpb-footer-brand { grid-column: 1/-1; }
}
@media(max-width:768px) {
    /* Share bar mobile */
    .tpb-share-bar {
        position: fixed; inset-block-start: auto; inset-block-end: 0; inset-inline: 0;
        flex-direction: row; border-radius: 0; transform: none; justify-content: center;
        background: var(--bg-card); border-top: 1px solid var(--border); padding: 8px;
    }
    .tpb-share-btn { border-radius: var(--radius-sm) !important; transform: none !important; }
    
    /* Slider mobile */
    .tpb-hero-slides { min-height: 420px; }
    .tpb-slider-controls { 
        bottom: 10px; 
        left: 50% !important; 
        right: auto !important; 
        transform: translateX(-50%); 
    }
    [dir="rtl"] .tpb-slider-controls { transform: translateX(50%); }

    /* Footer & Article mobile */
    .tpb-footer-grid { grid-template-columns: 1fr; gap: 24px; }
    .tpb-article-wrap { padding-inline: 0; }
}