/* ==========================================================================
   CSS Variables for Theming (Dark/Light Mode)
   ========================================================================== */
   :root {
    /* Light Theme Variables */
    --bg-primary: #f0f2f5;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --accent-color: #3b82f6;
    
    /* Glass Effect Variables - Light */
    --glass-bg: rgba(255, 255, 255, 0.6);
    --glass-border: rgba(255, 255, 255, 0.4);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
    
    /* Category Colors */
    --cat-azure: #0089d6;
    --cat-devops: #f59e0b;
    --cat-linux: #eab308;
    --cat-ai: #8b5cf6;
}

[data-theme="dark"] {
    /* Dark Theme Variables */
    --bg-primary: #0f172a;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --accent-color: #60a5fa;
    
    /* Glass Effect Variables - Dark */
    --glass-bg: rgba(30, 41, 59, 0.5);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Global Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.4s ease, color 0.4s ease;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   Animated Background Shapes (Enhances the Glass Effect)
   ========================================================================== */
.bg-shape {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 15s infinite alternate ease-in-out;
}

.bg-shape-1 {
    width: 400px;
    height: 400px;
    background: rgba(59, 130, 246, 0.3);
    top: -100px;
    left: -100px;
}

.bg-shape-2 {
    width: 500px;
    height: 500px;
    background: rgba(139, 92, 246, 0.2);
    bottom: -150px;
    right: -100px;
    animation-delay: -5s;
}

.bg-shape-3 {
    width: 300px;
    height: 300px;
    background: rgba(16, 185, 129, 0.2);
    top: 40%;
    left: 40%;
    animation-delay: -10s;
}

@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, 50px) scale(1.1); }
}

/* ==========================================================================
   Glassmorphism Core Classes
   ========================================================================== */
.glass-panel, .glass-header, .glass-card, .glass-footer {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* ==========================================================================
   🌟 Premium Floating Island Header
   ========================================================================== */
.glass-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 95%;
    max-width: 1200px;
    z-index: 1000;
    border-radius: 50px; /* Pill Shape */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    /* Initial state (Not Scrolled) */
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 🌟 Scrolled State (Light Theme - Default) */
.glass-header.scrolled {
    top: 10px;
    max-width: 1000px;
    background: rgba(255, 255, 255, 0.9); /* Light Mode එකට ගැලපෙන සුදු පාට */
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 15px 40px rgba(31, 38, 135, 0.1);
}

/* 🌟 Scrolled State (Dark Theme) */
[data-theme="dark"] .glass-header.scrolled {
    background: rgba(15, 23, 42, 0.9); /* Dark Mode එකට ගැලපෙන තද නිල්/කළු පාට */
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Hidden state for scrolling down */
.glass-header.hidden {
    transform: translate(-50%, -150%);
}

.nav-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr; /* Center align trick */
    align-items: center;
    padding: 12px 25px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.site-logo {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.site-logo:hover {
    transform: scale(1.09);
}

/* Center Menu */
.main-nav {
    display: flex;
    justify-content: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px; /* Space for the magnetic pill */
    align-items: center;
    position: relative;
    padding: 4px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .nav-links {
    background: rgba(255, 255, 255, 0.03);
}

.nav-link-item {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-link-item:hover, 
.nav-link-item.active {
    color: var(--text-primary);
    background: var(--glass-bg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dropdown-icon {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

/* Right Section Actions */
.nav-right-section {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* 🌟 Premium Dropdown Styles */
.nav-dropdown, 
.lang-dropdown-container {
    position: relative;
}

.dropdown-menu,
.lang-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-primary);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    min-width: 220px;
    padding: 10px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(15px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55); /* Bouncy Smooth Effect */
    box-shadow: var(--glass-shadow);
    z-index: 1001;
}

/* Language Menu Right Align (තිරෙන් එළියට යන එක නවත්වන්න) */
.lang-menu {
    left: auto;
    right: 0;
    min-width: 150px;
}

/* Invisible bridge (Mouse එක පහළට ගෙනියද්දී Dropdown එක වැහෙන එක නවත්වන්න) */
.nav-dropdown::before,
.lang-dropdown-container::before {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    height: 20px;
}

.nav-dropdown:hover .dropdown-menu,
.lang-dropdown-container:hover .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(10px);
}

.dropdown-menu li,
.lang-menu li {
    width: 100%;
}

.dropdown-menu a,
.lang-menu a {
    display: block;
    padding: 12px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    border-radius: 0;
    transition: all 0.2s ease;
}

/* Disable underline animation inside dropdowns */
.dropdown-menu a::after,
.lang-menu a::after {
    display: none; 
}

.dropdown-menu a:hover,
.lang-menu a:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-color);
    padding-left: 25px; /* Slide right on hover effect */
}

/* Actions Icons (Search, Lang, Theme) */
.nav-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.glass-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.glass-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: translateY(-2px);
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    font-size: 1.1rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* ==========================================================================
   Main Content Layout
   ========================================================================== */
.main-content {
    max-width: 1200px;
    margin: 150px auto 0;
    padding: 0 20px;
}

/* Hero Section - Updated Base */
.hero {
    border-radius: 30px; /* 🌟 20px තිබුණු එක 30px කළා (Apple Style) */
    padding: 100px 40px; /* 🌟 ඉඩ ටිකක් වැඩි කළා */
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    border: 1px solid var(--glass-border);
}

.gradient-text {
    font-size: 3.8rem; /* 🌟 පොඩ්ඩක් ලොකු කළා */
    font-weight: 800;
    letter-spacing: -1px; /* 🌟 Modern look එකට අකුරු ළං කළා */
    background: linear-gradient(135deg, #3b82f6, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 25px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 30px;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.primary-btn {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 12px 25px;
    font-weight: 600;
}

.outline-btn {
    padding: 12px 25px;
    font-weight: 600;
}

.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
}

.bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-7px); }
}

/* ==========================================================================
   Ad Spaces
   ========================================================================== */
.ad-container {
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    margin: 40px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.ad-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.horizontal-ad {
    width: 100%;
    max-width: 728px;
    height: 90px;
    background: rgba(0,0,0,0.05);
    border: 1px dashed var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

/* ==========================================================================
   Article Categories & Grid
   ========================================================================== */
.category-section {
    margin-bottom: 60px;
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.header-line {
    height: 1px;
    background: var(--glass-border);
    flex-grow: 1;
    margin-left: 20px;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
}

/* Glass Article Cards */
.article-card {
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-card:hover .card-image img {
    transform: scale(1.1);
}

.category-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
    backdrop-filter: blur(5px);
}

.azure-badge { background: rgba(0, 137, 214, 0.8); }
.devops-badge { background: rgba(245, 158, 11, 0.8); }
.linux-badge { background: rgba(234, 179, 8, 0.8); }
.ai-badge { background: rgba(139, 92, 246, 0.8); }

.card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-meta {
    display: flex;
    gap: 15px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.card-content h3 a:hover {
    color: var(--accent-color);
}

.card-content p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--glass-border);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 500;
}

.author-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
}

.read-more {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.read-more:hover {
    background: var(--accent-color);
    color: white;
}

/* ==========================================================================
   🌟 Footer (Premium Updated)
   ========================================================================== */
.glass-footer {
    margin-top: 80px;
    padding: 80px 20px 30px; /* 🌟 උඩින් තව ටිකක් ඉඩ දුන්නා */
    border-radius: 30px 30px 0 0;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--glass-border);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.02); /* 🌟 Soft shadow එකක් */
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    /* 🌟 2fr වෙනුවට 2.5fr දීලා දකුණු පැත්තේ Columns ටික තව දකුණට තල්ලු කළා */
    grid-template-columns: 2.5fr 1fr 1fr; 
    gap: 60px; /* 🌟 Columns අතර පරතරය වැඩි කළා */
    margin-bottom: 50px;
}

.footer-about {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* 🌟 වම් පැත්තටම Align වෙන්න හැදුවා */
}

.footer-about .site-logo {
    height: auto;
    width: 100%;
    max-width: 180px; /* 🌟 Logo එකේ සයිස් එක ලොකු කළා */
    transform: none; /* 🌟 Header එකේ තිබ්බ Zoom effect එක Footer එකෙන් අයින් කළා */
    margin-bottom: 20px;
}

.footer-about p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 25px 0;
    max-width: 420px;
    font-size: 0.95rem;
}

.social-links {
    display: flex;
    gap: 15px;
}

/* 🌟 Social Icons ටික Cleaner, Premium විදියට හැදුවා */
.glass-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: transparent; 
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    font-size: 1.1rem;
}

.glass-icon:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
    transform: translateY(-4px);
    box-shadow: 0 8px 15px rgba(59, 130, 246, 0.3); /* 🌟 Hover කරද්දී ලස්සන Glow එකක් */
}

.footer-links h3 {
    margin-bottom: 25px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.5px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 15px;
}

/* 🌟 Links වල Animation එක Smooth කළා */
.footer-links a {
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: inline-block; /* 🌟 Transform වැඩ කරන්න මේක අනිවාර්යයි */
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); /* 🌟 ගොඩක් Smooth transition එකක් */
}

.footer-links a:hover {
    color: var(--accent-color);
    /* 🌟 Padding වෙනුවට Transform පාවිච්චි කළා, එතකොට ගැස්සෙන්නේ නැතුව ලිස්සලා යනවා වගේ පේනවා */
    transform: translateX(6px); 
}

.footer-bottom {
    text-align: center;
    padding-top: 25px;
    border-top: 1px solid rgba(0,0,0,0.05); /* 🌟 ඉර ගොඩක් Soft කළා */
    color: var(--text-secondary);
    font-size: 0.9rem;
}

[data-theme="dark"] .footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* 🌟 Premium Mobile Menu Integrated with Header (V4 - Dropdown Fix) */
@media (max-width: 900px) {
    .nav-container {
        grid-template-columns: auto 1fr auto; 
    }
    
    .main-nav {
        position: absolute;
        top: calc(100% + 8px); 
        left: 0 !important;
        right: 0 !important;
        margin: 0 auto !important; 
        width: 100%; 
        max-width: 100%;
        background: var(--glass-bg);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border: 1px solid var(--glass-border);
        border-radius: 24px;
        box-shadow: 0 25px 50px rgba(0,0,0,0.2);
        padding: 15px;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-15px) scale(0.98) !important; 
        transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
        z-index: 990; 
    }

    .main-nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1) !important;
    }

    .nav-links {
        flex-direction: column;
        background: transparent;
        border: none;
        gap: 8px;
        align-items: stretch; 
    }

    .nav-link-item {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center; /* 🌟 Center Vertically */
        text-align: center;
        padding: 14px 20px;
        border-radius: 14px;
        background: transparent; 
        color: var(--text-primary);
        font-weight: 600;
        gap: 8px;
        transition: background 0.2s ease, color 0.2s ease;
    }
    
    .nav-link-item:hover, .nav-link-item:active {
        background: rgba(120, 120, 120, 0.1);
        color: var(--accent-color);
    }

    [data-theme="dark"] .nav-link-item:hover {
        background: rgba(255,255,255,0.05);
    }
    
    /* 🌟 Mobile Dropdown Fix */
    .nav-dropdown {
        position: static; /* 🌟 Important: Removes relative positioning */
        display: flex;
        flex-direction: column;
    }

    .dropdown-menu {
        position: static !important; /* 🌟 Keep it within normal document flow */
        visibility: visible; /* Let JS handle display */
        opacity: 1;
        transform: none !important;
        display: none; /* Hidden by default */
        box-shadow: inset 0 0 0 1px var(--glass-border) !important; 
        background: rgba(0,0,0,0.02) !important;
        border-radius: 16px !important;
        padding: 8px 0 !important;
        margin-top: 5px;
        width: 100%; /* Take full width of parent */
    }

    /* Show when parent gets active class via JS */
    .nav-dropdown.active .dropdown-menu {
        display: block; 
    }

    [data-theme="dark"] .dropdown-menu {
        background: rgba(255,255,255,0.02) !important;
    }

    .dropdown-menu a {
        display: block;
        text-align: center;
        padding: 12px !important; 
        font-size: 0.95rem;
        opacity: 0.85;
    }
    
    .dropdown-menu a:after {
        display: none; /* Remove any underline animation inside dropdown */
    }

    .dropdown-menu a:hover {
        opacity: 1;
        background: transparent !important;
        color: var(--accent-color);
        padding-left: 12px !important; /* Stop slide right effect on mobile */
    }
}

/* ==========================================================================
   Scroll Animations
   ========================================================================== */
.fade-in-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, visibility;
}

.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* 🌟 Premium Article Header Styles (Desktop & Mobile) */
.single-article-container {
    max-width: 950px;
    margin: 140px auto 40px;
    padding: 50px 60px;
    border-radius: 30px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 40px rgba(0,0,0,0.05);
}


/* 🌟 Premium Modern Article Title */
.article-header h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem); /* 1️⃣ Fluid Typography: ෆෝන් එකටයි ලැප්ටොප් එකටයි ඉබේම සයිස් එක හැදෙනවා */
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: -0.03em; /* 2️⃣ -1px වෙනුවට em පාවිච්චි කළාම අකුරු අතර පරතරය වඩාත් ස්වභාවිකයි */
    color: var(--text-primary);
    margin-bottom: 25px;
    text-wrap: balance; /* 3️⃣ Modern CSS: මාතෘකාවේ අන්තිම පේළියට එක වචනයක් විතරක් කැඩිලා වැටෙන එක (Orphans) මේකෙන් නවත්වනවා */
    word-break: break-word; /* 4️⃣ ගොඩක් දිග වචනයක් ආවොත් එළියට පනින්නේ නැතුව ලස්සනට පේළිය කඩනවා */
}

/* ==========================================
   🌟 Premium Breadcrumb Fixes
   ========================================== */
.breadcrumb {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap; /* පේළි කැඩෙන එක නවත්වයි */
    white-space: nowrap;
}

.breadcrumb a {
    color: var(--text-secondary);
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb a:hover {
    color: var(--accent-color);
}

.breadcrumb-separator {
    color: var(--glass-border);
    font-size: 0.75rem; /* Chevron අයිකන් එක පොඩි කරනවා */
}

.breadcrumb-title {
    color: var(--text-primary);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis; /* දිග වැඩි නම් අගට ... පෙන්වයි */
    flex-grow: 1; 
}

/* ==========================================
   🌟 Premium Article Meta (Option B - Glass Pills)
   ========================================== */
.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    margin-bottom: 40px;
    flex-wrap: wrap;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

[data-theme="dark"] .article-meta {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* 1. Author Highlight Area */
.meta-author-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 15px;
    border-right: 1px solid var(--glass-border); /* Author ව ලස්සනට වෙන් කරයි */
    margin-right: 5px;
}

.meta-author-pill img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color);
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2);
}

.meta-author-pill span { color: var(--text-secondary); }
.meta-author-pill strong { color: var(--text-primary); font-weight: 600; }

/* 2. Uniform Glass Pills */
.meta-item { 
    display: flex; 
    align-items: center; 
    gap: 6px; 
    background: rgba(0,0,0,0.03);
    padding: 6px 14px;
    border-radius: 20px;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
    font-weight: 500;
    transition: all 0.3s ease;
}

[data-theme="dark"] .meta-item {
    background: rgba(255,255,255,0.03);
}

.meta-item:hover {
    background: var(--glass-bg);
    border-color: var(--accent-color);
    color: var(--text-primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* 3. Language Badge Update */
.meta-item.lang-badge {
    background: linear-gradient(135deg, rgba(59,130,246,0.1), rgba(139,92,246,0.1));
    color: var(--accent-color);
    border-color: rgba(59,130,246,0.2);
}

/* Mobile Adjustments for Meta */
@media (max-width: 768px) {
    .meta-author-pill {
        border-right: none;
        width: 100%; /* ෆෝන් එකේදි Author පේළියක් තනියම ගන්නවා */
        margin-bottom: 5px;
    }
    .breadcrumb-title {
        max-width: 120px; /* ෆෝන් එකේදි මාතෘකාව දිග වැඩි වෙන එක නවත්තනවා */
    }
}

/* Hero Image Enhancement */
.featured-image {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 50px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* 🌟 Mobile Responsive Adjustments for Article Header */
@media (max-width: 768px) {
    .single-article-container { 
        padding: 30px 20px; 
        border-radius: 20px;
        margin-top: 100px; 
    }
    
    .article-header h1 { 
        font-size: 2rem; 
        line-height: 1.35;
        margin-bottom: 15px;
        letter-spacing: 0;
    }

    .article-meta {
        gap: 10px;
        padding-bottom: 20px;
        margin-bottom: 30px;
    }
    
    .meta-item {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    .featured-image { 
        height: 250px; 
        margin-bottom: 30px;
        border-radius: 15px;
    }
    
    /* Content Font Sizes for Mobile */
    .article-content {
        font-size: 1rem; 
        line-height: 1.7;
    }
    
    .article-content h2 {
        font-size: 1.4rem; 
        margin: 30px 0 15px;
    }
    
    .article-content h3 {
        font-size: 1.2rem; 
        margin: 25px 0 10px;
    }
}

/* Article Body Typography */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-content h2 {
    font-size: 1.8rem;
    margin: 40px 0 20px;
    color: var(--accent-color);
}

.article-content h3 {
    font-size: 1.4rem;
    margin: 30px 0 15px;
}

.article-content p { margin-bottom: 20px; }

/* Inline Images from Editor Fix */
.article-content img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 12px;
    margin: 30px auto;
    display: block;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.article-content ul, .article-content ol {
    margin: 0 0 20px 20px;
    padding-left: 20px;
}

.article-content li { margin-bottom: 10px; }

/* Code Block Styling */
.code-block {
    background: #1e1e1e;
    color: #d4d4d4;
    padding: 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 25px 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    border: 1px solid rgba(255,255,255,0.1);
}

.article-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: var(--text-secondary);
    background: rgba(59, 130, 246, 0.05);
    padding: 20px;
    border-radius: 0 10px 10px 0;
}

/* Author Box */
.author-box {
    display: flex;
    align-items: center;
    gap: 25px;
    margin-top: 60px;
    padding: 30px;
    background: rgba(0,0,0,0.05);
    border-radius: 15px;
    border: 1px solid var(--glass-border);
}

.author-box img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
}

.author-details h4 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.author-details p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
    line-height: 1.5;
}

.author-social a {
    color: var(--accent-color);
    font-size: 1.2rem;
    margin-right: 15px;
    transition: color 0.3s;
}

.author-social a:hover { color: var(--text-primary); }

/* 🌟 Premium Related Posts Slider CSS */
.related-posts-container {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--glass-border);
}

.related-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.related-header h3 {
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-controls {
    display: flex;
    gap: 10px;
}

.slider-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

.related-slider-wrapper {
    position: relative;
    width: 100%;
}

.related-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding-bottom: 15px; 
    align-items: stretch;
    scrollbar-width: none; 
    -ms-overflow-style: none;
    scroll-snap-type: x mandatory; /* 🌟 අලුතින් දැම්මා: වමට දකුණට යද්දි හරියටම Snap වෙන්න */
}

.related-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari and Opera */
}

.related-card {
    min-width: calc(33.333% - 13.33px);
    width: calc(33.333% - 13.33px); 
    flex-shrink: 0;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    scroll-snap-align: start; /* 🌟 අලුතින් දැම්මා: කාඩ් එකේ මුලට හරියන්නම මැග්නට් එක වගේ නවතින්න */
}

.related-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.related-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background-color: rgba(59, 130, 246, 0.1);
}

.related-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.related-content h4 {
    font-size: 1.05rem;
    margin-bottom: 10px;
    line-height: 1.4;
    height: 2.94rem; /* 🌟 FIX: හරියටම පේළි 2ක උස දුන්නා */
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal; /* 🌟 FIX: අකුරු කාඩ් එකේ වැදුණ ගමන් පල්ලෙහාට කඩන්න කියනවා */
    text-overflow: ellipsis;
}

.related-content h4 a:hover {
    color: var(--accent-color);
}

.related-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: auto;
}

/* Premium Comments Section CSS */
.comments-section {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid var(--glass-border);
}

.comments-header {
    font-size: 1.8rem;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.comment-form-container {
    background: rgba(0, 0, 0, 0.03);
    padding: 25px;
    border-radius: 15px;
    border: 1px solid var(--glass-border);
    margin-bottom: 40px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
}

.glass-input {
    width: 100%;
    padding: 12px 15px;
    border-radius: 8px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.glass-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

textarea.glass-input {
    resize: vertical;
    min-height: 120px;
    margin-bottom: 15px;
}

.submit-btn {
    background: var(--accent-color);
    color: white;
    font-weight: 600;
    border: none;
    padding: 12px 25px;
}

/* Success Alert */
.success-alert {
    display: none;
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 25px;
    align-items: center;
    gap: 12px;
    animation: fadeIn 0.5s ease-out;
}

.success-alert.show {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Comment List */
.comment-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.comment-item {
    display: flex;
    gap: 18px;
    padding: 20px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.comment-item:hover {
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.15);
}

.comment-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.comment-content h5 {
    font-size: 1.05rem;
    margin-bottom: 4px;
}

.comment-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.comment-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.load-more-container {
    text-align: center;
    margin-top: 30px;
}

/* ==========================================================================
   Category Page & Pagination CSS
   ========================================================================== */

.category-header-panel {
    margin: 120px auto 40px;
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    max-width: 1200px;
}

/* Dynamic Color based on Category Slug */
/* ප්‍රධාන Category Icon එක (උදා: Cloud Icon එක) ලොකුවටම තියාගන්න */
.category-header-panel i:not(.fa-home) {
    font-size: 3.5rem; /* කලින් තිබ්බ ලොකු සයිස් එක */
    margin-bottom: 20px;
}

/* Home Icon එක විතරක් වෙනම පොඩි කරන්න */
.category-header-panel i.fa-home,
.breadcrumb i.fa-home {
    font-size: 1.2rem; /* Home අයිකන් එකට ගැළපෙන පොඩි සයිස් එක */
    margin-bottom: 0;
    margin-right: 5px; /* අකුරුයි අයිකන් එකයි අතර පොඩි පරතරයක් */
}

.category-header-panel h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    background: linear-gradient(to right, #f59e0b, #ea580c);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.category-header-panel p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.breadcrumb {
    text-align: left;
    margin-bottom: 30px;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.breadcrumb a {
    color: var(--accent-color);
    transition: color 0.3s;
}

.breadcrumb a:hover { color: var(--text-primary); }

/* Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 60px 0;
}

.page-btn {
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.page-btn:hover, .page-btn.active {
    background: var(--cat-devops);
    color: white;
    border-color: var(--cat-devops);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(245, 158, 11, 0.3);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==========================================================================
   🌟 Premium Expandable Search Bar CSS
   ========================================================================== */
   .search-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    display: flex;
    align-items: center;
    border-radius: 25px;
    z-index: 1002;
    padding: 0;
    /* 🌟 FIXED: Add opaque background and solid shadow to prevent text overlapping */
    background: var(--bg-primary);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid var(--glass-border);
}

/* When Search is Active/Expanded */
.search-container.active .search-box {
    width: 300px; /* Desktop width */
    opacity: 1;
    visibility: visible;
    padding: 5px 15px;
}

.search-container.active .search-trigger {
    opacity: 0; /* Hide the search icon button */
    pointer-events: none;
}

.search-box input {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    padding: 8px 10px;
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-secondary);
}

.search-loading {
    color: var(--accent-color);
    margin-left: 10px;
}

/* 🌟 Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    /* 🌟 FIXED: Adjust position to align correctly under the search box */
    top: calc(100% + 25px); 
    right: 0;
    width: 350px;
    max-height: 400px;
    overflow-y: auto;
    border-radius: 15px;
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1003;
    display: flex;
    flex-direction: column;
    /* 🌟 FIXED: Ensure it has an opaque solid background */
    background: var(--bg-primary);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    border: 1px solid var(--glass-border);
}

/* Hide scrollbar for clean look */
.search-results-dropdown::-webkit-scrollbar { display: none; }

.search-results-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Individual Search Result Item */
.search-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 20px;
    transition: background 0.2s ease;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: rgba(59, 130, 246, 0.1);
}

.search-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.search-info h4 {
    font-size: 0.9rem;
    line-height: 1.3;
    margin: 0;
}

.search-info h4 a {
    color: var(--text-primary);
    transition: color 0.2s;
}

.search-info h4 a:hover {
    color: var(--accent-color);
}

.search-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.no-results {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-style: italic;
}

/* 🌟 Mobile View Adjustments for Search */
@media (max-width: 768px) {
    .search-box {
        position: fixed;
        top: 70px; /* Below the header */
        left: 50%;
        transform: translateX(-50%);
        width: 90%; /* Almost full width */
        max-width: 400px;
    }

    .search-container.active .search-box {
        width: 90%;
    }

    .search-results-dropdown {
        position: fixed;
        top: 130px;
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        width: 90%;
        max-width: 400px;
    }
    
    .search-results-dropdown.show {
        transform: translateX(-50%) translateY(0);
    }
}

/* 🌟 Mobile Responsive Fixes එක යටතේ තියෙන 768px කෑල්ලේ .related-card එක මෙහෙම වෙනස් කරන්න */
@media (max-width: 768px) {
    .related-card { 
        min-width: calc(50% - 10px); 
        width: calc(50% - 10px); /* 🌟 FIX: ෆෝන් එකෙත් පළල ලොක් කළා */
    }
}

/* 🌟 Mobile Adjustments for the new Footer (Centered) */
@media (max-width: 900px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center; /* සියලුම අකුරු මැදට */
    }
    
    .footer-about {
        align-items: center; /* Logo සහ Text මැදට */
        text-align: center;
    }

    .footer-about .site-logo {
        margin: 0 auto 20px auto; /* Logo එක හරියටම මැදට */
    }

    .social-links {
        justify-content: center; /* Social Icons මැදට */
        width: 100%;
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: center; /* Categories/Links මැදට */
    }

    .footer-links h3 {
        text-align: center;
        width: 100%;
    }
    
    .footer-links ul {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
        width: 100%;
    }

    .footer-links li {
        text-align: center;
    }
}

@media (max-width: 768px) {
    /* Premium Mobile Menu Drawer */
    .main-nav {
        position: absolute;
        top: 70px; /* ලෝගෝ එකට යටින් */
        right: 20px;
        width: 250px;
        background: var(--bg-primary);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border: 1px solid var(--glass-border);
        border-radius: 15px;
        box-shadow: 0 15px 35px rgba(0,0,0,0.2);
        padding: 20px;
        
        /* Animation: Hidden by default */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    }

    /* When menu is active (Toggled via JS) */
    .main-nav.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-links {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .nav-links > li {
        width: 100%;
    }

    /* 🌟 FIXED: Mobile Dropdown Transparency */
    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: var(--bg-primary); /* යටින් අකුරු පේන එක නවත්වන්න Solid පාටක් දුන්නා */
        border: 1px solid var(--glass-border);
        border-radius: 10px;
        min-width: 100%;
        margin-top: 10px;
        
        /* Mobile Toggle Animation */
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .nav-dropdown.active .dropdown-menu {
        display: block;
    }

    .mobile-menu-btn {
        display: flex;
    }

    /* 🌟 FIXED: Mobile Header Icons Alignment */
    .nav-right-section {
        gap: 10px;
        display: flex;
        align-items: center;
        justify-content: flex-end;
    }

    .nav-actions {
        gap: 6px; /* Icons අතර දුර ගානට හැදුවා */
        display: flex;
        align-items: center;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        margin-left: 5px; 
    }

    .hero {
        padding: 50px 20px;
    }
    
    .gradient-text {
        font-size: 2.5rem;
    }

    .single-article-container { padding: 20px; margin-top: 100px; }
    .article-header h1 { font-size: 2rem; }
    .featured-image { height: 250px; }
    .author-box { flex-direction: column; text-align: center; }
    .form-row { flex-direction: column; gap: 15px; }
    .related-card { min-width: calc(50% - 10px); }

    /* 🌟 FIXED: Language Menu Overflow in Mobile */
    .lang-dropdown-container .lang-menu {
        right: 50%; /* Icon එකට හරියටම යටින් මැදට ගන්නවා */
        transform: translateX(50%) translateY(15px); 
        min-width: 130px;
    }
    
    .lang-dropdown-container:hover .lang-menu {
        transform: translateX(50%) translateY(10px); /* Hover Animation එක හරිගැස්සුවා */
    }
}

@media (max-width: 480px) {
    .related-card { 
        min-width: 100%; 
        width: 100%; /* 🌟 FIX: පොඩිම ෆෝන් වලත් පළල ලොක් කළා */
    }
}

/* ==========================================================================
   🌟 About Us Page Specific CSS
   ========================================================================== */

/* Center Logo Icon above Welcome Text */
/* Center Logo Icon above Welcome Text */
.about-logo-icon {
    display: block;
    margin: 0 auto 20px auto;
    width: 80px; /* ලෝගෝ එකේ සයිස් එක */
    height: auto;
    /* 🌟 පරණ float එක අයින් කරලා අලුත් heartbeat එක දැම්මා */
    animation: heartbeat 3.5s infinite ease-in-out; 
}

/* 🌟 ලස්සන Heartbeat Animation එක (එක තැන ගැහෙන ඉෆෙක්ට් එක) */
@keyframes heartbeat {
    0% { transform: scale(1); }
    15% { transform: scale(1.15); } /* පළවෙනි ගැස්ම (ටිකක් ලොකු වෙනවා) */
    30% { transform: scale(1); }    /* ආයේ සාමාන්‍ය ගාණට එනවා */
    45% { transform: scale(1.2); } /* දෙවෙනි ගැස්ම */
    60% { transform: scale(1); }    /* ආයේ සාමාන්‍ය ගාණට එනවා */
    100% { transform: scale(1); }   /* ඊළඟ ගැස්මට පෙර පොඩි විවේකයක් */
}

/* Premium Author Box */
.about-author-box {
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 40px 0;
    padding: 30px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-author-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

.about-author-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-color);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3); /* නිල් පාට ලස්සන glow එකක් */
    flex-shrink: 0;
}

.about-author-details {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.about-author-details h3 {
    font-size: 1.8rem;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.author-title {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.05rem;
    margin-bottom: 15px;
}

.about-author-details .author-social {
    display: flex;
    gap: 15px;
}

.about-author-details .author-social a {
    color: var(--text-secondary);
    font-size: 1.3rem;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.about-author-details .author-social a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* 🌟 Responsive Design for About Us Page (Mobile View) */
@media (max-width: 768px) {
    .about-logo-icon {
        width: 60px; /* ෆෝන් එකේදී ලෝගෝ එක ටිකක් පොඩි කරනවා */
    }
    
    .about-author-box {
        flex-direction: column; /* පින්තූරෙයි අකුරුයි පල්ලෙහාට වැටෙන්න හදනවා */
        text-align: center;
        gap: 20px;
        padding: 25px 20px;
    }

    .about-author-details .author-social {
        justify-content: center; /* අයිකන් ටික මැදට ගන්නවා */
    }
}

/* ==========================================================================
   🌟 Privacy Policy Page Styles
   ========================================================================== */
.article-content h2 {
    font-size: 1.6rem;
    margin-top: 35px;
    margin-bottom: 15px;
    border-left: 4px solid var(--accent-color);
    padding-left: 15px;
}

.article-content h3 {
    font-size: 1.3rem;
    margin-top: 25px;
    color: var(--text-primary);
}

.article-content ul {
    list-style-type: none;
    padding-left: 10px;
}

.article-content ul li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 12px;
}

.article-content ul li::before {
    content: "\f058"; /* FontAwesome check-circle */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.article-content strong {
    color: var(--accent-color);
}

/* ==========================================================================
   🌟 Premium Hero Section Additions (Stripe/Apple Style)
   ========================================================================== */

/* Premium Soft Shadow Effect */
.premium-hero {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 
                0 0 0 1px rgba(255, 255, 255, 0.05) inset;
    background: linear-gradient(
        145deg, 
        rgba(255, 255, 255, 0.05) 0%, 
        rgba(255, 255, 255, 0.01) 100%
    );
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    overflow: hidden;
}

/* Add a subtle top highlight to the card */
.premium-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin: 0 auto 40px;
    line-height: 1.7;
    font-weight: 400;
}

/* Center the Buttons Container */
.center-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 10px;
}

/* Premium Button Styling & Pulse Hover Effect */
.pulse-btn {
    padding: 14px 35px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px; /* Apple UI standard button radius */
    background: var(--accent-color);
    color: white;
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}

.pulse-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.6);
    background: linear-gradient(135deg, #2563eb, #3b82f6);
}

/* Shine effect on hover */
.pulse-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(45deg);
    transition: all 0.3s ease;
    opacity: 0;
}

.pulse-btn:hover::after {
    opacity: 1;
    transform: rotate(45deg) translate(50%, 50%);
    transition: all 0.6s ease;
}

/* Mobile Adjustments for Premium Hero */
@media (max-width: 768px) {
    .premium-hero {
        padding: 60px 20px;
        border-radius: 20px;
    }
    
    .gradient-text {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
    
    .pulse-btn {
        width: 100%;
        max-width: 300px;
        padding: 12px 25px;
    }
}


/* 🌟 Premium Contact Page Specific Styles */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    margin-top: 40px;
}

.contact-info-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.2);
}

.contact-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--accent-color);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.contact-details h3 {
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    color: var(--text-primary);
}

.contact-details p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.contact-form-container {
    padding: 40px;
    border-radius: 20px;
}

select.glass-input option {
    background-color: var(--bg-color);
    color: var(--text-primary);
}

/* 🌟 Mobile View Adjustments for Contact Page */
@media (max-width: 900px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    /* 1. Contact Cards ටික මැදට ගන්නවා (අයිකන් එක උඩ, අකුරු යට) */
    .contact-card {
        flex-direction: column;
        text-align: center;
        padding: 20px;
        justify-content: center;
    }

    /* 2. Social Media අයිකන් ටික මැදට ගන්නවා */
    .contact-details .social-links {
        justify-content: center !important;
        margin-top: 15px !important;
    }

    /* 3. Name සහ Email කොටු දෙක තිරෙන් එළියට පනින එක නවත්වලා, එකකට යටින් එකක් දානවා */
    .form-row {
        flex-direction: column !important;
        gap: 15px;
    }

    /* 4. ෆෝම් එක වටේ තියෙන ඉඩ (Padding) ෆෝන් එකට ගැලපෙන්න අඩු කරනවා */
    .contact-form-container {
        padding: 25px 20px !important;
    }
}

.article-content h2 {
    margin-top: 35px;
    margin-bottom: 15px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
}
.article-content h3 {
    margin-top: 25px;
    margin-bottom: 10px;
    color: var(--accent-color);
}
.article-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}
.article-content li {
    margin-bottom: 10px;
    line-height: 1.6;
}
.warning-box {
    background: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 0 8px 8px 0;
}

/* ==========================================================================
   🌟 Premium Desktop Sidebar Ads (Sticky Skyscraper)
   ========================================================================== */

/* 1. ප්‍රධාන Wrapper එක (Grid එක හදමු) */
.article-layout-wrapper {
    display: grid;
    /* මැද ලිපියට 950px දීලා, දෙපැත්තට 1fr (ඉතුරු ඉඩ) දෙනවා */
    grid-template-columns: 1fr minmax(auto, 950px) 1fr;
    gap: 30px;
    align-items: start; /* Sticky වැඩ කරන්න මේක අනිවාර්යයි */
    max-width: 1600px; /* උපරිම පළල */
    margin: 140px auto 0;
    padding: 0 20px;
}

/* 2. Article කෑල්ල මැදට ගන්නවා */
.article-layout-wrapper .single-article-container {
    margin: 0; /* පරණ Margin එක අයින් කළා, Grid එකෙන් ඉබේම හැදෙනවා */
    width: 100%;
}

/* 3. Ad කෑලි දෙකේ (Sidebars) පොදු ස්ටයිල් */
.sidebar-ad {
    position: sticky;
    top: 120px; /* Header එකට යටින් හිරවෙන්න ඕන දුර */
    height: calc(100vh - 140px); /* තිරයේ උසට හරියන්න හැදුවා */
    display: flex;
    flex-direction: column;
    align-items: center; /* Ads මැදට ගන්නවා */
    justify-content: flex-start;
}

/* ඇතුළේ තියෙන Ad Code එක හිස් නම් හරි, පේන්නෙ නැත්නම් හරි අවුලක් නැති වෙන්න */
.sidebar-ad > * {
    width: 100%;
    max-width: 300px; /* Skyscraper ads වල සාමාන්‍ය උපරිම පළල */
    overflow: hidden;
}

/* 4. Responsive Design: කුඩා ස්ක්‍රීන් වලදී Ads දෙකම නොපෙනී යනවා */
@media (max-width: 1300px) {
    /* Grid එක අයින් කරලා, ආයේ පරණ විදිහටම මැදට ගන්නවා */
    .article-layout-wrapper {
        display: block;
        max-width: 1200px;
    }
    
    /* Article එක ආයේ පරණ විදිහට මැදට Margin දෙනවා */
    .article-layout-wrapper .single-article-container {
        margin: 0 auto 40px;
    }

    /* දෙපැත්තේ Ads සම්පූර්ණයෙන්ම හංගනවා (මොකද ඉඩ මදි නිසා) */
    .sidebar-ad {
        display: none !important;
    }
}

/* ==========================================================================
   🌟 Premium Sub-menu (Child Categories) Styling
   ========================================================================== */

/* 1. Parent list item that contains a submenu */
.has-submenu {
    position: relative;
}

/* 2. The sub-menu itself (Hidden by default, positioned to the right) */
.has-submenu .submenu {
    position: absolute;
    top: -1px; /* Align perfectly with the parent item */
    left: 100%; /* Push it exactly to the right edge of the parent dropdown */
    min-width: 220px;
    
    /* Premium Glass Effect */
    background: var(--bg-primary);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    
    /* Animation initial state */
    opacity: 0;
    visibility: hidden;
    transform: translateX(-15px); /* Start slightly to the left */
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    list-style: none;
    padding: 10px 0;
    z-index: 1005;
}

/* 3. Invisible bridge to prevent mouse-leave when moving diagonally */
.has-submenu::after {
    content: '';
    position: absolute;
    top: 0;
    right: -20px; /* Bridge gap to the right */
    width: 20px;
    height: 100%;
}

/* 4. Show submenu on hover */
.has-submenu:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateX(5px); /* Slide slightly right for a premium feel */
}

/* 5. Submenu items styling */
.has-submenu .submenu li {
    width: 100%;
}

.has-submenu .submenu a {
    padding: 10px 20px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.has-submenu .submenu a:hover {
    color: var(--accent-color);
    background: rgba(59, 130, 246, 0.05);
    padding-left: 25px; /* Premium slide-right on hover */
}

/* ==========================================================================
   🌟 Mobile Responsive Fixes for Sub-menu
   ========================================================================== */
@media (max-width: 900px) {
    /* On mobile, submenus should expand downwards, not to the right */
    .has-submenu .submenu {
        position: static;
        box-shadow: none;
        border: none;
        border-left: 2px solid var(--glass-border);
        border-radius: 0;
        margin: 5px 0 5px 20px; /* Indent from left */
        padding: 5px 0;
        min-width: auto;
        
        /* Remove desktop animations */
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none; /* Hide by default on mobile */
        background: transparent !important;
    }
    
    /* Show when parent is hovered/clicked on mobile */
    .has-submenu:hover > .submenu {
        display: block;
        transform: none;
    }

    /* Adjust arrow icon rotation on mobile hover */
    .has-submenu:hover > a > i.fa-chevron-right {
        transform: rotate(90deg);
        transition: transform 0.3s ease;
    }

    .has-submenu .submenu a {
        padding: 8px 15px !important;
    }
}

/* ==========================================================================
   🌟 Premium Avatar Selection Styles (Comments)
   ========================================================================== */
.avatar-selector {
    filter: grayscale(100%); /* 🌟 පින්තූරය තෝරන්න කලින් අළු පාටයි */
}

/* 🌟 පින්තූරය තේරුවාම එන ලස්සන Glow එක */
.avatar-selector.selected {
    opacity: 1 !important;
    filter: grayscale(0%);
    border-color: var(--accent-color) !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.5); /* ලස්සන නිල් පාට එළියක් */
    transform: scale(1.1); /* 🌟 තෝරපු එක පොඩ්ඩක් ලොකු වෙනවා */
}

/* 🌟 Post Comment Button එකේ Enable/Disable තත්ත්වයන් */
#submit-comment-btn {
    transition: all 0.3s ease;
}

#submit-comment-btn:disabled {
    background: rgba(0, 0, 0, 0.1); /* අළු පාට පසුබිමක් */
    color: var(--text-secondary);
    border-color: var(--glass-border);
}

[data-theme="dark"] #submit-comment-btn:disabled {
    background: rgba(255, 255, 255, 0.05);
}

#submit-comment-btn:not(:disabled) {
    opacity: 1 !important;
    filter: grayscale(0%) !important;
    cursor: pointer !important;
    background: var(--accent-color);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
}
