/*
Theme Name: ByteGen
Description: Modern, clean and responsive WordPress theme for AI, software, hardware and hosting blog. Fast loading and SEO optimized.
Version: 1.0
Author: ByteGen Team
Author URI: https://bytegen.io
License: GPL v2 or later
Text Domain: bytegen
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: 'Roboto', Arial, sans-serif;
    font-weight: 400;
    color: #333;
    background-color: #fff;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Georgia', serif;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 1rem;
    color: #222;
}

/* Image Responsiveness */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

a {
    color: #0066cc;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #004499;
    text-decoration: underline;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background-color: #fff;
    border-bottom: 1px solid #e5e5e5;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-logo {
    display: flex;
    align-items: center;
}

.site-logo h1 {
    font-size: 2rem;
    margin: 0;
    font-family: 'Georgia', serif;
    color: #222;
}

.site-logo a {
    color: #222;
    text-decoration: none;
}

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

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

.nav-menu li {
    margin-left: 2rem;
}

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

.nav-menu a:hover {
    color: #0066cc;
    text-decoration: none;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

/* Main Content */
.site-main {
    min-height: calc(100vh - 200px);
    padding: 3rem 0;
}

.content-area {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Posts */
.post-list {
    display: grid;
    gap: 2rem;
}

.post-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 2rem;
    transition: box-shadow 0.3s ease;
}

.post-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

.post-title a {
    color: #222;
    text-decoration: none;
}

.post-title a:hover {
    color: #0066cc;
}

.post-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.post-excerpt {
    color: #555;
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: #0066cc;
    font-weight: 500;
}

.read-more:hover {
    text-decoration: none;
    color: #004499;
}

/* Sidebar */
.sidebar {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 120px;
}

.widget {
    margin-bottom: 2rem;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: #222;
    border-bottom: 2px solid #0066cc;
    padding-bottom: 0.5rem;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget li {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e5e5;
}

.widget li:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.widget a {
    color: #555;
    display: block;
    padding: 0.25rem 0;
}

.widget a:hover {
    color: #0066cc;
    text-decoration: none;
}

/* Categories */
.categories-bottom {
    background: #f8f9fa;
    padding: 1rem 0;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
}

.categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
}

.categories-list a {
    background: #fff;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid #ddd;
    color: #555;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.categories-list a:hover {
    background: #0066cc;
    color: #fff;
    text-decoration: none;
    border-color: #0066cc;
}

/* Footer */
.site-footer {
    background: #222;
    color: #ccc;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h3 {
    color: #fff;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

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

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

.footer-section a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #fff;
    text-decoration: none;
}

.site-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #aaa;
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 1rem;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination a, .pagination span {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    color: #555;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

.pagination .current {
    background: #0066cc;
    color: #fff;
    border-color: #0066cc;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .menu-toggle {
        display: block;
        position: absolute;
        top: 1rem;
        right: 20px;
    }
    
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        background: #fff;
        border-top: 1px solid #e5e5e5;
        padding: 1rem 0;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        margin: 0;
        text-align: center;
    }
    
    .nav-menu a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .content-area {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .categories-list {
        justify-content: flex-start;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .post-item {
        padding: 1.5rem;
    }
    
    .sidebar {
        padding: 1.5rem;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 2px 10px rgba(0,102,204,0.3);
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background: #004499;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,102,204,0.4);
}

/* Screen Reader Text */
.screen-reader-text, .sr-only {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus, .sr-only:focus {
    background-color: #f1f1f1;
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 8px 16px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Focus Styles */
.focused {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* Form Styles */
.search-form {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.search-field {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.search-field:focus {
    border-color: #0066cc;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0,102,204,0.2);
}

.search-submit {
    padding: 0.75rem 1.5rem;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-submit:hover {
    background: #004499;
}

/* Error Form Fields */
.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 2px rgba(220,53,69,0.2) !important;
}

/* Print Styles */
@media print {
    .site-header,
    .main-navigation,
    .sidebar,
    .categories-bottom,
    .site-footer,
    #back-to-top {
        display: none;
    }
    
    .content-area {
        grid-template-columns: 1fr;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
} 