/* Blog-specific CSS - Fixes and overrides */

/* Add starry background to body like landing page */
/* Note: Background image is loaded via inline style in functions.php for proper path handling */
body.blog,
body.archive,
body.single,
body.search,
body.page {
    background-size: cover !important;
    background-attachment: fixed !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
    min-height: 100vh;
}

/* Page wrapper */
#page {
    background: transparent;
}

/* CSS Variables - Match landing page */
:root {
    --color-primary: #75C044;
    --color-primary-dark: #5A9B35;
    --color-secondary: #D3A10F;
    --text-primary: #FFFFFF;
    --text-light: #808080;
    --space-sm: 8px;
    --space-md: 16px;
    --radius-small: 8px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navigation - EXACT same styling as landing page */
.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: transparent !important;
    backdrop-filter: blur(20px) !important;
    z-index: 999 !important;
    padding: var(--space-md) 0 !important;
    transition: var(--transition) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    display: block !important;
    visibility: visible !important;
}

.nav-container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
}

/* RTL: Keep flex direction but align items to the right */
.rtl .nav-container {
    direction: rtl !important;
}

.nav-logo {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

/* RTL: Use direction rtl for natural RTL layout */
.rtl .nav-logo {
    direction: rtl !important;
}

.nav-logo a {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    text-decoration: none !important;
}

/* RTL: Use direction rtl for logo link */
.rtl .nav-logo a {
    direction: rtl !important;
}

/* RTL: Additional body class checks */
body.rtl .nav-container,
body[dir="rtl"] .nav-container,
html[dir="rtl"] .nav-container {
    direction: rtl !important;
}

body.rtl .nav-logo,
body[dir="rtl"] .nav-logo,
html[dir="rtl"] .nav-logo {
    direction: rtl !important;
}

body.rtl .nav-logo a,
body[dir="rtl"] .nav-logo a,
html[dir="rtl"] .nav-logo a {
    direction: rtl !important;
}

.nav-logo img {
    height: 60px;
    width: auto;
    object-fit: contain;
    max-width: 200px;
    transition: all 0.3s ease;
    transform: scale(2.5);
    margin-right: 60px;
}

.rtl .nav-logo img {
    margin-right: 0;
    margin-left: 60px;
}

.nav-logo h2 {
    color: var(--color-secondary);
    font-size: 28px;
    margin: 0;
    font-weight: 600;
}

.nav-menu {
    display: flex !important;
    list-style: none !important;
    gap: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.rtl .nav-menu {
    direction: rtl;
}

.nav-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-small);
}

.nav-menu a:hover {
    color: var(--color-secondary);
    background: rgba(255, 255, 255, 0.1);
}

.nav-menu a.active {
    color: var(--color-primary);
    background: rgba(117, 192, 68, 0.1);
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    margin: 3px 0;
    transition: var(--transition);
}

/* Content area styling */
#content.site-content {
    min-height: 60vh;
    padding: 2rem 1rem;
    margin-top: 100px;
}

#content-wrap.container {
    max-width: 1200px;
    margin: 2rem auto;
    /* background: rgba(255, 255, 255, 0.95) !important; */
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

/* Remove white background from individual elements inside content-wrap */
#content-wrap .site-main,
#content-wrap .content-area,
#content-wrap #primary {
    background: transparent !important;
}

/* Blog content typography - Override custom-theme.css white text */
#content-wrap h1,
#content-wrap h2,
#content-wrap h3,
#content-wrap h4,
#content-wrap h5,
#content-wrap h6,Zs
.entry-title,Z
.entry-title a {
    color: #ffffff !important;
}

#content-wrap p,
#content-wrap li,
#content-wrap span,
.entry-content,
.entry-content p,
.entry-meta,
.entry-meta span {
    color: #ffffff !important;
}

#content-wrap a,
.entry-content a {
    color: #ffffff !important;
    text-decoration: none;
}

#content-wrap a:hover,
.entry-content a:hover,
.entry-title a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

/* Blog posts styling */
.blog-archive {
    background: transparent;
}

.site-main {
    background: transparent;
}

/* Post entries */
.entry-title {
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.entry-title a {
    color: #333 !important;
}

.entry-title a:hover {
    color: #75C044 !important;
}

/* Entry meta */
.entry-meta {
    color: #999 !important;
    font-size: 14px;
    margin-bottom: 1rem;
}

.entry-meta a {
    color: #666 !important;
}

/* Entry content */
.entry-content {
    line-height: 1.8;
    margin-bottom: 2rem;
}


/* Scroll to top button */
.to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #75C044 0%, #5A9B35 100%);
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 999;
    box-shadow: 0 4px 15px rgba(117, 192, 68, 0.3);
}

.rtl .to-top {
    right: auto;
    left: 30px;
}

.to-top.show {
    display: flex;
}

.to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(117, 192, 68, 0.5);
    background: linear-gradient(135deg, #5A9B35 0%, #75C044 100%);
}

/* Pagination */
.navigation.pagination {
    margin: 2rem 0;
    text-align: center;
}

.page-numbers {
    display: inline-block;
    padding: 8px 15px;
    margin: 0 5px;
    background: #f8f8f8;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
}

.page-numbers:hover,
.page-numbers.current {
    background: #75C044;
    color: white;
}

/* Sidebar */
.sidebar {
    background: rgba(248, 248, 248, 0.9);
    padding: 1.5rem;
    border-radius: 8px;
}

/* Mobile Responsive - Match landing page */
@media (max-width: 1024px) {
    .nav-logo img {
        transform: scale(2.2);
        margin-right: 50px;
    }

    .rtl .nav-logo img {
        margin-left: 50px;
        margin-right: 0;
    }

    .nav-logo h2 {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        height: 100vh;
        flex-direction: column;
        background: rgba(15, 23, 34, 0.98);
        backdrop-filter: blur(30px);
        width: 100%;
        justify-content: center;
        align-items: center;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 8px 16px rgba(255, 255, 255, 0.1);
        padding: 40px 0;
        z-index: 1000;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 20px 0;
    }

    .nav-menu a {
        font-size: 1.5rem;
        padding: 15px 30px;
        border-radius: 15px;
        display: block;
        transition: all 0.3s ease;
    }

    .nav-logo img {
        transform: scale(1.8);
        margin-right: 40px;
    }

    .rtl .nav-logo img {
        margin-left: 40px;
        margin-right: 0;
    }

    .nav-logo h2 {
        font-size: 20px;
    }

    #content-wrap.container {
        padding: 1rem;
        margin: 1rem auto;
    }

    .translate-container .container {
        padding: 0 1rem;
    }

    .goog-te-combo {
        font-size: 13px !important;
        padding: 8px 15px !important;
    }

    #content.site-content {
        padding: 100px 15px 2rem 15px !important;
        margin-top: 50px;
    }
}

@media (max-width: 480px) {
    .nav-logo img {
        transform: scale(1.5);
        margin-right: 30px;
    }

    .rtl .nav-logo img {
        margin-left: 30px;
        margin-right: 0;
    }

    .nav-logo h2 {
        font-size: clamp(14px, 4vw, 18px);
    }
}

@media (max-width: 360px) {
    .nav-logo img {
        transform: scale(1.3);
        margin-right: 25px;
    }

    .rtl .nav-logo img {
        margin-left: 25px;
        margin-right: 0;
    }

    .nav-logo h2 {
        font-size: clamp(12px, 3.5vw, 16px);
    }
}
