/*
Theme Name: WeCanDoToo Blog Theme
Description: A modern, responsive blog theme with advanced features including SEO optimization, user management, and newsletter integration. Based on the WeCanDoToo React application.
Author: WeCanDoToo Team
Version: 1.0.0
Text Domain: wecandotoo
Tags: blog, responsive, modern, seo, newsletter
Requires at least: 5.0
Tested up to: 6.3
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* Reset and base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    color: #374151;
    background-color: #ffffff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header styles */
.site-header {
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 40;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 0;
}

.site-logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #111827;
}

.logo-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    margin-right: 8px;
}

.site-title {
    font-size: 24px;
    font-weight: bold;
    color: #111827;
}

/* Navigation styles */
.main-navigation {
    display: none;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    align-items: center;
    gap: 2rem;
}

.main-navigation a {
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    transition: color 0.2s;
}

.main-navigation a:hover {
    color: #3b82f6;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    display: inline-block;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background: #2563eb;
}

.btn-secondary {
    background: transparent;
    color: #374151;
}

.btn-secondary:hover {
    color: #3b82f6;
}

/* Mobile menu */
.mobile-menu-toggle {
    display: block;
    background: none;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
}

.mobile-menu {
    display: none;
    padding: 1rem 0;
    border-top: 1px solid #e5e7eb;
    margin-top: 1rem;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu li {
    margin-bottom: 8px;
}

.mobile-menu a {
    display: block;
    padding: 8px 0;
    text-decoration: none;
    color: #374151;
}

/* Blog styles */
.blog-hero {
    background: linear-gradient(135deg, #f8fafc, #dbeafe);
    padding: 4rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-description {
    font-size: 1.25rem;
    color: #6b7280;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.search-form {
    max-width: 400px;
    margin: 0 auto;
    position: relative;
}

.search-form input {
    width: 100%;
    padding: 12px 16px 12px 48px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-form input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #9ca3af;
}

/* Posts grid */
.posts-section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1.5rem;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 2rem;
}

.category-tab {
    padding: 8px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    transition: all 0.2s;
}

.category-tab:hover,
.category-tab.active {
    border-color: #3b82f6;
    color: #3b82f6;
    background: #dbeafe;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.post-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
}

.post-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.post-thumbnail {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-content {
    padding: 1.5rem;
}

.post-category {
    display: inline-block;
    padding: 4px 12px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 1rem;
}

.post-title {
    font-size: 1.25rem;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.post-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s;
}

.post-title a:hover {
    color: #3b82f6;
}

.post-excerpt {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #9ca3af;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.post-tags {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.post-tag {
    padding: 2px 8px;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
}

/* Single post styles */
.single-post-header {
    background: white;
    border-bottom: 1px solid #e5e7eb;
    padding: 3rem 0;
}

.breadcrumbs {
    margin-bottom: 1.5rem;
    font-size: 14px;
}

.breadcrumbs a {
    color: #3b82f6;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.post-header-title {
    font-size: 3rem;
    font-weight: bold;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.post-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: #6b7280;
    align-items: center;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.single-post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.post-content-body {
    font-size: 18px;
    line-height: 1.8;
    color: #374151;
}

.post-content-body h2,
.post-content-body h3,
.post-content-body h4 {
    color: #111827;
    font-weight: bold;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.post-content-body p {
    margin-bottom: 1.5rem;
}

.post-content-body img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

/* Footer styles */
.site-footer {
    background: #111827;
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section p {
    color: #d1d5db;
    line-height: 1.6;
    font-size: 14px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #60a5fa;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: #9ca3af;
    font-size: 14px;
    margin: 0;
}

.footer-bottom-links {
    display: flex;
    gap: 1.5rem;
}

.footer-bottom-links a {
    color: #9ca3af;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.footer-bottom-links a:hover {
    color: white;
}

/* Newsletter styles */
.newsletter-section {
    background: #dbeafe;
    padding: 4rem 0;
    text-align: center;
}

.newsletter-title {
    font-size: 2rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1rem;
}

.newsletter-description {
    color: #6b7280;
    margin-bottom: 2rem;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.newsletter-form input {
    flex: 1;
    min-width: 250px;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.newsletter-form input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.newsletter-form button {
    padding: 12px 24px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.newsletter-form button:hover {
    background: #2563eb;
}

.newsletter-disclaimer {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 1rem;
}

/* Responsive design */
@media (min-width: 768px) {
    .main-navigation {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .post-header-title {
        font-size: 4rem;
    }
    
    .newsletter-form {
        flex-wrap: nowrap;
    }
    
    .newsletter-form input {
        min-width: auto;
    }
}

/* Utility classes */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.hidden {
    display: none;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.space-x-2 > * + * {
    margin-left: 0.5rem;
}

.space-x-4 > * + * {
    margin-left: 1rem;
}

.w-full {
    width: 100%;
}

.max-w-4xl {
    max-width: 56rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.bg-white {
    background-color: white;
}

.bg-blue-50 {
    background-color: #eff6ff;
}

.text-gray-600 {
    color: #4b5563;
}

.text-gray-900 {
    color: #111827;
}

.font-bold {
    font-weight: bold;
}

.rounded-lg {
    border-radius: 8px;
}

.shadow {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.transition-colors {
    transition-property: color, background-color, border-color;
    transition-duration: 150ms;
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #3b82f6;
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    opacity: 0;
    pointer-events: none;
    z-index: 50;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    background: #2563eb;
    transform: translateY(-2px);
}

/* WordPress specific */
.wp-caption {
    max-width: 100%;
}

.wp-caption img {
    width: 100%;
    height: auto;
}

.wp-caption-text {
    font-size: 14px;
    color: #6b7280;
    text-align: center;
    padding: 8px;
    font-style: italic;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Comments */
.comments-area {
    background: #f9fafb;
    padding: 3rem 0;
}

.comments-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 2rem;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-author img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.comment-metadata {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 1rem;
}

.comment-content {
    line-height: 1.6;
}

.reply {
    margin-top: 1rem;
}

.comment-reply-link {
    font-size: 14px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.comment-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.comment-form-comment textarea {
    width: 100%;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    resize: vertical;
}

.comment-form-author,
.comment-form-email,
.comment-form-url {
    margin-bottom: 1rem;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
}

.form-submit {
    margin-top: 1rem;
}

.submit {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.submit:hover {
    background: #2563eb;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.page-numbers {
    display: inline-block;
    padding: 8px 12px;
    text-decoration: none;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    transition: all 0.2s;
}

.page-numbers:hover,
.page-numbers.current {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.page-numbers.dots {
    border: none;
    padding: 8px 4px;
}

/* Archive pages */
.archive-header {
    background: #f9fafb;
    padding: 3rem 0;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.archive-title {
    font-size: 2.5rem;
    font-weight: bold;
    color: #111827;
    margin-bottom: 1rem;
}

.archive-description {
    color: #6b7280;
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* 404 Page */
.error-404 {
    text-align: center;
    padding: 6rem 0;
}

.error-title {
    font-size: 6rem;
    font-weight: bold;
    color: #3b82f6;
    margin-bottom: 1rem;
}

.error-subtitle {
    font-size: 2rem;
    color: #111827;
    margin-bottom: 1rem;
}

.error-description {
    color: #6b7280;
    margin-bottom: 2rem;
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .newsletter-section,
    .back-to-top {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .single-post-content {
        max-width: none;
        margin: 0;
        padding: 0;
    }
}