/*
Theme Name: Fruitask Blog
Theme URI: https://fruitask.com
Author: Fruitask
Author URI: https://fruitask.com
Description: A light blog theme built with Tailwind CSS, with a two-column layout optimized for reading and ad placement. Primary color #6366f1.
Version: 1.0.1
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
*/

/* ========================================
   CUSTOM PROPERTIES & BASE STYLES
   ======================================== */
:root {
    color-scheme: only light;
    --color-primary: #6366f1;
    --color-primary-light: #818cf8;
    --color-primary-dark: #4f46e5;
    --color-text: #404040;
}

/* Fruitask Logo */
.fruitask-logo {
    display: inline-block;
    vertical-align: middle;
}
.fruitask-logo-text {
    fill: var(--color-text);
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

body {
    background: #fafbfc;
    color: var(--color-text);
    font-family: "Figtree", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-optical-sizing: auto;
}

.figtree-fruitask {
    font-family: "Figtree", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #c7d2fe;
    border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* ========================================
   GLASS CARD UTILITY
   ======================================== */
.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;
}

/* AdSense containment */
.adsbygoogle {
    max-width: 100% !important;
    overflow: hidden;
}
.adsbygoogle > div,
.adsbygoogle iframe {
    max-width: 100% !important;
}

.fruitask-ad-slot.is-ad-empty,
.ad-widget.is-ad-empty,
.adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
}

/* ========================================
   COMMENT FORM
   ======================================== */
.comment-form-cookies-consent {
    margin: 1.25rem 0 1.5rem;
}

.comment-form-cookies-consent label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}

.comment-form-cookies-consent input[type="checkbox"] {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

.fruitask-checkbox-box {
    position: relative;
    flex: 0 0 auto;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    border: 1px solid #d1d5db;
    border-radius: 0.4rem;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.fruitask-checkbox-box::after {
    content: "";
    position: absolute;
    left: 0.42rem;
    top: 0.2rem;
    width: 0.35rem;
    height: 0.65rem;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    opacity: 0;
    transform: rotate(45deg) scale(0.75);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.fruitask-checkbox-label {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #6b7280;
}

.comment-form-cookies-consent label:hover .fruitask-checkbox-box {
    border-color: var(--color-primary-light);
    transform: translateY(-1px);
}

.comment-form-cookies-consent input[type="checkbox"]:focus-visible + .fruitask-checkbox-box {
    outline: 2px solid var(--color-primary);
    outline-offset: 3px;
}

.comment-form-cookies-consent input[type="checkbox"]:checked + .fruitask-checkbox-box {
    background: var(--color-primary);
    border-color: var(--color-primary);
    box-shadow: 0 8px 18px #6366f138;
}

.comment-form-cookies-consent input[type="checkbox"]:checked + .fruitask-checkbox-box::after {
    opacity: 1;
    transform: rotate(45deg) scale(1);
}

/* ========================================
   BLOG CARD
   ======================================== */
.blog-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover {
    transform: translateY(-4px);
    border-color: #c7d2fe;
    box-shadow: 0 20px 40px #6366f114, 0 0 0 1px #6366f114;
}

.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;
}

/* ========================================
   NEWSLETTER
   ======================================== */
.newsletter-card {
    position: relative;
    overflow: hidden;
}

/* ========================================
   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: var(--color-primary);
    width: 0%;
    transition: width 0.1s linear;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9999;
}

/* ========================================
   POST CONTENT
   ======================================== */
.post-content {
    font-size: 1.125rem;
    line-height: 1.85;
    color: var(--color-text);
}

.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: #6366f10a;
    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: #6366f114;
    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: #6366f10f;
    font-weight: 600;
    color: #111827;
}

/* ========================================
   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: #6366f114;
    border-color: #c7d2fe;
    color: var(--color-primary-dark);
}

.pagination span.current {
    background: var(--color-primary);
    color: #fff;
    border: none;
}

/* Loading skeleton */
.skeleton {
    background: #6366f114;
    border-radius: 8px;
}

/* 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; }

/* 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; }
