/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: #fbe09b; /* Changed from #fad982 to #fbe09b */
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
  position: relative;
  min-height: 100vh;
}

/* Updated header bar style to match provided code */
.header-bar {
  width: 100%;
  background-color: #333;
  padding: 10px 0;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-link {
  color: #fff;
  text-decoration: none;
  padding: 10px 15px;
  display: inline-block;
  transition: background-color 0.3s ease;
}

.nav-link:hover {
  background-color: #555;
  border-radius: 5px;
}

/* Updated main content style to match provided code */
.main-content {
  padding: 20px;
  text-align: center;
  position: relative;
  min-height: calc(100vh - 60px);
}

.main-content h1 {
  font-size: 3rem;
  color: #333;
  margin-bottom: 20px;
}

.main-content p {
  font-size: 1.2rem;
  color: #666;
  margin-bottom: 30px;
}

/* Updated CTA button style to match provided code */
.cta-button {
  padding: 10px 20px;
  background-color: #ff6347;
  color: #fff;
  border: none;
  cursor: pointer;
  margin-top: 20px;
  border-radius: 5px;
  font-size: 1.1rem;
  font-weight: bold;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.cta-button:hover {
  background-color: #ff4500;
  transform: translateY(-2px);
}

/* Updated circle and rectangle classes to match user's exact specifications */
.circle {
  position: absolute;
  width: 100px;
  height: 100px;
  border-radius: 50%; /* This makes it a circle */
  z-index: 1;
}

.circled {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%; /* This makes it a circle */
  z-index: 1;
}

.circlee {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%; /* This makes it a circle */
  z-index: 1;
}

.rectangle {
  width: 200px;
  height: 100px;
  margin: 20px;
  background-color: #f5f5f5; /* Example color, adjust as needed */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Styles for unique curved cornners */
.stocks {
  border-radius: 20px 0 0 0; /* Top-left  corner curved */
}

.diversification {
  border-radius: 20px 0 0 0; /* Top-left  corner curved */
}

.growth {
  border-radius: 20px 0 0 0; /* Top-left corner curved */
}


.circle:hover {
  transform: scale(1.2);
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .main-content h1 {
    font-size: 2rem;
  }

  .main-content p {
    font-size: 1rem;
  }

  .circle,
  .rectangle {
    display: none;
  }
}

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

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 1rem;
  color: #2c3e50;
}

.section-subtitle {
  text-align: center;
  font-size: 1.2rem;
  color: #7f8c8d;
  margin-bottom: 3rem;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-outline {
  background: transparent;
  color: #667eea;
  border: 2px solid #667eea;
}

.btn-outline:hover {
  background: #667eea;
  color: white;
}

.btn-large {
  padding: 16px 32px;
  font-size: 1.2rem;
}

.btn-full {
  width: 100%;
}

/* Added fixed site branding in top-right corner */
.site-branding {
  position: fixed;
  top: 8px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 900;
  direction: rtl;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 10px 20px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.site-logo {
  width: 60px;
  height: 60px;
  object-fit: contain;
}

.site-title {
  font-family: "Dana", "Vazir", Arial, sans-serif;
  font-size: 32px;
  line-height: 1;
  color: #2c3e50;
  margin: 0;
  white-space: nowrap;
}

/* Modified top-left navigation boxes to be wider with single outline */
.top-nav-boxes {
  position: fixed;
  top: 16px;
  left: 16px;
  display: flex;
  gap: 14px;
  z-index: 900;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.nav-box:hover {
  transform: translateY(-2px);
}

.nav-box-svg {
  width: 180px;
  height: 60px;
  display: block;
}

.nav-box-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #558d8a;
  font-size: 16px;
  font-weight: 500;
  white-space: nowrap;
  pointer-events: none;
}

/* Added Persian text paragraph styling below navigation boxes */
.header-text-paragraph {
  position: fixed;
  top: 90px;
  left: 16px;
  max-width: 600px;
  z-index: 900;
  background-color: rgba(255, 255, 255, 0.9);
  padding: 10px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-text-paragraph p {
  color: #000080;
  font-size: 19px;
  font-weight: 500;
  line-height: 1.6;
  text-align: right;
  margin: 0;
  padding: 12px 16px;
}

/* Header */
.header {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  padding: 15px 30px;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.navbar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  margin: 0;
}

.nav-actions {
  display: flex;
  gap: 1rem;
}

/* Removed nav-brand and nav-menu styles as they're no longer needed */

/* Hero Section */
.hero {
  background: #fbe09b; /* Changed from #f5f5dc to #fbe09b */
  color: #2c3e50;
  padding: 120px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  position: relative;
}

/* Removed hero-logo-container styles as logo is now in fixed position */

/* Markets Section */
.markets {
  padding: 80px 0;
  background: #fbe09b; /* Changed from white to #fbe09b */
}

.markets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.market-card {
  background: #fbe09b; /* Changed from white to #fbe09b */
  border-radius: 15px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 2px solid transparent;
}

.market-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: #667eea;
}

.market-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.market-icon i {
  font-size: 2rem;
  color: white;
}

.market-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: #2c3e50;
}

.market-card p {
  color: #7f8c8d;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.market-stats {
  margin-bottom: 1.5rem;
}

.profit-rate {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: #27ae60;
  margin-bottom: 0.5rem;
}

.profit-label {
  font-size: 0.9rem;
  color: #7f8c8d;
}

/* Investment Modal - Position over investing buttons */
#investmentModal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

#investmentModal .modal-content {
  background-color: white;
  margin: 0;
  padding: 0;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: hsl(191, 59%, 31%);
  margin: 5% auto;
  padding: 0;
  border-radius: 15px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Cream variant for register modal */
.modal-cream .modal-content {
  background-color: hsl(41, 95%, 76%); /* cream */
}

/* Make register modal follow page scroll instead of fixed */
.modal-cream {
  position: absolute; /* override fixed from .modal */
}

/* Register modal input boxes color */
#registerModal .form-group input,
#registerModal .form-group select,
#registerModal .form-group textarea {
  background-color: hsl(191, 59%, 31%);
  color: #ffffff;
  border-color: hsl(191, 59%, 31%);
}

#registerModal .form-group input::placeholder,
#registerModal .form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

#registerModal .form-group input:focus,
#registerModal .form-group select:focus,
#registerModal .form-group textarea:focus {
  border-color: #ffffff;
  outline: none;
}

/* Register modal close icon styling */
#registerModal .modal-header {
  position: relative;
}

#registerModal .close-icon {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  transition: color 0.3s ease;
  z-index: 10;
}

#registerModal .close-icon:hover {
  color: #333;
}

/* Red star for required fields */
.required-star {
  color: hsl(6, 60%, 34%);
  margin: 0 4px;
  font-weight: 700;
}

/* Inline error messages for register form */
#registerModal .error-text {
  color: hsl(6, 60%, 34%);
  font-size: 0.9rem;
  margin-top: 6px;
  min-height: 1em;
}

#registerModal .form-group input.error,
#registerModal .form-group select.error,
#registerModal .form-group textarea.error {
  border-color: hsl(6, 60%, 34%);
}

.modal-header {
  padding: 2rem 2rem 1rem;
  border-bottom: 1px solid hsl(184, 82%, 28%);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: #2c3e50;
}

.close {
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  color: #aaa;
}

.close:hover {
  color: #333;
}

.modal-body {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #2c3e50;
}

.form-group input,
.form-group select {
  width: 100%;
  padding: 12px;
  border: 2px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #667eea;
}

.profit-preview {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 10px;
  margin-bottom: 1.5rem;
}

.profit-preview h4 {
  margin-bottom: 1rem;
  color: #2c3e50;
}

.profit-details {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.profit-details span {
  font-weight: 500;
  color: #27ae60;
}

/* Portfolio Section */
.portfolio {
  padding: 80px 0;
  background: #fbe09b; /* Changed from #f8f9fa to #fbe09b */
}

.portfolio-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.summary-card {
  background: #fbe09b; /* Changed from white to #fbe09b */
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.summary-card h3 {
  color: #7f8c8d;
  margin-bottom: 1rem;
  font-size: 1rem;
}

.summary-value {
  font-size: 2rem;
  font-weight: 700;
  color: #2c3e50;
}

.summary-value.profit {
  color: #27ae60;
}

.portfolio-table {
  background: #fbe09b; /* Changed from white to #fbe09b */
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.portfolio-table table {
  width: 100%;
  border-collapse: collapse;
}

.portfolio-table th,
.portfolio-table td {
  padding: 1rem;
  text-align: right;
  border-bottom: 1px solid #eee;
}

.portfolio-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #2c3e50;
}

.portfolio-table tr:hover {
  background: #f8f9fa;
}

/* About Section */
.about {
  padding: 80px 0;
  background: #fbe09b; /* Changed from white to #fbe09b */
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-text h3 {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: #2c3e50;
}

.about-text ul {
  list-style: none;
}

.about-text li {
  padding: 0.5rem 0;
  display: flex;
  align-items: center;
  font-size: 1.1rem;
}

.about-text li i {
  color: #27ae60;
  margin-left: 1rem;
  font-size: 1.2rem;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.stat-box {
  text-align: center;
  padding: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 15px;
}

.stat-box .stat-number {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.stat-box .stat-label {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Footer */
.footer {
  background: #2c3e50;
  color: white;
  padding: 3rem 0 1rem;
}

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

.footer-section h3,
.footer-section h4 {
  margin-bottom: 1rem;
  color: #ecf0f1;
}

.footer-section p,
.footer-section li {
  margin-bottom: 0.5rem;
  opacity: 0.8;
}

.footer-section a {
  color: #bdc3c7;
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.footer-section i {
  margin-left: 0.5rem;
  color: #667eea;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #34495e;
  opacity: 0.8;
}

/* User profile dropdown */
.user-profile-dropdown {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 1001;
}

.user-name-badge {
  background: hsl(191, 59%, 31%);
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-block;
}

.user-name-badge:hover {
  background: hsl(191, 59%, 25%);
  transform: translateY(-1px);
}

.profile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  min-width: 220px;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  border: 1px solid #eee;
}

.user-profile-dropdown:hover .profile-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.profile-menu-item {
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #f0f0f0;
}

.profile-menu-item:last-child {
  border-bottom: none;
}

.profile-menu-item:hover {
  background-color: #f8f9fa;
}

.profile-menu-item i {
  color: hsl(191, 59%, 31%);
  width: 16px;
  text-align: center;
}

.profile-menu-item span {
  font-weight: 500;
  color: #333;
}

.profile-menu-item[data-action="logout"] {
  color: #e74c3c;
}

/* Login modal input boxes color */
#loginModal .form-group input,
#loginModal .form-group select,
#loginModal .form-group textarea {
  background-color: hsl(191, 59%, 31%);
  color: #ffffff;
  border-color: hsl(191, 59%, 31%);
}

#loginModal .form-group input::placeholder,
#loginModal .form-group textarea::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

#loginModal .form-group input:focus,
#loginModal .form-group select:focus,
#loginModal .form-group textarea:focus {
  border-color: #ffffff;
  outline: none;
}

#loginModal .form-group input.error,
#loginModal .form-group select.error,
#loginModal .form-group textarea.error {
  border-color: hsl(6, 60%, 34%);
}

#loginModal .error-text {
  color: hsl(6, 60%, 34%);
  font-size: 0.9rem;
  margin-top: 6px;
  min-height: 1em;
}

/* Login prompt modal styling */
.login-prompt-icon {
  color: hsl(191, 59%, 31%);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.login-prompt-message {
  color: hsl(191, 59%, 31%);
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Exit modal styling */
.exit-icon {
  color: hsl(191, 59%, 31%);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.exit-message {
  color: hsl(191, 59%, 31%);
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Dashboard */
.dashboard {
  padding: 60px 0;
  background: #fbe09b; /* Changed from #fff to #fbe09b */
}

.dashboard .dashboard-actions {
  margin-top: 1.5rem;
  display: flex;
  gap: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .nav-menu {
    gap: 1rem;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding: 100px 0 60px;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }

  .markets-grid {
    grid-template-columns: 1fr;
  }

  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .portfolio-summary {
    grid-template-columns: 1fr;
  }

  .portfolio-table {
    overflow-x: auto;
  }

  .modal-content {
    width: 95%;
    margin: 10% auto;
  }

  .profit-details {
    flex-direction: column;
    gap: 0.5rem;
  }

  .site-branding {
    top: 8px;
    right: 12px;
    gap: 8px;
  }

  .site-logo {
    width: 48px;
    height: 48px;
  }

  .site-title {
    font-size: 28px;
  }

  /* Updated responsive styles for wider navigation boxes */
  .top-nav-boxes {
    flex-direction: column;
    gap: 8px;
    top: 12px;
    left: 12px;
  }

  .nav-box-svg {
    width: 140px;
    height: 50px;
  }

  .nav-box-text {
    font-size: 14px;
  }

  /* Responsive styling for header text paragraph */
  .header-text-paragraph {
    top: 200px;
    left: 12px;
    max-width: calc(100% - 24px);
  }

  .header-text-paragraph p {
    font-size: 16px;
    padding: 10px 12px;
  }

  .navbar {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    margin-top: 80px;
  }

  .nav-actions {
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .market-card {
    padding: 1.5rem;
  }

  .modal-body {
    padding: 1.5rem;
  }

  .site-title {
    font-size: 20px;
  }

  .site-logo {
    width: 36px;
    height: 36px;
  }

  /* Mobile responsive styles for navigation boxes */
  .nav-box-svg {
    width: 120px;
    height: 45px;
  }

  .nav-box-text {
    font-size: 12px;
  }

  /* Mobile responsive styles for header text paragraph */
  .header-text-paragraph p {
    font-size: 14px;
    padding: 8px 10px;
  }
}

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

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

.slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mb-1 {
  margin-bottom: 0.5rem;
}
.mb-2 {
  margin-bottom: 1rem;
}
.mb-3 {
  margin-bottom: 1.5rem;
}
.mb-4 {
  margin-bottom: 2rem;
}

.mt-1 {
  margin-top: 0.5rem;
}
.mt-2 {
  margin-top: 1rem;
}
.mt-3 {
  margin-top: 1.5rem;
}
.mt-4 {
  margin-top: 2rem;
}
