/* *****************************************************
    ** aHostingCompany Brand Injection - SIX Template **
***************************************************** */

/* --- 1. GLOBAL PAGE FOUNDATION --- */
body {
    background-color: #50605f !important; /* Slate Green Base */
    font-family: "Roboto", sans-serif !important;
    font-weight: 400 !important; /* Bumping global weight for better legibility */
    color: #ffffff !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.6 !important;
}

.container, .container-fluid {
    width: 95% !important;
    max-width: 1240px !important;
    margin: 0 auto !important;
    padding-left: 5px !important;
    padding-right: 20px !important;
}

/* --- 1.1 UNIVERSAL TEXT STANDARDS --- */

/* Force all paragraph and description text to match your homepage's clean look */
p, .summary, .description, .kb-article-summary {
    color: #ffffff !important;
    font-weight: 400 !important; /* Elegant but readable */
    font-size: 15px !important;
    opacity: 1 !important;
}

/* Ensure all headers (like Dept names and Article titles) are Ochre and Bold */
h1, h2, h3, h4, .title, .kb-title {
    color: #D4AF37 !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    font-weight: 700 !important;
}

/* Specifically target Department names and bold text on Support pages */
strong, b, .dept-name {
    color: #D4AF37 !important;
    font-weight: 700 !important;
}

/* Clean up the links so they don't turn default blue */
a {
    color: #D4AF37 !important;
    text-decoration: none !important;
}

a:hover {
    color: #ffffff !important;
}

/* --- PAGE HEADER SPACING FIX --- */

/* Targets Knowledgebase (Resources) and Contact Pages specifically */
#knowledgebase, #contact {
    padding-top: 100px !important;
}

/* Force the search container in Resources to have its own internal breathing room */
.kb-search-holder {
    margin-top: 100px !important;
    margin-bottom: 40px !important;
    padding: 30px !important;
    background-color: #f8f8f8 !important; /* Softens the search area */
    border-top: 3px solid #D4AF37 !important; /* Matching Ochre Line */
}

/* Force the Contact Form to pull away from the top edge */
#main-body .contact-container {
    margin-top: 100px !important;
}

/* Fix for the White Box "hugging" the header on all interior pages */
.main-content {
    padding-top: 30px !important;
}

/* --- 1.2 TEMPLATE WRAPPER REFINEMENT --- */

/* Removes the hidden breadcrumb bar that creates the white gap at the top */
.header-lined, .breadcrumb-container {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
}

/* Surgically removes the top buffer from the main body on your custom-header pages */
#announcements #main-body, 
#knowledgebase #main-body, 
#contact #main-body {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Standardizes the Announcements ID to match your 100px spacing fix */
#announcements {
    padding-top: 100px !important;
}

/* --- 2. HEADER & BRANDING (UNIVERSAL) --- */
header, #header {
    background-color: #001228 !important;
    border: none !important;
    margin: 0px !important;
    padding: 0px !important;
    width: 100% !important;
}

#main-menu {
    background-color: #001228 !important;
    border-bottom: 6px solid #50605f !important;
}

.header-lined .container {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 95% !important;
}

ul.top-nav {
    display: flex !important;
    justify-content: flex-end !important;
    align-items: center !important;
    flex-grow: 1 !important;
    gap: 15px !important; 
    margin: 0 !important;
    padding: 10px 0 !important;
    list-style: none !important;
}

ul.top-nav li:not(.primary-action) { display: none !important; }

ul.top-nav li.primary-action a {
    color: #ffffff !important;
    background: transparent !important;
    border: none !important;
    font-weight: 400 !important;
    text-decoration: none !important;
    font-size: 0.9rem !important;
}

.pull-right.nav-users {
    float: none !important;
    display: flex !important;
    justify-content: flex-end !important;
    flex-grow: 1 !important;
}

/* --- 3. DESKTOP VIEW (Above 768px) --- */
@media (min-width: 769px) {
    #header .container, #main-menu .container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }

    .navbar-collapse.collapse {
        display: flex !important;
        visibility: visible !important;
        height: auto !important;
        border: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .navbar-nav {
        display: flex !important;
        flex-direction: row !important;
        margin: 0 !important;
    }

    .navbar-toggle { display: none !important; }

    #main-menu #ed-2642664369 .menu-level-0 > li > a,
    #main-menu #ed-2642664369 .menu-level-0 > li > a span {
        color: #ffffff !important;
        text-transform: uppercase !important;
        font-weight: 700 !important;
        font-size: clamp(9px, 0.8vw, 10px) !important;
        padding: 15px 0.6vw !important;
        white-space: nowrap !important;
        letter-spacing: 0.5px !important;
    }
}

/* --- 3.5 THE 1024 BRIDGE --- */
@media (max-width: 1050px) and (min-width: 769px) {
    header, #header, #main-menu, .navbar-main {
        border: none !important;
        min-height: auto !important;
    }
    #main-menu .container { height: 50px !important; }
}

/* --- 4. MOBILE VIEW & LOGO FIX (768px and Below) --- */
@media (max-width: 768px) {
    /* 1. RESET IMAGE GEOMETRY: The Squash-Killer */
    #header .logo img, 
    .navbar-brand img, 
    #main-menu .navbar-header img,
    img.logo-custom {
        display: block !important;
        height: 75px !important;       /* Height we want */
        width: auto !important;         /* Key for proportions */
        min-width: unset !important;    /* Reset conflicting rules */
        max-width: 220px !important; 
        aspect-ratio: auto !important;  /* Forces original file shape */
    }

/* 2. BLACK BAR CONTAINER & HAMBURGER CLEANUP */
    #main-menu .navbar-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        background-color: #000000 !important;
        min-height: 85px !important;
        width: 100% !important;
        padding: 0 15px !important;
    }

    /* Target the button AND its specific WHMCS/Bootstrap states */
    #main-menu .navbar-toggle, 
    #main-menu .navbar-toggle.collapsed,
    #main-menu .navbar-toggle:hover,
    #main-menu .navbar-toggle:focus {
        border: 0px none transparent !important;
        background: transparent !important;
        background-color: transparent !important;
        box-shadow: none !important;
        outline: none !important;
        margin-right: 0 !important; /* Ensures it stays flush to the right padding */
    }

    .navbar-collapse.collapse.in {
        background-color: #001228 !important;
    }

    /* 3. FORCE LOGIN TEXT VISIBLE */
    ul.top-nav li.primary-action a span, 
    #topNavLogin a span {
        display: inline !important;
        visibility: visible !important;
        font-size: 0.75rem !important;
        margin-left: 5px !important;
    }
}

/* --- 5. UI COMPONENTS --- */
.main-content, .panel-default {
    background: #001228 !important;
    border: none !important;
    color: #ffffff;
}

.btn-primary, .login-button {
    background-color: #1C1C1C !important;
    border: none !important;
    color: #ffffff !important;
    text-transform: uppercase;
}

#ed-2642664369 .menu-level-0 > li > a:hover { color: #ce9d42 !important; }

/* DASHBOARD TILE OVERHAUL
   Purpose: Transform generic WHMCS tiles into AHC branded elements. */

.tile {
    background-color: #001228 !important; /* Brand Dark Blue */
    border: 1px solid #D4AF37 !important; /* Ochre border */
    border-radius: 4px !important;
    transition: transform 0.2s ease-in-out !important;
}

.tile:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4) !important;
}

/* Ensure icons, stats, and titles are Ochre */
.tile .icon i, .tile .stat, .tile .title {
    color: #D4AF37 !important;
}

/* Style the "View Details" footer of the tiles */
.tile .footer {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #ffffff !important;
    text-transform: uppercase !important;
    font-size: 10px !important;
    letter-spacing: 1px !important;
}

/* Force override of default WHMCS colors (Blue, Green, Red, Gold) */
.tile.bg-color-blue, 
.tile.bg-color-green, 
.tile.bg-color-red, 
.tile.bg-color-gold,
.tile.bg-color-pink {
    background-color: #001228 !important;
}

/* --- 6. THE "HEAD.TPL" RESCUE BLOCK --- 
   These rules move the logo to the left and nav to the right
   specifically for the 'Six' template structure. */

/* Desktop Header Alignment */
@media (min-width: 768px) {
    #header .container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: nowrap !important;
    }

    /* Force Logo Left */
    #header .logo { 
        order: -1 !important; 
        margin: 0 !important; 
        flex: 0 1 auto !important;
        display: block !important;
    }

    #header .logo img {
        width: 150px !important;
        height: auto !important;
        visibility: visible !important;
    }

    /* Force Navigation Links Right */
    #header .container > div:not(.logo) {
        display: flex !important;
        justify-content: flex-end !important;
        align-items: center !important;
        flex: 1 1 auto !important;
        order: 2 !important;
    }
}

/* Mobile Header Alignment Fix */
@media (max-width: 768px) {
    #header .container {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0 10px !important;
    }

    /* Keep Cart/Login next to Logo */
    .top-nav {
        order: 2 !important;
        margin: 0 !important;
        display: flex !important;
    }
    
    .navbar-toggle {
        order: 3 !important;
        margin-left: auto !important;
    }
}

/* --- AHC MARKETING HOOK (The Full-Width Bar) --- */
.ahc-marketing-hook {
    background-color: #001228 !important;
    padding: 30px 20px !important;
    border-bottom: 2px solid #D4AF37 !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
}

.ahc-marketing-hook p {
    color: #D4AF37 !important;
    font-size: 18px !important;
    text-transform: uppercase !important;
    letter-spacing: 5px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    text-align: center !important;
}
