/*
Theme Name: Fruitask Blog
Theme URI: https://fruitask.com
Author: Fruitask
Author URI: https://fruitask.com
Description: A super modern blog theme built with Tailwind CSS. Features a clean two-column layout optimized for reading and ad placement. Light mode default with dark mode toggle. Primary color #a855f7, secondary #beda21.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: fruitask-blog
Tags: blog, modern, tailwind, two-columns, responsive, translation-ready, light-mode, dark-mode

Fruitask Blog Theme — A modern blog theme with light/dark mode.
*/

/* ========================================
   CUSTOM PROPERTIES & BASE STYLES
   ======================================== */
:root {
    --color-primary: #a855f7;
    --color-primary-light: #c084fc;
    --color-primary-dark: #9333ea;
    --color-secondary: #beda21;
    --color-secondary-light: #d4ed45;
    --color-secondary-dark: #a8c41e;
}

/* Theme transition */
.theme-transition,
.theme-transition *,
.theme-transition *::before,
.theme-transition *::after {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease, fill 0.3s ease !important;
}

/* Fruitask Logo */
.fruitask-logo {
    display: inline-block;
    vertical-align: middle;
}
.fruitask-logo-text {
    fill: #1a1a2e;
}
.dark .fruitask-logo-text {
    fill: #ffffff;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Custom scrollbar — Light */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #c4b5fd;
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}
/* Custom scrollbar — Dark */
.dark ::-webkit-scrollbar-track {
    background: #0f0f1a;
}
.dark ::-webkit-scrollbar-thumb {
    background: var(--color-primary);
}
.dark ::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-light);
}

/* ========================================
   GLASS CARD UTILITY
   ======================================== */
/* Light mode: clean solid cards */
.glass {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.02);
}
.glass-light {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid #e5e7eb;
}
/* Dark mode: glassmorphism */
.dark .glass {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: none;
}
.dark .glass-light {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* AdSense containment */
.adsbygoogle {
    max-width: 100% !important;
    overflow: hidden;
}
.adsbygoogle > div,
.adsbygoogle iframe {
    max-width: 100% !important;
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   BACKGROUND
   ======================================== */
/* Light mode: clean white */
.gradient-bg {
    background: #fafbfc;
}
/* Dark mode: animated gradient */
.dark .gradient-bg {
    background: linear-gradient(135deg, #0f0517 0%, #1a0a2e 25%, #0f172a 50%, #0a1628 75%, #0f0517 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Floating orb decorations — hidden in light, visible in dark */
.orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.5s ease;
}
.dark .orb {
    opacity: 0.15;
}

.orb-1 {
    width: 500px;
    height: 500px;
    background: var(--color-primary);
    top: -100px;
    right: -100px;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--color-secondary);
    bottom: -50px;
    left: -100px;
}

.orb-3 {
    width: 300px;
    height: 300px;
    background: var(--color-primary-light);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* ========================================
   BLOG CARD
   ======================================== */
.blog-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light hover */
.blog-card:hover {
    transform: translateY(-4px);
    border-color: #c4b5fd;
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.08), 0 0 0 1px rgba(168, 85, 247, 0.08);
}
/* Dark hover */
.dark .blog-card:hover {
    border-color: rgba(168, 85, 247, 0.3);
    box-shadow: 0 20px 40px rgba(168, 85, 247, 0.1), 0 0 0 1px rgba(168, 85, 247, 0.1);
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-image {
    overflow: hidden;
}

.blog-card-image img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar sticky */
.sidebar-sticky {
    position: sticky;
    top: 100px;
}

/* Ad space styling */
.ad-space {
    border: 1px dashed #e5e7eb;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    color: #9ca3af;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.dark .ad-space {
    border-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.2);
}

/* ========================================
   NEWSLETTER
   ======================================== */
.newsletter-card {
    position: relative;
    overflow: hidden;
}

.newsletter-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, var(--color-primary), transparent, var(--color-secondary), transparent);
    animation: rotate 6s linear infinite;
    opacity: 0.05;
}
.dark .newsletter-card::before {
    opacity: 0.1;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}

/* ========================================
   SEARCH OVERLAY
   ======================================== */
.search-overlay {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.search-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   READING PROGRESS BAR
   ======================================== */
.reading-progress {
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    width: 0%;
    transition: width 0.1s linear;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
}

/* ========================================
   POST CONTENT
   ======================================== */
/* Light mode */
.post-content {
    font-size: 1.125rem;
    line-height: 1.85;
    color: #374151;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #111827;
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.post-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: #111827;
    margin: 2rem 0 0.75rem;
}

.post-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    margin: 1.5rem 0 0.5rem;
}

.post-content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 0.2s;
}

.post-content a:hover {
    color: var(--color-primary-dark);
}

.post-content img {
    border-radius: 12px;
    margin: 2rem 0;
    max-width: 100%;
    height: auto;
}

.post-content blockquote {
    border-left: 3px solid var(--color-primary);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: rgba(168, 85, 247, 0.04);
    border-radius: 0 8px 8px 0;
    color: #4b5563;
    font-style: italic;
}

.post-content ul, .post-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

.post-content li {
    margin-bottom: 0.5rem;
}

.post-content ul li {
    list-style-type: disc;
}

.post-content ol li {
    list-style-type: decimal;
}

.post-content pre {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.25rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.875rem;
}

.post-content code {
    background: rgba(168, 85, 247, 0.08);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875em;
    color: var(--color-primary-dark);
}

.post-content pre code {
    background: transparent;
    padding: 0;
    color: #374151;
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.post-content th, .post-content td {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.post-content th {
    background: rgba(168, 85, 247, 0.06);
    font-weight: 600;
    color: #111827;
}

/* Dark mode overrides for post-content */
.dark .post-content {
    color: rgba(255, 255, 255, 0.8);
}
.dark .post-content h2 {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.08);
}
.dark .post-content h3 {
    color: #fff;
}
.dark .post-content h4 {
    color: rgba(255, 255, 255, 0.9);
}
.dark .post-content a {
    color: var(--color-primary-light);
}
.dark .post-content a:hover {
    color: var(--color-secondary);
}
.dark .post-content blockquote {
    background: rgba(168, 85, 247, 0.05);
    color: rgba(255, 255, 255, 0.7);
}
.dark .post-content pre {
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.08);
}
.dark .post-content code {
    background: rgba(168, 85, 247, 0.15);
    color: var(--color-primary-light);
}
.dark .post-content pre code {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
}
.dark .post-content th, .dark .post-content td {
    border-color: rgba(255, 255, 255, 0.08);
}
.dark .post-content th {
    background: rgba(168, 85, 247, 0.1);
    color: #fff;
}

/* ========================================
   PAGINATION
   ======================================== */
.pagination a, .pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pagination a {
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    color: #6b7280;
}

.pagination a:hover {
    background: rgba(168, 85, 247, 0.08);
    border-color: #c4b5fd;
    color: var(--color-primary-dark);
}

.pagination span.current {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #fff;
    border: none;
}

/* Dark pagination */
.dark .pagination a {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.6);
}

.dark .pagination a:hover {
    background: rgba(168, 85, 247, 0.15);
    border-color: rgba(168, 85, 247, 0.3);
    color: #fff;
}

/* Loading skeleton */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}
.dark .skeleton {
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .sidebar-sticky {
        position: relative;
        top: 0;
    }
}

/* WordPress Core Alignment Classes */
.alignnone { margin: 1rem 0; }
.aligncenter { display: block; margin: 1.5rem auto; }
.alignleft { float: left; margin: 0.5rem 1.5rem 1rem 0; }
.alignright { float: right; margin: 0.5rem 0 1rem 1.5rem; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.875rem; color: #6b7280; margin-top: 0.5rem; text-align: center; }
.dark .wp-caption-text { color: rgba(255,255,255,0.5); }

/* WordPress gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.gallery-item { margin: 0; }
.gallery-item img { border-radius: 8px; width: 100%; height: auto; }
