/*
Theme Name: LogiVeo Blog
Description: A WordPress blog theme that mirrors the design of logiveo.com with modern, fast, and accessible components.
Version: 1.0.0
Author: LogiVeo
Text Domain: logiveo-blog
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, custom-background, custom-colors, custom-header, custom-logo, custom-menu, editor-style, featured-images, flexible-header, full-site-editing, block-patterns, rtl-language-support, sticky-post, theme-options, threaded-comments, translation-ready, wide-blocks
*/

/* 
=== CSS RESET & BASE STYLES ===
*/
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 
=== TYPOGRAPHY ===
*/
h1, h2, h3, h4, h5, h6 {
    margin: 0 0 1rem 0;
    font-weight: 600;
    line-height: 1.2;
    color: #1a1a1a;
}

h1 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2.25rem);
}

h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
}

h4 {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1.125rem;
}

p {
    margin: 0 0 1rem 0;
}

a {
    color: #059669;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover,
a:focus {
    color: #047857;
    text-decoration: underline;
}

/* 
=== LAYOUT & CONTAINER ===
*/
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.container--narrow {
    max-width: 760px;
}

.container--wide {
    max-width: 1440px;
}

/* 
=== HEADER ===
*/
.site-header {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    min-height: 80px;
}

.site-logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
}

.site-logo:hover {
    text-decoration: none;
}

.site-logo img {
    height: 40px;
    width: auto;
    transition: height 0.3s ease;
}

.site-header.scrolled .site-logo img {
    height: 35px;
}

/* 
=== NAVIGATION ===
*/
.main-navigation {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav-menu a {
    font-weight: 500;
    color: #1a1a1a;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a:focus {
    color: #059669;
    text-decoration: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #1a1a1a;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
}

.menu-toggle:hover,
.menu-toggle:focus {
    background: #f3f4f6;
    outline: 2px solid #059669;
    outline-offset: 2px;
}

/* 
=== MOBILE NAVIGATION ===
*/
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: #ffffff;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: right 0.3s ease;
        z-index: 9999;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-menu a {
        font-size: 1.25rem;
        padding: 1rem;
    }
    
    .nav-close {
        position: absolute;
        top: 1rem;
        right: 1rem;
        background: none;
        border: none;
        font-size: 2rem;
        cursor: pointer;
    }
}

/* 
=== MAIN CONTENT ===
*/
.site-main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* 
=== HERO SECTION ===
*/
.hero-section {
    text-align: center;
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    margin-bottom: 4rem;
}

.hero-content h1 {
    margin-bottom: 1.5rem;
    color: #1a1a1a;
}

.hero-content p {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta {
    display: inline-flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: #059669;
    color: #ffffff;
}

.btn-primary:hover,
.btn-primary:focus {
    background: #047857;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #059669;
    border-color: #059669;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: #059669;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}

/* 
=== CARDS & POSTS ===
*/
.posts-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

.posts-grid--featured {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.posts-grid--latest {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

@media (min-width: 768px) {
    .posts-grid--latest {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .posts-grid--latest {
        grid-template-columns: repeat(3, 1fr);
    }
}

.post-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.post-card:focus-within {
    outline: 2px solid #059669;
    outline-offset: 2px;
}

.post-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-image img {
    transform: scale(1.05);
}

.post-card-content {
    padding: 1.5rem;
}

.post-category {
    display: inline-block;
    background: #ecfdf5;
    color: #059669;
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-card-title {
    margin-bottom: 0.75rem;
}

.post-card-title a {
    color: #1a1a1a;
    text-decoration: none;
}

.post-card-title a:hover,
.post-card-title a:focus {
    color: #059669;
}

.post-excerpt {
    color: #64748b;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.read-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* 
=== SECTIONS ===
*/
.section {
    margin-bottom: 4rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.125rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

/* 
=== CATEGORIES ===
*/
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.category-card {
    background: #ffffff;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.category-card:hover,
.category-card:focus {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.category-count {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.5rem;
}

/* 
=== NEWSLETTER ===
*/
.newsletter-cta {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
    padding: 3rem;
    border-radius: 16px;
    text-align: center;
    margin-bottom: 3rem;
}

.newsletter-cta h3 {
    color: #ffffff;
    margin-bottom: 1rem;
}

.newsletter-cta p {
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto 1rem;
    flex-wrap: wrap;
}

.newsletter-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    min-width: 200px;
}

.newsletter-input:focus {
    outline: 2px solid #10b981;
    outline-offset: 2px;
}

.newsletter-submit {
    background: #ffffff;
    color: #059669;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.newsletter-submit:hover,
.newsletter-submit:focus {
    background: #f3f4f6;
    transform: translateY(-1px);
}

.privacy-note {
    font-size: 0.875rem;
    opacity: 0.8;
}

.privacy-note a {
    color: #ffffff;
    text-decoration: underline;
}

/* 
=== PAGINATION ===
*/
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #1a1a1a;
    text-decoration: none;
    transition: all 0.2s ease;
    min-width: 44px;
    height: 44px;
}

.page-numbers:hover,
.page-numbers:focus {
    background: #f3f4f6;
    border-color: #059669;
    text-decoration: none;
}

.page-numbers.current {
    background: #059669;
    color: #ffffff;
    border-color: #059669;
}

/* 
=== FOOTER ===
*/
.site-footer {
    background: #1f2937;
    color: #d1d5db;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: #ffffff;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #d1d5db;
    transition: color 0.2s ease;
}

.footer-section a:hover,
.footer-section a:focus {
    color: #10b981;
    text-decoration: none;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #374151;
    color: #d1d5db;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.social-link:hover,
.social-link:focus {
    background: #10b981;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
    color: #9ca3af;
}

/* 
=== SINGLE POST ===
*/
.post-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.post-title {
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.post-meta-single {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
    color: #64748b;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.post-content {
    max-width: 760px;
    margin: 0 auto;
    line-height: 1.8;
}

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

.post-content blockquote {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8fafc;
    border-left: 4px solid #059669;
    border-radius: 0 8px 8px 0;
    font-style: italic;
}

.post-content pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.post-content code {
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Fira Code', Monaco, 'Cascadia Code', 'Roboto Mono', monospace;
}

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

/* 
=== SHARING & NAVIGATION ===
*/
.post-sharing {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 3rem 0;
    padding: 2rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f8fafc;
    color: #1a1a1a;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.share-btn:hover,
.share-btn:focus {
    background: #059669;
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin: 3rem 0;
}

.nav-post {
    flex: 1;
    max-width: calc(50% - 1rem);
}

.nav-post a {
    display: block;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.nav-post a:hover,
.nav-post a:focus {
    background: #e2e8f0;
    text-decoration: none;
}

.nav-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.nav-title {
    font-weight: 600;
    margin: 0;
}

/* 
=== ACCESSIBILITY ===
*/
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #059669;
    color: #ffffff;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 0 0 4px 4px;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* 
=== UTILITIES ===
*/
.text-center {
    text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }

.fade-in {
    animation: fadeIn 0.6s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 
=== RESPONSIVE DESIGN ===
*/
@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-section {
        padding: 2rem 0;
    }
    
    .posts-grid--featured,
    .posts-grid--latest {
        grid-template-columns: 1fr;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-input {
        min-width: 100%;
    }
    
    .post-navigation {
        flex-direction: column;
    }
    
    .nav-post {
        max-width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}