/*
 * Custom stylesheet for TradeBoTicks website
 *
 * This design aims to present the company's philosophy and system
 * with modern UI patterns, clear hierarchy and a cohesive colour palette.
 * Colours are inspired by the TradeBoTicks logo.
 */

/* Colour variables for easy theming */
:root {
  /* Updated palette for a lighter, more modern feel */
  --primary: #0083a5;      /* teal for primary actions (slightly brighter) */
  --secondary: #1b365d;    /* deep blue for headings/navigation */
  --accent: #f29c3b;       /* warm accent for highlights */
  /* Use a true white base and a slightly lighter navy for contrast */
  --light-bg: #ffffff;     /* plain white background for a crisp editorial feel */
  --dark-bg: #12294b;      /* softened navy for contrast sections */
  --text-dark: #1b365d;
  --text-light: #ffffff;
}


/* Layout primitives */
* { box-sizing: border-box; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}


/* Base styles */
body {
  margin: 0;
  /* Use a clean sans-serif stack inspired by editorial sites */
  font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  line-height: 1.6;
  font-size: 17px;
  color: var(--text-dark);
  background-color: var(--light-bg);
}

/* Header navigation */
header {
  position: sticky;
  top: 0;
  width: 100%;
  /* Use a white header for a cleaner appearance */
  background-color: #ffffff;
  color: var(--text-dark);
  z-index: 1000;
  padding: 12px 0;
  /* subtle bottom border instead of heavy shadow */
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

header .nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

header .logo img {
  height: 40px;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 18px; flex-wrap: wrap;
}

nav a {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--primary);
}

/* Active navigation link styling */
nav a.active {
  color: var(--accent);
}

/* Main layout offset for sticky header */
main {
  padding-top: 0;
}

/* Hero section with background image and overlay */
.hero {
  position: relative;
  background-size: cover;
  background-position: center;
  color: var(--text-light);
  padding: 120px 20px 100px;
  text-align: center;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Lighter overlay to allow more of the image to show and soften contrast */
  background: rgba(18, 41, 75, 0.45);
}

.hero .hero-content {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 24px;
}

.hero p {
  font-size: 1.3rem;
  margin-bottom: 36px;
}

/* Generic CTA button styling */
.cta-buttons a {
  display: inline-block;
  margin: 6px 10px;
  padding: 12px 28px;
  border-radius: 8px;
  color: var(--text-light);
  background-color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease, transform 0.2s ease;
}

.cta-buttons a:hover {
  background-color: var(--accent);
  transform: translateY(-2px);
}

/* Cards section for home page */
.section-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin: 40px auto;
  padding: 0 20px;
  max-width: 1200px;
}

.card {
  background-color: #ffffff;
  border-radius: 12px;
  /* Softer card shadow for an understated effect */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  flex: 1 1 calc(33.333% - 20px);
  max-width: 350px;
  min-width: 260px;
  display: flex;
  flex-direction: column;
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-content {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.card-content h3 {
  color: var(--secondary);
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.card-content p {
  flex-grow: 1;
  font-size: 0.95rem;
  margin-bottom: 15px;
}

.card-content a {
  align-self: flex-start;
  padding: 10px 22px;
  background-color: var(--primary);
  color: var(--text-light);
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: background 0.3s ease, transform 0.2s ease;
}

.card-content a:hover {
  background-color: var(--accent);
  transform: translateY(-2px);
}

/* Generic section styles */
.section {
  padding: 72px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.section h2 {
  text-align: left;
  color: var(--secondary);
  margin-bottom: 30px;
  font-size: 1.8rem;
}

.section p {
  max-width: 800px;
  margin: 0 0 20px;
}

.section ul {
  list-style: disc;
  padding-left: 24px;
  max-width: 800px;
  margin: 0;
}

.section li {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

/* Dark section variant */
.section.dark {
  /* Use a dark gradient for contrast sections */
  /* Lighten the dark section gradient for a gentler transition */
  background: linear-gradient(180deg, rgba(18, 41, 75, 0.85), rgba(18, 41, 75, 0.7));
  color: var(--text-light);
}

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

/* Diagram container used on knowledge pages */
.diagram-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 30px 0 50px;
}

.diagram-container svg {
  max-width: 100%;
  height: auto;
}

/* Ensure images inside diagram containers scale responsively */
.diagram-container img {
  max-width: 100%;
  height: auto;
}

/* Page hero for internal pages */
.page-hero {
  position: relative;
  background-size: cover;
  background-position: center;
  color: var(--text-light);
  padding: 100px 20px;
  text-align: center;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  /* Slightly lighter overlay for internal page hero */
  background: rgba(18, 41, 75, 0.4);
}

.page-hero h1 {
  position: relative;
  font-size: 2.5rem;
  margin: 0;
  z-index: 1;
}

/* Content wrapper for internal pages */
.content-wrapper {
  max-width: 900px;
  margin: 48px auto;
  padding: 0 20px;
}

.content-wrapper h2 {
  color: var(--secondary);
  margin-top: 40px;
  margin-bottom: 20px;
  font-size: 1.6rem;
}

.content-wrapper h3 {
  color: var(--secondary);
  margin-top: 30px;
  margin-bottom: 10px;
  font-size: 1.4rem;
}

.content-wrapper ul {
  list-style: disc;
  padding-left: 40px;
  margin-bottom: 20px;
}

.content-wrapper li {
  margin-bottom: 8px;
  font-size: 0.95rem;
}

/* FAQ styling */
.faq-item {
  margin-bottom: 30px;
}

.faq-item h3 {
  color: var(--secondary);
  margin-bottom: 10px;
  font-size: 1.3rem;
}

.faq-item p {
  font-size: 0.95rem;
}

/* Glossary styling */
.term {
  margin-bottom: 25px;
}

.term h3 {
  color: var(--secondary);
  margin-bottom: 5px;
  font-size: 1.3rem;
}

.term p {
  font-size: 0.95rem;
  margin: 0;
}

/* Footer styles */
.site-footer {
  background-color: var(--dark-bg);
  color: var(--text-light);
  padding: 36px 0;
  font-size: 0.95rem;
}

.site-footer a {
  color: var(--text-light);
  text-decoration: none;
  opacity: 0.9;
}

.site-footer a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  align-items: start;
}

.site-footer p {
  margin: 8px 0;
}

.site-footer .footer-bottom {
  margin-top: 18px;
  opacity: 0.9;
}

@media (max-width: 768px) {
  /* Stack cards on small screens */
  .card {
    flex: 1 1 100%;
    max-width: none;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .page-hero h1 {
    font-size: 2rem;
  }
}



/* Header enhancements for consistency */
.site-header {
  position: sticky;
  top: 0;
  background-color: #ffffff;
  z-index: 1000;
  padding: 12px 0;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-header .brand img {
  height: 40px;
  display: block;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 18px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--secondary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.site-nav a:hover {
  color: var(--primary);
}

.site-nav a.active {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  border: 1px solid rgba(27, 54, 93, 0.25);
  background: #ffffff;
  color: var(--secondary);
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 600;
}

@media (max-width: 860px) {
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #ffffff; box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
  .site-header.nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 8px 0; }
  .site-nav a { display: block; padding: 12px 20px; }
}

main { padding-bottom: 40px; }
