@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;700&display=swap");

/* Global Styles */
* {
  box-sizing: border-box; /* Ensures consistent sizing */
}

body {
  font-family: "Inter", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #000000;
  width: 100%;
  overflow-x: hidden;
}

/* Header */
header {
  padding: 15px 20px;
  background-color: #000000; /* Ensure header has a background */
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 1000;
  position: relative; /* Added for mobile menu positioning */
}
.logo-link {
  /* Consistent class name */
  text-decoration: none;
}
.logo {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffffff;
}

/* Navbar (Desktop) */
nav.main-nav {
  /* Added main-nav class for targeting */
  display: flex; /* Ensure it's flex on desktop */
  align-items: center;
  gap: 20px; /* Space between desktop nav items */
}

nav.main-nav a,
.dropdown {
  color: rgb(255, 255, 255);
  text-decoration: none;
  font-size: 1rem;
  padding: 8px 16px;
  border-radius: 20px;
  transition: background-color 0.3s ease-in-out;
}

nav.main-nav a:hover {
  background-color: #646363;
  text-decoration: none;
}

/* Search Bar */
.search-container {
  display: flex;
  align-items: center;
  background: #fff;
  padding: 5px;
  border-radius: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.search-container input {
  border: none;
  outline: none;
  padding: 8px;
  width: 180px;
  font-size: 1rem;
  border-radius: 20px;
}

.search-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  padding: 5px;
  color: #000000;
}

.search-btn:hover {
  color: #555;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-link {
  display: flex; /* For aligning text and caret on desktop (though caret is hidden) */
  align-items: center;
  gap: 5px; /* Space between "More" text and caret icon */
}

.dropdown-link i {
  display: none; /* HIDE CARET ON DESKTOP */
}

.dropdown-menu {
  right: 0;
  left: auto;
  display: none; /* Hidden by default on desktop (no !important) */
  position: absolute;
  top: 100%;
  background-color: #2c2c2e; /* CHANGED: Dark background for desktop dropdown */
  box-shadow: 0 4px 6px rgb(0, 0, 0);
  padding: 10px;
  border-radius: 4px;
  z-index: 1000;
  min-width: 120px; /* Ensure menu is wide enough */
}

.dropdown-menu a {
  color: white; /* CHANGED: White text for readability on dark background */
  text-decoration: none;
  padding: 8px 12px;
  display: block;
  border-radius: 3px;
}

.dropdown-menu a:hover {
  background-color: rgba(
    255,
    255,
    255,
    0.1
  ); /* CHANGED: Lighter hover background */
}

.dropdown:hover .dropdown-menu {
  display: block; /* Show dropdown on hover for desktop */
}

/* User Icon */
.user-icon {
  font-size: 1.5rem;
  padding: 5px;
  cursor: pointer;
  margin: 0px 20px 0px 0px;
}

/* Hamburger Button (Hidden by Default for Desktop) */
.hamburger-btn {
  display: none; /* Hide hamburger icon on desktop */
  font-size: 1.8rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  color: #ffffff; /* White color for hamburger */
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 50px 20px;
  color: white;
}

.hero h1 {
  font-size: 9rem;
  font-weight: bold;
  margin: -10px;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin-top: 20px;
  font-size: 20px;
  color: rgb(255, 255, 255);
}

.stat-box {
  text-align: center;
}

.stats1,
.stats4 {
  font-size: 3.5rem;
  font-weight: bold;
  background-image: linear-gradient(
    90deg,
    #ffffff,
    #ffffff,
    #ffffff,
    #e52ec5,
    #007bffc5,
    #00ffc5,
    #ffffff,
    #ffffff,
    #ffffff
  );
  background-size: 500% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: moveGradient 45s infinite linear;
}

@keyframes moveGradient {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 400% 50%;
  }
}

.stats2,
.stats3 {
  font-size: 1rem;
  color: rgb(200, 200, 200);
  display: block;
}

/* Brokers Section */
.brokers {
  display: flex;
  flex-direction: column; /* Keeps cards stacked */
  align-items: center; /* Centers them */
  padding: 20px; /* Add padding to the section */
}

.broker-card {
  width: 90%;
  max-width: 1600px;
  margin: 20px auto;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 10px;
  background: linear-gradient(to right, #1c1c3c, #6065c3);
  color: white;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
}

.broker-card.featured {
  background: linear-gradient(145deg, #2c2c2e, #abafb5);
}

.broker-info h2 {
  font-size: 24px;
  color: white;
}

.broker-info p {
  color: white;
  font-size: 16px;
  margin: 10px 0;
}

.rating {
  color: white;
}

.broker-card button {
  /* Target buttons within broker-card specifically */
  margin: 3px;
  padding: 10px 15px;
  border: 2px solid white;
  border-radius: 13px;
  background: transparent;
  color: white;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.broker-card button:hover {
  background-color: #fff;
  color: black;
}

.broker-logo img {
  max-width: 100px; /* Limit logo size */
  height: auto;
}

/* Terms & Conditions Section */
.terms-section {
  background: #000000;
  color: #bbb;
  text-align: center;
  padding: 40px 20px;
  font-size: 0.9rem;
}

.terms-section h3 {
  color: white;
  margin-bottom: 10px;
}

.terms-section a {
  color: #00c3ff;
  text-decoration: none;
  font-weight: bold;
}

.terms-section a:hover {
  text-decoration: underline;
}

/* --- Mobile Responsive Styles --- */

@media (max-width: 768px) {
  header {
    padding: 10px 15px; /* Adjust header padding for mobile */
    flex-wrap: wrap; /* Allow elements to wrap */
    justify-content: space-between; /* Space out logo and hamburger */
  }

  .logo-link {
    margin-right: 0; /* Remove auto margin */
  }

  .hamburger-btn {
    display: block; /* Show hamburger icon on mobile */
  }

  nav.main-nav {
    /* Hide nav by default and style as a column menu */
    display: none;
    flex-direction: column;
    align-items: flex-start; /* Align items to the left */
    position: absolute;
    top: 60px; /* Position below the header */
    left: 0;
    width: 100%;
    background-color: #2c3e50; /* Dark background for mobile menu */
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
    padding: 10px 0;
    box-sizing: border-box;
    overflow-y: auto; /* Allow scrolling if menu is long */
    max-height: calc(100vh - 60px); /* Limit height to viewport */
  }

  nav.main-nav.active {
    display: flex; /* Show nav when active */
  }

  nav.main-nav a,
  .dropdown {
    width: 100%; /* Full width for menu items */
    text-align: left;
    padding: 12px 20px; /* More padding for tap targets */
    border-radius: 0; /* Remove border-radius for full width links */
    color: white; /* White text on dark background */
    box-sizing: border-box;
  }

  nav.main-nav a:hover,
  .dropdown:hover {
    background-color: rgba(255, 255, 255, 0.1); /* Lighter hover background */
  }

  /* Adjust search and user icon for mobile menu */
  .search-container {
    width: calc(100% - 40px); /* Adjust width considering padding */
    margin: 10px 20px;
    background-color: rgba(
      255,
      255,
      255,
      0.15
    ); /* Search background within menu */
    box-shadow: none;
  }
  .search-container input {
    width: 100%; /* Full width within its container */
    color: white;
    background: transparent;
    padding-left: 15px;
  }
  .search-container input::placeholder {
    color: rgba(255, 255, 255, 0.7);
  }
  .search-btn {
    color: white;
  }

  .user-icon {
    width: 100%;
    margin: 0; /* Remove specific margin */
    padding: 12px 20px;
    box-sizing: border-box;
    text-align: left;
  }
  .user-icon a {
    color: white;
    padding: 0; /* Remove extra padding from link inside icon div */
  }

  /* Dropdown specific mobile styles */
  .dropdown {
    width: 100%;
    margin-bottom: 5px; /* Add some margin for stacking */
  }
  .dropdown .dropdown-menu a {
    color: #000000;
  }

  .dropdown-link {
    width: 100%;
    text-align: left;
    padding: 12px 20px;
    background-color: rgba(
      255,
      255,
      255,
      0.05
    ); /* Slight background for distinction */
    border-radius: 5px;
    display: flex;
    justify-content: space-between; /* Push caret to the right */
    align-items: center;
    color: white;
  }

  .dropdown-link i {
    display: inline-block; /* SHOW CARET ON MOBILE */
    margin-left: 10px;
    transition: transform 0.2s ease;
  }
  .dropdown-link i.fa-caret-up {
    transform: rotate(180deg); /* Rotate caret when open */
  }

  .dropdown-menu {
    position: static; /* Position relative to normal flow in the column menu */
    display: none; /* Hidden by default on mobile (toggled by JS) */
    background-color: transparent; /* Remove background color */
    box-shadow: none; /* Remove shadow */
    padding: 0;
    width: 100%;
    margin-top: 0; /* No top margin within the menu flow */
    border-radius: 0;
  }

  .dropdown-menu a {
    padding-left: 40px; /* Increased indent for dropdown items to distinguish them more */
    background-color: rgba(
      255,
      255,
      255,
      0.1
    ); /* Slightly darker background for nested items */
    margin-bottom: 3px;
    border-radius: 5px;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
  }
  .black a {
    color: #000000;
  }

  .dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.15);
  }

  /* Hero Section Adjustments */
  .hero {
    padding: 30px 15px;
  }
  .hero h1 {
    font-size: 3rem; /* Smaller font for mobile hero title */
    margin: 0;
  }

  .stats {
    flex-direction: column; /* Stack stats vertically */
    gap: 20px; /* Space between stacked stats */
    font-size: 16px;
  }
  .stats1,
  .stats4 {
    font-size: 2.5rem; /* Smaller numbers */
  }
  .stats2,
  .stats3 {
    font-size: 0.9rem; /* Smaller text below numbers */
  }

  /* Brokers Section Adjustments */
  .brokers {
    padding: 10px; /* Reduce padding for the section */
  }
  .broker-card {
    flex-direction: column; /* Stack info and logo vertically */
    align-items: center; /* Center items when stacked */
    text-align: center; /* Center text within card */
    padding: 15px; /* Reduce card padding */
    width: calc(
      100% - 20px
    ); /* Make cards almost full width with some margin */
    margin: 10px auto; /* Adjust margin */
  }
  .broker-info {
    width: 100%; /* Ensure info takes full width when stacked */
    margin-bottom: 15px; /* Space between info and logo */
  }
  .broker-info h2 {
    font-size: 20px; /* Smaller heading */
  }
  .broker-info p {
    font-size: 14px; /* Smaller paragraph text */
  }
  .broker-logo {
    width: 100%; /* Ensure logo container takes full width */
    text-align: center; /* Center the logo */
  }
  .broker-logo img {
    max-width: 80px; /* Adjust logo size for mobile cards */
  }
  .broker-card button {
    width: calc(
      50% - 6px
    ); /* Make buttons take half width, accounting for margin */
    font-size: 0.9rem;
    padding: 8px 10px;
  }

  /* Terms & Conditions Section */
  .terms-section {
    padding: 20px 15px; /* Adjust footer padding */
    font-size: 0.8rem;
  }
}

/* Optional: Even smaller screens (e.g., old phones) */
@media (max-width: 480px) {
  .hero h1 {
    font-size: 2.5rem;
  }
  .stats1,
  .stats4 {
    font-size: 2rem;
  }
  .broker-card button {
    width: 100%; /* Stack buttons on very small screens */
    margin-bottom: 5px;
  }
}
