/*
Theme Name: Globonex Executive Brand Theme
Theme URI: https://globonex.com
Author: Globonex DevOps & Engineering
Author URI: https://globonex.com
Description: Executive glassmorphism WordPress theme built from scratch to mirror the WHMCS Executive Billing Automation portal. Features 6 built-in color schemes, expanded Customizer controls, responsive navigation, and block editor support.
Version: 1.0.0
Tested up to: 6.7
Requires at least: 5.9
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: globonex-billing-theme
Tags: executive, glassmorphism, responsive, customizer, hosting, billing-portal, custom-colors, block-styles
*/

/* Reset & Foundational Rules */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif);
  background-color: var(--body-bg, #f4f7fb);
  color: var(--text-main, #0f172a);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: var(--primary-color, #0564d2);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover, a:focus {
  color: var(--primary-hover, #034ca3);
}

/* Container Engine */
.site-container {
  width: 100%;
  max-width: var(--container-max-width, 1300px);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Executive Card / Surface */
.glass-card,
.site-card,
article.post,
article.page {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--bg-card-border, #e2e8f0);
  border-radius: var(--radius-card, 12px);
  box-shadow: var(--shadow-card, 0 4px 12px rgba(0, 0, 0, 0.08));
  padding: 2.25rem;
  margin-bottom: 2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Button Component Hierarchy */
.btn, button, input[type="submit"], input[type="button"], .wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  line-height: 1.2;
}

.btn-primary, input[type="submit"], .wp-block-button__link {
  background: var(--btn-primary-bg, #0564d2) !important;
  color: var(--btn-primary-text, #ffffff) !important;
  box-shadow: 0 4px 12px rgba(5, 100, 210, 0.25);
}

.btn-primary:hover, input[type="submit"]:hover, .wp-block-button__link:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(5, 100, 210, 0.35);
}

.btn-secondary {
  background: transparent;
  color: var(--text-main, #0f172a);
  border: 1px solid var(--btn-secondary-border, #e2e8f0);
}

.btn-secondary:hover {
  background: rgba(0, 0, 0, 0.04);
  border-color: var(--primary-color, #0564d2);
  color: var(--primary-color, #0564d2);
}

/* Header & Top Bar */
.whmcs-header {
  background: var(--header-bg, #1e3e62);
  color: var(--header-text, #ffffff);
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.whmcs-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.whmcs-brand a,
.whmcs-brand-link {
  color: #ffffff;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.whmcs-brand a:hover,
.whmcs-brand-link:hover {
  color: #ffffff;
  opacity: 0.95;
}

.whmcs-brand-logo {
  max-height: 42px;
  width: auto;
  object-fit: contain;
  border-radius: 4px;
}

.whmcs-brand-fallback-icon {
  font-size: 1.5rem;
  line-height: 1;
}

.site-brand-title {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: #ffffff;
}

/* Navigation Bar */
.whmcs-nav-bar {
  background: var(--nav-bg, #1e3e62);
  border-bottom: 3px solid var(--nav-border-bottom, #0564d2);
  position: sticky;
  top: 0;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.whmcs-nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.whmcs-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.whmcs-menu li {
  position: relative;
}

.whmcs-menu a {
  display: block;
  padding: 0.9rem 1.15rem;
  color: var(--nav-text, #e2e8f0);
  font-weight: 600;
  font-size: 0.92rem;
  border-radius: 4px 4px 0 0;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.whmcs-menu a:hover,
.whmcs-menu li.current-menu-item > a,
.whmcs-menu li.current_page_item > a {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Dropdown Sub-menus */
.whmcs-menu ul.sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--header-bg, #1e3e62);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: 3px solid var(--primary-color, #0564d2);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.4);
  list-style: none;
  margin: 0;
  padding: 0.5rem 0;
  display: none;
  z-index: 10000;
}

.whmcs-menu li:hover > ul.sub-menu {
  display: block;
}

.whmcs-menu ul.sub-menu a {
  padding: 0.65rem 1.25rem;
  font-size: 0.88rem;
  color: #cbd5e1;
  border-radius: 0;
}

.whmcs-menu ul.sub-menu a:hover {
  background: var(--primary-color, #0564d2);
  color: #ffffff;
  padding-left: 1.5rem;
}

/* Mobile Toggle */
.whmcs-mobile-toggle {
  display: none;
  background: var(--primary-color, #0564d2);
  color: #ffffff;
  border: none;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Footer Hierarchy */
.site-footer {
  background: var(--footer-bg, #0f172a);
  color: var(--footer-text, #94a3b8);
  padding: 3.5rem 0 2rem 0;
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-footer h1, .site-footer h2, .site-footer h3, .site-footer h4, .site-footer h5, .site-footer h6 {
  color: var(--footer-heading, #ffffff) !important;
  margin-bottom: 1rem;
  font-size: 1.15rem;
}

.footer-widgets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-bottom: 2.5rem;
}

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

/* Responsive Breakpoints */
@media (max-width: 860px) {
  .whmcs-mobile-toggle {
    display: inline-block;
  }
  .whmcs-menu {
    display: none;
    flex-direction: column;
    width: 100%;
    padding: 0.5rem 0;
  }
  .whmcs-menu.active {
    display: flex;
  }
  .whmcs-menu li {
    width: 100%;
  }
  .whmcs-menu a {
    width: 100%;
  }
  .whmcs-menu ul.sub-menu {
    position: static;
    box-shadow: none;
    background: rgba(0, 0, 0, 0.2);
    border: none;
    border-left: 3px solid var(--primary-color, #0564d2);
  }
}

/* Page Area Title Banner & Breadcrumbs */
.page-title-banner {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-left: 4px solid var(--primary-color) !important;
  border-radius: var(--radius-card, 12px);
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-title, .entry-title {
  color: var(--headings-color);
  line-height: 1.25;
  letter-spacing: -0.015em;
}

.page-breadcrumbs {
  font-size: 0.84rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
}

.page-breadcrumbs a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-breadcrumbs a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.page-breadcrumbs .breadcrumb-separator {
  color: var(--text-muted);
  opacity: 0.6;
}

.page-breadcrumbs .breadcrumb-current {
  color: var(--primary-color);
  font-weight: 600;
}

