/*
Theme Name: MBIC Child Theme
Theme URI: https://mbic.us
Description: Custom child theme matching mbic.us branding - dark theme with green accents, megamenu navigation
Author: MBIC
Author URI: https://mbic.us
Template: twentytwentyfour
Version: 1.0.0
Text Domain: mbic-child
*/

/* Import parent theme styles if needed */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ===== MBIC CUSTOM STYLES ===== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #000;
    color: #fff;
    overflow-x: hidden;
    cursor: auto;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        45deg,
        rgba(0, 0, 0, 0.95) 0%,
        rgba(0, 0, 0, 0.98) 100%
    );
    z-index: 0;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at 50% 50%,
        rgba(0, 255, 136, 0.1) 0%,
        rgba(0, 102, 255, 0.1) 50%,
        transparent 100%
    );
    animation: gradientShift 15s ease infinite;
    z-index: 0;
}

@keyframes gradientShift {
    0% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.8; }
    100% { transform: scale(1); opacity: 0.5; }
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 40px;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
    display: flex;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    margin-right: 40px;
    text-decoration: none;
}

.logo img {
    height: 70px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo:hover img {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 40px;
    list-style: none;
    justify-content: center;
    flex: 1;
}

.nav-links > li {
    position: relative;
}

.nav-action {
    margin-left: 40px;
}

.nav-action .hero-btn-primary {
    padding: 12px 28px;
    font-size: 1rem;
    border-radius: 999px;
    box-shadow: none;
}

@media (max-width: 1100px) {
    .nav-action { margin-left: 10px; }
}

@media (max-width: 768px) {
    .nav-links { gap: 16px; }
    .nav-action { display: none; }
}

.nav-links > li > a {
    color: #e8eaf0;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 5px 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-links > li > a:hover {
    color: #00ff88;
}

.nav-dropdown-arrow {
    width: 10px;
    height: 10px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.nav-links > li:hover .nav-dropdown-arrow {
    transform: rotate(225deg);
}

/* Mega Menu */
.mega-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    width: 1280px;
    max-width: 95vw;
    background: rgba(10, 15, 25, 0.98);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: 16px;
    padding: 32px;
    margin-top: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.nav-links > li.has-mega-menu:hover .mega-menu {
    opacity: 1;
    visibility: visible;
}

.mega-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(224px, 1fr));
    gap: 24px;
}

@media (min-width: 1280px) {
    .mega-menu-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

.mega-menu-section {
    padding: 16px;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.mega-menu-section:hover {
    background: rgba(0, 255, 136, 0.05);
}

.mega-menu-section h3 {
    font-size: 0.88rem;
    font-weight: 700;
    color: #00ff88;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mega-menu-icon {
    width: 19px;
    height: 19px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mega-menu-section p {
    font-size: 0.72rem;
    color: #d1d5db;
    line-height: 1.5;
    margin-bottom: 12px;
}

.mega-menu-links {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.mega-menu-link-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    border-radius: 6px;
    transition: background 0.3s ease;
    text-decoration: none !important;
    color: inherit !important;
}

.mega-menu-link-item:visited,
.mega-menu-link-item:link,
.mega-menu-link-item:active {
    color: inherit !important;
    text-decoration: none !important;
}

.mega-menu-link-item:hover {
    background: rgba(0, 255, 136, 0.03);
}

.mega-menu-link-title {
    color: #f0f2f5 !important;
    text-decoration: none !important;
    font-size: 0.76rem;
    font-weight: 600;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mega-menu-link-item:hover .mega-menu-link-title {
    color: #00ff88 !important;
}

.mega-menu-link-arrow {
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    color: #00ff88;
}

.mega-menu-link-item:hover .mega-menu-link-arrow {
    opacity: 1;
    transform: translateX(3px);
}

.mega-menu-link-desc {
    color: #9ca3af;
    font-size: 0.64rem;
    line-height: 1.4;
}

@media (max-width: 1120px) {
    .mega-menu {
        width: 95vw;
    }
    .mega-menu-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 960px) {
    .mega-menu-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .mega-menu {
        display: none;
    }
    .mega-menu-grid {
        grid-template-columns: 1fr;
    }
}

.mega-menu a {
    color: inherit !important;
    text-decoration: none !important;
}

.mega-menu a:hover,
.mega-menu a:visited,
.mega-menu a:link,
.mega-menu a:active {
    text-decoration: none !important;
}

.mega-menu-link-item-icon {
    font-size: 0.88rem;
    margin-right: 2px;
}

/* Main Content */
.content {
    position: relative;
    z-index: 10;
    padding-top: 100px;
}

/* WordPress-specific blog styles */
.site-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px 40px;
    position: relative;
    z-index: 10;
}

article {
    background: rgba(20, 24, 36, 0.7);
    border: 1px solid rgba(0, 255, 136, 0.1);
    border-radius: 16px;
    padding: 40px;
    margin-bottom: 40px;
    transition: all 0.3s ease;
}

article:hover {
    border-color: #00ff88;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.1);
}

.entry-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #fff;
}

.entry-title a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.entry-title a:hover {
    color: #00ff88;
}

.entry-meta {
    color: #b2ffe0;
    font-size: 0.9rem;
    margin-bottom: 20px;
    opacity: 0.8;
}

.entry-content {
    color: #e8eaf0;
    line-height: 1.8;
    font-size: 1.1rem;
}

.entry-content h2,
.entry-content h3 {
    color: #00ff88;
    margin-top: 30px;
    margin-bottom: 15px;
}

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

.entry-content a {
    color: #00ff88;
    text-decoration: none;
    transition: all 0.3s ease;
}

.entry-content a:hover {
    color: #fff;
    text-decoration: underline;
}

.entry-content ul,
.entry-content ol {
    margin: 20px 0 20px 40px;
    color: #e8eaf0;
}

.entry-content code {
    background: rgba(0, 255, 136, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #00ff88;
}

.entry-content pre {
    background: rgba(10, 15, 25, 0.9);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    border: 1px solid rgba(0, 255, 136, 0.2);
}

.entry-content pre code {
    background: none;
    padding: 0;
}

/* Navigation buttons */
.post-navigation {
    margin: 40px 0;
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-previous a,
.nav-next a {
    background: linear-gradient(90deg, #7f6fff 0%, #a66cff 100%);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.nav-previous a:hover,
.nav-next a:hover {
    background: linear-gradient(90deg, #a66cff 0%, #7f6fff 100%);
    transform: translateY(-2px);
}

/* Footer */
footer {
    background: rgba(10, 15, 25, 0.95);
    border-top: 1px solid rgba(0, 255, 136, 0.1);
    padding: 60px 40px 30px;
    position: relative;
    z-index: 10;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    grid-column: span 1;
}

.footer-logo {
    font-size: 2rem;
    font-weight: 800;
    color: #00ff88;
    margin-bottom: 15px;
}

.footer-description {
    color: #b2ffe0;
    opacity: 0.8;
    line-height: 1.6;
}

.footer-section h4 {
    color: #00ff88;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    color: #e8eaf0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #00ff88;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-wrap: wrap;
    gap: 20px;
}

.footer-copyright {
    color: #b2ffe0;
    opacity: 0.7;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    color: #b2ffe0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-legal a:hover {
    color: #00ff88;
}

/* Hero button styles (for CTAs) */
.hero-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(90deg, #7f6fff 0%, #a66cff 100%);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    border-radius: 12px;
    padding: 18px 36px;
    cursor: pointer;
    box-shadow: 0 4px 24px 0 rgba(127,111,255,0.12);
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
}

.hero-btn-primary:hover {
    background: linear-gradient(90deg, #a66cff 0%, #7f6fff 100%);
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 32px 0 rgba(127,111,255,0.18);
}

.hero-btn-primary svg {
    width: 20px;
    height: 20px;
}

/* WordPress admin bar spacing fix */
body.admin-bar nav {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar nav {
        top: 46px;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .site-main {
        padding: 60px 20px 20px;
    }
    
    article {
        padding: 20px;
    }
    
    .entry-title {
        font-size: 1.8rem;
    }
    
    .entry-content {
        font-size: 1rem;
    }
    
    footer {
        padding: 40px 20px 20px;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* =============================================================================
   MBIC Child Theme — additions to mirror main mbic.us site
   Mobile menu toggle, smooth scrolling, and minor blog entry tweaks.
   ============================================================================= */

html { scroll-behavior: smooth; }

/* Mobile menu toggle button (matches main site behavior) */
.nav-mobile-toggle {
    display: none;
    background: transparent;
    border: 0;
    width: 40px;
    height: 40px;
    padding: 8px;
    cursor: pointer;
    margin-left: auto;
}
.nav-mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    margin: 5px auto;
    background: #e8eaf0;
    transition: all .3s ease;
}
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-mobile-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
    .nav-mobile-toggle { display: block; }
    .nav-container { flex-wrap: wrap; }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        gap: 0 !important;
        padding-top: 16px;
        order: 3;
    }
    .nav-links.is-open { display: flex; }
    .nav-links > li { width: 100%; }
    .nav-links > li > a { display: block; padding: 12px 0; }
    .has-mega-menu .mega-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        background: rgba(0,0,0,0.4);
        margin: 8px 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height .3s ease;
        min-width: 0;
    }
    .has-mega-menu.is-open .mega-menu { max-height: 5000px; }
    .nav-action { margin-left: 0; order: 2; }
}

/* Active nav link highlight — Blog item is "current" while on blog */
.nav-links .nav-link-active,
.nav-links a.nav-link-active {
    color: #00ff88 !important;
}

/* Blog post listing — match main site card aesthetic */
.site-main article.post,
.site-main article.page,
.site-main article.no-results {
    background: rgba(20, 24, 36, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 40px 36px;
    margin-bottom: 36px;
    transition: border-color .3s ease, transform .3s ease;
}
.site-main article.post:hover,
.site-main article.page:hover {
    border-color: rgba(0, 255, 136, 0.25);
    transform: translateY(-2px);
}

/* Featured image polish */
.entry-thumbnail {
    margin: 0 0 24px;
    border-radius: 12px;
    overflow: hidden;
}
.entry-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .4s ease;
}
.entry-thumbnail:hover img { transform: scale(1.02); }

/* Pagination links — match site button feel */
.pagination,
.nav-links.posts-navigation,
.navigation.pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 60px 0 30px;
}
.pagination a,
.pagination .current,
.navigation.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    border-radius: 8px;
    background: rgba(20, 24, 36, 0.7);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e8eaf0;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all .2s ease;
}
.pagination a:hover,
.navigation.pagination .page-numbers:hover {
    background: rgba(0, 255, 136, 0.1);
    border-color: rgba(0, 255, 136, 0.3);
    color: #00ff88;
}
.pagination .current,
.navigation.pagination .page-numbers.current {
    background: linear-gradient(90deg, #7f6fff, #a66cff);
    color: #fff;
    border-color: transparent;
}

/* Comments section — keep dark, readable */
.comments-area,
#comments {
    background: rgba(20, 24, 36, 0.6);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 32px;
    margin-top: 40px;
}
.comments-area h2,
.comments-area h3,
#comments h2,
#comments h3 {
    color: #00ff88;
    margin-bottom: 16px;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 12px 14px;
    color: #fff;
    margin-bottom: 12px;
    font-family: inherit;
}
.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #00ff88;
}
.comment-form .submit,
.comment-form input[type="submit"] {
    background: linear-gradient(90deg, #7f6fff, #a66cff);
    color: #fff;
    border: 0;
    padding: 12px 28px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}
.comment-form input[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(127,111,255,0.3);
}

/* Search form */
.search-form {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}
.search-form input[type="search"] {
    flex: 1;
    background: rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 12px 14px;
    color: #fff;
}
.search-form input[type="submit"] {
    background: linear-gradient(90deg, #7f6fff, #a66cff);
    color: #fff;
    border: 0;
    padding: 12px 22px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
}

/* WP admin bar (when logged in) on dark theme — keep it visible */
body.admin-bar nav { top: 32px; }
@media (max-width: 782px) {
    body.admin-bar nav { top: 46px; }
}

/* =============================================================================
   DEFENSIVE NAV STYLES — high specificity overrides to defeat WordPress and
   parent-theme CSS that may try to fight our nav layout.
   ============================================================================= */
nav .nav-container,
body nav .nav-container {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    width: 100% !important;
}
nav .nav-links,
body nav ul.nav-links {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 40px !important;
    list-style: none !important;
    justify-content: center !important;
    flex: 1 1 auto !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 !important;
}
nav .nav-links > li {
    list-style: none !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;  /* The fix that stops "Meet the Team" from wrapping */
}
nav .nav-links > li > a {
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
}
nav .logo {
    display: flex !important;
    align-items: center !important;
    margin-right: 40px !important;
    flex: 0 0 auto !important;
}
nav .logo img {
    height: 70px !important;
    width: auto !important;
    max-width: none !important;
}
nav .nav-action {
    flex: 0 0 auto !important;
    margin-left: 40px !important;
    white-space: nowrap !important;
}
nav .nav-action .hero-btn-primary {
    white-space: nowrap !important;
}

/* Remove WordPress's default <ul> bullet styles that may bleed in */
nav ul, nav ul li { list-style: none !important; }
nav li::before, nav li::marker { content: none !important; }

/* WordPress wraps content sometimes — make sure our wrap isn't being squeezed by a max-width */
body > .content,
body > nav { max-width: 100% !important; }

/* At the responsive breakpoints we DO want wrapping (mobile menu) */
@media (max-width: 1100px) {
    nav .nav-links { gap: 24px !important; }
}
@media (max-width: 900px) {
    nav .nav-container { flex-wrap: wrap !important; }
    nav .nav-links {
        flex-wrap: nowrap !important;
        flex-direction: column !important;
        gap: 0 !important;
        order: 3 !important;
    }
}
@media (max-width: 768px) {
    nav .nav-links { gap: 16px !important; }
}

/* =============================================================================
   Blog page header H1 (added for SEO + Bing compliance)
   ============================================================================= */
.site-main .page-header {
    margin-bottom: 32px;
    text-align: center;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-main .page-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    margin: 0 0 8px;
    background: linear-gradient(45deg, #fff, #00ff88);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}
.site-main .page-subtitle {
    color: #b8c0cc;
    font-size: 1.05rem;
    margin: 0;
}
