/* ==========================================================================
   BOWY MatchGrade Design System & Core Theme Architecture
   Copyright (c) 2026 BOWY USA LLC. All rights reserved. Confidential and Proprietary.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design System Tokens (:root)
   -------------------------------------------------------------------------- */
:root {
  --headingFontFamily: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --subheadingFontFamily: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bodyFontFamily: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  
  --navy-dark: #0f172a;
  --navy-primary: #1a365d;
  --navy-light: #2b6cb0;
  --navy-hover: #1e429f;
  --accent-blue: #2b6cb0;
  
  --text-main: #1e293b;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --border-color: #e2e8f0;
  
  --warning-bg: #f0f7ff;
  --warning-border: #cbd5e1;
  --success-bg: #ecfdf5;
  --success-green: #10b981;
  
  --baseBrandColor: #1a365d;
  --baseBrandHover: #0f172a;
  --secondaryBrandColor: #334155;
  --topBackgroundColor: #0f172a;
  
  --card-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  --card-hover-shadow: 0 20px 30px -10px rgba(15, 23, 42, 0.15), 0 10px 15px -5px rgba(15, 23, 42, 0.08);
}

/* --------------------------------------------------------------------------
   2. Base Typography & Layout Resets
   -------------------------------------------------------------------------- */
.container,
.tc-page-container,
.bowy-container {
  font-family: var(--bodyFontFamily, "Open Sans", Arial, sans-serif);
  color: var(--secondaryBrandColor, #334155);
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px 15px 60px 15px;
  line-height: 1.75;
  box-sizing: border-box;
  font-size: 16px;
  overflow-wrap: break-word;
  word-break: break-word;
}

.container *,
.tc-page-container *,
.bowy-container * {
  box-sizing: border-box;
}

.container a,
.tc-page-container a,
.bowy-container a,
.custom-gun-container a {
  color: var(--navy-light, #2b6cb0) !important;
  text-decoration: underline !important;
  font-weight: 700;
  transition: color 0.2s ease;
}

.container a:hover,
.container a:focus,
.tc-page-container a:hover,
.tc-page-container a:focus,
.bowy-container a:hover,
.bowy-container a:focus,
.custom-gun-container a:hover,
.custom-gun-container a:focus {
  color: var(--navy-dark, #0f172a) !important;
  text-decoration: none !important;
}

/* --------------------------------------------------------------------------
   3. Universal Header Banner (.title-box)
   -------------------------------------------------------------------------- */
.title-box {
  position: relative;
  overflow: visible;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy-primary) 55%, #1e3a8a 100%);
  color: #ffffff !important;
  text-align: center;
  padding: 42px 24px;
  border-radius: 12px;
  margin-bottom: 35px;
  box-shadow: 0 15px 35px rgba(15, 23, 42, 0.25);
  border-bottom: 4px solid var(--navy-light, #2b6cb0);
}

.title-top-bar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 12px;
}

.title-box h1 {
  font-family: var(--headingFontFamily, "Roboto", Arial, sans-serif);
  color: #ffffff !important;
  margin: 0 0 12px 0;
  font-size: 32px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.title-box p {
  font-family: var(--subheadingFontFamily, "Source Sans 3", Arial, sans-serif);
  color: #f1f5f9 !important;
  margin: 0;
  font-size: 17px;
  font-weight: 600;
  opacity: 0.95;
}

.meta-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-size: 14px;
  color: #ffffff !important;
}

.meta-item {
  color: #ffffff !important;
}

/* --------------------------------------------------------------------------
   4. Universal Hero Banner (.custom-hero-banner)
   -------------------------------------------------------------------------- */
.custom-hero-banner,
.faq-hero-banner {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 40px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: var(--card-shadow);
  background-size: cover;
  background-position: center;
}

.custom-hero-overlay,
.faq-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.88) 0%, rgba(26, 54, 93, 0.82) 100%);
  z-index: 1;
}

.custom-hero-content,
.faq-hero-content {
  position: relative;
  z-index: 2;
  padding: 40px 24px;
  max-width: 800px;
}

.custom-hero-title,
.faq-hero-title {
  font-family: var(--headingFontFamily, "Roboto", Arial, sans-serif);
  font-size: 36px;
  font-weight: 900;
  color: #ffffff !important;
  margin: 0 0 12px 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.custom-hero-subtitle,
.faq-hero-subtitle {
  font-family: var(--subheadingFontFamily, "Source Sans 3", Arial, sans-serif);
  font-size: 18px;
  color: #e2e8f0 !important;
  margin: 0;
  font-weight: 500;
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   5. Universal Language Dropdown Selector
   -------------------------------------------------------------------------- */
.lang-dropdown-wrapper {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 30;
  font-family: var(--bodyFontFamily, "Open Sans", Arial, sans-serif);
}

.title-top-bar .lang-dropdown-wrapper {
  position: relative;
  top: auto;
  right: auto;
}

.lang-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff !important;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  user-select: none;
  line-height: 1.2;
}

.lang-dropdown-btn:hover,
.lang-dropdown-wrapper.open .lang-dropdown-btn,
.lang-dropdown-wrapper:hover .lang-dropdown-btn {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.lang-globe-icon {
  width: 16px;
  height: 16px;
  stroke: #ffffff;
  transition: transform 0.2s ease;
}

.lang-dropdown-wrapper:hover .lang-globe-icon,
.lang-dropdown-wrapper.open .lang-globe-icon {
  transform: rotate(15deg);
}

.lang-chevron-icon {
  width: 12px;
  height: 12px;
  stroke: #ffffff;
  transition: transform 0.2s ease;
}

.lang-dropdown-wrapper:hover .lang-chevron-icon,
.lang-dropdown-wrapper.open .lang-chevron-icon {
  transform: rotate(180deg);
}

.lang-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
  min-width: 190px;
  padding: 6px 0;
  z-index: 1000;
}

@media (hover: hover) and (pointer: fine) {
  .lang-dropdown-wrapper:hover .lang-dropdown-menu {
    display: block;
    animation: bowyFadeDown 0.2s ease-out;
  }
}

.lang-dropdown-wrapper.open .lang-dropdown-menu {
  display: block;
  animation: bowyFadeDown 0.2s ease-out;
}

.lang-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: 14px;
  color: var(--navy-dark) !important;
  text-decoration: none !important;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-option:hover {
  background: var(--bg-light);
  color: var(--navy-light) !important;
  text-decoration: none !important;
}

.lang-option.active {
  background: #eef2ff;
  color: var(--navy-primary) !important;
  font-weight: 700;
}

.lang-option-check {
  font-size: 12px;
  color: var(--navy-light);
  display: none;
}

.lang-option.active .lang-option-check {
  display: inline;
}

@keyframes bowyFadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .title-box {
    padding: 30px 16px;
  }
  .title-box h1 {
    font-size: 24px;
  }
  .meta-bar {
    flex-direction: column;
    gap: 8px;
  }
  .lang-dropdown-wrapper {
    position: static;
    display: inline-block;
    margin-bottom: 16px;
  }
  .lang-dropdown-btn {
    width: auto;
  }
  .lang-dropdown-menu {
    left: 50%;
    transform: translateX(-50%);
    right: auto;
  }
}

/* --------------------------------------------------------------------------
   6. Universal Cards, Callouts & Warning Boxes
   -------------------------------------------------------------------------- */
.card-box,
.content-card,
.notice-section {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  padding: 35px 40px;
  margin-bottom: 30px;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-box:hover,
.content-card:hover,
.notice-section:hover {
  transform: translateY(-2px);
  box-shadow: var(--card-hover-shadow);
}

.warning-box {
  background-color: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-left: 5px solid var(--navy-light);
  border-radius: 8px;
  padding: 20px 24px;
  margin: 25px 0;
  font-size: 15px;
  line-height: 1.6;
}

.contact-box {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 20px 24px;
  margin-top: 25px;
}

/* --------------------------------------------------------------------------
   7. Address Protection (Layer 2 Shuffled Bi-Di DOM)
   -------------------------------------------------------------------------- */
.bowy-legal-addr {
  display: inline-flex;
  flex-direction: row;
  user-select: text;
}

/* --------------------------------------------------------------------------
   8. Header Brand Identity & Global Logo Presentation
   -------------------------------------------------------------------------- */
.site-header .custom-logo-link img.custom-logo,
.site-header .site-branding img,
.wp-block-site-logo img,
.woocommerce-coming-soon-header-logo-title img.custom-logo,
img.custom-logo {
  max-width: 220px !important;
  width: auto !important;
  height: auto !important;
  max-height: 65px !important;
  object-fit: contain !important;
  display: block;
}

@media (max-width: 768px) {
  .site-header .custom-logo-link img.custom-logo,
  .site-header .site-branding img,
  .wp-block-site-logo img,
  .woocommerce-coming-soon-header-logo-title img.custom-logo,
  img.custom-logo {
    max-width: 155px !important;
    max-height: 48px !important;
  }
}

