/*
 Theme Name:   Enfold Child
 Theme URI:    https://kriesi.at/themes/enfold/
 Description:  Enfold Child Theme - "Amoeba Society" Immersive Design
 Author:       Byuuum Design
 Template:     enfold
 Version:      1.0.8
 License:      GNU General Public License v2 or later
 Text Domain:  enfold-child
*/

/* ----------------------------------------------------------------
   PROTOTYPE SYNC: CSS Variables
---------------------------------------------------------------- */
:root {
    /* Colors */
    --bg-dark: #050505;
    --text-white: #ffffff;
    --text-gray: #cccccc;
    --accent-blue: #3498db;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);

    /* Domain Colors */
    --color-asset: #00f2ff;
    /* Unity (Construction/Structure) */
    --color-ai: #9d00ff;
    /* Intelligence (Robot/Brain) */
    --color-community: #ff7b00;
    /* Energy (Fire/Passion) */

    /* Typography */
    --font-main: "Inter", "Noto Sans JP", Helvetica, Arial, sans-serif;
    --font-size-base: 16px;
    --font-size-h1: 4.5rem;
    /* Impactful Hero */
    --font-size-h2: 2.8rem;
    /* Section Titles */
    --font-size-h3: 1.8rem;
    /* Card Titles */
    /* Lead Text */
    --line-height-body: 1.8;

    /* ----------------------------------------------------------------
       Hero Animation Palette (Default: Home/Aurora)
       - Used by hero-animation.js
    ---------------------------------------------------------------- */
    --hero-bg: #051e40;
    /* Midnight Blue */
    --hero-cloud-1: #0080ff;
    /* Cyan/Blue */
    --hero-cloud-2: #33ccff;
    /* Lighter Cyan */
    --hero-beam: #1a66ff;
    /* Beam Edge */

    /* Dynamic Accent Color (Syncs with Theme) */
    --accent-main: #3498db;
    /* Default Blue */
}

/* ----------------------------------------------------------------
   Global UX Improvements
---------------------------------------------------------------- */
/* High Contrast Text Selection (Fixes readability on dark backgrounds) */
::selection {
    background: #ffeb3b !important;
    /* High-vis Yellow */
    color: #000000 !important;
    /* Force black text */
    -webkit-text-fill-color: #000000 !important;
    text-shadow: none !important;
}

::-moz-selection {
    background: #ffeb3b !important;
    color: #000000 !important;
    text-shadow: none !important;
}

::-webkit-selection {
    background: #ffeb3b !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    text-shadow: none !important;
}


/* ----------------------------------------------------------------
   Thematic Palettes (Overrides)
---------------------------------------------------------------- */

/* ABOUT: Deep Purple (Vision/Philosophy) */
body.page-template-page-about-php {
    --hero-bg: #1a0525;
    /* Dark Purple */
    --hero-cloud-1: #6a00ff;
    /* Vivid Purple */
    --hero-cloud-2: #b366ff;
    /* Light Lavender */
    --hero-beam: #8c1aff;
    /* Beam Purple */
    --accent-main: #e6b3ff;
    /* Restoration: Bright Lavender (High Contrast against Dark BG) */
}

/* SERVICE: Cyber Cyan (Asset/Structure) */
body.page-template-page-service-php {
    --hero-bg: #051a25;
    /* Dark Teal */
    --hero-cloud-1: #005c99;
    /* Darker Azure (Was Bright Cyan) - Dims the background */
    --hero-cloud-2: #004d66;
    /* Deep Teal (Was Pale Cyan) - Dims the background */
    --hero-beam: #0099cc;
    /* Deep Cyan */
    --accent-main: #66f2ff;
    /* Keep Text Bright Ice Cyan */
}

/* CONTACT: Warm Orange (Community/Fellows) */
body.page-template-page-contact-php {
    --hero-bg: #251005;
    /* Dark Brown/Orange */
    --hero-cloud-1: #ff6600;
    /* Vivid Orange */
    --hero-cloud-2: #ffb366;
    /* Peach/Light Orange */
    --hero-beam: #cc5200;
    /* Burnt Orange */
    --accent-main: #ffcc80;
    /* Creamy Orange (High Contrast) */
}

/* ----------------------------------------------------------------
   Canvas Container Fix (Background Persistence)
---------------------------------------------------------------- */
#amoeba-canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 0;
    /* Behind content, depends on wrapper transparency */
    pointer-events: none;
}

/* ABOUT: Deep Purple (Vision/Philosophy) */
body.page-template-page-about-php {
    --hero-bg: #1a0525;
    /* Dark Purple */
    --hero-cloud-1: #6a00ff;
    /* Vivid Purple */
    --hero-cloud-2: #b366ff;
    /* Light Lavender */
    --hero-beam: #8c1aff;
    /* Beam Purple */
}

/* SERVICE: Cyber Cyan (Asset/Structure) */
body.page-template-page-service-php {
    --hero-bg: #051a25;
    /* Dark Teal */
    --hero-cloud-1: #00d5ff;
    /* Bright Cyan */
    --hero-cloud-2: #70eaff;
    /* Pale Cyan */
    --hero-beam: #0099cc;
    /* Deep Cyan */
}

/* CONTACT: Warm Orange (Community/Fellows) */
body.page-template-page-contact-php {
    --hero-bg: #251005;
    /* Dark Brown/Orange */
    --hero-cloud-1: #ff6600;
    /* Vivid Orange */
    --hero-cloud-2: #ffb366;
    /* Peach/Light Orange */
    --hero-beam: #cc5200;
    /* Burnt Orange */
}

/* ----------------------------------------------------------------
   Global Icon System (Glass/Glow)
---------------------------------------------------------------- */
.glass-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.4s ease;
}

.glass-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
    /* Inherit text color */
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
    /* Subtle initial glow */
    transition: all 0.4s ease;
}

/* Hover Effects handled by parent card usually, but default hover: */
.glass-icon:hover svg {
    filter: drop-shadow(0 0 15px currentColor);
}

/* ----------------------------------------------------------------
   Scoped Immersive Styles (moved down from previous edits if needed)
---------------------------------------------------------------- */

/* Background & Global Font for the Template */
body.page-template-page-home-immersive-php,
body.page-template-page-about-php,
body.page-template-page-service-php,
body.page-template-page-contact-php {
    background-color: var(--bg-dark);
    font-family: var(--font-main);
    color: var(--text-white);
    overflow-x: hidden;
}

/* Enfold Header Transparency Override - ONLY for this template */
.page-template-page-home-immersive-php #header_main,
.page-template-page-about-php #header_main,
.page-template-page-service-php #header_main,
.page-template-page-contact-php #header_main,

.page-template-page-home-immersive-php .header_bg,
.page-template-page-about-php .header_bg,
.page-template-page-service-php .header_bg,
.page-template-page-contact-php .header_bg,

.page-template-page-home-immersive-php #header,
.page-template-page-about-php #header,
.page-template-page-service-php #header,
.page-template-page-contact-php #header {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.page-template-page-home-immersive-php .header_color .header_bg,
.page-template-page-about-php .header_color .header_bg,
.page-template-page-service-php .header_color .header_bg,
.page-template-page-contact-php .header_color .header_bg,

.page-template-page-home-immersive-php .header_color .main_menu ul ul,
.page-template-page-about-php .header_color .main_menu ul ul,
.page-template-page-service-php .header_color .main_menu ul ul,
.page-template-page-contact-php .header_color .main_menu ul ul,

.page-template-page-home-immersive-php .header_color .main_menu .menu ul li a,
.page-template-page-about-php .header_color .main_menu .menu ul li a,
.page-template-page-service-php .header_color .main_menu .menu ul li a,
.page-template-page-contact-php .header_color .main_menu .menu ul li a {
    background-color: transparent !important;
    color: #fff !important;
    /* Force menu items white */
}

/* Active menu item underline/color fix */
.page-template-page-home-immersive-php .header_color .main_menu ul:first-child>li.current-menu-item>a,
.page-template-page-home-immersive-php .header_color .main_menu ul:first-child>li.current_page_item>a {
    color: var(--accent-main) !important;
}

/* CRITICAL: Make Enfold Containers Transparent so Canvas is Visible */
/* Added .main_color as it's a primary Enfold background setter */
.page-template-page-home-immersive-php #wrap_all,
.page-template-page-about-php #wrap_all,
.page-template-page-service-php #wrap_all,
.page-template-page-contact-php #wrap_all,

.page-template-page-home-immersive-php #main,
.page-template-page-about-php #main,
.page-template-page-service-php #main,
.page-template-page-contact-php #main,

.page-template-page-home-immersive-php .main_color,
.page-template-page-about-php .main_color,
.page-template-page-service-php .main_color,
.page-template-page-contact-php .main_color,

.page-template-page-home-immersive-php .Alternate_color,
.page-template-page-about-php .Alternate_color,
.page-template-page-service-php .Alternate_color,
.page-template-page-contact-php .Alternate_color,

.page-template-page-home-immersive-php .template-page,
.page-template-page-about-php .template-page,
.page-template-page-service-php .template-page,
.page-template-page-contact-php .template-page,

.page-template-page-home-immersive-php .container,
.page-template-page-about-php .container,
.page-template-page-service-php .container,
.page-template-page-contact-php .container {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
}

/* FIX v1.0.7: Specific Override for #mission section which was stuck white */
.page-template-page-home-immersive-php section,
.page-template-page-about-php section,
.page-template-page-service-php section,
.page-template-page-contact-php section,

.page-template-page-home-immersive-php #mission,
.page-template-page-about-php #mission,
.page-template-page-service-php #mission,
.page-template-page-contact-php #mission,

.page-template-page-home-immersive-php .mission-section,
.page-template-page-about-php .mission-section,
.page-template-page-service-php .mission-section,
.page-template-page-contact-php .mission-section {
    background-color: transparent !important;
    background: none !important;
}

/* Remove Enfold's default main content padding for this template */
.page-template-page-home-immersive-php #main .container,
.page-template-page-about-php #main .container,
.page-template-page-service-php #main .container,
.page-template-page-contact-php #main .container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* ----------------------------------------------------------------
   The "Fixed World" (Background Animation)
---------------------------------------------------------------- */
#amoeba-canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    /* Behind content, but verify Z-index stacking against Enfold's wrap */
    pointer-events: none;
}

/* ----------------------------------------------------------------
   Immersive Content Styles
---------------------------------------------------------------- */
#immersive-home-wrapper {
    position: relative;
    z-index: 10;
    /* Above the canvas */
    width: 100%;
}

.container-immersive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section (Reveal Animation) */
.home-hero-section {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    /* Hidden initially */
    transition: opacity 2.0s ease;
    z-index: 10;

    /* DEFENSIVE: Remove any inherited Backgrounds/Gradients */
    background: none !important;
    background-image: none !important;
    background-color: transparent !important;
}

.home-hero-section.revealed {
    opacity: 1;
    /* Fade in when wall melts */
}

/* Hero Typography */
.hero-title {
    font-size: 3.5rem !important;
    font-weight: 900 !important;
    line-height: 1.4 !important;
    margin-bottom: 2rem !important;
    letter-spacing: 0.05rem;
    color: var(--text-white) !important;
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    border: none !important;
    /* Enfold sometimes adds borders to headings */
}

.hero-title .line-1 {
    display: block;
}

.hero-title .line-2 {
    display: block;
    font-size: 1.8rem;
    font-weight: 500;
    opacity: 0.8;
    margin-top: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem !important;
    opacity: 0.8;
    margin-bottom: 3rem !important;
    line-height: 1.8 !important;
    color: var(--text-white) !important;
}

/* Buttons (Prototype Style) */
.cta-group {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.btn {
    padding: 15px 40px;
    border-radius: 50px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    border: none;
    text-decoration: none !important;
    display: inline-block;
}

.btn-primary {
    background: var(--text-white);
    color: var(--bg-dark) !important;
    /* Force color */
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    color: var(--bg-dark) !important;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-white) !important;
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--glass-bg);
    color: var(--text-white) !important;
}

/* ----------------------------------------------------------------
   Mission Section (Glass Cards)
---------------------------------------------------------------- */
.mission-section {
    position: relative;
    z-index: 20;
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: 2.5rem !important;
    color: #fff !important;
    margin-bottom: 20px !important;
    border: none !important;
    background: transparent !important;
}

.section-desc {
    font-size: 1.1rem !important;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9) !important;
    max-width: 800px;
    margin: 0 auto;
}

/* Card Grid */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 40px;
    border-radius: 20px;
    transition: transform 0.4s ease, border-color 0.4s ease;
    text-align: center;
    color: #fff;
    box-shadow: none;
    /* Remove theme shadow */
}

.glass-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-main);
    background: rgba(255, 255, 255, 0.08);
}

.glass-card .icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.glass-card h3 {
    font-size: 1.5rem !important;
    margin-bottom: 15px !important;
    color: #fff !important;
}

.glass-card p {
    opacity: 0.7;
    line-height: 1.6;
    color: #fff;
}

/* Blog & Utilities */
.blog-header-section {
    background: transparent !important;
    padding-top: 80px;
    border-top: 1px solid var(--glass-border);
}

/* FOOTER FIX (v1.0.8 Immersive Footer) 
   - Hides the bulky Widget Footer (#footer)
   - Styles the Socket (#socket) as a minimal glass bar
*/
.page-template-page-home-immersive-php #footer,
.page-template-page-about-php #footer,
.page-template-page-service-php #footer,
.page-template-page-contact-php #footer {
    display: none !important;
    /* Hide large widget area to remove empty space */
}

.page-template-page-home-immersive-php #socket,
.page-template-page-about-php #socket,
.page-template-page-service-php #socket,
.page-template-page-contact-php #socket {
    position: relative;
    z-index: 20;
    background: rgba(0, 0, 0, 0.3) !important;
    /* Minimal semi-bg */
    border-top: 1px solid var(--glass-border) !important;
    color: rgba(255, 255, 255, 0.4) !important;
    text-align: center;
    padding: 20px 0 !important;
}

.page-template-page-home-immersive-php #socket .copyright,
.page-template-page-about-php #socket .copyright,
.page-template-page-service-php #socket .copyright,
.page-template-page-contact-php #socket .copyright {
    float: none !important;
    display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem !important;
    }

    .hero-title .line-2 {
        font-size: 1.4rem;
    }

    .cta-group {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
    }
}

/* ----------------------------------------------------------------
   Immersive Subpage Styles (About, Service, Contact)
   Added for V5 Unification
---------------------------------------------------------------- */

/* Common Section Spacing */
.about-hero-section,
.about-mission-section,
.about-philosophy-section,
.about-message-section,
.about-company-section,
.service-hero-section,
.service-domain-section,
.service-cta-section,
.contact-hero-section {
    padding: 100px 0;
    position: relative;
    z-index: 10;
}

/* Page Titles */
.page-title {
    font-size: 3rem !important;
    font-weight: 800 !important;
    text-align: center;
    margin-bottom: 60px !important;
    color: var(--text-white) !important;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.sub-title {
    font-size: 1.5rem;
    color: var(--accent-main);
    margin-bottom: 20px;
    font-weight: 700;
}

.section-lead {
    font-size: 1.8rem;
    line-height: 1.6;
    margin-bottom: 40px;
    font-weight: 700;
    text-align: center;
    color: #fff;
}

/* Content Blocks */
.content-block {
    max-width: 800px;
    margin: 0 auto 60px auto;
    text-align: center;
    line-height: 2.0;
    font-size: 1.1rem;
}

/* Vision Statement Box */
.vision-statement-box {
    border: 1px solid var(--accent-main);
    background: rgba(52, 152, 219, 0.1);
    padding: 60px;
    margin-top: 60px;
    text-align: center;
    border-radius: 4px;
}

.main-statement {
    font-size: 2rem !important;
    font-weight: 700 !important;
    margin-bottom: 30px !important;
    line-height: 1.4 !important;
}

.highlight-text {
    color: var(--accent-main);
    font-weight: 700;
}

/* Message Section */
.message-container {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 60px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.representative-sign {
    margin-top: 60px;
    text-align: right;
}

.representative-sign .role {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 5px;
}

.representative-sign .name {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Company Profile List */
.company-info-list {
    max-width: 800px;
    margin: 0 auto;
    border-top: 1px solid var(--glass-border);
}

.info-row {
    display: flex;
    padding: 20px 0;
    border-bottom: 1px solid var(--glass-border);
    align-items: center;
}

.info-row dt {
    width: 30%;
    font-weight: 700;
    color: var(--accent-main);
}

.info-row dd {
    width: 70%;
    margin: 0;
}

/* Mobile Adjustments for Subpages */
@media (max-width: 768px) {
    .page-title {
        font-size: 2rem !important;
    }

    .vision-statement-box,
    .message-container {
        padding: 30px;
    }

    .info-row {
        flex-direction: column;
        text-align: left;
        align-items: flex-start;
    }

    .info-row dt {
        width: 100%;
        margin-bottom: 5px;
    }

    .info-row dd {
        width: 100%;
    }
}

/* ----------------------------------------------------------------
   Service Page Specific Styles
---------------------------------------------------------------- */

/* Domain Header */
.domain-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.icon-large {
    font-size: 4rem;
    margin-bottom: 20px;
    display: inline-block;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.4));
}

.domain-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.domain-subtitle {
    font-size: 1.2rem;
    color: var(--accent-main);
    margin-bottom: 30px;
    font-family: monospace;
    letter-spacing: 0.1rem;
    text-transform: uppercase;
}

.domain-lead {
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Service List Grid */
.service-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-item {
    background: rgba(255, 255, 255, 0.03);
    /* Initial: Subtle Transparency (Immersive) */
    border: 1px solid var(--glass-border);
    padding: 30px;
    border-radius: 12px;
    transition: all 0.4s ease;
}

.service-item:hover {
    background: rgba(0, 0, 0, 0.8);
    /* Hover: Dark Glass (Readability) */
    transform: translateY(-5px);
    border-color: var(--accent-main);
}

.service-item h3 {
    font-size: 1.2rem;
    color: var(--accent-main);
    margin-bottom: 15px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 10px;
    display: inline-block;
}

.service-item p {
    font-size: 0.95rem;
    line-height: 1.6;
    opacity: 0.8;
}

/* CTA Section */
.service-cta-section {
    text-align: center;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8));
}


/* ----------------------------------------------------------------
   Connected Domains Visual (V5)
   - Color Coding & Connection Flow
---------------------------------------------------------------- */

:root {
    --color-asset: #00f2ff;
    /* Cyan */
    --color-ai: #9d00ff;
    /* Purple */
    --color-community: #ff7b00;
    /* Orange */
}

/* Base Connection Grid */
.service-connection-grid {
    position: relative;
    /* Ensure cards are above the connector */
}

/* The Connecting Line (PC Only) */
@media (min-width: 769px) {
    .service-connection-grid::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 10%;
        width: 80%;
        height: 2px;
        background: linear-gradient(90deg,
                var(--color-asset) 0%,
                var(--color-ai) 50%,
                var(--color-community) 100%);
        opacity: 0.3;
        z-index: 0;
        transform: translateY(-50%);
        filter: blur(2px);
    }
}

/* Domain Specific Styles - Initial Neutral State */
.glass-card.domain-asset,
.glass-card.domain-ai,
.glass-card.domain-community {
    border-color: var(--glass-border);
    transition: all 0.4s ease;
}

/* Icon Colors - Initial Neutral State (Glass Icon) */
.domain-asset .glass-icon,
.domain-ai .glass-icon,
.domain-community .glass-icon {
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.4s ease;
}

/* Hover Effects (Reveal Colors) - FORCED */
.glass-card.domain-asset:hover {
    box-shadow: 0 0 30px rgba(0, 242, 255, 0.2) !important;
    border-color: var(--color-asset) !important;
}

.glass-card.domain-ai:hover {
    box-shadow: 0 0 30px rgba(157, 0, 255, 0.2) !important;
    border-color: var(--color-ai) !important;
}

.glass-card.domain-community:hover {
    box-shadow: 0 0 30px rgba(255, 123, 0, 0.2) !important;
    border-color: var(--color-community) !important;
}

/* Icon Hover Effects - FORCED */
.glass-card.domain-asset:hover .glass-icon {
    color: var(--color-asset) !important;
    filter: drop-shadow(0 0 10px var(--color-asset));
}

.glass-card.domain-ai:hover .glass-icon {
    color: var(--color-ai) !important;
    filter: drop-shadow(0 0 10px var(--color-ai));
}

.glass-card.domain-community:hover .glass-icon {
    color: var(--color-community) !important;
    filter: drop-shadow(0 0 10px var(--color-community));
}

/* Icon Number Style (About Page) */
.icon-number {
    font-size: 3rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.1);
    stroke: 1px rgba(255, 255, 255, 0.3);
    /* Webkit text stroke support needed for visuals, or just color */
    -webkit-text-stroke: 1px rgba(255, 255, 255, 0.3);
    margin-bottom: 10px;
    font-family: var(--font-main);
    line-height: 1;
}

.glass-card:hover .icon-number {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    -webkit-text-stroke: 0px;
    transition: all 0.4s ease;
}

/* Ensure cards mask the line slightly or sit on top nicely */
.glass-card {
    z-index: 1;
    /* Above the line */
    background: rgba(10, 10, 10, 0.9);
    /* Slightly more opaque to hide line */
    backdrop-filter: blur(20px);
}

/* ----------------------------------------------------------------
   TABLE OF CONTENTS (Auto-Generated)
   - Matches "Hybrid Trust" Design
---------------------------------------------------------------- */
.byuuum-toc-container {
    background-color: #f9fbfd;
    /* Very subtle blue-grey */
    border: 1px solid #e1e8ed;
    border-left: 5px solid #66f2ff;
    /* Cyan Accent */
    padding: 25px;
    margin: 30px 0 40px 0;
    border-radius: 4px;
}

.byuuum-toc-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 15px !important;
    color: #051e40;
    /* Midnight Blue */
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
}

.byuuum-toc-title::before {
    content: "≡";
    /* Hamburger icon as symbol */
    margin-right: 10px;
    font-size: 1.5rem;
    color: #66f2ff;
}

.byuuum-toc-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.byuuum-toc-list li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.byuuum-toc-list li a {
    text-decoration: none !important;
    color: #333;
    font-size: 0.95rem;
    transition: color 0.2s;
    border-bottom: 1px solid transparent;
}

.byuuum-toc-list li a:hover {
    color: #005c99;
    border-bottom: 1px solid #005c99;
}

/* Indent H3 */
.byuuum-toc-list li.toc-level-h3 {
    margin-left: 20px;
    font-size: 0.9rem;
    color: #666;
}

.byuuum-toc-list li.toc-level-h3::before {
    content: "└";
    margin-right: 5px;
    color: #ccc;
}

/* ----------------------------------------------------------------
   RELATED POSTS (Enfold Override)
   - Layout: Card Grid
   - Style: Clean White Card with Shadow
---------------------------------------------------------------- */
.related_posts {
    padding-top: 40px;
    border-top: 1px solid #e1e8ed;
    margin-top: 50px;
}

.related_posts .related_title {
    font-size: 1.4rem;
    color: #051e40;
    margin-bottom: 20px;
    border-left: 5px solid #ff9933;
    /* Orange Accent */
    padding-left: 15px;
}

.related_entries_container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.related_posts .related_entry {
    background: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    margin: 0 !important;
    /* Reset Enfold margins */
    width: 100% !important;
}

.related_posts .related_entry:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 92, 153, 0.15);
    /* Blue glow shadow */
    border-color: #66f2ff;
}

.related_posts .related_content {
    margin: 0;
}

.related_posts .related_title_link {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    text-decoration: none !important;
    display: block;
    margin-bottom: 10px;
}

.related_posts .related_entry:hover .related_title_link {
    color: #005c99;
}

.related_posts .related_date {
    font-size: 0.8rem;
    color: #999;
}


/* ----------------------------------------------------------------
   SHORTCODE OVERRIDES (ALB Fix - Nuclear Option)
   - Ensures design consistency inside Enfold Text Blocks
---------------------------------------------------------------- */
#top .byuuum-related-shortcode-wrap .related_entries_container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

#top .byuuum-related-shortcode-wrap .related_entry {
    background-color: #ffffff !important;
    /* Force white card */
    border: 1px solid #e1e8ed !important;
    border-radius: 8px !important;
    padding: 20px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 0 !important;
}

#top .byuuum-related-shortcode-wrap .related_title {
    border-left: 5px solid #ff9933 !important;
    /* Orange Accent */
    padding-left: 15px !important;
    margin-bottom: 20px !important;
    font-size: 1.4rem !important;
    color: #051e40 !important;

}

/* ----------------------------------------------------------------
   DISABLE NATIVE RELATED POSTS
   - Hides Enfold's default legacy section (bottom of page)
   - Leaves our Custom Injection (.byuuum-related-wrapper) (above Author)
---------------------------------------------------------------- */
.related_posts,
.related_entries,
.av-related-sort-count-3,
.av-related-sort-count-4,
.av-related-sort-count-5 {
    display: none !important;
}

/* ----------------------------------------------------------------
   SIDEBAR CIRCULATION MACHINE (Custom Sidebar)
---------------------------------------------------------------- */

/* Widget Base */
.inner_sidebar .widget {
    margin-bottom: 40px !important;
    padding: 20px;
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.inner_sidebar .widgettitle {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #051e40 !important;
    margin-bottom: 20px !important;
    border-left: 4px solid #ff9933;
    padding-left: 12px;
    line-height: 1.2;
}

/* 1. Visual Article List */
.byuuum_visual_widget {
    margin-bottom: 40px !important;
    /* Force separation between widgets */
    overflow: hidden;
    /* Clear floats/content */
}

.byuuum_visual_list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.byuuum_visual_list .side_entry {
    margin-bottom: 15px !important;
    border-bottom: 1px solid #f0f4f8;
    padding-bottom: 15px;
}

.byuuum_visual_list .side_entry:last-child {
    border-bottom: none;
    margin-bottom: 0 !important;
    padding-bottom: 0;
}

.byuuum_visual_list .side_link {
    display: flex !important;
    align-items: flex-start;
    text-decoration: none !important;
    gap: 12px;
}


.byuuum_visual_list .side_image_wrap {
    width: 80px;
    height: 60px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 4px;
    background: #f0f4f8;
    /* Fallback bg */
}

.byuuum_visual_list .side_thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.byuuum_visual_list .side_thumb_placeholder {
    width: 100%;
    height: 100%;
    display: block;
    background-color: #f0f4f8;
}

.byuuum_visual_list .side_link:hover .side_thumb {
    transform: scale(1.1);
}

.byuuum_visual_list .side_content {
    flex-grow: 1;
}

.byuuum_visual_list .side_title {
    font-size: 0.9rem !important;
    line-height: 1.4 !important;
    color: #333 !important;
    margin: 0 !important;
    font-weight: 500 !important;
}


/* 2. Topic Tag Cloud */
.byuuum_tag_cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.byuuum_tag_pill {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.8rem;
    color: #051e40 !important;
    background: #f0f4f8;
    border-radius: 20px;
    /* Pill shape */
    text-decoration: none !important;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.byuuum_tag_pill .tag_hash {
    color: #999;
    margin-right: 4px;
    font-size: 0.75rem;
}

.byuuum_tag_pill:hover {
    background: #fff;
    border-color: #ff9933;
    color: #ff9933 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(255, 153, 51, 0.15);
}

/* ----------------------------------------------------------------
   CUSTOM RELATED POSTS (Cleaned & Responsive)
---------------------------------------------------------------- */

/* Base Styles (Desktop Default) */
.byuuum-related-wrapper {
    margin-top: 50px;
    padding-top: 40px;
    border-top: 1px solid #e1e8ed;
    clear: both;
    background-color: #ffffff !important;

    /* Desktop: Negative margin to cover stripes */
    margin-left: -50px;
    margin-right: -50px;
    padding: 50px;
    box-sizing: border-box;
    width: calc(100% + 100px);
    border-radius: 8px;
}

.byuuum-related-grid {
    display: grid;
    /* Side by side on desktop */
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

/* MOBILE FIX (Nuclear Full-Bleed) - Overrides Desktop */
@media only screen and (max-width: 767px) {
    .byuuum-related-wrapper {
        /* Force full screen width regardless of parent container */
        width: 100vw !important;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw !important;
        margin-right: -50vw !important;

        padding: 40px 20px !important;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .byuuum-related-grid {
        grid-template-columns: 1fr !important;
        /* Stack vertically */
        max-width: 100%;
        margin: 0 auto;
        /* Center content */
    }
}

/* Card & Typography Styles */
.related_title {
    border-left: 5px solid #ff9933 !important;
    padding-left: 15px !important;
    margin-bottom: 20px !important;
    font-size: 1.4rem !important;
    color: #051e40 !important;
}


/* ----------------------------------------------------------------
   5. AUTHOR BOX (Standard Post Bottom)
---------------------------------------------------------------- */
.custom-author-box {
    margin-top: 60px;
    padding: 30px;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    background-color: #fff;
    display: flex;
    align-items: center;
    gap: 20px;
}

.author-avatar img {
    border-radius: 50% !important;
    width: 90px !important;
    height: 90px !important;
    object-fit: cover !important;
    /* Key fix for distortion */
    border: 3px solid #f0f4f8;
}

.author-info h4 {
    margin: 0 0 5px !important;
    font-size: 1.1rem !important;
    color: #051e40 !important;
}

.author-role {
    display: block;
    font-size: 0.8rem;
    color: #ff9933;
    font-weight: 700;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.author-desc {
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
    color: #666 !important;
    margin: 0 !important;
}

/* Mobile */
@media only screen and (max-width: 767px) {
    .custom-author-box {
        flex-direction: column;
        text-align: center;
        padding: 25px 15px;
    }

    .author-avatar {
        margin-bottom: 15px;
    }
}

.related_entry {
    background-color: #ffffff !important;
    border: 1px solid #e1e8ed !important;
    border-radius: 8px !important;
    padding: 20px !important;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 0 !important;
    list-style: none !important;
    text-align: left !important;
}

.related_link {
    text-decoration: none !important;
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
}

.related_image_wrap {
    margin-bottom: 15px;
    overflow: hidden;
    border-radius: 4px;
    width: 100% !important;
}

.related_content {
    margin: 0 !important;
    width: 100% !important;
}

.related_content h6 {
    margin: 0 !important;
    font-size: 1rem !important;
    line-height: 1.4 !important;
    color: #333 !important;
    font-weight: 700 !important;

    /* Robust text wrapping */
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-wrap: break-word !important;
    word-break: break-word !important;
    hyphens: auto;
}

.related_date {
    display: block;
    margin-top: 8px;
    font-size: 0.8rem;
    color: #999 !important;
}

.related_thumb_placeholder {
    background: #fcfcfc;
    height: 150px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ddd;
    font-size: 0.8rem;
}


/* Base Styles (Safe for Mobile/All) */
.byuuum-related-wrapper {
    margin-top: 0;
    /* Changed from 50px to 0 to close stripe gap */
    padding-top: 30px;
    border-top: 1px solid #e1e8ed;
    clear: none;
    /* Changed from clear: both to prevent sidebar drop */
    background-color: #ffffff !important;
    box-sizing: border-box;
    width: 100%;
    /* Safe default */
    padding: 30px 20px;
    border-radius: 0;
}

.byuuum-related-grid {
    display: grid;
    grid-template-columns: 1fr;
    /* Stack by default */
    gap: 20px;
}

/* Desktop Expansion (Removed to prevent Sidebar Layout Breakage) */
@media only screen and (min-width: 768px) {
    .byuuum-related-wrapper {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        padding: 40px;
        border-radius: 8px;
        /* Optional radius on desktop */
    }

    .byuuum-related-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        /* Side by side on desktop */
    }
}

/* MOBILE FIX (Nuclear Full-Bleed) - Overrides Desktop */
@media only screen and (max-width: 767px) {
    .byuuum-related-wrapper {
        margin-top: 0 !important;
        /* Force full screen width regardless of parent container */
        width: 100vw !important;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw !important;
        margin-right: -50vw !important;

        padding: 40px 20px !important;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }


    .byuuum-related-grid {
        grid-template-columns: 1fr !important;
        /* Stack vertically */

        /* Add internal constraint so content doesn't hit edges too hard */
        max-width: 100%;
        margin: 0 auto;
    }
}

/* Re-apply Heading Wrap Fix (Lost in Cleanup) */
.related_title {
    border-left: 5px solid #ff9933 !important;
    padding-left: 15px !important;
    margin-bottom: 20px !important;
    font-size: 1.4rem !important;
    color: #051e40 !important;

    /* Text Wrap Fix */
    white-space: normal !important;
    word-break: break-all !important;
    overflow-wrap: break-word !important;
    line-height: 1.4 !important;
}

@import 'css/byuuum-markdown-ux.css';