:root {
    --primary-color: #0c5f88;
    --secondary-color: #2a9d8f;
    --background-light: #ffffff;
    --background-dark: #1a1a1a;
    --card-dark: #2c2c2c;
    --text-light: #ffffff;
    --text-dark: #333333;
    --shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', Arial, sans-serif;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Theme modes */
body.light-mode {
    background-color: var(--background-light);
    color: var(--text-dark);
}

body.dark-mode {
    background-color: var(--background-dark);
    color: var(--text-light);
}

/* Navigation styles */
.navbar {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 1rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-light);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-item {
    color: var(--text-light) !important;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.navbar-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .navbar-menu {
        display: none;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        background: var(--primary-color);
        padding: 1rem;
        box-shadow: var(--shadow);
    }

    .navbar-menu.active {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .navbar-item {
        width: 100%;
        padding: 0.75rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--text-light) !important;
    }

    .mobile-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--text-light);
        font-size: 1.5rem;
        cursor: pointer;
    }

    .dark-mode .navbar-menu {
        background: var(--background-dark);
    }
}

/* Mobile Navigation Styles */
.navbar-menu {
    transition: all 0.3s ease-in-out;
}

.navbar-menu.show {
    display: flex;
    flex-direction: column;
    width: 100%;
    background: var(--primary-color);
    padding: 1rem;
}

.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
    z-index: 1000;
}

/* Stock Cards */
.stocks-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.stock-card {
    background: var(--background-light);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.dark-mode .stock-card {
    background: var(--card-dark);
    border-color: rgba(255, 255, 255, 0.1);
}

.stock-card:hover {
    transform: translateY(-5px);
}

.stock-card h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Buttons */
.buy-button {
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
}

.buy-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Market Stats */
.market-overview {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 12px;
    text-align: center;
}

.market-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

/* Footer */
footer {
    background: var(--background-dark);
    color: var(--text-light);
    padding: 2rem 1rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h3 {
  margin-bottom: 5px;
}

.footer-section p {
  line-height: 1.6;
}


/* footer styling across all pages */
footer {
  background: var(--background-dark);
  color: var(--text-light);
  padding: 2rem;
  margin-top: auto;
  text-align: center;
}

.footer-links {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center; /* Add this */
}

.footer-links a {
  color: var(--text-light);
  text-decoration: none;
  padding: 0 1rem;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  transition: color 0.3s ease;
  white-space: nowrap; /* Add this to prevent line breaks */
  line-height: 1; /* Add this to maintain consistent height */
  display: inline-block; /* Add this */
}

.footer-links a:last-child {
  border-right: none;
}

.footer-links a:hover {
  color: var(--secondary-color);
}

.dark-mode .footer-links a {
  color: var(--text-light);
}

.dark-mode .footer-links a:hover {
  color: var(--secondary-color);
}

/* Mutual Fund Cards */
.funds-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
}

.fund-card {
    background: var(--background-light);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.dark-mode .fund-card {
    background: var(--card-dark);
    border-color: rgba(255, 255, 255, 0.1);
}

.fund-card:hover {
    transform: translateY(-5px);
}

.fund-card h2 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.fund-details {
    background: rgba(0, 0, 0, 0.05);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.dark-mode .fund-details {
    background: rgba(255, 255, 255, 0.05);
}

.fund-card .returns {
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.1rem;
}

/* Mutual Fund Returns Styling */
.fund-card .returns {
    color: #22c55e; /* Green color for positive returns */
    font-weight: bold;
}

/* Optional: If you want different colors based on positive/negative returns */
.fund-card .returns.negative {
    color: #ef4444; /* Red color for negative returns */
}

.invest-button {
    background: var(--primary-color);
    color: var(--text-light);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
}

.invest-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar ul {
    display: none;
  }
  
  .navbar-burger {
    display: block;
  }
  
  .stocks-container {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .mobile-toggle {
    display: block;
  }

  .navbar-menu {
    display: none;
    width: 100%;
    position: absolute;
    top: 60px;
    left: 0;
    background: var(--primary-color); /* Changed from background-light */
    padding: 1rem;
    box-shadow: var(--shadow);
  }

  .dark-mode .navbar-menu {
    background: var(--background-dark);
  }

  .navbar-menu.active {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .navbar-item {
    padding: 0.75rem;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-light) !important;
  }

  .dark-mode .navbar-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .mobile-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
  }

  .navbar-brand {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .market-stats {
    grid-template-columns: 1fr;
  }

  .funds-container {
    padding: 1rem;
  }
    
  .fund-card {
    margin-bottom: 1rem;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.stock-card {
  animation: fadeIn 0.5s ease-in;
}

/* Toggle button styles */
#theme-toggle {
  padding: 10px 20px;
  cursor: pointer;
  border: none;
  border-radius: 20px;
  background-color: #f0f0f0;
  color: #000;
  font-size: 16px;
  transition: background-color 0.3s, color 0.3s;
}

#theme-toggle.dark {
  background-color: #ded5d5;
  color: #fff;
}

/* Footer */
footer {
  background: #333;
  color: #fff;
  text-align: center;
  padding: 1rem;
  margin-top: auto; /* Pushes footer to the bottom */
  width: 100%;
}

.footer-links a {
  color: #fff;
  margin: 0 0rem;
  text-decoration: none;

}

/* Price change indicators */
.positive {
    color: #2ecc71;  /* Green color for positive changes */
    font-weight: bold;
}

.positive::before {
    content: '↑';
    margin-right: 4px;
}

.negative {
    color: #e74c3c;  /* Red color for negative changes */
    font-weight: bold;
}

.negative::before {
    content: '↓';
    margin-right: 4px;
}

/* Dark mode adjustments */
.dark-mode .positive {
    color: #00ff95;  /* Brighter green for dark mode */
}

.dark-mode .negative {
    color: #ff5555;  /* Brighter red for dark mode */
}

/* Social Media Icons */
.social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 3%;
}

.social-links a {
    color: var(--text-light);
    font-size: 1.5rem;
    transition: all 0.3s ease;
    opacity: 0.8;
    padding: 0.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    opacity: 1;
    transform: translateY(-3px);
    background: var(--primary-color);
    color: var(--text-light);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.dark-mode .social-links a {
    background: rgba(255, 255, 255, 0.05);
}

.dark-mode .social-links a:hover {
    background: var(--primary-color);
    color: var(--text-light);
}

