/* =========================================
   1. CORE VARIABLES (Extracted from LinkMagz)
========================================= */
:root {
    --theme-width: 1200px;
    --header-height: 48px;
    --navmenu-height: 62px;
    
    /* Light Mode Colors */
    --body-bg: #edf1f2;
    --body-text-color: #31353a;
    --link-color: #0273b9;
    --link-hover-color: #31353a;
    
    --header-bg: #424a56;
    --navmenu-bg: #547A92;
    --navmenu-text: #ffffff;
    
    --posts-bg: #ffffff;
    --sidebar-bg: #f8fafa;
    --widget-title-bg: #f0f4f4;
    --widget-title-color: #707070;
    
    --footer-bg: #4b525d;
    --footer-text: #ffffff;
}

/* =========================================
   2. GLOBAL SETTINGS
========================================= */
html { 
    line-height: 1.15; 
    -webkit-text-size-adjust: 100%; 
    font-family: 'Roboto', Arial, sans-serif; 
}
body { 
    margin: 0; 
    background: var(--body-bg); 
    color: var(--body-text-color); 
    font-size: 16px; 
    transition: background 0.2s, color 0.2s; 
}
a { 
    color: var(--link-color); 
    text-decoration: none; 
    transition: all 0.2s; 
}
a:hover { 
    color: var(--link-hover-color); 
}

/* =========================================
   3. DARK MODE VARIABLES
========================================= */
body.darkmode {
    --body-bg: #353535;
    --body-text-color: #eee;
    --link-color: #a3daef;
    --link-hover-color: #fff;
    --header-bg: #232323;
    --navmenu-bg: #2b2b2b;
    --posts-bg: #323232;
    --sidebar-bg: #2f2f2f;
    --widget-title-bg: #383838;
    --widget-title-color: #eee;
    --footer-bg: #282828;
}

/* =========================================
   4. HEADER & NAVIGATION
========================================= */
#header-outer { width: 100%; }
#header-content { 
    background: var(--header-bg); 
    min-height: var(--header-height); 
    padding: 20px 36px; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
}
.blog-title { 
    margin: 0; 
    font-size: 28px; 
    text-transform: uppercase; 
}
.blog-title a { color: #fff; }
.title-description { 
    font-size: 14px; 
    color: #fff; 
    margin: 5px 0 0; 
}

#navmenu-wrap { background: var(--navmenu-bg); }
.nav-outer { 
    max-width: var(--theme-width); 
    margin: 0 auto; 
    min-height: var(--navmenu-height); 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding: 0 36px; 
}
.navmenu-content ul { 
    list-style: none; 
    margin: 0; 
    padding: 0; 
    display: flex; 
}
.navmenu-content ul li { 
    font-weight: bold; 
    text-transform: uppercase; 
    margin-right: 30px; 
}
.navmenu-content ul li a { 
    color: var(--navmenu-text); 
    line-height: 42px; 
    display: inline-block; 
}

.nav-secondary { 
    display: flex; 
    align-items: center; 
    justify-content: flex-end; 
}
.iconsearch-label { 
    color: #fff; 
    cursor: pointer; 
    opacity: 0.8; 
    transition: 0.2s; 
    display: flex; 
    align-items: center; 
}
.iconsearch-label:hover { opacity: 1; }

/* =========================================
   5. DARK MODE SWITCH (UI Toggle)
========================================= */
.darkmode-switch { 
    margin-left: 20px; 
    display: flex; 
    align-items: center; 
}
.darkmode-switch .switch-title::before { 
    content: "Dark Mode"; 
    color: var(--navmenu-text); 
    font-size: 10px; 
    text-transform: uppercase; 
    opacity: 0.8; 
    margin-right: 8px;
}
.switch { 
    position: relative; 
    display: inline-block; 
    width: 36px; 
    height: 18px; 
    opacity: 0.8; 
    transition: 0.2s;
}
.switch:hover { opacity: 1; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { 
    position: absolute; 
    cursor: pointer; 
    top: 0; left: 0; right: 0; bottom: 0; 
    border: 2px solid var(--navmenu-text); 
    border-radius: 34px; 
    transition: .2s; 
}
.slider:before { 
    position: absolute; 
    content: ""; 
    height: 10px; 
    width: 10px; 
    left: 2px; 
    bottom: 2px; 
    background: var(--navmenu-text); 
    border-radius: 50%; 
    transition: .2s; 
}
input:checked + .slider { border-color: #fff; }
input:checked + .slider:before { 
    transform: translateX(18px); 
    background: #fff; 
}

/* =========================================
   6. MAIN LAYOUT (Wrapper, Content, Sidebar)
========================================= */
#wrapper { 
    max-width: var(--theme-width); 
    margin: 0 auto; 
    display: flex; 
    flex-wrap: wrap; 
    padding: 36px 0; 
}
#content-wrap { 
    flex: 1 1 69%; 
    max-width: 69%; 
    padding: 0 15px; 
    box-sizing: border-box; 
}
#sidebar-wrap { 
    flex: 1 1 31%; 
    max-width: 31%; 
    padding: 0 15px; 
    box-sizing: border-box; 
}

.post-outer-single { 
    background: var(--posts-bg); 
    padding: 30px; 
    border-radius: 4px; 
    transition: background 0.2s; 
    box-shadow: 0 0 10px rgba(0,0,0,0.02); 
}
.post-title { 
    font-size: 32px; 
    margin: 0 0 16px; 
    color: var(--body-text-color); 
}

.widget { 
    background: var(--sidebar-bg); 
    padding: 30px; 
    margin-bottom: 30px; 
    border-radius: 4px; 
    transition: background 0.2s; 
}
.normalwidget-title h2.title { 
    font-size: 16px; 
    text-transform: uppercase; 
    margin: 0 0 15px; 
    background: var(--widget-title-bg); 
    color: var(--widget-title-color); 
    padding: 5px 10px; 
    display: inline-block; 
    border-radius: 3px; 
}

/* =========================================
   7. LAZY LOAD SHIMMER EFFECT
========================================= */
.lazyload { 
    opacity: 0; 
    transition: opacity 200ms ease-in-out; 
}
.lazyload.loaded { opacity: 1; }
.lazyload + .lazy-loading {
    position: absolute; 
    top: 0; left: 0; right: 0; bottom: 0; 
    z-index: -1;
    background: linear-gradient(to right, #d7dee0 10%, #c8cecf 18%, #d7dee0 33%);
    background-size: 200% 100%;
    animation: placeHolderShimmer 1.25s infinite ease-in-out forwards;
}
.lazyload.loaded + .lazy-loading { opacity: 0; }
@keyframes placeHolderShimmer { 
    0% { background-position: 100% 0; } 
    100% { background-position: -100% 0; } 
}

/* =========================================
   8. FOOTER
========================================= */
#footer-outer { 
    background: var(--footer-bg); 
    color: var(--footer-text); 
    text-align: center; 
    padding: 20px 36px; 
    transition: background 0.2s; 
}
#footer-outer a { color: var(--footer-text); }
