/* 
   Financial Assessment Website Stylesheet
   Based on design inspiration from research/design_inspiration.md
*/

/* ===== GLOBAL STYLES ===== */
:root {
  /* Color scheme based on Corporate Blues palette */
  --primary-color: #1A365D;     /* Deep navy blue */
  --secondary-color: #4A90E2;   /* Sky blue */
  --accent-color: #FFC107;      /* Gold */
  --background-color: #F7F9FC;  /* Off-white */
  --text-color: #333333;        /* Dark gray */
  --light-text: #FFFFFF;        /* White */
  --error-color: #E53935;       /* Red for errors */
  --success-color: #43A047;     /* Green for success */
  --border-color: #E0E0E0;      /* Light gray for borders */
  --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --hover-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Merriweather', serif;
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Montserrat', sans-serif;
  margin-bottom: 1rem;
  color: var(--primary-color);
  line-height: 1.2;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

h4 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

p {
  margin-bottom: 1rem;
  line-height: 1.8;
}

a {
  color: var(--secondary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

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

ul, ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.5rem;
}

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

.section {
  padding: 70px 0;
}

.text-center {
  text-align: center;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 4px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  font-size: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--hover-shadow);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--light-text);
}

.btn-primary:hover {
  background-color: #142b4c;
  color: var(--light-text);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--light-text);
}

.btn-secondary:hover {
  background-color: #3a7bc8;
  color: var(--light-text);
}

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

.btn-accent:hover {
  background-color: #e0a800;
}

.btn-outline {
  background-color: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background-color: var(--primary-color);
  color: var(--light-text);
}

.btn-large {
  padding: 14px 28px;
  font-size: 1.1rem;
}

/* ===== HEADER & NAVIGATION ===== */
header {
  background-color: var(--light-text);
  box-shadow: var(--box-shadow);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  transition: all 0.3s ease;
}

header.scrolled {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.05);
}

.logo span {
  color: var(--accent-color);
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 30px;
  margin-bottom: 0;
}

.nav-links a {
  color: var(--primary-color);
  font-weight: 600;
  font-family: 'Montserrat', sans-serif;
  position: relative;
  padding: 5px 0;
}

.nav-links a:after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: var(--accent-color);
  transition: width 0.3s ease;
}

.nav-links a:hover:after {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.hamburger div {
  width: 25px;
  height: 3px;
  background-color: var(--primary-color);
  margin: 5px;
  transition: all 0.3s ease;
}

/* ===== HERO SECTION ===== */
.hero {
  padding: 120px 0 60px;
  background-color: var(--primary-color);
  color: var(--light-text);
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hero-text {
  flex: 1;
  padding-right: 40px;
}

.hero-text h1 {
  color: var(--light-text);
  margin-bottom: 20px;
  font-size: 3rem;
  line-height: 1.2;
}

.hero-text p {
  margin-bottom: 30px;
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
}

.hero-image {
  flex: 1;
  text-align: right;
}

.hero-image img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  transition: transform 0.5s ease;
}

.hero-image img:hover {
  transform: scale(1.02);
}

.cta-buttons {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

/* ===== ABOUT SECTION ===== */
.about {
  background-color: var(--light-text);
}

.about-content {
  display: flex;
  align-items: center;
  gap: 40px;
}

.about-image {
  flex: 1;
}

.about-image img {
  max-width: 100%;
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  transition: transform 0.5s ease;
}

.about-image img:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

.about-text {
  flex: 1;
}

/* ===== QUIZ SECTIONS ===== */
.quiz-intro {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 40px;
}

.quiz-container {
  background-color: var(--light-text);
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  padding: 30px;
  max-width: 800px;
  margin: 0 auto;
}

.quiz-progress {
  margin-bottom: 20px;
}

.progress-bar {
  height: 8px;
  background-color: var(--border-color);
  border-radius: 4px;
  overflow: hidden;
  margin-top: 10px;
}

.progress-fill {
  height: 100%;
  background-color: var(--secondary-color);
  transition: width 0.5s ease;
}

.question {
  margin-bottom: 30px;
}

.question h3 {
  margin-bottom: 15px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.option {
  padding: 15px;
  border: 2px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.option:hover {
  border-color: var(--secondary-color);
  background-color: rgba(74, 144, 226, 0.05);
  transform: translateY(-2px);
}

.option.selected {
  border-color: var(--secondary-color);
  background-color: rgba(74, 144, 226, 0.1);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.quiz-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

/* ===== RESULTS SECTION ===== */
.results-container {
  background-color: var(--light-text);
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  padding: 30px;
  max-width: 800px;
  margin: 0 auto;
}

.results-header {
  text-align: center;
  margin-bottom: 30px;
}

.results-summary {
  margin-bottom: 30px;
}

.personality-chart, .health-chart {
  margin: 30px 0;
  height: 300px;
}

.recommendations {
  margin-top: 40px;
}

.recommendation-item {
  background-color: rgba(74, 144, 226, 0.1);
  border-left: 4px solid var(--secondary-color);
  padding: 20px;
  margin-bottom: 15px;
  border-radius: 0 4px 4px 0;
  transition: transform 0.3s ease;
}

.recommendation-item:hover {
  transform: translateX(5px);
}

.recommendation-item h4 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

/* Timeline for action plan */
.timeline {
  margin-top: 30px;
}

.timeline-item {
  position: relative;
  padding-left: 30px;
  margin-bottom: 30px;
  border-left: 2px solid var(--secondary-color);
  padding-bottom: 20px;
}

.timeline-item h4 {
  margin-bottom: 10px;
  color: var(--secondary-color);
}

.timeline-item:last-child {
  border-left: 2px solid transparent;
}

.timeline-item::before {
  content: '';
  position: absolute;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  left: -8.5px;
  top: 5px;
}

/* ===== RESOURCES SECTION ===== */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.resource-card {
  background-color: var(--light-text);
  border-radius: 8px;
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.resource-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

.resource-image {
  height: 200px;
  overflow: hidden;
}

.resource-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.resource-card:hover .resource-image img {
  transform: scale(1.05);
}

.resource-content {
  padding: 20px;
}

.resource-content h3 {
  margin-bottom: 10px;
}

/* ===== CONTACT SECTION ===== */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  font-family: 'Merriweather', serif;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* ===== FOOTER ===== */
footer {
  background-color: var(--primary-color);
  color: var(--light-text);
  padding: 60px 0 30px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-column h4 {
  color: var(--light-text);
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.footer-links {
  list-style: none;
  padding-left: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
}

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

.footer-bottom {
  text-align: center;
  padding-top: 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
}

.social-links a {
  color: var(--light-text);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.social-links a:hover {
  color: var(--accent-color);
  transform: translateY(-3px);
}

/* ===== GLOSSARY STYLES ===== */
.glossary-term {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  transition: transform 0.3s ease;
}

.glossary-term:hover {
  transform: translateX(5px);
}

.glossary-term h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

/* ===== FAQ STYLES ===== */
.faq-item {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
}

.faq-item h3 {
  margin-bottom: 10px;
  color: var(--primary-color);
  cursor: pointer;
  transition: color 0.3s ease;
}

.faq-item h3:hover {
  color: var(--secondary-color);
}

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

.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 992px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }
  
  .hero-text {
    padding-right: 0;
    margin-bottom: 40px;
  }
  
  .cta-buttons {
    justify-content: center;
  }
  
  .about-content {
    flex-direction: column;
  }
  
  .about-image {
    margin-bottom: 30px;
  }
  
  h1 {
    font-size: 2.2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    right: 0;
    height: 100vh;
    top: 0;
    background-color: var(--light-text);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 70%;
    transform: translateX(100%);
    transition: transform 0.5s ease-in;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 1001;
  }
  
  .nav-links li {
    opacity: 0;
    margin: 20px 0;
  }
  
  .hamburger {
    display: block;
    z-index: 1002;
  }
  
  .nav-active {
    transform: translateX(0%);
  }
  
  .section {
    padding: 50px 0;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .quiz-navigation {
    flex-direction: column;
    gap: 15px;
  }
  
  .quiz-navigation .btn {
    width: 100%;
  }
  
  .timeline-item {
    padding-left: 20px;
  }
}

@media (max-width: 576px) {
  .cta-buttons {
    flex-direction: column;
    gap: 15px;
  }
  
  .cta-buttons .btn {
    width: 100%;
  }
  
  .section {
    padding: 40px 0;
  }
  
  .quiz-container, .results-container {
    padding: 20px;
  }
  
  .option {
    padding: 12px;
  }
  
  h1 {
    font-size: 1.8rem;
  }
  
  h2 {
    font-size: 1.5rem;
  }
  
  h3 {
    font-size: 1.3rem;
  }
}

/* Animation for nav links */
@keyframes navLinkFade {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Accessibility improvements */
.btn:focus, .form-control:focus, a:focus {
  outline: 3px solid rgba(74, 144, 226, 0.5);
  outline-offset: 2px;
}

/* Dark mode styles */
@media (prefers-color-scheme: dark) {
  :root {
    --background-color: #121212;
    --text-color: #E0E0E0;
    --border-color: #333333;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
  }
  
  .about, .quiz-container, .results-container, .resource-card {
    background-color: #1E1E1E;
  }
  
  header {
    background-color: #1A1A1A;
  }
  
  .option {
    border-color: #444444;
  }
  
  .form-control {
    background-color: #2A2A2A;
    border-color: #444444;
    color: var(--text-color);
  }
  
  .recommendation-item {
    background-color: rgba(74, 144, 226, 0.05);
  }
}

/* Additional enhancements */
.section-divider {
  height: 4px;
  width: 60px;
  background-color: var(--accent-color);
  margin: 0 auto 30px;
}

.highlight-text {
  color: var(--secondary-color);
  font-weight: 600;
}

.testimonial-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--hover-shadow);
}

/* Loading states */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(74, 144, 226, 0.3);
  border-radius: 50%;
  border-top-color: var(--secondary-color);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Tooltip styles */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: var(--primary-color);
  color: var(--light-text);
  text-align: center;
  border-radius: 4px;
  padding: 5px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  margin-left: -100px;
  opacity: 0;
  transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Improved focus styles for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--secondary-color);
  outline-offset: 2px;
}