@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,400&display=swap');

:root {
  --primary: #102a43;
  --primary-light: #243b53;
  --accent: #d08770;
  --accent-hover: #bf616a;
  --bg-light: #f7f9fb;
  --bg-white: #ffffff;
  --text-dark: #0f172a;
  --text-muted: #627d98;
  --border-color: #e2e8f0;
  --success: #2e7d32;
  --success-bg: #e8f5e9;
  
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
  
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.08), 0 2px 4px -1px rgba(0,0,0,0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
  
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header & Navbar */
header {
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 80px;
}

.logo {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  width: 12px;
  height: 24px;
  background-color: var(--accent);
  border-radius: 2px;
  display: inline-block;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 32px;
}

.nav-link {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-muted);
  position: relative;
  padding: 8px 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--primary);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

/* Hamburger */
.menu-toggle, .menu-btn {
  display: none;
}

/* Hero Section */
.hero {
  position: relative;
  min-height: 550px;
  display: flex;
  align-items: center;
  color: white;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  margin-bottom: 64px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(16, 42, 67, 0.9) 0%, rgba(36, 59, 83, 0.7) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.hero-subtitle {
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 16px;
  display: block;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 48px;
  line-height: 1.2;
  margin-bottom: 24px;
}

.hero-text {
  font-size: 18px;
  margin-bottom: 32px;
  opacity: 0.9;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--accent);
  color: white;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
}

.btn-outline {
  background-color: transparent;
  color: white;
  border: 2px solid white;
  margin-left: 16px;
}

.btn-outline:hover {
  background-color: white;
  color: var(--primary);
}

.btn-dark {
  background-color: var(--primary);
  color: white;
}

.btn-dark:hover {
  background-color: var(--primary-light);
}

/* Sections & Layout grids */
.section {
  padding: 80px 0;
}

.section-bg {
  background-color: var(--bg-white);
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 56px auto;
}

.section-subtitle {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 36px;
  color: var(--primary);
  margin-top: 8px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  align-items: center;
}

/* Cards */
.card {
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  padding: 40px 32px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  font-size: 32px;
  color: var(--accent);
  margin-bottom: 24px;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 12px;
}

.card-text {
  color: var(--text-muted);
  font-size: 15px;
}

/* Fund Cards */
.fund-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.fund-card:hover {
  box-shadow: var(--shadow-md);
}

.fund-header {
  position: relative;
  height: 200px;
  background-size: cover;
  background-position: center;
}

.fund-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--primary);
  color: white;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-sm);
}

.fund-body {
  padding: 24px;
}

.fund-name {
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 8px;
}

.fund-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.fund-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-val {
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
}

.stat-val.positive {
  color: var(--success);
}

/* Charts - Analytics components */
.chart-container {
  background-color: var(--bg-white);
  padding: 32px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  margin-bottom: 40px;
}

.chart-bar-layout {
  display: flex;
  align-items: flex-end;
  height: 250px;
  gap: 20px;
  margin-top: 32px;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 8px;
}

.chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  height: 100%;
  justify-content: flex-end;
}

.chart-bar {
  width: 100%;
  background: linear-gradient(to top, var(--primary), var(--accent));
  border-radius: 4px 4px 0 0;
  transition: var(--transition);
  position: relative;
}

.chart-bar:hover {
  filter: brightness(1.1);
}

.chart-bar-value {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}

.chart-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

/* Tables */
.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  background-color: var(--bg-white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
}

.data-table th, .data-table td {
  padding: 16px 24px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.data-table th {
  background-color: var(--primary);
  color: white;
  font-weight: 600;
  font-size: 14px;
}

.data-table tr:hover {
  background-color: var(--bg-light);
}

/* Forms */
.contact-form {
  background-color: var(--bg-white);
  padding: 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--primary);
  margin-bottom: 8px;
}

.form-input, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 15px;
  transition: var(--transition);
  background-color: var(--bg-light);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background-color: var(--bg-white);
}

/* Success Alert */
.alert-popup {
  visibility: hidden;
  opacity: 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.alert-popup:target {
  visibility: visible;
  opacity: 1;
}

.alert-box {
  background: white;
  padding: 40px;
  border-radius: var(--radius-md);
  max-width: 450px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.alert-popup:target .alert-box {
  transform: translateY(0);
}

.alert-icon {
  width: 64px;
  height: 64px;
  background-color: var(--success-bg);
  color: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin: 0 auto 24px auto;
}

.alert-title {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--primary);
  margin-bottom: 12px;
}

.alert-message {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 32px;
}

.alert-close {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}

.alert-close:hover {
  background: var(--primary-light);
}

/* Footer */
footer {
  background-color: var(--primary);
  color: white;
  padding: 80px 0 40px 0;
  margin-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 40px;
  margin-bottom: 64px;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-desc {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
  line-height: 1.8;
}

.footer-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 24px;
  position: relative;
  padding-bottom: 8px;
}

.footer-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 30px;
  height: 2px;
  background-color: var(--accent);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: #a0aec0;
  font-size: 14px;
}

.footer-links a:hover {
  color: white;
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  color: #a0aec0;
}

/* Media Queries & Responsive Menu Hack & Layout Fixes */
@media (max-width: 992px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 36px;
  }
  .hero {
    min-height: 450px;
  }
  
  /* Show hamburger button */
  .menu-btn {
    display: block;
    cursor: pointer;
    z-index: 110;
    padding: 10px;
  }
  
  .menu-btn-icon {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--primary);
    position: relative;
    transition: var(--transition);
  }
  
  .menu-btn-icon::before, .menu-btn-icon::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background-color: var(--primary);
    transition: var(--transition);
  }
  
  .menu-btn-icon::before {
    top: -8px;
  }
  
  .menu-btn-icon::after {
    top: 8px;
  }

  /* Right-side slideout navbar */
  .nav-menu {
    position: fixed;
    top: 0;
    right: -300px; /* Hide offscreen */
    width: 300px;
    height: 100vh;
    background-color: var(--bg-white);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 120px; /* Align content to center horizontally and top side */
    gap: 32px;
    transition: right 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0);
    z-index: 105;
  }
  
  .nav-link {
    font-size: 18px;
  }

  /* Checkbox Hack Action */
  .menu-toggle:checked ~ .nav-menu {
    right: 0;
  }

  /* Hamburger to Cross icon transition */
  .menu-toggle:checked ~ .menu-btn .menu-btn-icon {
    background-color: transparent;
  }
  
  .menu-toggle:checked ~ .menu-btn .menu-btn-icon::before {
    transform: rotate(45deg);
    top: 0;
  }
  
  .menu-toggle:checked ~ .menu-btn .menu-btn-icon::after {
    transform: rotate(-45deg);
    top: 0;
  }

  /* Fix responsive filters */
  .filter-tabs {
    flex-wrap: wrap;
    gap: 8px;
  }
  .filter-btn {
    font-size: 13px;
    padding: 8px 14px;
  }

  /* Fix Chart columns on mobile */
  .chart-bar-layout {
    height: 350px;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 16px;
    border-bottom: none;
    border-left: 2px solid var(--border-color);
    padding-left: 16px;
    padding-bottom: 0;
  }
  .chart-bar-col {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    height: auto;
    width: 100%;
    gap: 16px;
  }
  .chart-bar {
    height: 20px !important; /* Force width-based horizontal chart */
    border-radius: 0 4px 4px 0;
  }
  .chart-bar-value {
    top: 50%;
    right: -45px;
    left: auto;
    transform: translateY(-50%);
  }
  .chart-label {
    min-width: 100px;
    text-align: right;
  }
}

@media (max-width: 576px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-title {
    font-size: 28px;
  }
  .hero-content .btn {
    display: block;
    width: 100%;
    text-align: center;
    margin-left: 0;
  }
  .hero-content .btn + .btn {
    margin-top: 12px;
  }
  .alert-box {
    padding: 24px;
  }
}

