/*
Theme Name: Child Theme
Author: 
Description: Your description goes here
Version: 1.0
Template: astra
*/

/* =========================================================
   1. GENERAL & HEADER FIXES (Astra Specific)
========================================================= */
a.menu-link { color: white !important; }
.elementor-button:hover, .elementor-308 .elementor-element.elementor-element-217cc5d .elementor-button:focus { color: #fff !important; }

@media screen and (max-width: 600px) {
    body .post-6748 h1 { font-size: 24px !important; }
    #ast-fixed-header .main-header-bar {
        box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
        background: #fff;
    }
    .ast-theme-transparent-header #masthead .site-logo-img .transparent-custom-logo img {
        max-width: 150px !important;
        width: 150px !important;
    }
}

span#wlcms_dashboard_logo img { max-width: 90px; }
.entry-meta, .entry-meta * { color: #bd3600 !important; }

/* Mobile Menu Fixes */
@media only screen and (min-width: 100px) and (max-width: 767px) {
    .ast-theme-transparent-header .ast-builder-menu .main-header-menu, 
    .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-link, 
    .ast-theme-transparent-header [CLASS*="ast-builder-menu-"] .main-header-menu .menu-item > .menu-link, 
    .ast-theme-transparent-header .ast-masthead-custom-menu-items, 
    .ast-theme-transparent-header .ast-masthead-custom-menu-items a, 
    .ast-theme-transparent-header .ast-builder-menu .main-header-menu .menu-item > .ast-menu-toggle, 
    .ast-theme-transparent-header .main-header-menu .menu-link {
        color: #bd3600;
    }
    .ast-builder-menu-mobile .main-navigation .menu-item.current-menu-item > .menu-link, 
    .ast-builder-menu-mobile .main-navigation .inline-on-mobile .menu-item.current-menu-item > .ast-menu-toggle, 
    .ast-builder-menu-mobile .main-navigation .menu-item.current-menu-ancestor > .menu-link, 
    .ast-builder-menu-mobile .main-navigation .menu-item.current-menu-ancestor > .ast-menu-toggle {
        color: #ffffff !important;
        background: var(--ast-global-color-0);
    }
    ul#ast-hf-mobile-menu .current-menu-item a { color: white !important; }
    a.menu-link { font-weight: 400; color: #f06836 !important; }
    .current-menu-item a { color: white !important; }
    a.menu-link::focus { color: white !important; }
}

ul#ast-hf-mobile-menu a { color: #f06836 !important; }
ul#ast-hf-mobile-menu .current-menu-item a { color: white !important; background-color: #f06836; }

/* Login Page */
body.login.js.login-action-login.wp-core-ui.locale-en-us {
    background-position: bottom;
    background-image: url("https://mcanerin.com/wp-content/uploads/2023/05/human-head-2022-12-16-04-41-35-utc-small.jpg") !important;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    justify-content: center;
}
div#login {
    margin-left: 160px;
    padding: 70px 30px;
    box-shadow: rgba(0, 0, 0, 0.35) 0px 5px 15px;
    background-color: #0915307a;
}
form#loginform {
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    background-color: transparent;
}
label { color: white; }


/* =========================================================
   2. PREMIUM BLOG UI - HERO SECTION & BACK BUTTON
========================================================= */
body.single-post .site-content .ast-container {
    max-width: 100% !important;
    padding: 0 !important;
    display: block !important;
}
body { background-color: #fcfcfc; }

/* Hero Section */
.premium-hero-section {
    background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
    position: relative;
    padding: 60px 0;
    border-bottom: 1px solid #eee;
}
.hero-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.hero-text-side { width: 50%; padding-right: 40px; }

/* Back to Blog Button */
.premium-back-btn-wrapper { margin-bottom: 25px; }
.premium-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #0b1b3d !important;
    border: 1px solid #e0e0e0;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}
.premium-back-btn svg { transition: transform 0.3s ease; }
.premium-back-btn:hover {
    background: #f26c22;
    color: #fff !important;
    border-color: #f26c22;
    box-shadow: 0 5px 15px rgba(242, 108, 34, 0.2);
    transform: translateY(-2px);
}
.premium-back-btn:hover svg { transform: translateX(-4px); }

/* Title & Meta */
.premium-hero-title {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    color: #1a1a1a;
    margin-bottom: 25px;
    letter-spacing: -0.5px;
}
.premium-hero-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #555;
    font-size: 14px;
    font-weight: 500;
}
.premium-hero-meta .meta-item { display: flex; align-items: center; gap: 6px; }
.premium-hero-meta svg { color: #f26c22; }
.meta-divider { color: #ccc; }

/* Hero Author Link */
.premium-hero-meta .hero-author-link {
    color: #555 !important;
    text-decoration: none !important;
    font-weight: 600;
    transition: color 0.3s ease;
}
.premium-hero-meta .hero-author-link:hover {
    color: #f26c22 !important;
    text-decoration: underline !important;
}

/* Hero Image Card */
.hero-image-side { width: 50%; display: flex; justify-content: center; align-items: center; }
.hero-image-card {
    width: 100%;
    position: relative;
    transform: skewX(-8deg);
    border-radius: 20px;
    box-shadow: -20px 20px 40px rgba(0,0,0,0.15);
    border: 6px solid #fff;
    background: #fff;
    overflow: hidden;
}
.hero-image-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* =========================================================
   3. MAIN LAYOUT & SIDEBAR
========================================================= */
.premium-main-wrapper {
    max-width: 1200px;
    margin: 50px auto;
    padding: 0 20px;
}
.premium-layout-container { display: flex; gap: 50px; align-items: flex-start; }

/* Sidebar */
.premium-sidebar {
    width: 320px;
    flex-shrink: 0;
    position: sticky;
    top: 100px;
}

/* Table of Contents */
.toc-widget {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
}
.toc-header {
    background: #f26c22;
    color: #fff;
    padding: 15px 20px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.toc-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
}
.toc-toggle-icon {
    display: none;
    transition: transform 0.3s ease;
}
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { border-bottom: 1px solid #f5f5f5; }
.toc-list li:last-child { border-bottom: none; }
.toc-list li a {
    display: block;
    padding: 15px 20px;
    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    position: relative;
    transition: all 0.2s;
    cursor: pointer;
}
.toc-list li a:hover { color: #f26c22; background: #fafafa; }
.toc-list li.active a { color: #f26c22 !important; font-weight: 500; background: #fafafa; padding-left: 30px; }
.toc-list li.active a::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #f26c22;
    border-radius: 50%;
}
.toc-list li a.toc-h3 { padding-left: 40px !important; font-size: 12px; color: #777; }
.toc-list li.active a.toc-h3::before { left: 30px; width: 6px; height: 6px; }

/* Sidebar CTA Widget */
.cta-widget {
    background: linear-gradient(180deg, #fff5f0 0%, #ffe8df 100%);
    border-radius: 10px;
    overflow: hidden;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}
.cta-image { width: 100%; height: 150px; object-fit: cover; }
.cta-content { padding: 30px 20px; }
.cta-content h3 { font-size: 26px; font-weight: 800; color: #0b1b3d; margin: 0 0 10px 0; line-height: 1.2; }
.cta-content h3 span { color: #f26c22; }
.cta-content p { color: #555; font-size: 14px; margin-bottom: 20px; }
.cta-btn {
    display: inline-block;
    background: #f26c22;
    color: #fff !important;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
}
.cta-btn:hover { background: #d85a15; }


/* =========================================================
   4. CONTENT TYPOGRAPHY
========================================================= */
.premium-content { flex-grow: 1; width: 100%; min-width: 0; }

.content-category-badge {
    display: inline-block;
    background: #f26c22;
    color: #fff;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}
.content-category-badge a { color: #fff !important; text-decoration: none; }

/* Typography Core */
.premium-typography {
    font-size: 16px;
    line-height: 1.85;
    color: #333;
    letter-spacing: 0.2px;
}
.premium-typography p { margin-bottom: 15px; }

/* Links */
.premium-typography a, 
#post-content-body a, 
.entry-content a {
    color: #f26c22 !important;
    text-decoration: none !important;
    text-underline-offset: 3px;
    font-weight: 500 !important;
    transition: color 0.3s ease;
    box-shadow: none !important;
}
.premium-typography a:hover, 
#post-content-body a:hover, 
.entry-content a:hover {
    color: #d85a15 !important;
}

/* Headings */
.premium-typography h2 {
    font-size: 26px;
    font-weight: 800;
    color: #0b1b3d;
    margin-top: 20px;
    margin-bottom: 20px;
    padding-left: 25px;
    border-left: 5px solid #f26c22;
    line-height: 1.3;
    background: none !important;
}
.premium-typography h2::before { display: none !important; }
.premium-typography h3 { font-size: 22px; font-weight: 700; color: #0b1b3d; margin-top: 45px; margin-bottom: 20px; }
.premium-typography h4 { font-size: 18px; font-weight: 700; color: #0b1b3d; margin-top: 35px; margin-bottom: 15px; }

/* Images */
.premium-typography img {
    border-radius: 16px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 4px solid #fff;
    max-width: 100%;
    height: auto;
}

/* Blockquotes */
.premium-typography blockquote {
    background: #f8f9fa;
    border-left: 5px solid #f26c22;
    padding: 25px 30px;
    margin: 40px 0;
    font-size: 20px;
    font-style: italic;
    color: #0b1b3d;
    border-radius: 0 10px 10px 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.02);
    position: relative;
}
.premium-typography blockquote::before {
    content: '"';
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 60px;
    color: rgba(242, 108, 34, 0.2);
    font-family: serif;
    line-height: 1;
}

/* Lists */
.premium-typography ul { list-style: none; padding-left: 0; }
.premium-typography ul li { position: relative; padding-left: 35px; margin-bottom: 15px; }
.premium-typography ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 2px;
    color: #fff;
    background: #f26c22;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(242, 108, 34, 0.3);
}

/* Tables */
.premium-typography table {
    width: 100%;
    border-collapse: collapse;
    margin: 30px 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.premium-typography th { background: #0b1b3d; color: #fff; padding: 15px; text-align: left; }
.premium-typography td { padding: 15px; border-bottom: 1px solid #eee; background: #fff; }
.premium-typography tr:hover td { background: #fafafa; }


/* =========================================================
   5. NEW SECTIONS (Author Bio, Full CTA, Recent Posts)
========================================================= */
.premium-author-bio {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: linear-gradient(to right, #ffffff, #fcfcfc);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #f0f0f0;
    border-left: 4px solid #f26c22;
    box-shadow: 0 15px 40px rgba(0,0,0,0.05);
    margin-top: 50px;
}
.author-avatar-large img { border-radius: 50%; width: 80px; height: 80px; object-fit: cover; border: 3px solid #f26c22; }
.author-bio-content { flex: 1; }
.bio-label { font-size: 12px; color: #888; text-transform: uppercase; letter-spacing: 1px; font-weight: 600; display: block; margin-bottom: 5px; }
.bio-name { font-size: 22px; font-weight: 800; color: #111; margin: 0 0 10px 0; }
.bio-desc { font-size: 14px; color: #555; line-height: 1.6; margin-bottom: 15px; }
.bio-link { font-size: 12px; font-weight: 700; color: #f26c22; text-decoration: none; transition: color 0.3s; }
.bio-link:hover { color: #d85a15; }

/* Author Bio Name Link */
.bio-name a.author-name-link {
    color: #111 !important;
    text-decoration: none !important;
    transition: color 0.3s ease;
    font-weight: 800;
}
.bio-name a.author-name-link:hover {
    color: #f26c22 !important;
}

/* Full Width CTA */
.post-fullwidth-cta {
    background: #f26c22;
    position: relative;
    padding: 80px 20px;
    text-align: center;
    overflow: hidden;
    margin-top: 60px;
}
.cta-bg-shape {
    position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 800px; height: 800px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 1;
}
.cta-inner { position: relative; z-index: 2; max-width: 800px; margin: 0 auto; }
.post-fullwidth-cta h2 { font-size: 34px; font-weight: 800; color: #fff; margin: 0 0 15px 0; letter-spacing: -0.5px; }
.post-fullwidth-cta p { font-size: 16px; color: rgba(255, 255, 255, 0.9); margin-bottom: 35px; line-height: 1.6; }
.cta-buttons { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.cta-buttons a { padding: 15px 30px; border-radius: 50px; font-size: 15px; font-weight: 700; text-decoration: none; transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1); }
.btn-primary { background: #fff; color: #f26c22 !important; }
.btn-primary:hover { background: #111; color: #fff !important; transform: translateY(-3px); }
.btn-outline { background: transparent; color: #fff !important; border: 2px solid #fff; }
.btn-outline:hover { background: #fff; color: #f26c22 !important; transform: translateY(-3px); }

/* Recent Posts */
.post-recent-blogs { max-width: 1200px; margin: 80px auto 60px; padding: 0 20px; }
.recent-header { text-align: center; margin-bottom: 40px; }
.recent-header h2 { font-size: 36px; font-weight: 800; color: #111; margin: 0 0 10px 0; }
.recent-header p { font-size: 16px; color: #666; margin: 0; }
.post-recent-blogs .origency-blog-card { border: 1px solid #eee; background: #fff; }


/* =========================================================
   6. STICKY FIX (CRITICAL — must come before media queries)
========================================================= */
/* Sticky breaks if ANY parent has overflow: hidden/auto/scroll */
body.single-post,
body.single-post #page,
body.single-post .site,
body.single-post .site-content,
body.single-post .ast-container,
body.single-post .site-content .ast-container,
body.single-post .premium-main-wrapper,
body.single-post .premium-layout-container {
    overflow: visible !important;
}
/* Astra often sets overflow-x:hidden on body — that kills sticky.
   Use overflow-x:clip instead (does NOT break sticky). */
body.single-post {
    overflow-x: clip !important;
}


/* =========================================================
   7. SMOOTH SCROLL + HEADING OFFSET
========================================================= */
html { scroll-behavior: smooth; scroll-padding-top: 120px; }
#post-content-body h2, #post-content-body h3 { scroll-margin-top: 100px; }


/* =========================================================
   8. MOBILE TOC DROPDOWN & RESPONSIVE
========================================================= */
@media (max-width: 992px) {
    /* Layout */
    .hero-content-wrapper { flex-direction: column; }
    .hero-text-side { width: 100%; padding-right: 0; margin-bottom: 40px; }
    .hero-image-side { width: 100%; height: auto; }
    .hero-image-card { transform: skewX(0); }

    .premium-layout-container {
        flex-direction: column;
        gap: 25px;
    }

    /* ===== STICKY SIDEBAR (THE ACTUAL FIX) ===== */
    .premium-sidebar {
        width: 100%;
        position: sticky;      /* was relative — now sticky */
        top: 80px;                /* sticks to top of viewport */
        z-index: 999;          /* above content */
        margin-bottom: 0;
        align-self: flex-start;
    }

    /* Hide CTA widget on mobile */
    .cta-widget { display: none; }

    /* ===== STICKY TOC WIDGET ===== */
    .toc-widget {
        display: block !important;
        margin-bottom: 0;
        border-radius: 12px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        border: 1px solid #eee;
        position: sticky;      /* widget itself also sticky */
        top: 10px;
        background: #fff;
    }

    .toc-header {
        background: #f26c22;
        padding: 15px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        border-radius: 12px;
        transition: border-radius 0.3s ease;
    }

    .toc-header.active {
        border-radius: 12px 12px 0 0;
    }

    .toc-header-title {
        font-size: 16px;
        font-weight: 700;
        color: #fff;
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .toc-toggle-icon {
        display: block;
        color: #fff;
    }

    .toc-body {
        display: none;
        background: #fff;
        max-height: 60vh;               /* better than 300px */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        border-radius: 0 0 12px 12px;
        border: 1px solid #eee;
        border-top: none;
    }

    .toc-list li a {
        padding: 12px 20px;
        font-size: 14px;
    }
    .toc-list li a.toc-h3 {
        padding-left: 35px !important;
    }

    /* Other Responsive */
    .premium-hero-title { font-size: 22px; }
    .premium-author-bio { flex-direction: column; text-align: center; align-items: center; }
    .post-fullwidth-cta h2 { font-size: 28px; }
    .post-fullwidth-cta p { font-size: 16px; }
    .cta-buttons { flex-direction: column; }
    .recent-header h2 { font-size: 28px; }
}

@media (max-width: 768px) {
    .premium-hero-meta { flex-wrap: wrap; gap: 10px; }
    .meta-divider { display: none; }
    .premium-typography h2 { font-size: 26px; padding-left: 15px; }
    .premium-typography h3 { font-size: 22px; }
    .premium-typography { font-size: 16px; }
}