/*
Theme Name: Masur
Theme URI: https://example.com/masur
Author: Your Name
Author URI: https://example.com
Description: Temukan informasi terbaru seputar publikasi jurnal Scopus dan SINTA, serta konsultasikan kebutuhan publikasi Anda bersama tim profesional kami.
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: masur
Tags: blog, news, magazine, responsive, clean, modern
*/

:root {
    --color-bg-light: #faf9f5; /* refined soft cream background */
    --color-bg-dark: #09090b; /* deep slate black background */
    --color-text-light: #18181b; /* zinc-900 */
    --color-text-dark: #f4f4f5; /* zinc-100 */
    --color-accent: #4f46e5; /* premium royal indigo accent */
    --color-border: rgba(24, 24, 27, 0.05);
    --color-card-bg: #ffffff;
    --color-overlay: rgba(9, 9, 11, 0.4);
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

h1, h2, h3, h4, h5, h6, .logo {
    font-family: var(--font-heading);
    letter-spacing: -0.02em;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

body {
    font-family: var(--font-primary);
    background-color: var(--color-bg-light);
    color: var(--color-text-light);
    font-size: 15px; /* slightly smaller base text size */
    line-height: 1.6;
    transition: var(--transition);
}

body.dark-mode {
    background-color: var(--color-bg-dark);
    color: var(--color-text-dark);
}

body.dark-mode .card,
body.dark-mode .featured-card,
body.dark-mode .post-card {
    background-color: #1e1e1e;
    color: var(--color-text-dark);
}

body.dark-mode header {
    background-color: var(--color-bg-dark);
    border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode footer {
    background-color: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.05);
}

.container {
    max-width: 1100px; /* scaled down from 1200px for a more snug fit */
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--color-bg-light); /* cream matching the body background */
    padding: 12px 0; /* more compact header */
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo-container .custom-logo-link {
    display: block;
    line-height: 0;
}

.logo-container img.custom-logo {
    max-height: 36px;
    width: auto;
    display: block;
    transition: var(--transition);
}

/* Custom Logo Visibility in Dark Mode */
.logo-container .custom-logo-dark,
.logo-container .dark-logo-link {
    display: none !important;
}

body.dark-mode .logo-container .dark-logo-link,
body.dark-mode .logo-container .custom-logo-dark {
    display: block !important;
}

body.dark-mode .logo-container .custom-logo-link:not(.dark-logo-link) {
    display: none !important;
}



.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px; /* scaled down from 24px */
    font-weight: 800;
    text-decoration: none;
    color: var(--color-text-light);
    letter-spacing: -0.5px;
}

body.dark-mode .logo {
    color: var(--color-text-dark);
}

.logo-icon {
    width: 28px; /* scaled down from 32px */
    height: 28px;
    background: linear-gradient(135deg, var(--color-accent), #6366f1);
    color: #fff;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px; /* scaled down from 18px */
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.2);
}

body.dark-mode .logo-icon {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

#mainNav > ul {
    display: flex;
    list-style: none;
    gap: 22px; /* tighter spacing between menu items */
    align-items: center;
    margin: 0;
    padding: 0;
}

#mainNav > ul > li {
    position: relative;
}

#mainNav a {
    text-decoration: none;
    color: var(--color-text-light);
    font-size: 14px; /* scaled down from 15px */
    font-weight: 500;
    transition: var(--transition);
}

body.dark-mode #mainNav a {
    color: var(--color-text-dark);
}

#mainNav a:hover {
    color: var(--color-accent);
}

/* Category Arrow/Caret dropdown indicator */
#mainNav > ul > li.menu-item-has-children > a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#mainNav > ul > li.menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 5px;
    height: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-2px) rotate(45deg);
    transition: var(--transition);
    opacity: 0.7;
}

#mainNav > ul > li.menu-item-has-children > a:hover::after {
    transform: translateY(1px) rotate(45deg);
}

/* Submenu dropdown panel */
#mainNav .sub-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: var(--color-card-bg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 10px 0;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    list-style: none;
    gap: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 100;
    border: 1px solid var(--color-border);
}

#mainNav > ul > li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

#mainNav .sub-menu li {
    width: 100%;
    margin: 0;
    padding: 0;
}

#mainNav .sub-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 14px;
    white-space: nowrap;
    color: var(--color-text-light);
    font-weight: 400;
}

body.dark-mode #mainNav .sub-menu a {
    color: var(--color-text-dark);
}

#mainNav .sub-menu a:hover {
    background-color: rgba(255, 138, 0, 0.05);
    color: var(--color-accent);
}

body.dark-mode #mainNav .sub-menu {
    background-color: #1e1e1e;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.05);
}

.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 20px;
    color: var(--color-text-light);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
}

body.dark-mode .icon-btn {
    color: var(--color-text-dark);
}

.icon-btn:hover {
    color: var(--color-accent);
}

.header-divider {
    color: rgba(0, 0, 0, 0.15);
    font-weight: 300;
    font-size: 16px;
    user-select: none;
}

body.dark-mode .header-divider {
    color: rgba(255, 255, 255, 0.15);
}

.mobile-menu-toggle {
    display: none;
}

/* Hero Section */
.hero-section {
    padding: 40px 0 20px;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: stretch;
    position: relative;
}

.hero-image-wrapper {
    z-index: 1;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(9, 9, 11, 0.02);
    border: 1px solid rgba(24, 24, 27, 0.05);
    position: relative;
    height: auto;
    min-height: 380px;
}

body.dark-mode .hero-image-wrapper {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.hero-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-content:hover .hero-image-wrapper img {
    transform: scale(1.04);
}

.featured-card {
    z-index: 2;
    background: var(--color-card-bg);
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(9, 9, 11, 0.02);
    border: 1px solid rgba(24, 24, 27, 0.05);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(9, 9, 11, 0.06);
    border-color: var(--color-accent);
}

body.dark-mode .featured-card {
    background: #18181b;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

body.dark-mode .featured-card:hover {
    border-color: #6366f1;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}

.badge-wrapper {
    margin-bottom: 14px;
}

.featured-card .badge {
    background: linear-gradient(135deg, #ff9f1c, #ff6b35);
    color: #fff;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.featured-card h1 {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 14px;
    color: var(--color-text-light);
    letter-spacing: -0.5px;
}

body.dark-mode .featured-card h1 {
    color: var(--color-text-dark);
}

.featured-card h1 a {
    text-decoration: none;
    color: inherit;
    position: relative;
    background-image: linear-gradient(120deg, var(--color-accent) 0%, #6366f1 100%);
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: color 0.25s ease, background-size 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-bottom: 2px;
}

.featured-card h1 a:hover {
    color: var(--color-accent);
    background-size: 100% 2px;
}

.featured-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    font-size: 14px;
    color: var(--color-accent);
    text-decoration: none;
    transition: var(--transition);
    margin-top: 14px;
    align-self: flex-start;
}

.featured-read-more svg {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.featured-read-more:hover {
    color: #6366f1;
}

.featured-read-more:hover svg {
    transform: translateX(4px);
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 14px;
    margin-bottom: 20px;
}

.post-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.meta-separator {
    color: #ccc;
    font-weight: bold;
}

body.dark-mode .meta-separator {
    color: #444;
}

.post-excerpt {
    color: #555;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 25px;
}

body.dark-mode .post-excerpt {
    color: #b0b0b0;
}

.read-more-btn-square {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #e2e2e0;
    border-radius: 6px;
    color: #555;
    text-decoration: none;
    transition: var(--transition);
    background-color: transparent;
}

.read-more-btn-square svg {
    transition: var(--transition);
}

body.dark-mode .read-more-btn-square {
    border-color: #333;
    color: #bbb;
}

.read-more-btn-square:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background-color: rgba(255, 138, 0, 0.05);
}

.read-more-btn-square:hover svg {
    transform: translateX(2px);
}

body.dark-mode .read-more-btn-square:hover {
    background-color: rgba(255, 138, 0, 0.1);
}

/* Section Headers */
.section-header {
    padding: 40px 0 30px;
}

.section-header h2 {
    font-size: 28px;
    font-weight: bold;
}

/* Popular Posts Slider */
.popular-slider {
    position: relative;
    padding-bottom: 40px;
}

.slider-wrapper {
    overflow: hidden;
}

.slider-container {
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease;
}

.post-card {
    min-width: calc(33.333% - 14px);
    background: var(--color-card-bg);
    border-radius: 16px; /* more rounded */
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(9, 9, 11, 0.02), 0 1px 3px rgba(9, 9, 11, 0.01);
    border: 1px solid rgba(24, 24, 27, 0.04);
    transition: var(--transition);
}

body.dark-mode .post-card {
    border-color: rgba(255, 255, 255, 0.05);
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(79, 70, 229, 0.05);
    border-color: rgba(79, 70, 229, 0.15);
}

body.dark-mode .post-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: rgba(99, 102, 241, 0.3);
}

.post-card-image {
    position: relative;
    height: 160px; /* scaled down from 200px */
    overflow: hidden;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post-card:hover .post-card-image img {
    transform: scale(1.04);
}

.category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #18181b;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

body.dark-mode .category-badge {
    background: rgba(24, 24, 27, 0.85);
    color: #f4f4f5;
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.post-card-content {
    padding: 20px;
}

.post-card-content h3 {
    font-size: 16px; /* scaled down from 18px */
    line-height: 1.4;
    margin-bottom: 12px;
}

.post-card-content h3 a {
    text-decoration: none;
    color: var(--color-text-light);
    position: relative;
    background-image: linear-gradient(120deg, var(--color-accent) 0%, #6366f1 100%);
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: color 0.25s ease, background-size 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-bottom: 2px;
}

body.dark-mode .post-card-content h3 a {
    color: var(--color-text-dark);
}

.post-card-content h3 a:hover {
    color: var(--color-accent);
    background-size: 100% 2px;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ddd;
    cursor: pointer;
    transition: var(--transition);
}

.dot.active {
    background-color: var(--color-accent);
    width: 24px;
    border-radius: 4px;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 10;
}

body.dark-mode .slider-nav {
    border-color: rgba(255, 255, 255, 0.05);
}

.slider-nav:hover {
    background-color: var(--color-accent);
    color: #fff;
    border-color: var(--color-accent);
    transform: translateY(-50%) scale(1.05);
}

.slider-nav.prev {
    left: -8px; /* shifted inward to avoid screen clipping */
}

.slider-nav.next {
    right: -8px; /* shifted inward to avoid screen clipping */
}

/* Recent Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding-bottom: 40px;
}

.grid-post-card {
    background: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    transition: var(--transition);
}

.grid-post-card:hover {
    transform: translateY(-4px);
}

.grid-post-image {
    height: 180px; /* scaled down from 220px */
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 14px; /* scaled down */
}

.grid-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.grid-post-card:hover .grid-post-image img {
    transform: scale(1.04);
}

.grid-post-content {
    padding: 0;
}

.grid-post-content h3 {
    font-size: 16px; /* scaled down from 18px */
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 8px;
    letter-spacing: -0.2px;
}

.grid-post-content h3 a {
    text-decoration: none;
    color: var(--color-text-light);
    position: relative;
    background-image: linear-gradient(120deg, var(--color-accent) 0%, #6366f1 100%);
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
    transition: color 0.25s ease, background-size 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding-bottom: 2px;
}

body.dark-mode .grid-post-content h3 a {
    color: var(--color-text-dark);
}

.grid-post-content h3 a:hover {
    color: var(--color-accent);
    background-size: 100% 2px;
}

.grid-post-excerpt {
    color: #5a5a58;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 0;
}

body.dark-mode .grid-post-excerpt {
    color: #b5b2ac;
}

.post-category-tag {
    display: inline-block;
    background-color: #f0f0f0;
    color: #666;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    text-decoration: none;
    transition: var(--transition);
}

body.dark-mode .post-category-tag {
    background-color: #404040;
    color: #aaa;
}

.post-category-tag:hover {
    background-color: var(--color-accent);
    color: #fff;
}

/* Load More */
.load-more-section {
    text-align: center;
    padding: 20px 0 60px;
}

.load-more-btn {
    padding: 12px 32px;
    background-color: transparent;
    border: 2px solid var(--color-text-light);
    border-radius: 8px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition);
    color: var(--color-text-light);
}

body.dark-mode .load-more-btn {
    border-color: var(--color-text-dark);
    color: var(--color-text-dark);
}

.load-more-btn:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: #fff;
}

/* Footer */
footer {
    background-color: var(--color-card-bg);
    border-top: 1px solid var(--color-border);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1.2fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-section p {
    color: #666;
    line-height: 1.8;
}

body.dark-mode .footer-section p {
    color: #aaa;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    text-decoration: none;
    color: var(--color-text-light);
    font-size: 14px;
    transition: var(--transition);
}

body.dark-mode .footer-links a {
    color: var(--color-text-dark);
}

.footer-links a:hover {
    color: var(--color-accent);
}

.category-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-tags a {
    display: inline-block;
    background-color: #f0f0f0;
    color: #666;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
    transition: var(--transition);
}

body.dark-mode .category-tags a {
    background-color: #404040;
    color: #aaa;
}

.category-tags a:hover {
    background-color: var(--color-accent);
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid var(--color-border);
    color: #888;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        display: flex;
        flex-direction: column;
        gap: 0;
    }
    
    .hero-image-wrapper {
        width: 100%;
        height: 380px;
        border-radius: 12px;
    }
    
    .featured-card {
        width: 100%;
        margin-top: -40px; /* Overlaps the bottom of the image slightly */
        padding: 35px 30px;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    }
    
    .featured-card h1 {
        font-size: 26px;
        padding-right: 0;
    }
    
    .post-card {
        min-width: calc(50% - 10px);
    }
    
    .posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    #mainNav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        border-top: 1px solid rgba(0, 0, 0, 0.08);
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
        padding: 12px 20px 16px;
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
        z-index: 999;
    }
    
    #mainNav.active {
        display: block;
        animation: mobileMenuFadeIn 0.2s ease-out;
    }

    body.dark-mode #mainNav {
        background-color: #121215;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
    }
    
    #mainNav > ul {
        flex-direction: column;
        gap: 2px;
        align-items: stretch;
        width: 100%;
    }

    #mainNav > ul > li {
        width: 100%;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    }

    #mainNav > ul > li:last-child {
        border-bottom: none;
    }

    body.dark-mode #mainNav > ul > li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    body.dark-mode #mainNav > ul > li:last-child {
        border-bottom: none;
    }

    #mainNav > ul > li > a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 8px;
        font-size: 15px;
        font-weight: 500;
        color: var(--color-text-light);
        border-radius: 6px;
        transition: var(--transition);
    }

    #mainNav > ul > li > a:hover {
        color: var(--color-accent);
        background-color: rgba(79, 70, 229, 0.05);
    }

    body.dark-mode #mainNav > ul > li > a {
        color: #f4f4f5 !important;
    }

    body.dark-mode #mainNav > ul > li > a:hover {
        color: #818cf8 !important;
        background-color: rgba(99, 102, 241, 0.12);
    }
    
    /* Child menus in mobile layout */
    #mainNav > ul li.menu-item-has-children > a::after {
        margin-left: auto;
        transition: transform 0.25s ease;
    }

    #mainNav > ul li.menu-item-has-children.active > a::after {
        transform: translateY(1px) rotate(225deg);
    }

    #mainNav .sub-menu,
    body.dark-mode #mainNav .sub-menu {
        position: static;
        transform: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        background-color: transparent !important;
        padding: 4px 0 8px 16px;
        display: none;
        border: none;
        min-width: unset;
        gap: 2px;
    }

    #mainNav > ul li.active .sub-menu {
        display: flex;
        flex-direction: column;
    }

    #mainNav .sub-menu li {
        width: 100%;
        border: none;
    }

    #mainNav .sub-menu a {
        display: block;
        padding: 8px 10px;
        font-size: 14px;
        font-weight: 400;
        color: #52525b;
        border-radius: 6px;
        transition: var(--transition);
        white-space: normal;
    }

    #mainNav .sub-menu a:hover {
        color: var(--color-accent);
        background-color: rgba(79, 70, 229, 0.05);
    }

    body.dark-mode #mainNav .sub-menu a {
        color: #a1a1aa !important;
    }

    body.dark-mode #mainNav .sub-menu a:hover {
        color: #818cf8 !important;
        background-color: rgba(99, 102, 241, 0.12);
    }

    @keyframes mobileMenuFadeIn {
        from {
            opacity: 0;
            transform: translateY(-8px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .post-card {
        min-width: 100%;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .slider-nav {
        display: none;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .featured-card {
        padding: 30px 25px;
        margin-top: -30px;
    }
    
    .featured-card h1 {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-image-wrapper {
        height: 250px;
    }
    
    .featured-card {
        padding: 25px 20px;
    }
    
    .featured-card h1 {
        font-size: 20px;
    }
    
    .section-header h2 {
        font-size: 22px;
    }
}

/* Header Search Bar slide down */
.header-search-bar {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--color-card-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 12px 0;
    z-index: 999;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

.header-search-bar.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

body.dark-mode .header-search-bar {
    background-color: var(--color-bg-dark);
    border-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.header-search-bar .search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    gap: 10px;
    align-items: center;
}

.header-search-bar .search-form label {
    flex: 1;
    display: block;
}

.header-search-bar .search-form .search-field {
    width: 100%;
    padding: 8px 14px;
    font-size: 14px;
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-light);
    color: var(--color-text-light);
    border-radius: 8px;
    outline: none;
    font-family: var(--font-primary);
    transition: var(--transition);
}

body.dark-mode .header-search-bar .search-form .search-field {
    background-color: #121214;
    border-color: rgba(255, 255, 255, 0.05);
    color: var(--color-text-dark);
}

.header-search-bar .search-form .search-field:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.header-search-bar .search-form .search-submit {
    background-color: var(--color-accent);
    color: #fff;
    border: none;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: var(--transition);
}

.header-search-bar .search-form .search-submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* Load More Button styling */
.load-more-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    margin-bottom: 20px;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-light);
    padding: 12px 32px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-primary);
    outline: none;
}

body.dark-mode .load-more-btn {
    color: var(--color-text-dark);
    border-color: rgba(255, 255, 255, 0.1);
}

.load-more-btn:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.15);
}

body.dark-mode .load-more-btn:hover {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.load-more-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* WhatsApp CTA Button in Header */
.cta-wa-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #25d366;
    color: #ffffff !important;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 20px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.25);
    margin-left: 10px;
}

.cta-wa-btn:hover {
    background-color: #1ebd5b;
    color: #ffffff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.cta-wa-btn svg.wa-icon {
    width: 15px;
    height: 15px;
    fill: currentColor;
    display: block;
}

@media (max-width: 768px) {
    .cta-wa-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .cta-wa-btn span {
        display: none;
    }
    .cta-wa-btn {
        padding: 8px;
        border-radius: 50%;
        margin-left: 5px;
    }
}

/* Floating WhatsApp Button */
.floating-wa-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #25d366;
    color: #ffffff !important;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
    z-index: 9999;
}

.floating-wa-btn:hover {
    background-color: #1ebd5b;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
    color: #ffffff !important;
}

.floating-wa-btn svg.wa-floating-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: block;
}

/* Pulsing effect to draw attention politely */
.floating-wa-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50px;
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
    animation: wa-pulse 2s infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes wa-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@media (max-width: 576px) {
    .floating-wa-btn {
        bottom: 20px;
        right: 20px;
        padding: 12px;
        border-radius: 50%;
    }
    .floating-wa-btn span.floating-wa-text {
        display: none;
    }
}