/* --- GLOBAL DEFAULTS --- */
html, body { margin: 0; padding: 0; width: 100%; overflow-x: hidden; font-family: Arial, sans-serif; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; position: relative; }

/* --- HEADER STYLING --- */
header {
    text-align: center;
    padding: 40px 0;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)),
                url("images/P7042352_NCC1701D_1920x1200_PbGtag.jpg") no-repeat center center;
    background-size: cover;
    border-bottom: #7baa24 3px solid;
}
#site-logo { max-width: 90%; width: 800px; height: auto; display: block; margin: 0 auto 20px auto; }

/* H1 & TITLES */
.site-slogan { display: flex; flex-direction: column; align-items: center; width: 100%; }
h1.custom-format {
    color: #ffffff !important;
    text-transform: uppercase;
    font-size: 2rem;
    max-width: 750px !important;
    margin: 10px auto !important;
    text-align: center;
    line-height: 1.15;
}
h1.custom-format .h1-line { display: block; text-align: center; }
h1.custom-format .ampersand {
    display: block;
    text-align: center;
    line-height: 1;
    margin: 6px 0;
}
.ipp-subtitle { color: #ffd700; font-weight: bold; text-align: center; margin-top: 5px; }

/* --- NAV LINKS --- */
.banner-service-links ul, .main-nav ul, #mobile-nav ul {
    display: flex; justify-content: center; list-style: none; padding: 0; margin: 0;
}
.banner-service-links a, .main-nav a, #mobile-nav a {
    color: #ffffff !important;
    text-decoration: none !important;
    padding: 0 15px;
    font-weight: bold;
    transition: color 0.3s ease;
}
.banner-service-links a:hover, .main-nav a:hover, #mobile-nav a:hover {
    color: #7baa24 !important;
}
.pipe { color: #7baa24; font-weight: bold; margin: 0 5px; }
.menu-separator { color: #ffffff; padding: 0 5px; font-style: italic; }

/* Service Level Links: ONE line only */
.banner-service-links ul { flex-wrap: nowrap; white-space: nowrap; }
.banner-service-links li { flex: 0 0 auto; }
.banner-service-links a { white-space: nowrap; }
@media (max-width: 420px) {
    .banner-service-links a { padding: 0 8px; }
    .pipe { margin: 0 3px; }
}

/* Main Nav Bar */
.main-nav { background: #56063a; padding: 15px 0; border-bottom: #7baa24 2px solid; }

/* --- MOBILE MENU TOGGLE (Centered, below service links) --- */
.menu-toggle {
    display: none;
    cursor: pointer;
    margin: 15px auto 0 auto;
    width: 40px;
}
.bar {
    display: block;
    width: 100%;
    height: 4px;
    background-color: #ffffff;
    margin: 6px 0;
    border-radius: 2px;
}

/* Animated Hamburger -> X */
.menu-toggle .bar {
    transition: transform 0.25s ease, opacity 0.2s ease;
    transform-origin: center;
}
.menu-toggle.open .bar:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.menu-toggle.open .bar:nth-child(2) { opacity: 0; }
.menu-toggle.open .bar:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* Mobile Dropdown Styling */
#mobile-nav {
    display: none;
    background: #000000;
    position: relative;
    width: 100%;
    z-index: 9999;
    border-top: 2px solid #7baa24;
}
#mobile-nav.active { display: block !important; }
#mobile-nav ul { display: block; padding: 20px 0; text-align: center; }
#mobile-nav li { margin-bottom: 15px; border-bottom: 1px solid #333; padding-bottom: 10px; }

/* --- LAYOUT --- */
.content-area {
    display: flex;
    max-width: 1200px;
    margin: 40px auto;
    gap: 30px;
    align-items: flex-start; /* IMPORTANT: do NOT let sidebar image define row height */
}

/* Prevent flex children from expanding unexpectedly */
.sidebar, .main-content { min-height: 0; }

/* --- SIDEBAR (DESKTOP OVERFLOW FIX) --- */
.sidebar {
    width: 220px;
    flex-shrink: 0;
}

/* allow badge to extend beyond image */
.sidebar-media {
    position: relative;
    overflow: visible;
    min-height: 0;
}

/*
  CRITICAL FIX:
  - wrapper height starts at 0 so the image cannot force the flex row taller on desktop
  - JS sets wrapper height = main content height after layout
*/
.sidebar-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 0;          /* <-- prevents desktop image from defining layout height */
    min-height: 0;
}
.sidebar-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Badge extends 5px left/right/above (desktop + landscape) */
.cyber-card {
    background: #000000;
    border: 2px solid #00d4ff;
    border-top: 4px solid #00d4ff;
    padding: 15px 5px;
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    z-index: 10;
    text-align: center;
}
.cyber-header { color: #fff; font-weight: bold; display: block; }
.managed-nix { color: #7baa24; font-weight: bold; display: block; }
.unmanaged-win { color: #ffd700; font-weight: bold; display: block; }
.cyber-dmca { color: #ff0000; font-weight: bold; display: block; }
.cyber-est { color: #fff; border-top: 1px solid #333; margin-top: 5px; padding-top: 5px; display: block; }

/* MAIN CONTENT */
.main-content {
    flex: 1;
    background: #ffffff;
    padding: 40px;
    position: relative;
    z-index: 0;
}
.main-content > * { position: relative; z-index: 1; }

.welcome-subtitle { text-align: center; color: #7baa24; margin: 0 0 20px 0; }
.welcome-text { text-align: left; }

/* FEATURES: side-by-side + left-aligned subtitles by default */
.features-grid {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    margin-top: 30px;
}
.feature-column { flex: 1; min-width: 0; }
.feature-subtitle { color: #7baa24; text-align: left; margin: 0 0 10px 0; }
.feature-column ul { margin: 0; padding-left: 18px; }
.feature-column li { margin-bottom: 10px; line-height: 1.25; }

/* Call to action centered (and everything below) */
.call-to-action { text-align: center; margin-top: 25px; }

/* SOCIAL + BELOW: centered */
.tech-logos, .social-links, .tagline, .copyright-box {
    text-align: center;
    width: 100%;
}
.stack-logos {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 14px; /* space between logos and social links */
}
.social-links {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 15px;
}
.tagline { margin-top: 18px; }
.copyright-box { margin-top: 10px; }

/* --- MOBILE MENU VISIBILITY RULES --- */
@media (max-width: 991px) {
    .main-nav { display: none !important; }
    .menu-toggle { display: block !important; }
}

/* MOBILE PORTRAIT:
   - badge ABOVE welcome subtitle (centered)
   - sidebar image becomes background behind main content at 10% opacity */
@media (max-width: 991px) and (orientation: portrait) {
    .content-area { flex-direction: column; align-items: center; margin: 0; width: 100%; }
    .sidebar { width: 100%; order: -1; margin-bottom: 10px; }

    .sidebar-image-wrapper { display: none !important; }

    .cyber-card {
        position: relative;
        top: 0;
        left: 0;
        right: 0;
        width: 90%;
        max-width: 320px;
        margin: 0 auto 15px auto;
    }

    .main-content { padding: 25px 18px; }
    .main-content::before {
        content: "";
        position: absolute;
        inset: 0;
        background: url("images/U-HGlobalClimb5.jpg") no-repeat center center;
        background-size: cover;
        opacity: 0.10;
        z-index: 0;
        pointer-events: none;
    }

    .features-grid { flex-direction: column; }
}

/* MOBILE LANDSCAPE: keep features side-by-side */
@media (max-width: 991px) and (orientation: landscape) {
    .content-area { flex-direction: row; align-items: flex-start; margin: 20px auto; padding: 0 10px; width: 100%; }
    .sidebar { width: 200px; }
    .main-content { padding: 25px 20px; }

    .features-grid { flex-direction: row; }
}
