/*
Theme Name: Machinery.cz
Theme URI: https://machinery.cz
Description: Industrial & Professional téma pro odborný portál o průmyslových strojích
Version: 1.0
Author: Machinery.cz
Text Domain: machinery
*/

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

:root {
    --primary: #1d4ed8;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --accent: #d97706;
    --accent-dark: #b45309;
    --text: #0f172a;
    --text-light: #475569;
    --text-muted: #94a3b8;
    --bg: #f8fafc;
    --bg-white: #fff;
    --bg-blue: #eff6ff;
    --border: #e2e8f0;
    --accent-yellow: #fef3c7;
    --accent-green: #059669;
    --dark: #0f172a;
    --max-width: 1140px;
}

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

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Syne', Georgia, serif;
    line-height: 1.3;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* ===== HEADER ===== */
.site-header {
    background: var(--dark);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 68px;
}

.site-logo {
    font-family: 'Syne', serif;
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.site-logo span { color: var(--accent); }

/* Navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 4px;
    align-items: center;
}

.main-nav a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.2s;
}

.main-nav a:hover,
.main-nav .current-menu-item a {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.main-nav .nav-cta a,
.nav-cta-link {
    background: var(--accent) !important;
    color: #fff !important;
    padding: 9px 20px !important;
    border-radius: 6px;
    font-weight: 700;
}

.nav-cta-link:hover { background: var(--accent-dark) !important; }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* ===== HERO ===== */
.hero {
    padding: 80px 24px;
    background: linear-gradient(135deg, var(--dark) 0%, #1e3a8a 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.hero-badge {
    display: inline-block;
    background: rgba(217,119,6,0.2);
    color: #fbbf24;
    border: 1px solid rgba(217,119,6,0.4);
    padding: 6px 18px;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 24px;
    position: relative;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    color: #fff;
    position: relative;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.7);
    max-width: 520px;
    margin: 0 auto 36px;
    position: relative;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 15px 32px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(217,119,6,0.3);
}

.btn-primary:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(217,119,6,0.4);
}

.btn-ghost {
    display: inline-block;
    color: #fff;
    padding: 15px 32px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.2s;
}

.btn-ghost:hover { border-color: #fff; }

/* ===== CALCULATOR STRIP ===== */
.calc-strip {
    background: #fff;
    border-bottom: 2px solid var(--border);
    padding: 28px 24px;
}

.calc-strip-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 24px;
    flex-wrap: wrap;
}

.calc-strip label {
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 6px;
}

.calc-strip input {
    background: var(--bg);
    border: 2px solid var(--border);
    border-radius: 6px;
    padding: 11px 14px;
    color: var(--text);
    font-size: 1rem;
    font-family: inherit;
    font-weight: 600;
    width: 180px;
    transition: border-color 0.2s;
}

.calc-strip input:focus { outline: none; border-color: var(--primary); }

.calc-strip .result {
    background: var(--primary);
    border-radius: 8px;
    padding: 12px 28px;
    text-align: center;
    margin-left: auto;
}

.calc-strip .result small {
    display: block;
    color: rgba(255,255,255,0.7);
    font-size: 0.72rem;
}

.calc-strip .result strong {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 800;
    font-family: 'Syne', serif;
}

/* ===== SECTION STYLES ===== */
.section-eyebrow {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.section-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 48px;
}

/* ===== CATEGORY GRID ===== */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.cat-card {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    gap: 18px;
    align-items: flex-start;
    transition: all 0.3s;
    cursor: pointer;
    border: 2px solid var(--border);
    text-decoration: none;
    color: inherit;
}

.cat-card:hover {
    border-color: var(--primary);
    box-shadow: 0 8px 30px rgba(29,78,216,0.08);
}

.cat-emoji {
    font-size: 1.8rem;
    min-width: 48px;
    height: 48px;
    background: var(--bg-blue);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cat-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.cat-card p { font-size: 0.85rem; color: var(--text-light); margin: 0; }
.cat-count { font-size: 0.75rem; color: var(--text-muted); margin-top: 8px; font-weight: 600; }

/* ===== ARTICLES GRID ===== */
.site-content { padding: 50px 0; }

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.article-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
    border: 1px solid var(--border);
}

.article-card:hover {
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
    transform: translateY(-4px);
}

.article-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.article-card-body { padding: 22px; }

.article-card .category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.article-card .category::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
}

.article-card h2 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.article-card h2 a {
    color: var(--text);
    text-decoration: none;
}

.article-card h2 a:hover { color: var(--primary); }

.article-card .excerpt {
    font-size: 0.87rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.article-card .meta {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* ===== SINGLE ARTICLE ===== */
.single-article {
    max-width: 760px;
    margin: 0 auto;
}

.single-article h1 {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.single-article .article-meta {
    color: var(--text-light);
    font-size: 0.88rem;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.single-article .entry-content {
    font-size: 1.04rem;
    line-height: 1.8;
}

.entry-content h2 {
    font-size: 1.55rem;
    margin: 40px 0 15px;
    color: var(--text);
}

.entry-content h3 {
    font-size: 1.25rem;
    margin: 30px 0 12px;
}

.entry-content p { margin-bottom: 18px; }
.entry-content ul, .entry-content ol { margin: 15px 0 20px 25px; }
.entry-content li { margin-bottom: 8px; }

.entry-content blockquote {
    border-left: 4px solid var(--primary);
    padding: 15px 25px;
    margin: 25px 0;
    background: var(--bg-blue);
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.entry-content a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.entry-content img { max-width: 100%; height: auto; border-radius: 10px; margin: 20px 0; }

.entry-content table { width: 100%; border-collapse: collapse; margin: 25px 0; border-radius: 8px; overflow: hidden; }
.entry-content th, .entry-content td { padding: 12px 15px; border: 1px solid var(--border); text-align: left; }
.entry-content th { background: var(--bg-blue); font-weight: 700; font-family: 'Syne', serif; color: var(--primary); }

/* ===== INFO BOX (CTA) ===== */
.info-box {
    background: var(--bg-blue);
    border: 2px solid #bfdbfe;
    border-radius: 12px;
    padding: 24px 28px;
    margin: 30px 0;
}

.info-box h4 {
    font-family: 'Syne', serif;
    color: var(--text);
    margin-bottom: 8px;
    font-size: 1.05rem;
}

.info-box .cta-btn {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    padding: 11px 26px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 10px;
    transition: all 0.2s;
}

.info-box .cta-btn:hover { background: var(--primary-dark); }

/* ===== CTA BANNER ===== */
.cta-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: 16px;
    padding: 48px 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 40px 0;
    color: #fff;
}

.cta-banner h2 {
    font-size: 1.7rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: #fff;
}

.cta-banner p { color: rgba(255,255,255,0.8); max-width: 400px; }

.btn-dark {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    padding: 15px 32px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-dark:hover { background: var(--accent-dark); }

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
    padding: 12px 0;
    font-size: 0.83rem;
    color: var(--text-muted);
    background: #fff;
    border-bottom: 1px solid var(--border);
}

.breadcrumbs a { color: var(--primary); text-decoration: none; }
.breadcrumbs span { margin: 0 8px; }

/* ===== SIDEBAR ===== */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 290px;
    gap: 40px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.sidebar .widget {
    background: var(--bg-white);
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 22px;
    border: 1px solid var(--border);
}

.sidebar .widget h3 {
    font-size: 0.95rem;
    margin-bottom: 14px;
    color: var(--text);
}

.sidebar .widget ul { list-style: none; }
.sidebar .widget li { padding: 7px 0; border-bottom: 1px solid var(--border); }
.sidebar .widget li:last-child { border-bottom: none; }
.sidebar .widget a { color: var(--text); text-decoration: none; font-size: 0.88rem; }
.sidebar .widget a:hover { color: var(--primary); }

/* ===== PAGINATION ===== */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span {
    display: inline-block;
    padding: 9px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    text-decoration: none;
    font-size: 0.88rem;
}

.pagination .current {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--dark);
    color: rgba(255,255,255,0.5);
    padding: 50px 0 25px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px 30px;
}

.footer-col h4 {
    color: #fff;
    font-family: 'Syne', serif;
    margin-bottom: 14px;
    font-size: 0.95rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.5); text-decoration: none; font-size: 0.88rem; }
.footer-col a:hover { color: var(--accent); }
.footer-col p { font-size: 0.88rem; line-height: 1.6; }

.footer-bottom {
    text-align: center;
    padding: 20px 24px 0;
    border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 0.78rem;
    max-width: var(--max-width);
    margin: 0 auto;
}

/* ===== SEARCH ===== */
.search-form input[type="search"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.search-form input[type="search"]:focus { outline: none; border-color: var(--primary); }

/* ===== 404 ===== */
.error-404 { text-align: center; padding: 80px 24px; }
.error-404 h1 { font-size: 5rem; color: var(--primary); margin-bottom: 16px; }

/* ===== TABLE OF CONTENTS ===== */
.toc-box {
    background: var(--bg-white);
    border: 2px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: 8px;
    padding: 22px 26px;
    margin: 24px 0;
}

.toc-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list li { margin-bottom: 6px; }
.toc-list li a {
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s;
    display: block;
    padding: 4px 0;
}
.toc-list li a:hover { color: var(--primary); }
.toc-list .toc-sub { padding-left: 20px; }
.toc-list .toc-sub a { font-size: 0.83rem; }

/* ===== RELATED POSTS ===== */
.related-posts {
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid var(--border);
}

.related-posts h3 { font-size: 1.2rem; margin-bottom: 20px; }

.related-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.related-item {
    display: block;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
    text-decoration: none;
    transition: all 0.2s;
}

.related-item:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(29,78,216,0.08);
}

.related-cat {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.related-title {
    display: block;
    color: var(--text);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
}

/* ===== LAST UPDATED ===== */
.last-updated {
    background: var(--accent-yellow);
    color: #92400e;
    padding: 7px 16px;
    border-radius: 4px;
    font-size: 0.78rem;
    display: inline-block;
    margin-bottom: 20px;
    font-weight: 600;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .menu-toggle { display: block; }

    .main-nav {
        display: none;
        position: absolute;
        top: 68px;
        left: 0;
        right: 0;
        background: var(--dark);
        padding: 16px 24px 24px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .main-nav.active { display: block; }
    .main-nav ul { flex-direction: column; gap: 4px; }
    .main-nav a { display: block; padding: 12px 16px; }

    .hero { padding: 50px 24px; }
    .hero h1 { font-size: 2rem; }

    .calc-strip-inner { flex-direction: column; align-items: stretch; }
    .calc-strip input { width: 100%; }
    .calc-strip .result { margin-left: 0; }

    .cat-grid { grid-template-columns: 1fr; }
    .articles-grid { grid-template-columns: 1fr; }
    .content-with-sidebar { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 24px; }

    .cta-banner { flex-direction: column; text-align: center; gap: 24px; padding: 32px 24px; }
    .single-article h1 { font-size: 1.7rem; }
}
