/* StrengthGenics Main App Layout Styles */

:root {
    --sg-black: #0d0d0d;
    --sg-white: #ffffff;
    --sg-gray-bg: #f8f8f7;
    --sg-border: rgba(0, 0, 0, 0.08);
    --sg-border-dark: rgba(255, 255, 255, 0.12);
    --sg-neon: #FFC629;
    --sg-neon-hover: #e5b222;
    --sg-muted: #666666;
    --sg-font-mono: 'Roboto Mono', monospace;
    --sg-font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body.sg-page {
    margin: 0;
    padding: 0;
    font-family: var(--sg-font-sans);
    background-color: var(--sg-gray-bg);
    color: var(--sg-black);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Nav Header */
.sg-nav-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--sg-border);
    width: 100%;
}

.sg-nav-container {
    max-width: 1380px;
    margin: 0 auto;
    padding: 18px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sg-brand-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    height: 26px;
}

.sg-brand-logo img {
    height: 24px;
    width: auto;
    object-fit: contain;
}

.sg-nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.sg-nav-link {
    font-family: var(--sg-font-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--sg-black);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.sg-nav-link:hover, .sg-nav-link.active {
    opacity: 0.6;
}

/* Programs Dropdown Submenu */
.sg-nav-dropdown-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 100%;
}

.sg-nav-dropdown-trigger {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.sg-nav-dropdown-popover {
    position: absolute;
    top: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #ffffff;
    min-width: 260px;
    border-radius: 12px;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16), 0 2px 6px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(15, 23, 42, 0.08);
    padding: 8px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s ease;
}

/* Invisible bridge so cursor moving from trigger to popover never drops hover */
.sg-nav-dropdown-popover::before {
    content: '';
    position: absolute;
    top: -18px;
    left: -20px;
    right: -20px;
    height: 22px;
    background: transparent;
}

.sg-nav-dropdown-wrapper:hover .sg-nav-dropdown-popover,
.sg-nav-dropdown-wrapper.is-open .sg-nav-dropdown-popover,
.sg-nav-dropdown-wrapper:focus-within .sg-nav-dropdown-popover {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.sg-nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    text-decoration: none;
    color: #0f172a;
    transition: background-color 0.15s ease;
}

.sg-nav-dropdown-item:hover,
.sg-nav-dropdown-item.active {
    background: #f1f5f9;
}

.sg-dropdown-icon {
    font-size: 18px;
    line-height: 1;
}

.sg-dropdown-text {
    display: flex;
    flex-direction: column;
}

.sg-dropdown-title {
    font-family: var(--sg-font-display, sans-serif);
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    text-transform: none;
    letter-spacing: 0;
}

.sg-dropdown-desc {
    font-family: var(--sg-font-body, sans-serif);
    font-size: 11px;
    color: #64748b;
    text-transform: none;
    letter-spacing: 0;
    margin-top: 2px;
}

.sg-nav-checkin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--sg-neon);
    color: #000000 !important;
    font-family: var(--sg-font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0 16px;
    height: 34px;
    border-radius: 4px;
    border: 1.5px solid var(--sg-neon);
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(255, 198, 41, 0.45);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sg-nav-checkin-btn:hover {
    background-color: var(--sg-neon-hover);
    border-color: var(--sg-neon-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 198, 41, 0.6);
    opacity: 1 !important;
}

.sg-nav-checkin-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ef4444;
    margin-left: 6px;
    box-shadow: 0 0 6px #ef4444;
    animation: sgDotAlertPulse 1.4s infinite;
}

.sg-btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--sg-neon);
    color: #000000;
    font-family: var(--sg-font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0 20px;
    height: 38px;
    border-radius: 4px;
    text-decoration: none;
    border: 1.5px solid var(--sg-neon);
    cursor: pointer;
    white-space: nowrap;
    box-sizing: border-box;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(255, 198, 41, 0.4);
    transition: all 0.2s ease;
}

.sg-btn-cta:hover {
    background-color: var(--sg-neon-hover);
    border-color: var(--sg-neon-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(255, 198, 41, 0.5);
}

.sg-btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.04);
    color: #000000;
    font-family: var(--sg-font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0 18px;
    height: 38px;
    border-radius: 4px;
    border: 1.5px solid rgba(0, 0, 0, 0.4);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    box-sizing: border-box;
    line-height: 1;
    transition: all 0.2s ease;
}
.sg-btn-outline:hover {
    background: rgba(0, 0, 0, 0.08);
    border-color: #000000;
}

.sg-btn-black {
    background-color: #000000;
    color: #ffffff;
}
.sg-btn-black:hover {
    background-color: #222222;
    color: #ffffff;
}

/* Subpage Hero */
.sg-subpage-hero {
    background: #000000;
    color: #ffffff;
    padding: 80px 24px 70px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.sg-subpage-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 30%, rgba(255, 198, 41, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.sg-subpage-kicker {
    font-family: var(--sg-font-mono);
    font-size: 12px;
    letter-spacing: 0.15em;
    color: var(--sg-neon);
    text-transform: uppercase;
    margin-bottom: 14px;
    display: inline-block;
}

.sg-subpage-title {
    font-size: clamp(36px, 5vw, 64px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin: 0 0 16px;
    text-transform: uppercase;
}

.sg-subpage-subtitle {
    font-size: clamp(16px, 2vw, 19px);
    color: rgba(255, 255, 255, 0.7);
    max-width: 680px;
    margin: 0 auto;
    line-height: 1.5;
}

/* Container & Cards */
.sg-main-content {
    flex: 1;
}

.sg-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 24px;
}

/* Footer */
.sg-page-footer {
    background-color: #000000;
    color: #ffffff;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 48px 24px 36px;
    margin-top: auto;
}

.sg-footer-inner {
    max-width: 1380px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.sg-footer-brand {
    font-family: var(--sg-font-mono);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: #ffffff;
}

.sg-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.sg-footer-links a {
    font-family: var(--sg-font-mono);
    font-size: 12px;
    letter-spacing: 0.05em;
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.2s ease;
}

.sg-footer-links a:hover {
    color: var(--sg-neon);
}

.sg-footer-copy {
    font-family: var(--sg-font-mono);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.35);
    width: 100%;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Flash Message */
.sg-alert {
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 28px;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sg-alert-success {
    background: #e8fbe6;
    color: #0b5e00;
    border: 1px solid #b5eeb2;
}

.sg-alert-error {
    background: #fde8e8;
    color: #9b1c1c;
    border: 1px solid #f8b4b4;
}

/* Mobile Hamburger */
.sg-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.sg-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #000;
    margin: 4px 0;
    transition: 0.2s;
}

@media (max-width: 860px) {
    .sg-nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #ffffff;
        flex-direction: column;
        padding: 24px;
        gap: 20px;
        border-bottom: 1px solid var(--sg-border);
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }
    .sg-nav-dropdown-wrapper {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }
    .sg-nav-dropdown-popover {
        position: static;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 4px 0 0 12px;
        display: flex;
        flex-direction: column;
        width: 100%;
        margin-top: 6px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .sg-nav-dropdown-popover::before {
        display: none;
    }
    .sg-nav-menu.open {
        display: flex;
    }
    .sg-nav-menu .sg-nav-checkin-btn {
        width: 100%;
        height: 42px;
        font-size: 12px;
    }
    .sg-nav-toggle {
        display: block;
    }
}

