/**
 * MAINTEX Global Styles
 * Ported from Next.js globals.css + inline styles
 */

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

body {
  font-family: var(--wp--preset--font-family--geist);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--wp--preset--color--text-dark);
  background: #ffffff;
  line-height: 1.6;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--wp--preset--color--brand-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--wp--preset--color--brand-primary);
}

/* ========================================
   Layout Utilities
   ======================================== */
.maintex-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
  width: 100%;
}

@media (max-width: 1024px) {
  .maintex-container {
    padding: 0 24px;
  }
}

@media (max-width: 640px) {
  .maintex-container {
    padding: 0 16px;
  }
}

/* ========================================
   Header — Fixed Nav
   ======================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.site-header__inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  height: 70px;
  display: flex;
  align-items: center;
  gap: 24px;
}

@media (min-width: 1024px) {
  .site-header__inner {
    padding: 0 40px;
  }
}

.site-header__logo img {
  height: 40px;
  width: auto;
}

/* Desktop Nav */
.site-header__nav {
  display: none;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 1024px) {
  .site-header__nav {
    display: flex;
  }
}

.site-header__nav-item {
  position: relative;
}

.site-header__nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: 13px;
  color: #4b5563;
  transition: all 0.2s;
  text-decoration: none;
}

.site-header__nav-link:hover,
.site-header__nav-link--active {
  color: #0A0A8A;
}

.site-header__nav-link--active {
  font-weight: 500;
}

.site-header__nav-link .chevron {
  width: 12px;
  height: 12px;
  opacity: 0.5;
}

/* CTA Buttons */
.site-header__cta {
  display: none;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

@media (min-width: 1024px) {
  .site-header__cta {
    display: flex;
  }
}

.btn-login {
  padding: 8px 16px;
  font-size: 13px;
  color: #4b5563;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: transparent;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-login:hover {
  border-color: #0A0A8A;
  color: #0A0A8A;
}

.btn-demo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
  background: #0A0A8A;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.2s;
}

.btn-demo:hover {
  background: rgba(10, 10, 138, 0.9);
  color: #ffffff;
}

/* ========================================
   Mega Menu
   ======================================== */
.mega-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  padding-top: 12px;
  z-index: 100;
  display: none;
}

.site-header__nav-item:hover .mega-menu,
.mega-menu--active {
  display: block;
}

/* Invisible bridge to prevent mouseout */
.mega-menu__bridge {
  position: absolute;
  top: -4px;
  left: 0;
  right: 0;
  height: 16px;
}

.mega-menu__panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  min-width: 720px;
}

.mega-menu__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.mega-menu__column-title {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f3f4f6;
}

.mega-menu__item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 12px;
  margin: 0 -12px;
  border-radius: 8px;
  text-decoration: none;
  color: #4b5563;
  transition: all 0.15s;
}

.mega-menu__item:hover {
  background: #f9fafb;
  color: #0A0A8A;
}

.mega-menu__item-icon {
  width: 32px;
  height: 32px;
  background: #f3f4f6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.mega-menu__item:hover .mega-menu__item-icon {
  background: rgba(10, 10, 138, 0.1);
}

.mega-menu__item-icon svg {
  width: 16px;
  height: 16px;
  color: #0A0A8A;
}

.mega-menu__item-label {
  font-weight: 500;
  color: #1f2937;
  transition: color 0.15s;
}

.mega-menu__item:hover .mega-menu__item-label {
  color: #0A0A8A;
}

.mega-menu__item-desc {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
}

.mega-menu__footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mega-menu__footer-text {
  font-size: 12px;
  color: #9ca3af;
}

.mega-menu__footer-link {
  font-size: 12px;
  font-weight: 500;
  color: #0A0A8A;
  text-decoration: none;
}

.mega-menu__footer-link:hover {
  opacity: 0.7;
}

/* ========================================
   Mobile Menu
   ======================================== */
.mobile-menu-toggle {
  display: block;
  padding: 8px;
  color: #4b5563;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
}

@media (min-width: 1024px) {
  .mobile-menu-toggle {
    display: none;
  }
}

.mobile-menu {
  display: none;
  background: #ffffff;
  border-top: 1px solid #f3f4f6;
  padding: 24px;
}

.mobile-menu--open {
  display: block;
}

@media (min-width: 1024px) {
  .mobile-menu {
    display: none !important;
  }
}

.mobile-menu__link {
  display: block;
  padding: 8px 0;
  color: #4b5563;
  text-decoration: none;
}

.mobile-menu__link--active {
  color: #0A0A8A;
  font-weight: 500;
}

.mobile-menu__sub {
  padding-left: 16px;
  margin-top: 8px;
}

.mobile-menu__sub-title {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 0;
}

.mobile-menu__sub-link {
  display: block;
  padding: 4px 0;
  font-size: 14px;
  color: #6b7280;
  text-decoration: none;
}

.mobile-menu__sub-link:hover {
  color: #0A0A8A;
}

.mobile-menu__cta {
  display: block;
  width: 100%;
  padding: 12px;
  text-align: center;
  background: #0A0A8A;
  color: #ffffff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  margin-top: 16px;
}

.mobile-menu__cta:hover {
  background: rgba(10, 10, 138, 0.9);
  color: #ffffff;
}

/* ========================================
   Footer
   ======================================== */
.site-footer {
  background: #f9fafb;
  padding: 64px 0;
  border-top: 1px solid #e5e7eb;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.site-footer__brand-desc {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.6;
  margin-bottom: 24px;
}

.site-footer__bbc-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
}

.site-footer__bbc-box img {
  height: 40px;
  width: auto;
}

.site-footer__bbc-label {
  font-size: 12px;
  font-weight: 500;
  color: #374151;
}

.site-footer__bbc-year {
  font-size: 12px;
  color: #6b7280;
}

.site-footer__column-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #9ca3af;
  font-weight: 600;
  margin-bottom: 20px;
}

.site-footer__links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer__links li + li {
  margin-top: 12px;
}

.site-footer__links a {
  font-size: 14px;
  color: #6b7280;
  text-decoration: none;
  transition: color 0.2s;
}

.site-footer__links a:hover {
  color: #0A0A8A;
}

.site-footer__bottom {
  border-top: 1px solid #e5e7eb;
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.site-footer__copyright {
  font-size: 12px;
  color: #9ca3af;
}

.site-footer__rgpd {
  display: flex;
  align-items: center;
  gap: 8px;
}

.site-footer__rgpd-dot {
  width: 6px;
  height: 6px;
  background: #22c55e;
  border-radius: 50%;
}

.site-footer__rgpd-text {
  font-size: 11px;
  color: #9ca3af;
}

.site-footer__bottom-links {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-footer__bottom-links a {
  font-size: 12px;
  color: #9ca3af;
  text-decoration: none;
}

.site-footer__bottom-links a:hover {
  color: #0A0A8A;
}

/* ========================================
   Buttons — Global
   ======================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 500;
  color: #ffffff;
  background: #0A0A8A;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 4px 6px -1px rgba(10, 10, 138, 0.2);
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.btn-primary:hover {
  background: #0909a0;
  color: #ffffff;
}

.btn-primary--white {
  color: #0A0A8A;
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.btn-primary--white:hover {
  background: rgba(255, 255, 255, 0.9);
  color: #0A0A8A;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  font-size: 16px;
  font-weight: 500;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  text-decoration: none;
  background: #ffffff;
  transition: all 0.2s;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: #0A0A8A;
  color: #0A0A8A;
}

.btn-secondary--white {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.3);
  background: transparent;
}

.btn-secondary--white:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* ========================================
   Section Labels
   ======================================== */
.section-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #0A0A8A;
  font-weight: 600;
  margin-bottom: 16px;
}

/* ========================================
   Badge / Pill
   ======================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 9999px;
  background: #f0f4ff;
  border: 1px solid #e0e7ff;
  color: #0A0A8A;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge--dark {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.9);
}

.badge--small {
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge--red {
  background: #fef2f2;
  border-color: #fee2e2;
  color: #dc2626;
}

.badge--brand {
  background: rgba(10, 10, 138, 0.1);
  border-color: rgba(10, 10, 138, 0.2);
  color: #0A0A8A;
}

/* ========================================
   Background Patterns
   ======================================== */
.bg-dot-pattern-light {
  position: relative;
}

.bg-dot-pattern-light::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, #e2e8f0 1px, transparent 0);
  background-size: 40px 40px;
  opacity: 0.5;
  pointer-events: none;
}

.bg-dot-pattern-dark {
  position: relative;
}

.bg-dot-pattern-dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 2px 2px, rgba(255,255,255,0.15) 1px, transparent 0);
  background-size: 48px 48px;
  opacity: 1;
  pointer-events: none;
}

.bg-dot-pattern-dark--small::before {
  background-size: 32px 32px;
}

/* Decorative blur circles */
.blur-circle {
  position: absolute;
  border-radius: 50%;
  filter: blur(64px);
  pointer-events: none;
}

.blur-circle--cyan {
  background: rgba(34, 211, 238, 0.1);
}

.blur-circle--blue {
  background: rgba(96, 165, 250, 0.1);
}

/* ========================================
   Stars Rating
   ======================================== */
.stars {
  display: flex;
  gap: 4px;
}

.stars svg {
  width: 16px;
  height: 16px;
  fill: #facc15;
}

/* ========================================
   Responsive Helpers
   ======================================== */
.hide-mobile {
  display: none;
}

@media (min-width: 1024px) {
  .hide-mobile {
    display: block;
  }
}

.hide-desktop {
  display: block;
}

@media (min-width: 1024px) {
  .hide-desktop {
    display: none;
  }
}

/* ========================================
   WordPress Admin Bar offset
   ======================================== */
.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

/* Body padding for fixed header */
body {
  padding-top: 70px;
}

.admin-bar body {
  padding-top: 102px;
}
