/* ========================================
   UNIFIED PROFESSIONAL STYLESHEET
   American Stock Analysis Platform
   ======================================== */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: #333;
}

.main-content {
  flex: 1;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */
.header {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e40af 100%);
  color: white;
  padding: 20px 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.logo-img {
  height: 60px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.header-text h1 {
  font-size: 2.5rem;
  font-weight: 800;
  margin: 0;
  padding: 0;
  letter-spacing: -0.5px;
}

.header p {
  font-size: 1rem;
  opacity: 0.95;
  margin: 0;
  font-weight: 300;
}

.nav-links {
  margin-top: 15px;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.nav-links a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 8px 14px;
  border-radius: 6px;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.1);
  border-bottom: 2px solid #60a5fa;
  transform: translateY(-2px);
}

.nav-links a.active {
  background: rgba(255, 255, 255, 0.15);
  border-bottom: 2px solid white;
}

/* ========================================
   CONTAINERS & LAYOUT
   ======================================== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
}

.container-small {
  max-width: 1000px;
  margin: 0 auto;
  padding: 30px 20px;
}

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

/* ========================================
   SECTIONS & CARDS
   ======================================== */
.section {
  background: white;
  border-radius: 10px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.section:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.section h2 {
  font-size: 2rem;
  color: #1e3a8a;
  margin-bottom: 15px;
  border-bottom: 3px solid #1e40af;
  padding-bottom: 10px;
  font-weight: 700;
}

.section h3 {
  font-size: 1.2rem;
  color: #1e40af;
  margin: 20px 0 10px 0;
  font-weight: 600;
}

.section p {
  line-height: 1.8;
  color: #555;
  margin-bottom: 15px;
  font-size: 0.95rem;
}

/* ========================================
   BUTTONS & FORMS
   ======================================== */
.btn-primary {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(30, 58, 138, 0.4);
}

.btn-secondary {
  background: white;
  color: #1e3a8a;
  padding: 12px 24px;
  border: 2px solid #1e3a8a;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #f0f4ff;
  transform: translateY(-2px);
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus {
  outline: none;
  border-color: #1e40af;
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
  color: white;
  padding: 40px 0 20px;
  margin-top: 50px;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

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

.footer-section h3 {
  font-size: 1.1rem;
  margin-bottom: 15px;
  font-weight: 600;
}

.footer-section p {
  font-size: 0.9rem;
  color: #bfdbfe;
  line-height: 1.8;
  margin-bottom: 10px;
}

.footer-section ul {
  list-style: none;
}

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

.footer-section a {
  color: #bfdbfe;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 0.95rem;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 20px;
  text-align: center;
  color: #bfdbfe;
  font-size: 0.9rem;
}

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

.footer-bottom .credit {
  font-weight: 600;
  color: white;
  font-size: 0.85rem;
  margin-top: 10px;
}

/* ========================================
   SEARCH & FILTERS
   ======================================== */
.search-wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
  background: white;
  border-radius: 10px;
  margin-top: 20px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.search-title {
  font-size: 1.5rem;
  color: #1e3a8a;
  margin-bottom: 20px;
  font-weight: 700;
}

.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.search-box input {
  flex: 1;
  min-width: 250px;
  padding: 12px 15px;
  border: 2px solid #1e40af;
  border-radius: 6px;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.search-box input:focus {
  outline: none;
  border-color: #1e3a8a;
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.search-box button {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: white;
  padding: 12px 30px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.search-box button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(30, 58, 138, 0.3);
}

.filter-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-btn {
  padding: 10px 20px;
  background: white;
  border: 2px solid #1e40af;
  border-radius: 6px;
  color: #1e40af;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.95rem;
}

.filter-btn:hover {
  background: #f0f4ff;
  transform: translateY(-2px);
}

.filter-btn.active {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
  color: white;
  border-color: #1e3a8a;
}

/* ========================================
   UTILITIES
   ======================================== */
.results-info {
  text-align: center;
  color: #1e3a8a;
  font-weight: 600;
  margin-bottom: 20px;
  padding: 10px 0;
  font-size: 0.95rem;
}

.hidden {
  display: none !important;
}

.highlight-box {
  background: #f0f4ff;
  border-left: 4px solid #1e40af;
  padding: 15px 20px;
  margin: 20px 0;
  border-radius: 6px;
}

.stock-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #1e40af;
  transition: all 0.3s ease;
}

.stock-card:hover {
  transform: translateX(5px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stock-symbol {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 5px;
}

.stock-name {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.stock-description {
  color: #555;
  line-height: 1.6;
  font-size: 0.9rem;
  margin-bottom: 15px;
}

.stock-link {
  display: inline-block;
  background: #1e40af;
  color: white;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
  transition: all 0.3s ease;
}

.stock-link:hover {
  background: #1e3a8a;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(30, 58, 138, 0.3);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
  .header-text h1 {
    font-size: 1.8rem;
  }

  .section h2 {
    font-size: 1.5rem;
  }

  .nav-links {
    gap: 10px;
  }

  .nav-links a {
    font-size: 0.85rem;
    padding: 6px 10px;
  }

  .search-box {
    flex-direction: column;
  }

  .search-box input {
    min-width: 100%;
  }

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

  .logo-container {
    flex-direction: column;
    text-align: center;
  }

  .logo-img {
    height: 50px;
  }

  .header-text h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 15px 0;
  }

  .header-content {
    padding: 0 15px;
  }

  .header-text h1 {
    font-size: 1.3rem;
  }

  .nav-links {
    gap: 8px;
  }

  .nav-links a {
    font-size: 0.75rem;
    padding: 5px 8px;
  }

  .section {
    padding: 20px;
    margin-bottom: 20px;
  }

  .container,
  .container-small,
  .container-medium {
    padding: 20px 15px;
  }
}
