/* ===================================================== */
/* ROOT VARIABLES */
/* ===================================================== */

:root {
  --primary-color: #2FC1A4;
  --accent-color: #c40000;
  --dark-color: #000;
  --light-bg: #F8F8F3;
  --header-bg: #fefefe00;
  --footer-bg: #ddddddeb;
  --header-height: 70px;
}

:root {

  --banner-home-img: url("green_yellow_spects.jpg");
  --banner-homeportfolio-img: url("portfolio_pencils_green.jpg");
  --banner-products-img: url("products_pencils.jpg");
  --banner-insights-img: url("green_cork.jpg");
  --banner-about-img: url("about_client_specific.jpg");
  --banner-calculators-img: url("calculators_page.jpg");
  --banner-login-img: url("reporting_pencil_marker.jpg");
  --banner-loginmessage-img: url("coming_soon_clock.jpg");
  --banner-goalcalc-img: url("goal_goal.jpg");
  --banner-investcalc-img: url("portfolio_play.jpg");
  --banner-retirecalc-img: url("retire_sailing.jpg");
}

/* ============================= */
/* GLOBAL RESET */
/* ============================= */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  margin: 0px;
  font-family: Verdana, sans-serif;
  background: var(--light-bg);
  color: var(--dark-color);
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Default (Light Mode) */
.logo-dark {
  display: none;
}

/* ============================= */
/* CONTAINER */
/* ============================= */

.container, 
.products-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

main.container {
  padding-top: var(--header-height);
  margin-top: 20px;
  text-align: center;
}

/* ===================================================== */
/* HEADER */
/* ===================================================== */

header {
  width: 100%;
  height: var(--header-height);
  background: var(--header-bg);
  position: fixed;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,0);
  backdrop-filter: blur(0px);
  transition: background 0.35s ease, backdrop-filter 0.35s ease, box-shadow 0.35s ease;
}

/* When user scrolls */
header.scrolled {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(6px);
  box-shadow: 0 3px 12px rgba(0,0,0,0.08);
}

.header-container {
  display: flex;
  justify-content: space-between; /* logo left, nav/toggle right */
  align-items: center;
  height: 100%;
  padding: 0 16px;
}

.logo {
  height: 50px;
  width:auto;
}

.right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.header-container img {
  height: 50px;        /* fits nicely in 70px header */
  width: auto;         /* maintain aspect ratio */
  vertical-align: middle;
}

/* ===================================================== */
/* NAVIGATION */
/* ===================================================== */

/* Hamburger toggle */
.menu-toggle {
  display: flex; /* visible on mobile */
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 24px;
  cursor: pointer;
}

.menu-toggle span {
  height: 3px;
  background: black;
  border-radius: 2px;
  transition: all 0.3s ease;   /* smooth animation */
}

/* Transform to X when menu is open */

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px,6px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px,-6px);
}


/* Nav links (hidden by default on mobile) */
.nav-links {
  position: fixed;
  top: var(--header-height);
  right: -100%;   /* start off-screen */
  width: 70%;
  height: 100%;
  background: rgba(255,255,255,0.92);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: right 0.3s ease;
  z-index: 1000; /* ensure above content */
}

/* Active state: slide in */
.nav-links.active {
  right: 0;
}

/* Links styling */
.nav-links a {
  color: black;
  text-decoration: none;
  font-weight: 500;
  padding: 10px 0;
  transition: color 0.3s ease, border-bottom 0.3s ease;
}
.nav-links a:hover {
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
}

/* Overlay */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 900;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* ===================================================== */
/* BANNERS */
/* ===================================================== */

.banner-home,
.banner-homeportfolio,
.banner-products,
.banner-insights,
.banner-about,
.banner-login,
.banner-goalcalc,
.banner-investcalc,
.banner-retirecalc,
.banner-loginmessage,
.banner-calculators {
  background-size: cover;
  background-position: center;
  height: calc(100vh - var(--header-height));
  display: flex;              /* center text inside */
  align-items: center;        /* center horizontally */
  flex-direction: column; /* stack children vertically */
  justify-content: flex-end; /* optional: center vertically if needed */
  text-align: center;
  padding-bottom: 80px;
}

/* light-mode banners */
.banner-home {
  background-image: linear-gradient(rgba(255,255,255,0.75), rgba(255,255,255,0.5)),
                    var(--banner-home-img);
}

.banner-homeportfolio {
  background-image: linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.5)),
                    var(--banner-homeportfolio-img);
}

.banner-calculators {
  background-image: linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0.5)),
                    var(--banner-calculators-img);
}

.banner-goalcalc {
  background-image: linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0.5)),
                    var(--banner-goalcalc-img);
}

.banner-investcalc {
  background-image: linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0.5)),
                    var(--banner-investcalc-img);
}

.banner-retirecalc {
  background-image: linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0.5)),
                    var(--banner-retirecalc-img);
}

.banner-products {
  background-image: linear-gradient(rgba(255,255,255,0.4), rgba(255,255,255,0.4)),
                    var(--banner-products-img);
}

.banner-insights {
  background-image: linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0.5)),
                    var(--banner-insights-img);
}

.banner-about {
  background-image: linear-gradient(rgba(255,255,255,0.4), rgba(255,255,255,0.4)),
                    var(--banner-about-img);
}

.banner-login {
  background-image: linear-gradient(rgba(255,255,255,0.4), rgba(255,255,255,0.4)),
                    var(--banner-login-img);
}

.banner-loginmessage {
  background-image: linear-gradient(rgba(255,255,255,0.5), rgba(255,255,255,0.5)),
                    var(--banner-loginmessage-img);
}

.banner-subtext {
  color: #181818;
  font-size: 1.2rem;
  margin-bottom: 20px; /* space between subtext and span */
  display: block;
  max-width: 800px;
  padding: 0 20px;      /* ensures it takes full width */
}

.banner-home h2,
.banner-homeportfolio h2,
.banner-products h2,
.banner-insights h2,
.banner-about h2,
.banner-login h2,
.banner-loginmessage h2,
.banner-calculators h2,
.banner-goalcalc h2,
.banner-investcalc h2,
.banner-retirecalc h2 {
  padding: 12px;
  border-radius: 5px;
}

/* ===================================================== */
/* LANDING PAGE CARDS */
/* ===================================================== */

.landing-grid {
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 50px;              /* was 30px → increase */
  padding: 80px 60px;     /* more breathing room */
  max-width: 1400px;      /* slightly wider layout */
  margin: 0 auto;
}

.landing-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;   /* smoother */
  /*border-top: 4px solid #0eeed0;*/
  text-decoration: none;
  color: white;
  display: block;
  box-shadow: 0 15px 30px rgba(0,0,0,0.08);  /* subtle lift */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.landing-card img {
  width: 100%;
  height: 420px;   /* was 350px */
  object-fit: cover;
  transition: transform 0.4s ease;
}

/* Overlay */
.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;   /* was 20px */
  transition: background 0.4s ease;
}

/* Heading always visible */
.card-overlay h2 {
  margin: 0;
  font-size: 24px;
  font-weight: bold;
}

/* Description hidden initially */
.card-overlay p {
  margin-top: 10px;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

/* Hover Effects */
.landing-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 45px rgba(0,0,0,0.12);
}

.landing-card:hover .card-overlay {
  background: rgba(0, 0, 0, 0.75); /* darker inverted shade */
}

.landing-card:hover .card-overlay p {
  opacity: 1;
  transform: translateY(0);
}

/* ===================================================== */
/* BUTTON SYSTEM */
/* ===================================================== */

.btn {
  display: inline-block;
  grid-column: span 2;
  justify-self: center;
  margin-top: 30px;
  padding: 12px 35px;
  background: rgb(68, 68, 68);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: 0.3s ease;
}

.btn:hover {
  background: var(--accent-color);
}

/* ===================================================== */
/* PRODUCT CARDS */
/* ===================================================== */

.product-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding: 1.5rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fafafa;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  background-color: #fdfdfd; /* subtle change */
}

.product-icon {
  flex: 0 0 20%;
  text-align: center;
  font-size: 48px;
  color: #c40000;
}

.product-details {
  flex: 0 0 75%;
}

.product-details h2 {
  font-size: 22px;
  margin-bottom: 0.5rem;
}

.product-details p,
.product-details ul {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
}

/* ============================= */
/* Services Solutions Products */
/* ============================= */

.ssp-section {
  padding: 50px 20px;
  background: linear-gradient(180deg, #f6f8fc, #eef2f8);
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  margin-bottom: 10px;
  color: #1a2b49;
}

.section-header p {
  color: #666;
  max-width: 700px;
  margin: auto;
}

.ssp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.ssp-card {
  background: rgba(255, 255, 255, 0.893);
  padding: 25px;
  border-radius: 14px;
  border-top: 4px solid #0eeed0;
  box-shadow: 0 12px 30px rgba(0,0,0,0.06);
  transition: all 0.35s ease;
  position: relative;
}

.ssp-card:hover {
  transform: translateY(-6px);
}

.ssp-card h3 {
  margin-bottom: 15px;
  color: rgb(46, 46, 46);
}

.ssp-card p {
  font-size: 15px;
  color: #555;
  margin-bottom: 20px;
  line-height: 1.6;
}

.ssp-card ul {
  list-style: none;
  padding: 0;
}

.ssp-card ul li {
  margin-bottom: 10px;
  font-size: 14px;
  color: #333;
  position: relative;
  padding-left: 22px;
}

.ssp-card ul li::before {
  content: "";
  width: 8px;
  height: 8px;
  background: #373737;
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 8px;
}

/* ===================================================== */
/* CALCULATOR GRID */
/* ===================================================== */

#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-box {
  text-align: center;
  color: white;
  font-size: 20px;
}

.spinner {
  border: 4px solid rgba(255,255,255,0.2);
  border-top: 4px solid #00c3ff;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  margin: 0 auto 20px auto;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% { transform: rotate(360deg); }
}

.calculator-navigation{
  text-align:center;
  padding:20px 10px;
}

.calc-nav-title{
  font-size:14px;
  letter-spacing:1px;
  opacity:0.7;
  margin-bottom:20px;
}

/* ===================================================== */
/* FORM GRID */
/* ===================================================== */

.subheading {
  font-size: 0.9em;
  color: #555;
  margin-top: 10px;
  margin-bottom: 25px;
}

.calc-form{
  max-width: 1100px;
  margin: auto;
}

.form-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

/* field container */
.form-group{
  display: flex;
  flex-direction: column;
}

/* labels */
.form-group label{
  font-size: 14px;
  margin-bottom: 6px;
  font-weight: 500;
  text-align: left;
}

/* inputs */
.form-group input,
.form-group select{
  width: 100%;
  height: 42px;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

/* SIP combo field */
.input-with-value{
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 10px;
}

.input-with-value input{
  display: none;
}

/* submit button */

#sipTypeGroup {
  grid-column: 1;
}

#sipValueGroup {
  grid-column: 2;
}

#chart {
  margin-top: 40px;
}

h3 {
  margin-top: 50px;
}

.input-with-value {
  display: flex;
  align-items: center;
  gap: 12px; /* space between dropdown and value */
}

.input-with-value select {
  flex: 1; /* dropdown takes available width */
}

.input-with-value span {
  white-space: nowrap;
  font-weight: bold;
  color: #333;
}

.input-with-value input {
  width: 100px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fafafa;
  text-align: left;
  font-weight: normal;
}

.approach-input {
  height: 36px;           /* fixed height for all */
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fafafa;
  font-size: 14px;
  line-height: 1.4;
  box-sizing: border-box;
}

.approach-input[readonly] {
  text-align: left;
}

/* Applicable for goal calculator as input fields are less */
.goalcalc-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 30px;
  margin: 30px auto;
  max-width: 650px;
  align-items: start;
}

.goalcalc-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}


/* ============================= */
/* DOWNLOAD CONTAINER */
/* ============================= */

#results{
  scroll-margin-top:120px;
}

.chart-wrapper {
    position: relative;
    width: 100%;
}

.chart-container {
  width: 100%;
  margin: 25px auto;
}

.download-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 10;
}

.download-icon {
    color: #1D6F42;
    font-size: 20px;
    background: white;
    padding: 6px;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.download-icon:hover {
  color: #c40000; /* hover effect */
}

.message-container {
  background: #f4f4f4;
  font-family: Verdana, sans-serif;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin-top: 20px;
  margin-bottom: 40px;
  padding: 16px;
  background: rgba(255,255,255,0.8);
  border-radius: 8px;
  text-align: left;
}

.summary-title {
  font-weight: bold;
  display: block;
  margin-bottom: 12px;
}

.summary-text {
  white-space: normal;
  line-height: 1.6;
  font-size: 15px;
}
.summary-text b {
  color: #1f2c56;
  font-weight: 600;
}

.banner-home h1,
.banner-homeportfolio h1,
.banner-products h1,
.banner-insights h1,
.banner-about h1,
.banner-login h1,
.banner-loginmessage h1,
.banner-calculators h1,
.banner-goalcalc h1,
.banner-investcalc h1,
.banner-retirecalc h1 {
  color: #141414;
  font-size: 2em;
  padding: 12px;
  border-radius: 5px;
}

.message-container pre {
  white-space: pre-wrap;
  word-wrap: break-word;
  margin-bottom: 10px;
  font-size: 14px;
}

.download-container .js-plotly-plot {
  width: 100% !important;
}

.download-container .plot-container {
  width: 100%;
}

/* Desktop height */
.chart-container .js-plotly-plot {
  height: 450px;
}



/* ===================================================== */
/* LOGIN PAGE */
/* ===================================================== */

.login-actions,
.calculator-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.login-card,
.calculator-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  background: rgba(255,255,255,0.9);
  color: #333;
  transition: all 0.25s ease;
}

.login-card i,
.calculator-card i {
  font-size: 18px;
}

.login-card:hover,
.calculator-card:hover {
  transform: translateY(-2px);
  background: #ffffff;
}

/* ===================================================== */
/* FOOTER */
/* ===================================================== */

footer {
  background: var(--footer-bg);
  color: black;
  padding: 0 8px;
  position: relative;
}

/* Social container */
.footer-social {
  position: absolute;
  top: -25px;         /* makes it spill out */
  right: 40px;
  display: flex;
  gap: 12px;
}

/* Individual icons */
.footer-social a {
  width: 45px;
  height: 45px;
  background: #000;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  text-decoration: none;
  transition: 0.3s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

.footer-social a:nth-child(1):hover {
  background: #DB4437;   /* Gmail red */
}

.footer-social a:nth-child(2):hover {
  background: #25D366;   /* WhatsApp green */
}

.footer-social a:nth-child(3):hover {
  background: #0077B5;   /* LinkedIn blue */
}

.footer-social a:nth-child(4):hover {
  background: #FBBC05;   /* Googlemap yellow */
}

/* Hover effect */
.footer-social a:hover {
  transform: translateY(-4px);
}

.footer-top {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
  margin-bottom: 6px;
  padding: 0 10px;
}
.footer-left h4,
.footer-right h4 {
  margin-bottom: 12px;
}

.footer-left {
  flex: 0 0 40%;
  margin-bottom: 5px;
  margin-right: auto;
}

.footer-right {
  flex: 0 0 60%;
  margin-bottom: 5px;
  margin-left: auto;
}

.footer-right .disclaimer .compliance {
  font-size: 0.7em;
  text-align: justify;
}

.footer-right .disclaimer .disclaimer-text {
  font-size: 0.6em;
  text-align: justify;
}

.footer-bottom {
  text-align: center;
  margin-top: 5px;
  padding: 0 5px;
}

.footer-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.footer-stack .logo {
  max-width: 260px;
  height: auto;
  margin: 15px auto 5px auto;
}

.copyright {
  display: inline-flex;
  gap: 4px;
  font-size: 0.6em;
  align-items: center;
}

.red-dots {
  color: red;
}

.red-separator {
  color: red;
}

/* Footer form layout */
.footer-form {
  display: flex;
  flex-direction: column;
  gap: 8px; /* controls vertical spacing */
  max-width: 320px;
}

/* Inputs + textarea */
.footer-form input,
.footer-form textarea {
  width: 100%;
  padding: 6px 6px;
  border-radius: 6px;
  border: none;
  font-size: 12px;
}

/* Bigger message box */
.footer-form textarea {
  min-height: 90px;
  resize: vertical;
}

/* Button styling */
.footer-form button {
  margin-top: 6px;
  padding: 6px 14px;
  border-radius: 6px;
  border: none;
  background-color: #444;
  color: white;
  cursor: pointer;
  transition: 0.3s ease;
}

.footer-form button:hover {
  background-color: #c40000;
}

/* Popup after sending email */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s ease;
  z-index: 9999;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup-message {
  background: white;
  padding: 30px 40px;
  border-radius: 12px;
  font-size: 18px;
  text-align: center;
  animation: popIn 0.3s ease;
}

@keyframes popIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ===================================================== */
/* ABOUT PAGE - SECTIONS */
/* ===================================================== */

.section {
    padding: 2px 0;
}

.section h3 {
    margin-bottom: 15px;
    color: #0f2b46;
}

.section p {
    margin-bottom: 20px;
}

.section ul {
    margin-top: 10px;
    padding-left: 20px;
}

.section ul li {
    margin-bottom: 8px;
}

/* Alternate background */
.alt {
    background-color: #f5f7fa;
}

/* ===================================================== */
/* MEDIA QUERIES - FOR RESPONSIVENESS */
/* ===================================================== */

/* ===================================================== */
/* DESKTOP NAVIGATION */
/* ===================================================== */

@media (min-width: 769px) {

  /* Hide hamburger */
  .menu-toggle {
    display: none;
  }

  /* Restore horizontal menu */
  .nav-links {
    position: static;
    transform: none;
    height: auto;
    width: auto;

    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 24px;

    background: transparent;
    backdrop-filter: none;
    padding: 0;
  }

  .nav-links li {
    width: auto;
  }

  .nav-links a {
    padding: 0;
  }

  /* Overlay never needed on desktop */
  .overlay {
    display: none;
  }

}

@media (max-width: 768px) {

  .nav-links {
    position: fixed;
    top: var(--header-height);
    right: 0;              /* attach to right side */
    width: 50%;            /* cover half screen */
    height: calc(100vh - var(--header-height));

    display: flex;
    flex-direction: column;
    align-items: stretch;

    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);

    padding: 20px 0;

    transform: translateX(100%);
    transition: transform 0.3s ease;

    z-index: 1000;
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .nav-links li {
    list-style: none;
    width: 100%;
  }

  .nav-links a {
    display: block;
    width: 100%;
    padding: 16px 24px;
    text-decoration: none;
    color: var(--text-color);
  }

}

@media (max-width: 768px) {

  .banner-home,
  .banner-products,
  .banner-insights,
  .banner-about,
  .banner-login,
  .banner-calculators,
  .banner-goalcalc,
  .banner-investcalc,
  .banner-retirecalc {
      height: 70svh;
      padding-bottom: 40px
  }

  .banner-homeportfolio,
  .banner-loginmessage {
    height: 70svh;
      padding-bottom: 40px
  }

  .landing-grid {
    display: flex;
    overflow-x: auto;
    gap: 20px;
    padding: 40px 20px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; /* smooth iOS scroll */
  }

  .landing-grid::-webkit-scrollbar {
    display: none; /* hide scrollbar */
  }

  .landing-card {
    flex: 0 0 85%;  /* each card takes 85% of screen */
    scroll-snap-align: start;
  }

}

@media (max-width: 768px) {
  .calc-card {
    flex: 1 1 100%;     /* full width on mobile */
    max-width: 100%;
  }
  .card-image {
    height: 250px;      /* slightly shorter for mobile */
  }
}

@media (max-width: 768px) {

  .login-actions,
  .calculator-actions {
    flex-direction: column;
    align-items: center;
  }

  .login-card,
  .calculator-card {
    width: 220px;
    justify-content: center;
  }

}

@media (max-width: 992px) {
  .calc-form,
  .goalcalc-form {
    grid-template-columns: repeat(2, 1fr);
  }

  .calc-form button,
  .goalcalc-form button {
    grid-column: span 2;
  }

  #sipTypeGroup {
    grid-column: 1;
  }

  #sipValueGroup {
    grid-column: 2;
  }
}

@media (max-width: 600px) {
  .calc-form,
  .goalcalc-form {
    grid-template-columns: 1fr;
  }

  .calc-form button,
  .goalcalc-form button {
    grid-column: span 1;
  }

  #sipTypeGroup,
  #sipValueGroup {
    grid-column: 1;
  }
}

@media (max-width:768px){
.form-grid{
  grid-template-columns: 1fr;
}
}

/* Slightly smaller on mobile */
@media (max-width: 768px) {
    .download-container {
        top: 6px;
        right: 6px;
    }

    .download-icon {
        font-size: 12px;
        padding: 3px;
    }
}

@media (max-width: 768px) {

  .card-overlay {
    background: rgba(0, 0, 0, 0.6);
  }

  .card-overlay p {
    opacity: 1;
    transform: translateY(0);
  }

}

@media (max-width: 768px) {

  .footer-top {
    flex-direction: column;     /* stack vertically */
    align-items: flex-start;    /* align text left */
    gap: 20px;                  /* spacing between sections */
  }

  .footer-left,
  .footer-right {
    flex: 1 1 100%;
    width: 100%;
  }

  .footer-right .disclaimer {
    text-align: left;   /* cleaner for mobile */
  }

  .footer-stack .logo {
    max-width: 180px;
  }

}

@media (max-width: 768px) {
  .footer-social {
    right: 50%;
    transform: translateX(50%);
    top: -22px;   /* adjust spill slightly */
  }
}

@media (max-width: 768px) {

  .footer-social a {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

}

@media (max-width: 768px) {
  .download-container {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .modebar {
    display: none !important;
  }
}

/* Mobile height */
@media (max-width: 768px) {
  .chart-container .js-plotly-plot {
    height: 320px;
  }
}

/* ===================================================== */
/* SYSTEM DARK MODE */
/* ===================================================== */

@media (prefers-color-scheme: dark) {

  :root {
    --primary-color: #2FC1A4;
    --accent-color: #ff4a4a;
    --dark-color: #e8e8e8;
    --light-bg: #121212;
    --header-bg: #fefefe00;
    --footer-bg: #262525;
  }

  .menu-toggle span {
    background-color: #ddd;
  }

  body {
    background: var(--light-bg);
    color: var(--dark-color);
  }

  header {
    background: var(--header-bg);
  }

  header.scrolled {
  background: rgba(20,20,20,0.92);
  }

  .nav-links a {
    color: #ddd;
  }

  .product-card,
  .calc-card,
  .ssp-card {
    background: #1f1f1f;
    border-color: #333;
  }

  .product-details p,
  .calc-card p,
  .ssp-card p {
    color: #bbb;
  }

  input,
  select,
  textarea {
    background: #1f1f1f;
    color: #eee;
    border: 1px solid #444;
  }

  .message-container {
    background: rgba(30,30,30,0.9);
  }

  header {
    background: var(--header-bg);
  }

  footer {
    background: var(--footer-bg);
    color: #ddd;
  }

  .ssp-section {
  background: linear-gradient(180deg, #1f1f1f, #252627);
 }

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  color: #ddd;
}

.section-header p {
  color: #ffffff;
}

.ssp-card {
  background: rgba(57, 57, 57, 0.502);
  padding: 40px;
  border-radius: 14px;
  border-top: 4px solid #0eeed0;
  box-shadow: 0 12px 30px rgba(59, 59, 59, 0.427);
  transition: all 0.35s ease;
  position: relative;
}

.ssp-card h3 {
  color: #ddd;
}

.ssp-card p {
  color: #ffffff;
}

.ssp-card ul li {
  color: #ddd;
}

.ssp-card ul li::before {
  background: #ddd;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  background: rgb(68, 68, 68);
  color: #ffffff;
  border-radius: 30px;
  text-decoration: bold;
  cursor: pointer;
  transition: 0.3s ease;
}

.btn:hover {
  background: var(--accent-color);
}

.input-with-value input {
  width: 100px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: rgb(31, 31, 31);
  text-align: left;
  font-weight: normal;
}

.approach-input {
  height: 36px;           /* fixed height for all */
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: rgb(31, 31, 31);
  font-size: 14px;
  line-height: 1.4;
  box-sizing: border-box;
}

.summary-text b {
  color: #ddd;
  font-weight: 600;
}

body {
  background: var(--light-bg);
  color: var(--dark-color);
}

.banner-subtext {
  color: #ddd;
}

.banner-home h2,
.banner-homeportfolio h2,
.banner-products h2,
.banner-insights h2,
.banner-about h2,
.banner-login h2,
.banner-loginmessage h2,
.banner-calculators h2,
.banner-goalcalc h2,
.banner-investcalc h2,
.banner-retirecalc h2 {
  color: #ffffff;
  padding: 12px;
  border-radius: 5px;
}

.logo-light {
  display: none;
}

.logo-dark {
  display: block;
}

}

/* dark-mode banners */

@media (prefers-color-scheme: dark) {

  .banner-home {
    background-image: linear-gradient(rgba(0,0,0,0.60), rgba(0,0,0,0.40)),
                      var(--banner-home-img);
  }

  .banner-homeportfolio {
    background-image: linear-gradient(rgba(0,0,0,0.60), rgba(0,0,0,0.40)),
                      var(--banner-homeportfolio-img);
  }

  .banner-calculators {
    background-image: linear-gradient(rgba(0,0,0,0.60), rgba(0,0,0,0.40)),
                      var(--banner-calculators-img);
  }

  .banner-goalcalc {
    background-image: linear-gradient(rgba(0,0,0,0.60), rgba(0,0,0,0.40)),
                      var(--banner-goalcalc-img);
  }

  .banner-investcalc {
    background-image: linear-gradient(rgba(0,0,0,0.60), rgba(0,0,0,0.40)),
                      var(--banner-investcalc-img);
  }

  .banner-retirecalc {
    background-image: linear-gradient(rgba(0,0,0,0.60), rgba(0,0,0,0.40)),
                      var(--banner-retirecalc-img);
  }

  .banner-products {
    background-image: linear-gradient(rgba(0,0,0,0.60), rgba(0,0,0,0.40)),
                      var(--banner-products-img);
  }

  .banner-insights {
    background-image: linear-gradient(rgba(0,0,0,0.60), rgba(0,0,0,0.40)),
                      var(--banner-insights-img);
  }

  .banner-about {
    background-image: linear-gradient(rgba(0,0,0,0.60), rgba(0,0,0,0.40)),
                      var(--banner-about-img);
  }

  .banner-login {
  background-image: linear-gradient(rgba(0,0,0,0.60), rgba(0,0,0,0.40)),
                    var(--banner-login-img);
}

.banner-loginmessage {
  background-image: linear-gradient(rgba(0,0,0,0.60), rgba(0,0,0,0.40)),
                    var(--banner-loginmessage-img);
}

}

@media (prefers-color-scheme: dark) {

  .login-card,
  .calculator-card {
    background: rgba(255,255,255,0.08);
    color: #f0f0f0;
  }

  .login-card:hover,
  .calculator-card:hover {
    background: rgba(255,255,255,0.15);
  }

}

@media (prefers-color-scheme: dark) and (max-width: 768px) {

  .nav-links {
    background: rgba(20, 20, 20, 0.92);
    backdrop-filter: blur(8px);
  }

}