/* ===================================
   Trustbase Custom CSS
   稳重可靠视觉设计
   =================================== */

/* ===================================
   CSS Variables - Brand Colors
   =================================== */
:root {
  /* Primary Colors - 稳重深蓝 */
  --primary-color: #1B3A5B;
  --primary-dark: #0F2842;
  --primary-light: #2A5A8A;

  /* Accent Colors - 专业金色 */
  --accent-color: #C9A961;
  --accent-dark: #A88B4F;
  --accent-light: #DCC090;

  /* Neutral Colors */
  --text-primary: #2C3E50;
  --text-secondary: #5A6C7D;
  --text-light: #7A8A99;
  --bg-light: #F8F9FA;
  --bg-white: #FFFFFF;
  --border-color: #E1E8ED;

  /* Section Backgrounds */
  --section-dark: #1B3A5B;
  --section-light: #F8F9FA;
  --section-accent: #C9A961;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* ===================================
   Global Styles
   =================================== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif, -apple-system;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Lato', 'Helvetica Neue', Arial, sans-serif, -apple-system;
  font-weight: 400;
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
  line-height: 1.3;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
}

h3 {
  font-size: 1.75rem;
}

h4 {
  font-size: 1.5rem;
}

h5 {
  font-size: 1.25rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: var(--spacing-sm);
  color: var(--text-secondary);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

/* ===================================
   Header & Navigation
   =================================== */
.header {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.main-menu a {
  color: var(--text-primary);
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  transition: color var(--transition-fast);
}

.main-menu a:hover,
.main-menu a.active {
  color: var(--accent-color);
  text-decoration: none;
}

/* ===================================
   Hero Section Override
   =================================== */
.hero-image {
  background-color: var(--primary-color) !important;
  min-height: 500px;
}

.hero-image .hero-text h1 {
  color: var(--bg-white) !important;
  font-weight: 700;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-image .hero-text h2 {
  color: var(--accent-color) !important;
}

.hero-image .hero-text p {
  color: rgba(255, 255, 255, 0.95) !important;
}

/* ===================================
   Buttons
   =================================== */
.button {
  background-color: var(--accent-color) !important;
  border: none;
  border-radius: 4px;
  padding: 12px 28px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.5px;
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
}

.button:hover {
  background-color: var(--accent-dark) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none !important;
}

.button-white {
  background: transparent !important;
  border: 2px solid var(--bg-white) !important;
  color: var(--bg-white) !important;
}

.button-white:hover {
  background-color: var(--bg-white) !important;
  color: var(--primary-color) !important;
}

/* ===================================
   Section Styling
   =================================== */
.section {
  padding: var(--spacing-lg) 0;
}

.section-primary {
  background-color: var(--primary-color);
  color: var(--bg-white);
}

.section-primary h2,
.section-primary h3,
.section-primary h4 {
  color: var(--bg-white);
}

.section-primary p {
  color: rgba(255, 255, 255, 0.9);
}

.section-light {
  background-color: var(--section-light);
}

.section-accent {
  background-color: var(--section-accent);
  color: var(--primary-dark);
}

.section-accent h2,
.section-accent h3 {
  color: var(--primary-dark);
}

/* ===================================
   Feature Cards
   =================================== */
.feature {
  padding: var(--spacing-md);
  background: var(--bg-white);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  height: 100%;
}

.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  color: var(--accent-color);
  margin-bottom: var(--spacing-sm);
}

.feature h3 {
  color: var(--primary-color);
  margin-bottom: var(--spacing-xs);
}

.feature p {
  color: var(--text-secondary);
}

/* ===================================
   White Box / Content Box
   =================================== */
.whitebox {
  background: var(--bg-white);
  padding: var(--spacing-md);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--spacing-md);
}

.whitebox h3 {
  color: var(--primary-color);
  border-bottom: 2px solid var(--accent-color);
  padding-bottom: var(--spacing-xs);
  margin-bottom: var(--spacing-sm);
}

/* ===================================
   Strip / Banner Section
   =================================== */
.strip {
  padding: var(--spacing-lg) 0;
  background-color: var(--primary-color);
  color: var(--bg-white);
}

.strip .strip-content {
  border-left: 4px solid var(--accent-color);
  padding-left: var(--spacing-md);
}

.strip h2 {
  color: var(--bg-white);
}

/* ===================================
   Footer
   =================================== */
.footer {
  background-color: var(--primary-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer h3,
.footer h4 {
  color: var(--accent-color);
  margin-bottom: var(--spacing-sm);
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  transition: color var(--transition-fast);
}

.footer a:hover {
  color: var(--accent-color);
}

.sub-footer {
  background-color: var(--primary-dark);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: var(--spacing-sm) 0;
  color: rgba(255, 255, 255, 0.6);
}

/* ===================================
   Form Elements
   =================================== */
form input,
form textarea,
form select {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-size: 16px;
  transition: border-color var(--transition-fast);
  margin-bottom: var(--spacing-sm);
}

form input:focus,
form textarea:focus,
form select:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(201, 169, 97, 0.1);
}

form button[type="submit"] {
  background-color: var(--accent-color);
  color: var(--bg-white);
  border: none;
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-normal);
}

form button[type="submit"]:hover {
  background-color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ===================================
   Utility Classes
   =================================== */
.text-primary {
  color: var(--primary-color) !important;
}

.text-accent {
  color: var(--accent-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.bg-accent {
  background-color: var(--accent-color) !important;
}

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.pt-1 { padding-top: var(--spacing-xs); }
.pt-2 { padding-top: var(--spacing-sm); }
.pt-3 { padding-top: var(--spacing-md); }
.pt-4 { padding-top: var(--spacing-lg); }

.pb-1 { padding-bottom: var(--spacing-xs); }
.pb-2 { padding-bottom: var(--spacing-sm); }
.pb-3 { padding-bottom: var(--spacing-md); }
.pb-4 { padding-bottom: var(--spacing-lg); }

/* ===================================
   Mobile First Responsive Design
   =================================== */

/* Extra Small Devices (phones, less than 576px) - Base styles */
@media (max-width: 575.98px) {
  :root {
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .hero-image {
    min-height: 400px;
    padding-top: 40px;
  }

  .hero-image .hero-text h1 {
    font-size: 2rem;
  }

  .hero-image .hero-text h2 {
    font-size: 1.5rem;
  }

  .hero-image .hero-text p {
    font-size: 1.1rem;
    width: 100%;
  }

  .section {
    padding: var(--spacing-md) 0;
  }

  .feature {
    margin-bottom: var(--spacing-sm);
  }

  .button {
    width: 100%;
    text-align: center;
    margin-bottom: var(--spacing-xs);
  }

  .main-menu-mobile {
    background-color: var(--bg-white);
  }
}

/* Small Devices (landscape phones, 576px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
  h1 {
    font-size: 2.25rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero-image .hero-text h1 {
    font-size: 2.5rem;
  }

  .hero-image .hero-text p {
    width: 80%;
  }
}

/* Medium Devices (tablets, 768px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
  h1 {
    font-size: 2.5rem;
  }

  h2 {
    font-size: 2rem;
  }

  .hero-image {
    min-height: 500px;
  }

  .hero-image .hero-text h1 {
    font-size: 3rem;
  }

  .hero-image .hero-text p {
    width: 70%;
  }

  .section {
    padding: var(--spacing-lg) 0;
  }

  .button {
    width: auto;
  }
}

/* Large Devices (desktops, 992px and up) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  h1 {
    font-size: 2.75rem;
  }

  h2 {
    font-size: 2.25rem;
  }

  .hero-image {
    min-height: 550px;
  }

  .hero-image .hero-text h1 {
    font-size: 3.5rem;
  }

  .section {
    padding: var(--spacing-xl) 0;
  }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 2.5rem;
  }

  .hero-image {
    min-height: 600px;
  }

  .hero-image .hero-text h1 {
    font-size: 4rem;
    width: 80%;
  }

  .hero-image .hero-text h2 {
    font-size: 2.4rem;
  }

  .hero-image .hero-text p {
    font-size: 1.6rem;
    width: 60%;
  }

  .section {
    padding: var(--spacing-xl) 0;
  }
}

/* Print Styles */
@media print {
  :root {
    --primary-color: #000000;
    --accent-color: #666666;
  }

  .header,
  .main-menu,
  .main-menu-mobile,
  .footer,
  .sub-footer,
  .button,
  .hero-image {
    display: none !important;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
    color: #000000;
    background: #ffffff;
  }

  h1, h2, h3, h4, h5, h6 {
    color: #000000;
    page-break-after: avoid;
  }

  p, li {
    orphans: 3;
    widows: 3;
  }

  a {
    color: #000000;
    text-decoration: underline;
  }

  a[href]:after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
  }

  .section {
    page-break-inside: avoid;
    padding: 1rem 0;
  }

  .feature,
  .whitebox {
    box-shadow: none;
    border: 1px solid #cccccc;
    page-break-inside: avoid;
  }

  @page {
    margin: 2cm;
  }
}

/* ===================================
   Animation & Transitions
   =================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* ===================================
   Accessibility
   =================================== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}