/* ==========================================================================
   500 Sri Lanka Business Ideas - Web Application Stylesheet
   Color Palette: Deep Navy (#0B2545), Slate Blue (#134074), Gold (#D97706), Cyan (#0096D6)
   ========================================================================== */

:root {
  --primary-navy: #0B2545;
  --secondary-blue: #134074;
  --accent-cyan: #0096D6;
  --accent-gold: #D97706;
  --gold-hover: #B45309;
  --light-gold: #FFFBEB;
  --light-blue: #F0F4F8;
  --card-border: #E2E8F0;
  --dark-text: #1E293B;
  --muted-text: #64748B;
  --bg-body: #F8FAFC;
  --font-main: 'Segoe UI', 'Noto Sans Sinhala', -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-body);
  color: var(--dark-text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Navbar */
.navbar-custom {
  background: var(--primary-navy);
  box-shadow: 0 4px 20px rgba(11, 37, 69, 0.15);
  padding: 0.85rem 0;
}

.navbar-brand-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #FFFFFF !important;
  letter-spacing: -0.3px;
}

.navbar-brand-sub {
  font-size: 0.78rem;
  color: #94A3B8;
  display: block;
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, #0B2545 0%, #134074 60%, #0F2D59 100%);
  color: #FFFFFF;
  padding: 3.5rem 0 3rem 0;
  position: relative;
  overflow: hidden;
}

.hero-section::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 150, 214, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-badge {
  background: rgba(217, 119, 6, 0.2);
  border: 1px solid rgba(217, 119, 6, 0.5);
  color: #FBBF24;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  display: inline-block;
  margin-bottom: 1rem;
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #CBD5E1;
  max-width: 650px;
  margin-bottom: 2rem;
}

.hero-stat-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  text-align: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.hero-stat-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.12);
}

.hero-stat-num {
  font-size: 1.8rem;
  font-weight: 800;
  color: #38BDF8;
  line-height: 1.1;
}

.hero-stat-label {
  font-size: 0.8rem;
  color: #CBD5E1;
  margin-top: 0.2rem;
}

.hero-book-thumb {
  max-height: 280px;
  border-radius: 12px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
  transform: perspective(1000px) rotateY(-8deg);
  transition: transform 0.3s ease;
}

.hero-book-thumb:hover {
  transform: perspective(1000px) rotateY(0deg) scale(1.03);
}

/* Section Titles */
.section-header {
  margin-bottom: 2.25rem;
}

.section-tag {
  color: var(--accent-cyan);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-title {
  color: var(--primary-navy);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.section-desc {
  color: var(--muted-text);
  font-size: 1.05rem;
}

/* Category Cards */
.category-card {
  background: #FFFFFF;
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  height: 100%;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: flex;
  flex-direction: column;
}

.category-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px rgba(11, 37, 69, 0.08);
  border-color: var(--accent-cyan);
}

.category-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  background: var(--light-blue);
  color: var(--secondary-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
  transition: all 0.3s ease;
}

.category-card:hover .category-icon-box {
  background: var(--primary-navy);
  color: #FFFFFF;
}

.category-badge-pill {
  background: var(--light-blue);
  color: var(--secondary-blue);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
}

.category-title-si {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--primary-navy);
  margin-bottom: 0.25rem;
}

.category-title-en {
  font-size: 0.9rem;
  color: var(--muted-text);
  margin-bottom: 0.75rem;
  font-weight: 500;
}

.category-desc {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.category-action-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.category-card:hover .category-action-link {
  color: var(--primary-navy);
}

/* Category View & Idea Grid */
.view-container {
  display: none;
}

.view-container.active {
  display: block;
}

/* Filter & Search Bar */
.filter-bar-card {
  background: #FFFFFF;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.search-input-group {
  position: relative;
}

.search-input-group .form-control {
  padding-left: 2.75rem;
  padding-right: 2.5rem;
  border-radius: 10px;
  border: 1px solid #CBD5E1;
  height: 48px;
  font-size: 0.95rem;
}

.search-input-group .form-control:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 150, 214, 0.15);
}

.search-icon-inside {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  font-size: 1.05rem;
  z-index: 5;
}

.search-clear-btn {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94A3B8;
  cursor: pointer;
  z-index: 5;
  display: none;
}

.filter-btn-pill {
  border-radius: 30px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid #CBD5E1;
  background: #FFFFFF;
  color: #475569;
  transition: all 0.2s ease;
}

.filter-btn-pill:hover,
.filter-btn-pill.active {
  background: var(--primary-navy);
  color: #FFFFFF;
  border-color: var(--primary-navy);
}

/* Idea Card */
.idea-card {
  background: #FFFFFF;
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: all 0.25s ease;
  cursor: pointer;
  position: relative;
}

.idea-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(11, 37, 69, 0.08);
  border-color: var(--accent-cyan);
}

.idea-id-badge {
  background: var(--light-blue);
  color: var(--secondary-blue);
  font-weight: 800;
  font-size: 0.8rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.idea-card-title-si {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary-navy);
  line-height: 1.35;
  margin-bottom: 0.25rem;
}

.idea-card-title-en {
  font-size: 0.85rem;
  color: var(--muted-text);
  margin-bottom: 0.85rem;
  font-weight: 500;
}

.badges-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.badge-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
}

.badge-capital {
  background: #FEF3C7;
  color: #92400E;
}

.badge-type {
  background: #E0F2FE;
  color: #0369A1;
}

.badge-cashflow {
  background: #DCFCE7;
  color: #166534;
}

.badge-potential {
  background: #F3E8FF;
  color: #7E22CE;
}

.idea-card-overview {
  font-size: 0.88rem;
  color: #475569;
  line-height: 1.5;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.idea-card-footer {
  border-top: 1px solid #F1F5F9;
  padding-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.idea-investment-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-gold);
}

.btn-view-details {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-navy);
  background: var(--light-blue);
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.idea-card:hover .btn-view-details {
  background: var(--primary-navy);
  color: #FFFFFF;
}

/* Modal Detail View */
.modal-idea-header {
  background: var(--primary-navy);
  color: #FFFFFF;
  padding: 1.75rem 2rem;
  border-top-left-radius: calc(0.5rem - 1px);
  border-top-right-radius: calc(0.5rem - 1px);
}

.modal-idea-title-si {
  font-size: 1.4rem;
  font-weight: 800;
  color: #FFFFFF;
  margin-bottom: 0.35rem;
}

.modal-idea-title-en {
  font-size: 0.95rem;
  color: #94A3B8;
  font-weight: 500;
  margin-bottom: 0.85rem;
}

.modal-section-title {
  color: var(--secondary-blue);
  font-size: 1.1rem;
  font-weight: 800;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.detail-card-box {
  background: #FFFFFF;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}

/* Callout Box (Pro Tips) */
.callout-gold-box {
  background: var(--light-gold);
  border: 1px solid #FDE68A;
  border-left: 5px solid var(--accent-gold);
  border-radius: 12px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

.callout-gold-title {
  color: var(--gold-hover);
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Investment Table */
.table-investment {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #CBD5E1;
}

.table-investment thead th {
  background: var(--primary-navy);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0.75rem 1rem;
  border: none;
}

.table-investment tbody td {
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  border-top: 1px solid #E2E8F0;
}

.table-investment tbody tr:nth-child(even) {
  background: #F8FAFC;
}

.table-investment .total-row td {
  background: #EFF6FF;
  font-weight: 800;
  color: var(--primary-navy);
  border-top: 2px solid var(--secondary-blue);
}

/* Bullet item list */
.custom-bullet-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0;
}

.custom-bullet-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.55rem;
  font-size: 0.92rem;
  line-height: 1.5;
}

.custom-bullet-list li::before {
  content: '•';
  color: var(--accent-cyan);
  font-size: 1.4rem;
  position: absolute;
  left: 0.35rem;
  top: -0.25rem;
}

.pro-tip-item {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.65rem;
  font-size: 0.92rem;
  line-height: 1.5;
}

.pro-tip-item::before {
  content: '💡';
  position: absolute;
  left: 0;
  top: 0.1rem;
  font-size: 0.9rem;
}

/* Loading & Empty States */
.state-spinner {
  padding: 4rem 0;
  text-align: center;
}

.empty-state {
  text-align: center;
  padding: 4rem 1rem;
  background: #FFFFFF;
  border-radius: 14px;
  border: 1px dashed var(--card-border);
}

.empty-state-icon {
  font-size: 3rem;
  color: #CBD5E1;
  margin-bottom: 1rem;
}

/* Footer */
.footer-custom {
  background: var(--primary-navy);
  color: #94A3B8;
  padding: 3rem 0 2rem 0;
  margin-top: 5rem;
  font-size: 0.9rem;
}

.footer-custom h5 {
  color: #FFFFFF;
  font-weight: 700;
  margin-bottom: 1rem;
}

.footer-custom a {
  color: #CBD5E1;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-custom a:hover {
  color: #38BDF8;
}

/* Floating Back-to-Top Button */
.btn-floating-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-navy);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  border: none;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.btn-floating-top.show {
  opacity: 1;
  visibility: visible;
}

.btn-floating-top:hover {
  background: var(--accent-cyan);
  color: #FFFFFF;
  transform: translateY(-3px);
}

/* Breadcrumbs */
.breadcrumb-custom {
  background: transparent;
  padding: 0.5rem 0;
  font-size: 0.9rem;
}

.breadcrumb-custom .breadcrumb-item a {
  color: var(--secondary-blue);
  font-weight: 600;
  text-decoration: none;
}

.breadcrumb-custom .breadcrumb-item.active {
  color: #64748B;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.85rem;
  }
  .hero-book-thumb {
    max-height: 200px;
    margin-top: 1.5rem;
    transform: none;
  }
  .section-title {
    font-size: 1.5rem;
  }
}
