/*
Theme Name: EnjoyBlog Pro
Theme URI: https://enjoyblog.pro
Author: EnjoyBlog Team
Author URI: https://enjoyblog.pro
Description: A professional and feature-rich WordPress blog theme with unlimited customization options, Google Fonts integration, advanced widgets, and comprehensive theme options panel.
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: enjoyblog-pro
Tags: blog, news, magazine, custom-colors, custom-menu, featured-images, theme-options, translation-ready, custom-logo, one-column, two-columns, three-columns, flexible-header, custom-header, custom-background, post-formats, sticky-post, threaded-comments, rtl-language-support, responsive-layout, accessibility-ready
*/

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --accent-color: #f59e0b;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --border-color: #e5e7eb;
    --header-height: 80px;
    --container-width: 1200px;
    --border-radius: 8px;
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-color);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* ==========================================================================
   Container & Layout
   ========================================================================== */

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.site-content {
    flex: 1;
    padding: 40px 0;
}

.content-area {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
}

.content-area.full-width {
    grid-template-columns: 1fr;
}

/* ==========================================================================
   Header Styles
   ========================================================================== */

.site-header {
    background: var(--bg-color);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-logo img {
    max-height: 50px;
    width: auto;
}

.site-title {
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

.site-title a {
    color: var(--text-color);
}

.site-description {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

.main-navigation {
    display: flex;
    align-items: center;
    gap: 30px;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    color: var(--text-color);
    font-weight: 500;
    padding: 10px 0;
    display: block;
}

.main-navigation a:hover {
    color: var(--primary-color);
}

/* Dropdown Menu */
.main-navigation .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    min-width: 220px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.main-navigation li:hover>.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation .sub-menu li {
    display: block;
}

.main-navigation .sub-menu a {
    padding: 10px 20px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-color);
    padding: 10px;
}

/* Header Search */
.header-search {
    position: relative;
}

.header-search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 8px 15px;
    transition: var(--transition);
}

.header-search-form:focus-within {
    box-shadow: var(--shadow-md);
}

.header-search-input {
    border: none;
    background: transparent;
    outline: none;
    width: 200px;
    font-size: 14px;
}

.header-search-submit {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-light);
    font-size: 18px;
    padding: 0;
}

.header-search-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--text-color);
    padding: 10px;
}

/* ==========================================================================
   Posts & Articles
   ========================================================================== */

.post-list {
    display: grid;
    gap: 30px;
}

.post-item {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.post-item:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.post-thumbnail {
    position: relative;
    overflow: hidden;
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
}

.post-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-item:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-category {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-content-wrapper {
    padding: 25px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 12px;
    font-size: 14px;
    color: var(--text-light);
}

.post-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.post-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 12px;
}

.post-title a {
    color: var(--text-color);
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-light);
    margin-bottom: 15px;
    line-height: 1.6;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 14px;
}

.read-more:hover {
    gap: 12px;
}

/* Single Post */
.single-post-header {
    margin-bottom: 30px;
}

.single-post-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 15px;
}

.single-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.single-post-thumbnail {
    margin-bottom: 30px;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.entry-content {
    font-size: 18px;
    line-height: 1.8;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: 2em;
    margin-bottom: 0.8em;
    line-height: 1.3;
}

.entry-content h2 {
    font-size: 28px;
}

.entry-content h3 {
    font-size: 24px;
}

.entry-content p {
    margin-bottom: 1.5em;
}

.entry-content ul,
.entry-content ol {
    margin-bottom: 1.5em;
    padding-left: 30px;
}

.entry-content li {
    margin-bottom: 0.5em;
}

.entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 2em 0;
    font-style: italic;
    color: var(--text-light);
}

/* Social Share */
.social-share {
    background: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 20px;
    margin: 30px 0;
}

.social-share-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
}

.social-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.social-share-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.social-share-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: white;
}

.social-share-button.facebook {
    background: #1877f2;
}

.social-share-button.twitter {
    background: #1da1f2;
}

.social-share-button.linkedin {
    background: #0077b5;
}

.social-share-button.pinterest {
    background: #e60023;
}

.social-share-button.email {
    background: #6b7280;
}

/* ==========================================================================
   Sidebar & Widgets
   ========================================================================== */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.widget {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
}

.widget-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
}

.widget ul {
    list-style: none;
}

.widget li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.widget li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--text-color);
    display: block;
}

.widget a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* Custom Post Widget */
.custom-post-widget-tabs {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.custom-post-widget-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    cursor: pointer;
    background: transparent;
    border: none;
    font-weight: 600;
    color: var(--text-light);
    transition: var(--transition);
}

.custom-post-widget-tab.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
    margin-bottom: -2px;
}

.custom-post-widget-content {
    display: none;
}

.custom-post-widget-content.active {
    display: block;
}

.widget-post-item {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.widget-post-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.widget-post-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: var(--border-radius);
    overflow: hidden;
    flex-shrink: 0;
}

.widget-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.widget-post-info {
    flex: 1;
}

.widget-post-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 5px;
}

.widget-post-title a {
    color: var(--text-color);
}

.widget-post-meta {
    font-size: 12px;
    color: var(--text-light);
}

/* Ad Widget */
.ad-widget {
    text-align: center;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.ad-widget-label {
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background: var(--text-color);
    color: #fff;
    padding: 50px 0 20px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-widget {
    color: rgba(255, 255, 255, 0.8);
}

.footer-widget-title {
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-widget ul {
    list-style: none;
}

.footer-widget li {
    margin-bottom: 10px;
}

.footer-widget a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-widget a:hover {
    color: white;
}

.site-info {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    background: var(--bg-light);
    color: var(--text-color);
    font-weight: 600;
    transition: var(--transition);
}

.page-numbers:hover,
.page-numbers.current {
    background: var(--primary-color);
    color: white;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 992px) {
    .content-area {
        grid-template-columns: 1fr;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-color);
        box-shadow: var(--shadow-lg);
        padding: 20px;
    }

    .main-navigation.active {
        display: block;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .header-search-form {
        display: none;
    }

    .header-search-toggle {
        display: block;
    }

    .header-search.active .header-search-form {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        margin: 10px 20px;
        box-shadow: var(--shadow-lg);
    }

    .header-search.active .header-search-input {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .single-post-title {
        font-size: 28px;
    }

    .entry-content {
        font-size: 16px;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

.text-center {
    text-align: center;
}

.mt-0 {
    margin-top: 0;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 2rem;
}

.mb-0 {
    margin-bottom: 0;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}