/*
Theme Name: Clarity
Theme URI: https://themes.developer.com/clarity
Author: Developer
Description: Clean magazine theme with blue accents and modern typography.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: clarity
Tags: blog, news, magazine, grid-layout, custom-logo, custom-menu, featured-images, footer-widgets
*/

/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: 'Open Sans', sans-serif; color: #333333; background: #f5f6f8; line-height: 1.7; overflow-x: hidden; }
a { color: #1e96fc; text-decoration: none; transition: color 0.2s; }
a:hover { color: #0a7de0; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4, h5, h6 { font-family: 'Poppins', sans-serif; color: #1b2228; line-height: 1.3; font-weight: 600; }

/* ===== LAYOUT ===== */
.site-container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.content-area { display: flex; gap: 30px; padding: 30px 0; }
.main-content { flex: 1; min-width: 0; }
.sidebar-area { width: 300px; flex-shrink: 0; }
@media (max-width: 991px) {
    .content-area { flex-direction: column; }
    .sidebar-area { width: 100%; }
}

/* ===== HEADER ===== */
.site-header { background: #1b2228; color: #ffffff; position: relative; z-index: 100; }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 70px; }
.site-branding { display: flex; align-items: center; gap: 12px; }
.site-branding .custom-logo { max-height: 40px; width: auto; }
.site-title { font-family: 'Poppins', sans-serif; font-size: 24px; font-weight: 700; color: #ffffff; }
.site-title a { color: inherit; }
.site-title a:hover { color: #1e96fc; }
.site-description { font-size: 12px; color: #b0b8c1; margin-top: 2px; }

/* ===== MAIN NAVIGATION ===== */
.main-nav { background: #1b2228; border-top: 1px solid rgba(255,255,255,0.08); }
.main-nav .site-container { display: flex; align-items: center; justify-content: space-between; }
.nav-menu { list-style: none; display: flex; flex-wrap: wrap; gap: 0; }
.nav-menu li { position: relative; }
.nav-menu li a { display: block; padding: 14px 18px; color: #ffffff; font-family: 'Poppins', sans-serif; font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; transition: all 0.2s; border-bottom: 3px solid transparent; }
.nav-menu li a:hover, .nav-menu li.current-menu-item a, .nav-menu li.current_page_item a { color: #1e96fc; border-bottom-color: #1e96fc; }
.nav-menu li ul { display: none; position: absolute; top: 100%; left: 0; background: #1b2228; min-width: 220px; z-index: 200; border-top: 3px solid #1e96fc; box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.nav-menu li:hover > ul { display: block; }
.nav-menu li ul li a { padding: 10px 18px; font-size: 13px; text-transform: none; border-bottom: 1px solid rgba(255,255,255,0.06); border-left: none; border-right: none; }

/* Mobile menu toggle */
.menu-toggle { display: none; background: none; border: none; color: #ffffff; font-size: 24px; cursor: pointer; padding: 10px; }
@media (max-width: 768px) {
    .menu-toggle { display: block; }
    .nav-menu { display: none; flex-direction: column; width: 100%; }
    .nav-menu.active { display: flex; }
    .nav-menu li a { border-bottom-color: transparent; border-left: 3px solid transparent; }
    .nav-menu li a:hover { border-left-color: #1e96fc; }
    .nav-menu li ul { position: static; box-shadow: none; border-top: none; }
    .nav-menu li ul li a { padding-left: 36px; }
}

/* ===== SEARCH IN HEADER ===== */
.header-search { position: relative; }
.header-search input { background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15); color: #ffffff; padding: 8px 14px; border-radius: 4px; font-size: 13px; width: 200px; transition: all 0.2s; }
.header-search input:focus { background: rgba(255,255,255,0.15); border-color: #1e96fc; outline: none; width: 260px; }
.header-search input::placeholder { color: rgba(255,255,255,0.5); }

/* ===== POST CARDS ===== */
.posts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
@media (max-width: 991px) { .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .posts-grid { grid-template-columns: 1fr; } }

.post-card { background: #ffffff; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.06); transition: transform 0.2s, box-shadow 0.2s; }
.post-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); }
.post-card .card-thumb { position: relative; overflow: hidden; aspect-ratio: 16/10; background: #e4e8ec; }
.post-card .card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.post-card:hover .card-thumb img { transform: scale(1.05); }
.post-card .card-thumb .no-thumb { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1b2228, #1e96fc); color: white; font-family: 'Poppins', sans-serif; font-size: 28px; font-weight: 700; opacity: 0.6; }
.post-card .card-body { padding: 18px; }
.post-card .card-category { display: inline-block; padding: 3px 10px; border-radius: 3px; font-size: 11px; font-weight: 600; color: #fff; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 10px; }
.post-card .card-title { font-size: 17px; font-weight: 600; line-height: 1.4; margin-bottom: 8px; }
.post-card .card-title a { color: #1b2228; }
.post-card .card-title a:hover { color: #1e96fc; }
.post-card .card-excerpt { font-size: 14px; color: #888888; line-height: 1.6; margin-bottom: 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-card .card-meta { font-size: 12px; color: #888888; display: flex; align-items: center; gap: 12px; }
.post-card .card-meta .meta-date::before { content: '\1F4C5'; margin-right: 4px; }

/* Featured/Hero post (first post on homepage) */
.featured-post { grid-column: 1 / -1; display: grid; grid-template-columns: 1.2fr 1fr; border-radius: 6px; overflow: hidden; background: #ffffff; box-shadow: 0 2px 12px rgba(0,0,0,0.08); }
.featured-post .card-thumb { aspect-ratio: auto; min-height: 320px; }
.featured-post .card-body { padding: 30px; display: flex; flex-direction: column; justify-content: center; }
.featured-post .card-title { font-size: 26px; margin-bottom: 14px; }
.featured-post .card-excerpt { font-size: 15px; -webkit-line-clamp: 4; }
@media (max-width: 768px) {
    .featured-post { grid-template-columns: 1fr; }
    .featured-post .card-thumb { min-height: 200px; }
}

/* Category color badges */
.cat-color-1 { background: #1e96fc; }
.cat-color-2 { background: #3ddc97; }
.cat-color-3 { background: #f2295b; }
.cat-color-4 { background: #c49529; }
.cat-color-5 { background: #9b59b6; }
.cat-color-6 { background: #e67e22; }
.cat-color-7 { background: #1abc9c; }
.cat-color-8 { background: #e74c3c; }


/* ===== SECTION HEADERS ===== */
.section-header { display: flex; align-items: center; margin-bottom: 24px; border-bottom: 3px solid #1e96fc; padding-bottom: 10px; }
.section-title { font-size: 20px; font-weight: 700; color: #1b2228; text-transform: uppercase; position: relative; padding-right: 16px; }

/* ===== SIDEBAR ===== */
.widget { background: #ffffff; border-radius: 6px; padding: 22px; margin-bottom: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.widget-title { font-size: 16px; font-weight: 700; color: #1b2228; text-transform: uppercase; padding-bottom: 12px; margin-bottom: 16px; border-bottom: 3px solid #1e96fc; }
.widget ul { list-style: none; }
.widget ul li { padding: 8px 0; border-bottom: 1px solid #e4e8ec; font-size: 14px; }
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: #333333; display: flex; justify-content: space-between; }
.widget ul li a:hover { color: #1e96fc; }
.widget ul li .count { color: #888888; font-size: 12px; }

/* Recent Posts Widget */
.widget-recent-post { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #e4e8ec; }
.widget-recent-post:last-child { border-bottom: none; }
.widget-recent-post .wrp-thumb { width: 70px; height: 70px; border-radius: 4px; overflow: hidden; flex-shrink: 0; background: #e4e8ec; }
.widget-recent-post .wrp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.widget-recent-post .wrp-content { flex: 1; min-width: 0; }
.widget-recent-post .wrp-title { font-size: 13px; font-weight: 600; line-height: 1.4; margin-bottom: 4px; }
.widget-recent-post .wrp-title a { color: #1b2228; }
.widget-recent-post .wrp-title a:hover { color: #1e96fc; }
.widget-recent-post .wrp-date { font-size: 11px; color: #888888; }

/* ===== SINGLE POST ===== */
.single-post-content { background: #ffffff; border-radius: 6px; padding: 36px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.single-post-header { margin-bottom: 24px; }
.single-post-header .post-category { display: inline-block; padding: 4px 14px; border-radius: 3px; font-size: 12px; font-weight: 600; color: #fff; text-transform: uppercase; margin-bottom: 16px; }
.single-post-header h1 { font-size: 32px; line-height: 1.3; margin-bottom: 16px; }
.single-post-header .post-meta { font-size: 14px; color: #888888; display: flex; flex-wrap: wrap; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid #e4e8ec; }
.single-post-header .post-meta span::before { margin-right: 6px; }
.single-featured-image { margin-bottom: 24px; border-radius: 6px; overflow: hidden; }
.single-featured-image img { width: 100%; }

/* Post content typography */
.entry-content { font-size: 17px; line-height: 1.8; color: #333333; }
.entry-content p { margin-bottom: 1.5em; }
.entry-content h2 { font-size: 26px; margin: 1.5em 0 0.8em; }
.entry-content h3 { font-size: 22px; margin: 1.3em 0 0.6em; }
.entry-content h4 { font-size: 18px; margin: 1.2em 0 0.5em; }
.entry-content blockquote { border-left: 4px solid #1e96fc; padding: 16px 24px; margin: 1.5em 0; background: rgba(0,0,0,0.02); font-style: italic; font-size: 18px; }
.entry-content ul, .entry-content ol { margin: 1em 0; padding-left: 2em; }
.entry-content li { margin-bottom: 0.5em; }
.entry-content img { border-radius: 6px; margin: 1em 0; }
.entry-content a { color: #1e96fc; text-decoration: underline; }
.entry-content pre { background: #1b2228; color: #ffffff; padding: 20px; border-radius: 6px; overflow-x: auto; font-size: 14px; margin: 1.5em 0; }
.entry-content code { background: rgba(0,0,0,0.06); padding: 2px 6px; border-radius: 3px; font-size: 14px; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; }
.entry-content th, .entry-content td { padding: 10px 14px; border: 1px solid #e4e8ec; text-align: left; }
.entry-content th { background: #f5f6f8; font-weight: 600; }

/* ===== PAGINATION ===== */
.pagination { display: flex; gap: 6px; justify-content: center; margin: 40px 0; flex-wrap: wrap; }
.pagination a, .pagination span { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 12px; border-radius: 4px; font-size: 14px; font-weight: 500; background: #ffffff; color: #333333; border: 1px solid #e4e8ec; transition: all 0.2s; }
.pagination a:hover { background: #1e96fc; color: #fff; border-color: #1e96fc; }
.pagination .current { background: #1e96fc; color: #fff; border-color: #1e96fc; }

/* ===== FOOTER ===== */
.site-footer { background: #0d1317; color: #b0b8c1; margin-top: 40px; }
.footer-widgets { padding: 50px 0 30px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
@media (max-width: 768px) { .footer-widgets { grid-template-columns: 1fr; } }
.footer-widgets .widget { background: transparent; box-shadow: none; padding: 0; }
.footer-widgets .widget-title { color: #fff; border-bottom-color: #1e96fc; }
.footer-widgets .widget ul li a { color: #b0b8c1; }
.footer-widgets .widget ul li a:hover { color: #1e96fc; }
.footer-widgets .widget ul li { border-bottom-color: rgba(255,255,255,0.08); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 20px 0; text-align: center; font-size: 13px; }
.footer-bottom a { color: #1e96fc; }

/* ===== ARCHIVE / SEARCH HEADER ===== */
.archive-header { background: #ffffff; border-radius: 6px; padding: 24px 30px; margin-bottom: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.archive-header h1 { font-size: 24px; margin-bottom: 4px; }
.archive-header p { color: #888888; font-size: 14px; }

/* ===== 404 PAGE ===== */
.error-404 { text-align: center; padding: 80px 20px; background: #ffffff; border-radius: 6px; }
.error-404 h1 { font-size: 120px; color: #1e96fc; line-height: 1; margin-bottom: 16px; }
.error-404 h2 { font-size: 28px; margin-bottom: 16px; }
.error-404 p { font-size: 16px; color: #888888; margin-bottom: 24px; }
.error-404 .btn { display: inline-block; padding: 12px 28px; background: #1e96fc; color: #fff; border-radius: 4px; font-weight: 600; }
.error-404 .btn:hover { background: #0a7de0; color: #fff; }

/* ===== COMMENTS ===== */
.comments-area { background: #ffffff; border-radius: 6px; padding: 30px; margin-top: 24px; box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.comments-area h2 { font-size: 22px; margin-bottom: 24px; }
.comment-list { list-style: none; }
.comment-body { padding: 16px 0; border-bottom: 1px solid #e4e8ec; }
.comment-meta { font-size: 13px; color: #888888; margin-bottom: 8px; }
.comment-meta .fn { font-weight: 600; color: #1b2228; }
.comment-content p { font-size: 15px; margin-bottom: 8px; }
.comment-reply-link { font-size: 13px; color: #1e96fc; font-weight: 600; }
.comment-respond { margin-top: 24px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
    width: 100%; padding: 10px 14px; border: 1px solid #e4e8ec; border-radius: 4px; font-size: 14px; margin-bottom: 12px; font-family: 'Open Sans', sans-serif;
}
.comment-form textarea { min-height: 120px; resize: vertical; }
.comment-form .submit { background: #1e96fc; color: #fff; border: none; padding: 12px 28px; border-radius: 4px; font-size: 14px; font-weight: 600; cursor: pointer; font-family: 'Poppins', sans-serif; }
.comment-form .submit:hover { background: #0a7de0; }

/* ===== BREADCRUMBS ===== */
.breadcrumbs { font-size: 13px; color: #888888; padding: 16px 0; }
.breadcrumbs a { color: #1e96fc; }
.breadcrumbs .sep { margin: 0 8px; }

/* ===== NO RESULTS ===== */
.no-results { text-align: center; padding: 60px 20px; background: #ffffff; border-radius: 6px; }
.no-results h2 { margin-bottom: 12px; }
.no-results p { color: #888888; }

/* ===== SEARCH FORM ===== */
.search-form { display: flex; gap: 8px; }
.search-form .search-field { flex: 1; padding: 10px 14px; border: 1px solid #e4e8ec; border-radius: 4px; font-size: 14px; }
.search-form .search-submit { background: #1e96fc; color: #fff; border: none; padding: 10px 20px; border-radius: 4px; font-weight: 600; cursor: pointer; }

/* ===== SCREEN READER TEXT ===== */
.screen-reader-text { clip: rect(1px,1px,1px,1px); position: absolute; height: 1px; width: 1px; overflow: hidden; }

/* ===== ALIGNMENTS ===== */
.alignleft { float: left; margin: 0 1.5em 1.5em 0; }
.alignright { float: right; margin: 0 0 1.5em 1.5em; }
.aligncenter { display: block; margin: 1.5em auto; }
.wp-block-image { margin: 1.5em 0; }