/* 
  InvestWise Tanzania - Main Stylesheet
  Created: June 20, 2025
*/

/* Base Styles and Variables */
:root {
  --primary: #3A86FF;
  --secondary: #8338EC;
  --tertiary: #FF006E;
  --bg-light: #F8F9FA;
  --bg-dark: #1E2A3A;
  --text-primary: #2B2D42;
  --text-secondary: #8D99AE;
  --success: #06D6A0;
  --warning: #FFBE0B;
  --error: #EF476F;
  --transition: all 0.3s ease;
  --shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.15);
  --border-radius: 8px;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 8rem;
}

/* Typography */
body {
  font-family: 'Open Sans', sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-light);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--spacing-sm);
  color: var(--text-primary);
}

h1 {
  font-size: 2.25rem;
}

h2 {
  font-size: 1.875rem;
}

h3 {
  font-size: 1.5rem;
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.125rem;
}

h6 {
  font-size: 1rem;
}

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

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

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

/* Button Styles */
.btn {
  display: inline-block;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: var(--border-radius);
  transition: var(--transition);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  transition: var(--transition);
  z-index: -1;
}

.btn:hover::before {
  left: 0;
}

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

.btn-primary:hover {
  background-color: #2a75eb;
  color: white;
}

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

.btn-secondary:hover {
  background-color: #7328d9;
  color: white;
}

.btn-tertiary {
  background-color: var(--tertiary);
  color: white;
}

.btn-tertiary:hover {
  background-color: #e6005d;
  color: white;
}

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

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

/* Layout & Grid Enhancements */
.container {
  width: 100%;
  padding-right: 15px;
  padding-left: 15px;
  margin-right: auto;
  margin-left: auto;
}

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

.section-title {
  text-align: center;
  margin-bottom: var(--spacing-md);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--primary);
  border-radius: 3px;
}

/* Card Styles */
.card {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
  transition: var(--transition);
  overflow: hidden;
  margin-bottom: var(--spacing-md);
}

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

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

.card-body {
  padding: var(--spacing-sm);
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xs);
}

/* Header & Navigation */
.site-header {
  background-color: white;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

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

.navbar-brand {
  display: flex;
  align-items: center;
}

.navbar-brand img {
  height: 40px;
}

.navbar-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
}

.navbar-nav {
  display: flex;
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  margin-left: var(--spacing-md);
}

.nav-link {
  color: var(--text-primary);
  font-weight: 600;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* Hero Section */
.hero {
  position: relative;
  height: 80vh;
  min-height: 500px;
  display: flex;
  align-items: center;
  color: white;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(30, 42, 58, 0.8) 0%, rgba(30, 42, 58, 0.6) 100%);
  z-index: -1;
}

.hero-content {
  max-width: 700px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  text-align: center;
}

.hero-title {
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
  font-weight: 700;
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: var(--spacing-md);
  font-weight: 300;
}

/* Features Section */
.features {
  background-color: white;
}

.feature-item {
  text-align: center;
  padding: var(--spacing-md);
  transition: var(--transition);
}

.feature-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: var(--spacing-sm);
}

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

/* Checklist Section */
.checklist-section {
  background-color: var(--bg-light);
}

.checklist-item {
  background: white;
  border-radius: var(--border-radius);
  padding: var(--spacing-md);
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow);
  transition: var(--transition);
  display: flex;
  align-items: flex-start;
}

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

.checklist-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-right: var(--spacing-sm);
  line-height: 1;
}

.checklist-content {
  flex: 1;
}

.checklist-title {
  margin-bottom: var(--spacing-xs);
}

/* CTA Section */
.cta-section {
  background-color: var(--bg-dark);
  color: white;
  text-align: center;
  padding: var(--spacing-xl) 0;
}

.cta-title {
  color: white;
  margin-bottom: var(--spacing-sm);
  font-size: 2.5rem;
}

.cta-text {
  max-width: 700px;
  margin: 0 auto var(--spacing-md);
}

/* Form Styles */
.form-section {
  background-color: white;
  padding: var(--spacing-lg) 0;
}

.form-container {
  max-width: 600px;
  margin: 0 auto;
  padding: var(--spacing-md);
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

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

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--text-primary);
  background-color: white;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.form-control:focus {
  color: var(--text-primary);
  background-color: white;
  border-color: var(--primary);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(58, 134, 255, 0.25);
}

textarea.form-control {
  height: auto;
  min-height: 100px;
}

.form-btn {
  width: 100%;
}

/* About Page */
.about-section {
  padding: var(--spacing-lg) 0;
}

.about-img {
  width: 100%;
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-md);
}

.mission-values {
  background-color: var(--bg-light);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  margin-top: var(--spacing-md);
}

.value-item {
  margin-bottom: var(--spacing-sm);
  padding-left: var(--spacing-sm);
  border-left: 3px solid var(--primary);
}

/* Case Studies Page */
.case-study {
  margin-bottom: var(--spacing-lg);
  border-bottom: 1px solid #eee;
  padding-bottom: var(--spacing-md);
}

.case-study:last-child {
  border-bottom: none;
}

.case-study-img {
  width: 100%;
  border-radius: var(--border-radius);
  margin-bottom: var(--spacing-sm);
}

.case-study-content {
  padding: var(--spacing-sm) 0;
}

.testimonial {
  background-color: var(--bg-light);
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  margin-top: var(--spacing-sm);
  position: relative;
}

.testimonial::before {
  content: '\201C';
  font-family: Georgia, serif;
  font-size: 4rem;
  position: absolute;
  left: 10px;
  top: -20px;
  color: var(--primary);
  opacity: 0.3;
}

/* Contact Page */
.contact-section {
  padding: var(--spacing-lg) 0;
}

.contact-info {
  margin-bottom: var(--spacing-md);
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.contact-icon {
  width: 40px;
  height: 40px;
  background-color: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: var(--spacing-sm);
}

.map-container {
  height: 400px;
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-top: var(--spacing-md);
}

/* Footer */
.footer {
  background-color: var(--bg-dark);
  color: white;
  padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-logo {
  max-width: 180px;
  margin-bottom: var(--spacing-sm);
}

.footer-links h5 {
  color: white;
  margin-bottom: var(--spacing-sm);
  position: relative;
  padding-bottom: 10px;
}

.footer-links h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: var(--primary);
}

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

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

.footer-links a {
  color: #bdc3c7;
  transition: var(--transition);
}

.footer-links a:hover {
  color: white;
}

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

.footer-bottom p {
  margin-bottom: 0;
}

/* Cookie Consent */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: white;
  padding: var(--spacing-md);
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  display: none;
}

.cookie-consent.show {
  display: block;
}

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

.cookie-buttons {
  display: flex;
  gap: var(--spacing-xs);
}

.cookie-settings {
  display: none;
  margin-top: var(--spacing-sm);
}

.cookie-settings.show {
  display: block;
}

.cookie-category {
  margin-bottom: var(--spacing-xs);
  padding: var(--spacing-xs);
  border: 1px solid #eee;
  border-radius: var(--border-radius);
}

.cookie-category-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.cookie-category-header h5 {
  margin: 0;
}

.cookie-category-content {
  margin-top: var(--spacing-xs);
  display: none;
}

.cookie-category-content.show {
  display: block;
}

.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

.cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: var(--transition);
  border-radius: 34px;
}

.cookie-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: var(--transition);
  border-radius: 50%;
}

input:checked + .cookie-slider {
  background-color: var(--primary);
}

input:checked + .cookie-slider:before {
  transform: translateX(26px);
}

/* Privacy Policy, Terms, Cookie Policy Pages */
.policy-section {
  padding: var(--spacing-lg) 0;
}

.policy-container {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: var(--spacing-md);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.policy-date {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-md);
}

.policy-section h3 {
  margin-top: var(--spacing-md);
  margin-bottom: var(--spacing-xs);
  color: var(--primary);
}

.policy-section ul {
  margin-bottom: var(--spacing-sm);
  padding-left: var(--spacing-md);
}

.policy-section li {
  margin-bottom: 8px;
}

/* Thanks Page */
.thanks-section {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--spacing-lg) 0;
}

.thanks-container {
  max-width: 600px;
  margin: 0 auto;
  background: white;
  padding: var(--spacing-lg);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow);
}

.thanks-icon {
  font-size: 4rem;
  color: var(--success);
  margin-bottom: var(--spacing-sm);
}

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

/* International Telephone Input */
.iti {
  width: 100%;
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 1s ease-in-out;
}

.slide-up {
  animation: slideUp 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Media Queries */
@media (min-width: 576px) {
  .container {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .container {
    max-width: 720px;
  }
  
  h1 {
    font-size: 2.75rem;
  }
  
  h2 {
    font-size: 2.25rem;
  }
  
  .hero-title {
    font-size: 3.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.75rem;
  }
}

@media (min-width: 992px) {
  .container {
    max-width: 960px;
  }
  
  h1 {
    font-size: 3rem;
  }
  
  h2 {
    font-size: 2.5rem;
  }
  
  .hero-title {
    font-size: 4rem;
  }
  
  .hero-subtitle {
    font-size: 2rem;
  }
}

@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }
}

/* Mobile Navigation */
@media (max-width: 991.98px) {
  .navbar-toggle {
    display: block;
  }
  
  .navbar-nav {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: 0;
    overflow: hidden;
    background-color: white;
    flex-direction: column;
    align-items: center;
    transition: var(--transition);
    z-index: 1000;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
  }
  
  .navbar-nav.active {
    height: auto;
    padding: var(--spacing-md) 0;
  }
  
  .nav-item {
    margin: 0 0 var(--spacing-xs);
  }
}

/* Mobile-first adjustments */
@media (max-width: 767.98px) {
  .section {
    padding: var(--spacing-md) 0;
  }
  
  .hero {
    height: 60vh;
  }
  
  .hero-content {
    padding: 0 var(--spacing-sm);
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.25rem;
  }
  
  .feature-item {
    margin-bottom: var(--spacing-md);
  }
  
  .cookie-buttons {
    flex-direction: column;
  }
  
  .cookie-buttons button {
    margin-bottom: var(--spacing-xs);
  }
}

/* Thumb-zone optimizations for mobile */
@media (max-width: 767.98px) {
  .btn {
    padding: 0.875rem 1.5rem;
    border-radius: 50px; /* More thumb-friendly */
  }
  
  .form-control {
    padding: 1rem;
    border-radius: 8px;
  }
  
  .navbar-brand img {
    height: 32px; /* Slightly smaller on mobile */
  }
  
  .navbar-toggle {
    padding: 1rem; /* Larger tap area */
  }
  
  .nav-item {
    padding: 0.75rem 0; /* More spacing for easier tapping */
  }
  
  .cookie-consent {
    padding: var(--spacing-md) var(--spacing-sm);
  }
  
  /* Move important actions to thumb zone */
  .form-btn,
  .cta-buttons {
    margin-top: var(--spacing-md);
  }
  
  /* Adjust checklist for easier mobile interaction */
  .checklist-item {
    padding: var(--spacing-sm);
  }
  
  /* Better spacing for tap targets */
  .footer-links li {
    padding: 8px 0;
  }
}

/* Jarallax specific styles */
.jarallax {
  position: relative;
  z-index: 0;
}

.jarallax > .jarallax-img {
  position: absolute;
  object-fit: cover;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* Custom animations from WOW.js and Animate.css */
.wow {
  visibility: hidden;
}