/* Global box-sizing rule */
* {
  box-sizing: border-box;
}

/* Basic body and layout styles */
body {
  margin: 0;
  font-family: Arial, sans-serif;
  font-size: 16px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #f9f9f9;
  color: #222;
}

/* Header Styles */
header {
  background-color: #111;
  color: white;
  padding: 1em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1001;
}

header h1 {
  margin: 0;
  font-size: 1.6em;
  cursor: pointer;
  color: #00d8ff;
}

/* Hamburger Menu Styles */
.hamburger {
  display: none;
  font-size: 1.5em;
  background: none;
  border: none;
  color: white;
  cursor: pointer;
}

/* Layout Container Styles */
.layout {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* Navigation Styles */
nav {
  width: 250px;
  background-color: #111;
  color: white;
  padding: 1em;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

nav li {
  padding: 0.5em 0;
}

nav li a {
  color: #00d8ff;
  text-decoration: none;
  font-weight: 500;
}

nav li a:hover {
  color: white;
  text-decoration: underline;
}

/* Main Content Area Styles */
main {
  flex: 1;
  padding: 2em;
  overflow-y: auto;
  font-size: 1.1em;
  line-height: 1.6;
}

/* Footer Styles */
footer {
  background-color: #222;
  color: #ccc;
  text-align: center;
  padding: 1em;
  font-size: 0.9em;
}

/* Mobile and Smaller Screen Adjustments */
@media (max-width: 768px) {
  body {
    font-size: 17px;
  }

  nav {
    position: fixed;
    top: 60px;
    left: 0;
    height: calc(100% - 60px);
    transform: translateX(-100%);
    z-index: 1000;
  }

  nav.open {
    transform: translateX(0);
  }

  .hamburger {
    display: block;
  }

  .layout {
    flex-direction: column;
  }

  main {
    padding-top: 1em;
  }
}

/* Simplified Styles for Menu */
#menu {
  list-style-type: none;
  padding: 0;
  margin: 0;
  font-family: Arial, sans-serif;
}

.menu-item {
  margin-bottom: 5px;
  font-size: 16px; /* Slightly smaller font size for compactness */
}

/* Default menu items (no background changes) */
.menu-item a {
  text-decoration: none;
  color: #ddd;  /* Lighter color for menu items */
  padding: 8px 10px; /* Reduced padding for a compact look */
  display: block;
  background-color: transparent;  /* No background color for other links */
  border-radius: 5px;
  font-weight: normal;
}

.menu-item a:hover {
  color: #00d8ff;  /* Highlight color on hover */
}

/* Refined styling for Stock Dashboard link with icon */
.menu-item.stock-dashboard a {
  display: flex;
  align-items: center;
  color: #ddd;
  text-decoration: none;
  font-weight: normal;
  padding: 8px 10px;
  gap: 0.4em;
  background-color: transparent;
}

.menu-item.stock-dashboard a:hover {
  color: #00d8ff;
  text-decoration: underline;
}



/* Styling for the sub-menu under Stock Dashboard */
.submenu {
  list-style-type: none;
  padding-left: 15px;  /* Reduced padding to make it more compact */
  margin: 0;
}

.submenu-item {
  margin-bottom: 3px; /* Reduced space between items */
}

.submenu-item a {
  font-size: 13px;
  color: #bbb;
  padding: 2px 6px;
  text-decoration: none;
  display: block;
  background: none;
  border: none;
  text-align: left;
  border-radius: 0;
  line-height: 1.4;
}

.submenu-item a:hover {
  color: #00d8ff;
  background-color: transparent;
  text-decoration: underline;
}


/* --- Stock Dashboard Page --- */

.stock-dashboard {
  padding: 1rem;
}

.stock-dashboard h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem;
  color: #222;
}

/* Grid layout for cards */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

/* Individual cards */
.card {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.05);
}

.card h3 {
  margin-top: 0;
  font-size: 1.2rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
  color: #111;
}

.card p, .card li {
  margin: 0.5em 0;
  font-size: 0.95rem;
}

/* For wide sections like SWOT or long text */
.full-width {
  grid-column: 1 / -1;
}

.card ul {
  padding-left: 1.2rem;
  margin: 0;
}

.swot-section {
  margin-top: 2rem;
}

.swot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}

.swot-card {
  background: #fff;
  padding: 1rem 1.2rem;
  border-radius: 6px;
  border-left: 4px solid #ccc;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease;
}

.swot-card:hover {
  transform: translateY(-2px);
}

.swot-card h4 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: #222;
}

.swot-card ul {
  margin: 0;
  padding-left: 1.2rem;
  color: #444;
  font-size: 0.95rem;
  line-height: 1.4;
}

/* Color accents by SWOT type */
.swot-card.strengths {
  border-color: #28a745;
}

.swot-card.weaknesses {
  border-color: #dc3545;
}

.swot-card.opportunities {
  border-color: #17a2b8;
}

.swot-card.threats {
  border-color: #ffc107;
}

@media (max-width: 768px) {
  nav {
    transform: translateX(-100%);
    position: fixed;
    top: 60px;
    left: 0;
    height: calc(100% - 60px);
    width: 250px;
    background-color: #111;
    transition: transform 0.3s ease-in-out;
    z-index: 1000;
  }

  nav.open {
    transform: translateX(0);
  }

  .layout {
    flex-direction: column;
  }

  .hamburger {
    display: block;
  }

  main {
    padding-top: 1em;
  }
}
