/*
Theme Name: Sleap Technologies Blog
Theme URI: https://sleaptechnologies.com
Author: Sleap Technologies
Author URI: https://sleaptechnologies.com
Description: A modern, SEO-optimized WordPress blog theme designed to drive traffic to Sleap Technologies. Features clean design, fast loading, and strategic CTAs.
Version: 1.0.0
License: GPL v2 or later
Text Domain: sleap-blog
*/

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

:root {
    --primary-color: #2563eb;
    --secondary-color: #1e40af;
    --accent-color: #3b82f6;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --background: #ffffff;
    --background-alt: #f9fafb;
    --border-color: #e5e7eb;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --max-width: 1280px;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

body {
    font-family: var(--font-sans);
    color: var(--text-primary);
    background: var(--background);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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.8;
}

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

a:hover {
    color: var(--secondary-color);
}

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

/* Header Styles */
.site-header {
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    height: 40px;
    width: auto;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.site-title a {
    color: inherit;
}

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

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.main-navigation a:hover {
    color: var(--primary-color);
}

.main-navigation .current-menu-item a {
    color: var(--primary-color);
}

.cta-button {
    background: var(--primary-color);
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.cta-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    margin: 5px 0;
    transition: 0.3s;
}

/* Main Content Area */
.site-content {
    padding: 3rem 0;
    min-height: 60vh;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
    align-items: start;
}

/* Blog Post Cards */
.blog-posts {
    display: grid;
    gap: 2rem;
}

.post-card {
    background: var(--background);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.post-thumbnail {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.post-content {
    padding: 2rem;
}

.post-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.post-category {
    background: var(--background-alt);
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-weight: 600;
    color: var(--primary-color);
}

.post-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.post-title a {
    color: var(--text-primary);
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:after {
    content: '→';
    transition: transform 0.3s ease;
}

.read-more:hover:after {
    transform: translateX(5px);
}

/* Single Post Styles */
.single-post {
    background: var(--background);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.post-header {
    padding: 3rem 3rem 2rem;
    background: linear-gradient(135deg, var(--background-alt) 0%, var(--background) 100%);
}

.post-header .post-meta {
    margin-bottom: 1.5rem;
}

.post-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.post-featured-image {
    width: 100%;
    height: auto;
    display: block;
}

.post-body {
    padding: 3rem;
}

.post-body h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.post-body ul, .post-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-body li {
    margin-bottom: 0.5rem;
}

.post-body blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

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

.post-body pre {
    background: var(--background-alt);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.post-body code {
    background: var(--background-alt);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.875em;
}

/* Author Box */
.author-box {
    background: var(--background-alt);
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 3rem;
    display: flex;
    gap: 1.5rem;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    flex-shrink: 0;
}

.author-info h3 {
    margin-bottom: 0.5rem;
}

.author-bio {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Sidebar */
.sidebar {
    position: sticky;
    top: 100px;
}

.widget {
    background: var(--background);
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
}

.widget-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-color);
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

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

/* CTA Widget */
.cta-widget {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    text-align: center;
}

.cta-widget .widget-title {
    color: white;
    border-bottom-color: rgba(255, 255, 255, 0.3);
}

.cta-widget p {
    margin-bottom: 1.5rem;
}

.cta-widget .cta-button {
    background: white;
    color: var(--primary-color) !important;
}

.cta-widget .cta-button:hover {
    background: var(--background-alt);
}

/* Search Form */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-field {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
}

.search-submit {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.search-submit:hover {
    background: var(--secondary-color);
}

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

.pagination a, .pagination span {
    padding: 0.75rem 1rem;
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
}

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

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

/* Footer */
.site-footer {
    background: var(--text-primary);
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 5rem;
}

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

.footer-widget h3 {
    color: white;
    margin-bottom: 1rem;
}

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

.footer-widget li {
    margin-bottom: 0.75rem;
}

.footer-widget a {
    color: rgba(255, 255, 255, 0.8);
}

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

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
}

/* Newsletter Form */
.newsletter-form {
    margin-top: 1rem;
}

.newsletter-form input {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
}

.newsletter-form button {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: var(--accent-color);
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: background 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
}

/* Comments Section */
.comments-area {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--background-alt);
    border-radius: 1rem;
}

.comments-title {
    margin-bottom: 2rem;
}

.comment-list {
    list-style: none;
    margin-bottom: 2rem;
}

.comment {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.comment-meta {
    flex: 1;
}

.comment-author-name {
    font-weight: 600;
    color: var(--text-primary);
}

.comment-date {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.comment-content {
    color: var(--text-primary);
}

/* Comment Form */
.comment-form {
    background: var(--background);
    padding: 2rem;
    border-radius: 0.5rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-family: inherit;
}

.comment-form textarea {
    min-height: 150px;
    resize: vertical;
}

.comment-form button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.comment-form button:hover {
    background: var(--secondary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-area {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .menu-toggle {
        display: block;
    }

    .main-navigation {
        position: fixed;
        top: 0;
        right: -300px;
        width: 300px;
        height: 100vh;
        background: var(--background);
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transition: right 0.3s ease;
        flex-direction: column;
        align-items: flex-start;
    }

    .main-navigation.active {
        right: 0;
    }

    .main-navigation ul {
        flex-direction: column;
        width: 100%;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }

    .post-header {
        padding: 2rem 1.5rem 1rem;
    }

    .post-body {
        padding: 2rem 1.5rem;
    }
}

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

/* Loading Animation */
.loading {
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none; }