/* ===== TechZóna 2026 v2 — Mobile First + Glow Effects ===== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg: #ffffff;
    --bg-secondary: #f5f5f7;
    --bg-card: #ffffff;
    --text: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-muted: #86868b;
    --border: #e5e5e7;
    --accent: #0071e3;
    --accent-hover: #0077ed;
    --accent-glow: rgba(0, 113, 227, 0.15);
    --badge-bg: linear-gradient(135deg, #0071e3, #a855f7);
    --badge-text: #ffffff;
    --header-bg: rgba(255, 255, 255, 0.82);
    --card-shadow: 0 1px 3px rgba(0,0,0,0.06);
    --card-shadow-hover: 0 12px 40px rgba(0,0,0,0.1);
    --card-glow: 0 0 0 1px rgba(0, 113, 227, 0.3), 0 12px 40px rgba(0,0,0,0.1);
    --hero-gradient: linear-gradient(180deg, transparent 30%, rgba(0,0,0,0.85) 100%);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --container: 1240px;
}

[data-theme="dark"] {
    --bg: #09090b;
    --bg-secondary: #131316;
    --bg-card: #18181b;
    --text: #fafafa;
    --text-secondary: #a1a1aa;
    --text-muted: #71717a;
    --border: #27272a;
    --accent: #3b82f6;
    --accent-hover: #60a5fa;
    --accent-glow: rgba(59, 130, 246, 0.15);
    --badge-bg: linear-gradient(135deg, #3b82f6, #a855f7);
    --badge-text: #ffffff;
    --header-bg: rgba(9, 9, 11, 0.85);
    --card-shadow: 0 1px 3px rgba(0,0,0,0.3);
    --card-shadow-hover: 0 12px 40px rgba(0,0,0,0.5);
    --card-glow: 0 0 0 1px rgba(59, 130, 246, 0.4), 0 12px 40px rgba(0,0,0,0.5);
}

html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background var(--transition), color var(--transition);
}

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

/* --- Container --- */
.tz-container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.tz-container-narrow { max-width: 760px; }

/* --- Header --- */
.tz-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background var(--transition), box-shadow var(--transition);
}

.tz-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 16px;
}

.tz-logo { display: flex; align-items: center; flex-shrink: 0; }
.tz-logo img { height: 32px; width: auto; }

.tz-logo-text {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* --- Nav --- */
.tz-nav { display: none; }

.tz-nav-list { list-style: none; display: flex; gap: 2px; }

.tz-nav-list li a {
    display: block;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    white-space: nowrap;
}

.tz-nav-list li a:hover,
.tz-nav-list li.current-menu-item a,
.tz-nav-list li.current-category-ancestor a {
    color: var(--text);
    background: var(--bg-secondary);
}

/* --- Header Actions --- */
.tz-header-actions { display: flex; align-items: center; gap: 4px; }

.tz-theme-toggle,
.tz-search-toggle,
.tz-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition);
}

.tz-theme-toggle:hover,
.tz-search-toggle:hover,
.tz-menu-toggle:hover {
    background: var(--bg-secondary);
    color: var(--text);
}

.tz-icon-moon { display: none; }
[data-theme="dark"] .tz-icon-sun { display: none; }
[data-theme="dark"] .tz-icon-moon { display: block; }

/* --- Hamburger --- */
.tz-hamburger { display: flex; flex-direction: column; gap: 5px; width: 18px; }
.tz-hamburger span { display: block; height: 2px; background: var(--text); border-radius: 2px; transition: all var(--transition); }

.tz-menu-toggle[aria-expanded="true"] .tz-hamburger span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.tz-menu-toggle[aria-expanded="true"] .tz-hamburger span:nth-child(2) { opacity: 0; }
.tz-menu-toggle[aria-expanded="true"] .tz-hamburger span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* --- Mobile nav open --- */
.tz-nav.is-open {
    display: flex;
    position: fixed;
    top: 61px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 99;
    padding: 24px 20px;
    animation: tz-fade-in 0.2s ease;
}

.tz-nav.is-open .tz-nav-list { flex-direction: column; gap: 2px; width: 100%; }
.tz-nav.is-open .tz-nav-list li a { font-size: 1.125rem; padding: 14px 16px; }

/* --- Search overlay --- */
.tz-search-overlay {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    animation: tz-slide-down 0.2s ease;
}
.tz-search-overlay.is-open { display: block; }

.tz-search-form { display: flex; gap: 12px; align-items: center; }

.tz-search-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 1rem;
    font-family: var(--font);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    outline: none;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.tz-search-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.tz-search-close {
    font-size: 1.5rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    line-height: 1;
}

/* --- Main --- */
.tz-main { min-height: 60vh; padding: 24px 0 48px; }

/* --- Hero --- */
.tz-hero {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 32px;
}

.tz-hero-link { display: block; position: relative; }

.tz-hero-image { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }

.tz-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 0, 0.15, 1);
}

.tz-hero-link:hover .tz-hero-image img { transform: scale(1.04); }

.tz-hero-overlay {
    position: absolute;
    inset: 0;
    background: var(--hero-gradient);
}

.tz-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px;
    color: #fff;
}

.tz-hero-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin: 10px 0 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.tz-hero-excerpt {
    display: none;
    font-size: 0.9375rem;
    line-height: 1.5;
    opacity: 0.9;
    margin-bottom: 12px;
    max-width: 600px;
}

.tz-hero-meta {
    display: flex;
    gap: 8px;
    font-size: 0.8125rem;
    opacity: 0.7;
}

/* --- Badge --- */
.tz-badge {
    display: inline-block;
    padding: 5px 14px;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: var(--badge-bg);
    color: var(--badge-text);
    border-radius: 100px;
}

.tz-badge-sm { padding: 4px 12px; font-size: 0.625rem; }

/* --- Featured Grid --- */
.tz-featured { margin-bottom: 32px; }

.tz-featured-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.tz-card-featured {
    border: 1px solid var(--border);
    position: relative;
}

.tz-card-featured .tz-card-link {
    flex-direction: column;
}

.tz-card-featured .tz-card-image {
    aspect-ratio: 16 / 9;
}

.tz-card-featured .tz-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.tz-card-featured .tz-card-excerpt {
    -webkit-line-clamp: 3;
}

/* --- Section --- */
.tz-section { margin-bottom: 56px; }

.tz-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.tz-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 24px;
    position: relative;
    display: inline-block;
}

.tz-section-header .tz-section-title {
    margin-bottom: 0;
    padding-bottom: 0;
}

.tz-section-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--badge-bg);
    border-radius: 2px;
}

.tz-section-header .tz-section-title::after { bottom: -8px; }

.tz-section-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--accent);
    white-space: nowrap;
    transition: opacity var(--transition);
}
.tz-section-link:hover { opacity: 0.7; }

/* --- Grid --- */
.tz-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

/* --- Card --- */
.tz-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all var(--transition);
    position: relative;
}

.tz-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent), #a855f7);
    opacity: 0;
    z-index: -1;
    transition: opacity var(--transition);
}

.tz-card:hover {
    box-shadow: var(--card-glow);
    transform: translateY(-4px);
    border-color: rgba(59, 130, 246, 0.3);
}

.tz-card:hover::before { opacity: 0.08; }

.tz-card-link { display: flex; flex-direction: column; height: 100%; }

.tz-card-image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-secondary);
}

.tz-card-placeholder {
    background: linear-gradient(135deg, var(--bg-secondary), var(--border));
}

.tz-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0, 0.15, 1);
}

.tz-card:hover .tz-card-image img { transform: scale(1.06); }

.tz-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.tz-card-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -0.01em;
    margin: 8px 0;
    flex: 1;
}

.tz-card-excerpt {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tz-card-meta {
    display: flex;
    gap: 8px;
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-top: auto;
}

.tz-meta-sep { opacity: 0.4; }

/* --- Scroll Reveal --- */
/* Scroll reveal — progressive enhancement: hidden only when JS is ready */
html.tz-js .tz-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

html.tz-js .tz-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children in grid */
html.tz-js .tz-grid .tz-reveal:nth-child(1) { transition-delay: 0s; }
html.tz-js .tz-grid .tz-reveal:nth-child(2) { transition-delay: 0.06s; }
html.tz-js .tz-grid .tz-reveal:nth-child(3) { transition-delay: 0.12s; }
html.tz-js .tz-grid .tz-reveal:nth-child(4) { transition-delay: 0.18s; }
html.tz-js .tz-grid .tz-reveal:nth-child(5) { transition-delay: 0.24s; }
html.tz-js .tz-grid .tz-reveal:nth-child(6) { transition-delay: 0.3s; }

/* --- Article --- */
.tz-article-hero { max-height: 500px; overflow: hidden; margin-bottom: 32px; }
.tz-article-hero img { width: 100%; height: 100%; object-fit: cover; }
.tz-article-header { margin-bottom: 32px; }

.tz-article-title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
    margin: 12px 0;
}

.tz-article-meta {
    display: flex;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.tz-article-content {
    font-size: 1.0625rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.tz-article-content h2, .tz-article-content h3, .tz-article-content h4 {
    color: var(--text);
    margin: 2em 0 0.75em;
    line-height: 1.3;
    letter-spacing: -0.02em;
}
.tz-article-content h2 { font-size: 1.5rem; font-weight: 700; }
.tz-article-content h3 { font-size: 1.25rem; font-weight: 600; }
.tz-article-content p { margin-bottom: 1.25em; }
.tz-article-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.tz-article-content img { border-radius: var(--radius-sm); margin: 1.5em 0; }
.tz-article-content blockquote { border-left: 3px solid var(--accent); padding: 0.5em 1.5em; margin: 1.5em 0; font-style: italic; color: var(--text-muted); }
.tz-article-content ul, .tz-article-content ol { padding-left: 1.5em; margin-bottom: 1.25em; }
.tz-article-content li { margin-bottom: 0.5em; }

/* --- Article footer --- */
.tz-article-footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
}
.tz-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tz-tag {
    padding: 5px 14px;
    font-size: 0.8125rem;
    font-weight: 500;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 100px;
    border: 1px solid var(--border);
    transition: all var(--transition);
}
.tz-tag:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.tz-share { display: flex; align-items: center; gap: 12px; font-size: 0.875rem; color: var(--text-muted); }
.tz-share a { font-weight: 500; color: var(--accent); transition: opacity var(--transition); }
.tz-share a:hover { opacity: 0.7; }

/* --- Related --- */
.tz-related { padding: 48px 0; background: var(--bg-secondary); }

/* --- Archive --- */
.tz-archive-header { margin-bottom: 32px; }
.tz-archive-title { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; }
.tz-archive-desc { color: var(--text-secondary); margin-top: 8px; }

/* --- Pagination --- */
.tz-pagination { margin-top: 48px; display: flex; justify-content: center; }
.tz-pagination .nav-links { display: flex; gap: 4px; }
.tz-pagination a, .tz-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}
.tz-pagination a { background: var(--bg-secondary); color: var(--text-secondary); }
.tz-pagination a:hover { background: var(--accent); color: #fff; }
.tz-pagination .current { background: var(--accent); color: #fff; }

/* --- Button --- */
.tz-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 28px;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: var(--font);
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: 100px;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: 0 2px 8px var(--accent-glow);
}
.tz-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px var(--accent-glow);
}
.tz-load-more-wrap { text-align: center; margin-top: 40px; }

/* --- Page --- */
.tz-page { padding: 16px 0 48px; }
.tz-page-title { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 32px; }

/* --- 404 --- */
.tz-404 { text-align: center; padding: 80px 0; }
.tz-404-code {
    font-size: 6rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 16px;
}
.tz-404 h2 { font-size: 1.5rem; margin-bottom: 8px; }
.tz-404 p { color: var(--text-secondary); margin-bottom: 24px; }

/* --- Empty --- */
.tz-empty { text-align: center; padding: 60px 0; }
.tz-empty h2 { font-size: 1.25rem; margin-bottom: 8px; }
.tz-empty p { color: var(--text-secondary); }
.tz-empty a { color: var(--accent); }

/* --- Footer --- */
.tz-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: 56px 0 24px;
    margin-top: 48px;
}
.tz-footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; margin-bottom: 32px; }

.tz-footer-logo {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    display: inline-block;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--accent), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.tz-footer-desc { color: var(--text-secondary); font-size: 0.875rem; line-height: 1.6; }

.tz-footer-nav h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 14px;
}
.tz-footer-links { list-style: none; }
.tz-footer-links li { margin-bottom: 10px; }
.tz-footer-links a { font-size: 0.9375rem; color: var(--text-secondary); transition: color var(--transition); }
.tz-footer-links a:hover { color: var(--accent); }

.tz-footer-bottom { padding-top: 24px; border-top: 1px solid var(--border); text-align: center; }
.tz-footer-bottom p { font-size: 0.8125rem; color: var(--text-muted); }

/* --- Widget --- */
.tz-widget { margin-bottom: 24px; }
.tz-widget-title { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 12px; }

/* --- Animations --- */
@keyframes tz-fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes tz-slide-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
    html.tz-js .tz-reveal { opacity: 1; transform: none; }
}

/* ========= TABLET (>= 640px) ========= */
@media (min-width: 640px) {
    .tz-grid { grid-template-columns: repeat(2, 1fr); }
    .tz-featured-grid { grid-template-columns: repeat(2, 1fr); }

    .tz-card-featured .tz-card-title { font-size: 1.25rem; }

    .tz-hero-image { aspect-ratio: 2.2 / 1; }
    .tz-hero-title { font-size: 2rem; }
    .tz-hero-excerpt { display: block; }
    .tz-hero-content { padding: 32px; }
    .tz-article-title { font-size: 2.25rem; }
    .tz-footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

/* ========= DESKTOP (>= 1024px) ========= */
@media (min-width: 1024px) {
    .tz-container { padding: 0 32px; }
    .tz-header-inner { height: 64px; }

    .tz-nav { display: flex; flex: 1; justify-content: center; }
    .tz-menu-toggle { display: none; }

    .tz-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }

    .tz-featured-grid { gap: 24px; }
    .tz-card-featured .tz-card-link { flex-direction: row; }
    .tz-card-featured .tz-card-image { aspect-ratio: auto; width: 45%; flex-shrink: 0; }
    .tz-card-featured .tz-card-body { padding: 24px; justify-content: center; }
    .tz-card-featured .tz-card-title { font-size: 1.375rem; }

    .tz-hero-image { aspect-ratio: 2.5 / 1; }
    .tz-hero-title { font-size: 2.75rem; }
    .tz-hero-content { padding: 48px; max-width: 65%; }
    .tz-article-title { font-size: 2.75rem; }
    .tz-article-hero { border-radius: var(--radius); max-height: 560px; }
    .tz-card-body { padding: 20px; }
    .tz-card-title { font-size: 1.0625rem; }
    .tz-page-title { font-size: 2.5rem; }
}

/* ========= LARGE DESKTOP (>= 1280px) ========= */
@media (min-width: 1280px) {
    .tz-grid { grid-template-columns: repeat(3, 1fr); gap: 28px; }
    .tz-hero-title { font-size: 3rem; }
}

/* --- WP overrides --- */
.wp-block-image img { border-radius: var(--radius-sm); }
.alignwide { margin-left: -20px; margin-right: -20px; }
.alignfull { margin-left: calc(-50vw + 50%); margin-right: calc(-50vw + 50%); max-width: 100vw; width: 100vw; }

.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}
