/*
Theme Name: UC World Theme
Theme URI: https://ucworld.pl
Author: Michał Piotrowski
Author URI: https://mpiotrowski.com.pl
Description: Nowoczesny motyw dla bloga UC World - zunifikowana komunikacja i technologie UCaaS
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ucworld
*/

/* ==========================================================================
   GLOBAL STYLES
   ========================================================================== */

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

:root {
    --primary: #1a1a1a;
    --secondary: #2d2d2d;
    --accent: #0066ff;
    --text-primary: #1a1a1a;
    --text-secondary: #6b6b6b;
    --bg: #fafafa;
    --card-bg: rgba(255, 255, 255, 0.7);
    --border: rgba(0, 0, 0, 0.08);
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: 80px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cabinet Grotesk', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

h1 {
    font-size: clamp(36px, 6vw, 64px);
    font-weight: 800;
}

h2 {
    font-size: clamp(28px, 4vw, 48px);
}

h3 {
    font-size: clamp(24px, 3vw, 36px);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

/* ==========================================================================
   HEADER & NAVIGATION
   ========================================================================== */

header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 250, 250, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: all 0.3s ease;
}

header.scrolled {
    background: rgba(250, 250, 250, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: opacity 0.3s ease;
    color: var(--primary);
    font-family: 'Cabinet Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 700;
}

.logo svg {
    width: 32px;
    height: 32px;
}

.logo:hover {
    opacity: 0.7;
}

.nav-links {
    display: flex;
    gap: 40px;
    align-items: center;
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    position: relative;
    transition: color 0.3s ease;
    letter-spacing: 0.2px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.current-menu-item {
    color: var(--accent);
}

.nav-links a:hover::after,
.nav-links a.current-menu-item::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ==========================================================================
   BLOG HERO
   ========================================================================== */

.blog-hero {
    padding: 80px 0 40px;
    text-align: center;
}

.blog-hero h1 {
    margin-bottom: 16px;
    animation: fadeInUp 0.6s ease forwards 0.2s;
    opacity: 0;
}

.blog-hero p {
    color: var(--text-secondary);
    font-size: clamp(16px, 2vw, 20px);
    max-width: 600px;
    margin: 0 auto;
    animation: fadeInUp 0.6s ease forwards 0.4s;
    opacity: 0;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   LAYOUT - TWO COLUMNS (MAIN + SIDEBAR)
   ========================================================================== */

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    padding: 60px 0;
}

.main-content {
    min-width: 0;
}

/* ==========================================================================
   BLOG POSTS GRID
   ========================================================================== */

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 32px;
    margin-bottom: 40px;
}

.blog-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.blog-card-image {
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.blog-card-image svg {
    width: 64px;
    height: 64px;
    color: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-image svg {
    transform: scale(1.1);
}

.blog-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.blog-card-category {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--accent);
    color: white;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.blog-card-date {
    color: var(--text-secondary);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.blog-card h2 {
    font-size: 20px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.blog-card-excerpt {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
}

.blog-card-readmore {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent);
    font-weight: 600;
    font-size: 14px;
    transition: gap 0.3s ease;
}

.blog-card:hover .blog-card-readmore {
    gap: 12px;
}

.blog-card-readmore svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card-readmore svg {
    transform: translateX(4px);
}

/* ==========================================================================
   SINGLE POST
   ========================================================================== */

.single-post {
    background: white;
    border-radius: 20px;
    padding: 48px;
    border: 1px solid var(--border);
    margin-bottom: 48px;
}

.post-header {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border);
}

.post-title {
    font-size: clamp(28px, 4vw, 42px);
    margin-bottom: 16px;
    line-height: 1.2;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    color: var(--text-secondary);
    font-size: 14px;
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.post-meta svg {
    width: 16px;
    height: 16px;
}

.post-category-badge {
    display: inline-flex;
    padding: 6px 16px;
    background: var(--accent);
    color: white;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.post-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--text-primary);
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 32px;
    margin-bottom: 16px;
}

.post-content p {
    margin-bottom: 20px;
}

.post-content ul,
.post-content ol {
    margin-bottom: 20px;
    padding-left: 28px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 24px 0;
}

.post-content blockquote {
    border-left: 4px solid var(--accent);
    padding-left: 24px;
    margin: 24px 0;
    font-style: italic;
    color: var(--text-secondary);
}

.post-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.post-content pre {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 24px 0;
}

.post-content pre code {
    padding: 0;
    background: none;
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.sidebar-widget {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 28px;
    margin-bottom: 24px;
}

.sidebar-widget h3 {
    font-size: 20px;
    margin-bottom: 20px;
    font-weight: 700;
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget li {
    margin-bottom: 12px;
}

.sidebar-widget li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-radius: 10px;
    transition: all 0.3s ease;
    color: var(--text-primary);
}

.sidebar-widget li a:hover {
    background: rgba(0, 102, 255, 0.08);
    color: var(--accent);
}

.category-count {
    background: var(--bg);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 48px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 12px 20px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination .current {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

footer {
    background: var(--primary);
    color: white;
    padding: 60px 0 32px;
    margin-top: 80px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 48px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.footer-brand h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 15px;
    max-width: 400px;
}

.footer-links {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    padding-top: 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 992px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 70px;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(250, 250, 250, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 24px;
        gap: 24px;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
        border-bottom: 1px solid var(--border);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .single-post {
        padding: 32px 24px;
    }

    .footer-content {
        flex-direction: column;
        gap: 32px;
    }

    .footer-links {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 60px 0 30px;
    }

    .content-wrapper {
        padding: 40px 0;
    }

    .post-content {
        font-size: 16px;
    }
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.text-center {
    text-align: center;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
