/*
 * ForgeMind Shared Styles
 * This file contains all shared CSS for the ForgeMind theme
 * Include this in all templates for consistent styling
 */

/* CSS VARIABLES */
:root {
    --fg-navy: #101012;
    --fg-gray: #b5b5b5;
    --fg-gray-dark: #707070;  /* ADA compliant gray for text on white */
    --fg-white: #ffffff;
    --fg-black: #000000;
    --fg-cyan: #818CF8;
    --fg-purple: #3DDBA0;
    --fg-font-heading: 'Space Grotesk', sans-serif;
    --fg-font-body: 'Inter', sans-serif;
    --fg-focus: #ffffff;  /* White focus outline for universal contrast */
}

/* MASTER RESET */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: #101012 !important;
    overflow-x: hidden !important;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
    width: 100% !important;
    min-height: 100% !important;
    background: #101012 !important;
    position: relative !important;
}

/* Force WordPress wrappers to behave */
#page, #content, .site, .ast-container, .site-content,
.ast-separate-container, .ast-plain-container, .ast-page-builder-template,
.entry-content, .site-main, main, article {
    width: 100% !important;
    max-width: 100% !important;
    min-height: auto !important;
    background: transparent !important;
    overflow-x: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
    position: relative !important;
}

#forgemind-site {
    min-height: 100vh;
    background: var(--fg-navy);
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    z-index: 1 !important;
    overflow-x: hidden !important;
    transform: none !important;
    left: 0 !important;
    right: 0 !important;
    font-family: var(--fg-font-body), -apple-system, BlinkMacSystemFont, sans-serif !important;
    color: #000;
    line-height: 1.6;
}

#forgemind-site * {
    box-sizing: border-box;
}

img, video, iframe {
    max-width: 100%;
}

/* Hide ALL Astra/WordPress elements */
#wpadminbar,
.site-header,
.site-footer,
#masthead,
#colophon,
.ast-mobile-header-wrap,
#ast-mobile-header,
.ast-mobile-popup-drawer,
.ast-mobile-header-content,
#page > *:not(#forgemind-site),
.wp-site-blocks > *:not(#forgemind-site) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    width: 0 !important;
    overflow: hidden !important;
}

/* SKIP LINK - Accessibility */
.fg-skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #818CF8;
    color: var(--fg-white);
    padding: 12px 24px;
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    border-radius: 0 0 8px 8px;
    transition: top 0.3s;
}

.fg-skip-link:focus {
    top: 0;
    outline: 3px solid var(--fg-white);
    outline-offset: 2px;
}

/* HEADER */
.fg-header {
    background: var(--fg-navy);
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #818CF8;
}

.fg-logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.fg-logo-section img {
    max-height: 100px;
    width: auto;
}

.fg-brand-name {
    display: block;
    font-family: var(--fg-font-heading);
    color: var(--fg-white);
    font-size: 24px;
    margin: 0 0 5px 0;
    font-weight: 700;
}

.fg-brand-text p {
    font-family: var(--fg-font-heading) !important;
    color: var(--fg-white) !important;
    font-size: 12px !important;
    margin: 0;
    opacity: 0.9;
    padding-left: 15px;
}

/* NAVIGATION */
.fg-nav {
    display: flex;
    justify-content: center;
    flex: 1;
    margin-left: 40px;
}

.fg-nav-links {
    display: flex;
    gap: 35px;
    border-bottom: 2px solid var(--fg-white);
    padding-bottom: 8px;
    align-items: center;
}

.fg-nav a {
    color: var(--fg-white);
    text-decoration: none;
    font-weight: 500;
    font-size: 16px;
    transition: opacity 0.3s;
    white-space: nowrap;
    padding: 10px 0;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.fg-nav a:hover {
    text-decoration: underline;
}

/* Dropdown */
.fg-nav-dropdown {
    position: relative;
}

.fg-nav-dropdown-toggle {
    color: var(--fg-white) !important;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    white-space: nowrap;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    padding: 10px 0;
    min-height: 44px;
    font-family: inherit;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    -webkit-tap-highlight-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}

.fg-nav-dropdown-toggle:hover {
    text-decoration: underline;
    background: none !important;
    background-color: transparent !important;
}

.fg-nav-dropdown-toggle:focus,
.fg-nav-dropdown-toggle:active,
.fg-nav-dropdown-toggle:focus-visible {
    outline: none !important;
    background: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border: none !important;
    color: var(--fg-white) !important;
}

.fg-nav-dropdown-toggle::after {
    content: ' ▼';
    font-size: 10px;
}

.fg-nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--fg-navy);
    border-top: none;
    border-bottom: 2px solid var(--fg-white);
    border-left: none;
    border-right: none;
    border-radius: 0;
    padding: 10px 0;
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    z-index: 1001;
    margin-top: 12px;
}

.fg-nav-dropdown:hover .fg-nav-dropdown-menu,
.fg-nav-dropdown:focus-within .fg-nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.fg-nav-dropdown-menu a {
    display: block;
    padding: 12px 20px;
    min-height: 44px;
    color: var(--fg-white);
    text-decoration: none;
    font-size: 15px;
    transition: background 0.3s;
}

.fg-nav-dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

/* HEADER RIGHT */
.fg-header-right {
    display: flex;
    gap: 20px;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

.fg-header-right a {
    color: var(--fg-white);
    text-decoration: none;
    font-size: 16px;
    transition: opacity 0.3s;
}

.fg-header-right a:hover {
    text-decoration: underline;
}

/* MOBILE MENU */
.fg-mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    min-width: 44px;
    min-height: 44px;
    z-index: 1001;
}

.fg-mobile-menu-btn:focus,
.fg-mobile-menu-btn:active,
.fg-mobile-menu-btn:focus:active {
    outline: none !important;
    box-shadow: none !important;
    background: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

.fg-mobile-menu-btn:focus-visible {
    outline: 3px solid var(--fg-white) !important;
    outline-offset: 2px !important;
}

.fg-hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--fg-white);
    position: relative;
    transition: all 0.3s;
}

.fg-hamburger::before,
.fg-hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 3px;
    background: var(--fg-white);
    transition: all 0.3s;
}

.fg-hamburger::before {
    top: -8px;
}

.fg-hamburger::after {
    top: 8px;
}

.fg-mobile-menu-btn.active .fg-hamburger {
    background: transparent;
}

.fg-mobile-menu-btn.active .fg-hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.fg-mobile-menu-btn.active .fg-hamburger::after {
    top: 0;
    transform: rotate(-45deg);
}

.fg-mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--fg-navy);
    z-index: 999;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.fg-mobile-nav.active {
    opacity: 1;
    visibility: visible;
}

.fg-mobile-nav a {
    color: var(--fg-white);
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    padding: 12px 40px;
    min-height: 44px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    width: 100%;
    text-align: center;
}

.fg-mobile-nav a:first-child {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* FOOTER */
.fg-footer {
    background: var(--fg-gray);
    padding: 30px 5% 5px;
    border-top: 3px solid #818CF8;
    border-bottom: 3px solid #818CF8;
}

.fg-footer-grid {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
    max-width: 1400px;
    margin: 0 auto;
}

.fg-footer-grid > div:first-child {
    display: flex;
    align-items: center;
    gap: 15px;
}

.fg-footer-grid > div:first-child img {
    max-height: 60px;
    width: auto;
}

/* Footer brand text - navy on gray background */
.fg-footer .fg-brand-name {
    color: var(--fg-navy) !important;
}

.fg-footer .fg-brand-text p {
    color: var(--fg-navy) !important;
}

.fg-footer h3 {
    font-family: var(--fg-font-heading);
    font-size: 16px;
    margin: 0 0 15px 0;
    font-weight: 700;
}

.fg-footer a {
    color: var(--fg-black);
    text-decoration: none;
    display: block;
    margin-bottom: 10px;
}

.fg-footer a:hover {
    text-decoration: underline;
}

.fg-footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #ccc;
    font-size: 14px;
}

.fg-footer-bottom p {
    margin: 0;
}

/* RESPONSIVE - Tablet */
@media (max-width: 1200px) {
    .fg-nav {
        display: none !important;
    }

    .fg-mobile-menu-btn {
        display: block !important;
    }

    .fg-mobile-nav {
        display: flex !important;
    }
}

@media (max-width: 1024px) {
    .fg-footer-grid {
        gap: 30px 40px;
    }
    .fg-footer-grid > div {
        flex: 0 0 auto;
    }
}

@media (max-width: 768px) {
    .fg-header {
        padding: 15px 4%;
    }

    .fg-logo-section {
        flex: 1;
        min-width: 0;
    }

    .fg-logo-section img {
        max-height: 60px;
    }

    .fg-brand-name {
        font-size: 18px;
    }

    .fg-brand-text p {
        font-size: 9px;
        padding-left: 0;
    }

    .fg-footer-grid {
        gap: 30px;
    }

    .fg-footer {
        padding: 20px 4% 15px;
    }
}

@media (max-width: 480px) {
    .fg-brand-name {
        font-size: 14px;
    }

    .fg-brand-text p {
        display: none;
    }

    .fg-mobile-nav a {
        font-size: 16px;
    }

    .fg-footer-grid {
        gap: 20px 30px;
    }
    .fg-footer-grid > div:first-child {
        flex-direction: column;
        align-items: flex-start;
    }
    .fg-footer-grid > div:first-child img {
        max-height: 50px;
    }
    .fg-footer h3 {
        font-size: 14px;
        margin-bottom: 10px;
    }
    .fg-footer a {
        font-size: 14px;
        padding: 6px 0;
        min-height: 44px;
    }
}

@media (max-width: 380px) {
    .fg-brand-name {
        font-size: 12px;
    }
    .fg-footer-grid {
        gap: 15px 20px;
    }
    .fg-footer-grid > div:first-child img {
        max-height: 40px;
    }
    .fg-footer h3 {
        font-size: 12px;
    }
    .fg-footer a {
        font-size: 12px;
        padding: 8px 0;
        min-height: 44px;
    }
}

/* COOKIE CONSENT BANNER */
.fg-cookie-banner {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    background: #101012 !important;
    border-top: 1px solid #818CF8 !important;
    padding: 16px 24px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 20px !important;
    z-index: 99999 !important;
    font-family: 'Inter', sans-serif !important;
    box-sizing: border-box !important;
}
.fg-cookie-banner p {
    color: #ffffff !important;
    font-size: 14px !important;
    margin: 0 !important;
    line-height: 1.5 !important;
    background: none !important;
    padding: 0 !important;
}
.fg-cookie-banner a {
    color: #818CF8 !important;
    text-decoration: underline !important;
}
.fg-cookie-banner button#fg-cookie-accept {
    background: #818CF8 !important;
    color: #101012 !important;
    border: none !important;
    padding: 8px 20px !important;
    border-radius: 4px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    white-space: nowrap !important;
    line-height: 1.4 !important;
    min-height: auto !important;
    width: auto !important;
    display: inline-block !important;
}
.fg-cookie-banner button#fg-cookie-accept:hover {
    background: #3DDBA0 !important;
}
@media (max-width: 600px) {
    .fg-cookie-banner {
        flex-direction: column !important;
        text-align: center !important;
        gap: 12px !important;
        padding: 14px 16px !important;
    }
}
