/* --- Global Styles & Variables --- */
:root {
  --color-dark-bg: #0E0B16;
  --color-blue-bg: #4717f6;
  --color-purple-bg: #A239CA;
  --color-light-bg: #e7dfdd;
  --color-text-light: #F0F0F0;
  --color-text-dark: #333333;
  --color-text-muted: #6c757d;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Poppins", sans-serif;
  font-optical-sizing: auto;
  background-color: var(--color-light-bg);
  color: var(--color-text-dark);
  line-height: 1.7;
}

html, body {
  height: 100%;
  overflow-x: hidden;
}

ul { margin: 0;padding: 0; }

li { list-style: none; }

.color-purple {
  color: var(--color-purple-bg);
}

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

dl,
ol,
ul {
  margin-bottom: 0;
  padding-left: 0;
}

/* --- Header --- */
.main-header {
  background-color: var(--color-dark-bg);
  padding: 15px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--color-light-bg);
  /* box-shadow: 0px 3px 6px rgba(231, 223, 221, 20%); */
  border-bottom: 1px solid #2c2c3a;
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 30px;
}

.main-nav a {
  color: var(--color-text-light);
  font-weight: 500;
  transition: color 0.3s ease;
}

.main-nav a:hover { color: var(--color-purple-bg);}

/* --- Hero Section --- */
.hero {
  background-color: var(--color-purple-bg);
  color: var(--color-text-light);
  padding: 80px 0;
  text-align: center;
}

.hero-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 6px solid #FFFFFF;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  margin: 0 auto 25px;
  object-fit: cover;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 400;
  margin-bottom: 5px;
}

.hero p {
  font-size: 1.2rem;
  font-weight: 400;
  opacity: 0.9;
}

/* --- About Section --- */
.about { padding: 100px 0; }

.about-content {
  max-width: 800px;
  margin: 0 auto;
  text-align: justify;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

.about-content p { margin-bottom: 25px; }
.about-content p:last-child { margin-bottom: 0; }

/* --- CTA Profits Section --- */
.cta-profits { background-color: #FFFFFF }

.cta-profits-image,
.cta-profits-text { flex: 1; }
.cta-profits .custom-title { padding: 12rem 0; }
.cta-profits .custom-title h2 { color: var(--color-dark-bg); }

.custom-title h2 {
  font-size: 2.4rem;
  font-weight: 400;
  margin-bottom: 1rem;
  text-align: center;
  width: 100%;
  line-height: 2rem;
  letter-spacing: -0.1rem;
}

.custom-title h2::first-line { font-size: 2rem; }

.btn {
  display: inline-block;
  padding: 12px 40px;
  border-radius: 50px;
  font-weight: 400;
  text-align: center;
  transition: all 0.3s ease;
  font-size: 15px;
}

.btn-dark {
  background-color: var(--color-dark-bg);
  color: var(--color-text-light);
}

.btn-dark:hover {
  background-color: #000000;
  transform: translateY(-2px);
}


.cta-calculator {
  background-color: var(--color-purple-bg);
  padding: 100px 0;
  text-align: center;
  color: var(--color-text-light);
}

.btn-light {
  background-color: #FFFFFF;
  color: var(--color-text-dark);
}

.btn-light:hover {
  background-color: var(--color-light-bg);
  transform: translateY(-2px);
}

/* --- Footer ---  */
.main-footer {
  background-color: var(--color-dark-bg);
  color: #A0A0B0;
  padding-top: 60px;
  border-top: 1px solid #2c2c3a;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 40px;
  border-bottom: 1px solid #2c2c3a;
}

.footer-bottom {
  padding: 20px 0;
  text-align: center;
  font-size: 0.9rem;
}

.footer-logo { font-size: 1.8rem; }

.footer-logo span {
  font-size: 1rem;
  vertical-align: super;
}

.footer-info {
  text-align: justify;
  font-size: 12px;
  padding: 1rem 0;
  border-bottom: 1px solid #2c2c3a;
}

/* --- Calculator Section --- */
.calculator-section {
  background-color: var(--color-dark-bg);
  padding: 50px 0;
}

.calculator-wrapper {
  max-width: 900px;
  margin: 0 auto;
  color: var(--color-text-light);
  background-color: var(--color-dark-bg);
}

.calculator-wrapper .custom-title h2 { color: #FFFFFF; }

.calculator-wrapper .subtitle {
  text-align: center;
  margin-bottom: 2.5rem;
}

.calculator-wrapper h3 {
  font-size: 1.75rem;
  margin-top: 3rem;
  margin-bottom: 2rem;
  border-top: 1px solid #3A3A5A;
  padding-top: 2.5rem;
  text-align: center;
  /* font-weight: 600; */
}

/* Form Styling */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 2rem;
}

.form-group label {
  font-size: 0.9rem;
  /* font-weight: 500; */
  margin-bottom: 0.5rem;
  color: #C0C0D0;
  display: block;
}

.input-group { display: flex; }

.input-group-text {
  padding: 0.75rem 1rem;
  background-color: var(--color-purple-bg);
  /* background-color: #3A3A5A; */
  border: 1px solid #4A4A6A;
  border-right: none;
  border-radius: 8px 0 0 8px;
  color: #FFFFFF;
}

.form-control {
  width: 100%;
  /* background-color: #2A2A4A; */
  background-color: var(--color-purple-bg);
  border: 1px solid #4A4A6A;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  color: #FFFFFF;
  font-family: 'Poppins', sans-serif;
}

.form-control:focus {
  outline: none;
  border-color: var(--color-purple-bg);
  box-shadow: 0 0 0 0px rgba(138, 43, 226, 0.3);
  /* background-color: #2A2A4A; */
  background-color:  rgba(162, 57, 202, 0.6);
  color: #FFFFFF;
  transition: .7s;
}

.form-control.interest-select,
.form-control.period-select {
  flex-grow: 0;
  width: auto;
  border-left: 1px solid #4A4A6A;
  cursor: pointer;
}

/* Button Styling */
.button-group {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}


/* Results Styling */
#results-section { margin-top: 3rem; }

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0 4rem;
}

.result-box {
  background-color: #2A2A4A;
  padding: 1.5rem;
  border-radius: 10px 0;
  text-align: center;
  border: 1px solid #3A3A5A;
}

.result-box.highlight {
  background-color: #A239CA;
  border-color: #A239CA;
}

.result-box p {
  margin: 0 0 0.5rem 0;
  font-size: 1rem;
  /* font-weight: 500; */
  color: #C0C0D0;
}

.result-box .value {
  font-size: 2rem;
  font-weight: 700;
  color: #FFFFFF;
}

.result-box.highlight p,
.result-box.highlight .value { color: #FFFFFF; }

/* Chart & Table Styling */
.table-container {
  max-height: 400px;
  overflow-y: auto;
  border-radius: 8px;
  border: 1px solid #3A3A5A;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 0.8rem 1.2rem;
  text-align: right;
  border-bottom: 1px solid #3A3A5A;
  white-space: nowrap;
}

th:first-child,
td:first-child { text-align: left; }

thead th {
  background-color: rgba(162, 57, 202, 0.6);
  /* background-color: #3A3A5A; */
  position: sticky;
  top: 0;
  /* font-weight: 600; */
  color: #FFFFFF;
}

tbody tr:last-child td { border-bottom: none; }

tbody tr:nth-child(even) { background-color: #202038; }

/* --- Responsive Adjustments --- */
@keyframes fade-to-right {
  0% {
    opacity: 0;
    transform: translateX(0);
  }
  100% {
    opacity: 1;
    transform: translateX(90%);
  }
}  

@keyframes toLeft {
  0% {
    opacity: 0;
    transform: translateX(100%);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@media (max-width: 992px) {
  .cta-profits .custom-title h2 { font-size: 2rem; }

  .menu-box {
    position: fixed;
    background-color: #1b1d1f;
    color: var(--color-text-light);
    text-transform: uppercase;
    inset: 0;
    animation: toLeft .5s linear;
    width: 90%;
    margin-left: 10%;
  }

  .menu-box ul {
    flex-direction: column;
    font-size: 1.4rem;
    font-weight: 500;
    padding-top: 2rem;
    padding-left: 1rem;
  }

  .menu-box .position-relative {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
}

@media (max-width: 768px) {

  .main-header .container,
  .footer-top {
    flex-direction: column;
    gap: 20px;
  }

  .main-nav ul {gap: 20px;}
  .hero h1 {font-size: 2.5rem;}
  .cta-profits .custom-title {padding: 6rem 0;}
  .about,
  .calculator-section {padding: 60px 0;}
  .form-grid {grid-template-columns: 1fr;}
  .calculator-wrapper {padding: 0 1.5rem;}
}
