body {
    font-family: Arial, sans-serif;
    text-align: center;
    background-color: #f4f4f4;
}

/* Main Container */
.container {
    max-width: 90%; /* Make it adaptive */
    margin: auto;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}


/* Improve radio button alignment */
.input-group {
    display: flex;
    justify-content: center;
    gap: 15px; /* Adds spacing between options */
    flex-wrap: wrap; /* Allows wrapping for smaller screens */
    margin-top: 10px;
}

.input-group input[type="radio"] {
    margin-right: 5px; /* Adds spacing between button & text */
    transform: scale(1.2); /* Increases size slightly */
}


.input-group label {
    display: inline-block;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    padding: 10px 15px;
}

/* Dropdown Styling */
select {
    padding: 8px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    width: 100%;
    max-width: 300px;
    margin: 10px 0;
}


/* Sliders */
.slider-container {
    margin: 15px 0;
    align-items: center;
   
    
     
}

/* Buttons */
#investmentOptions button {
    /*display: inline-block; /* Stack buttons on mobile */
    width: auto; /* Full width */
    padding: 12px 20px;
    font-size: 16px;
    margin: 5px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    min-width: 200px; /* Prevent too small buttons */
    text-align: center;
    transition: background 0.3s, transform 0.2s;
    
}

#investmentOptions button:hover {
    background: #0056b3;
}
#investmentOptions {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap; /* Ensures proper wrapping if needed */
}
.investment-type-btn {
    padding: 10px 20px;
    border: 2px solid #007bff;
    background: white;
    color: #007bff;
    font-size: 16px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;

}

.investment-type-btn:hover {
    background: #007bff;
    color: white;
}
.investment-type-btn.active {
    background: #007bff;
    color: white;
    border-color: #0056b3;
}
/* Toggle SIP/Lumpsum Buttons */
.toggle-btn {
    background: #ddd;
    padding: 10px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
}


.toggle-btn.active {
    background: #007bff;
    color: white;
}
/* Frequency Selection Buttons */
.freq-btn {
    padding: 8px 15px;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
    transition: 0.3s;
}

.freq-btn:hover {
    background: #ddd;
}

.freq-btn.active {
    background: #007bff;
    color: white;
}

/* Chart and Summary Side by Side */
.chart-summary-container {
    display: flex;
  justify-content: center;;
    align-items: center;
    gap: 10px;
  /*  margin-top: 20px;*/
  width: 100%;
  padding-right: 2%;
}

.chart-container {
    flex: 6;
    max-width: 60%;
    text-align: right;
    display: flex;
    margin-top: 40px; 
    justify-content: center; /* Move chart closer to summary */

}

/*.chart-container {
    max-width: 60%;  /* Prevent excessive stretching 
    margin: auto;    /* Center the chart 
    text-align: center;
}*/
.chart-container canvas {
    height: 300px !important;
}

.results {
    flex: 3;
    background-color: #e8f5e9;
    padding: 20px;
    border-radius: 10px;
    text-align: left;
    min-width: 250px;
}

/* Bold numbers in investment summary */
.results span {
    font-weight: bold;
    font-size: 18px;
}
.results p {
    margin: 10px 0;
    margin-bottom: 5px;
}

/* Investment Summary */
.summary-container {
    flex: 3;
    width: 35%;
    padding: 15px;
    background: #e8f5e9;
    border-radius: 10px;
    text-align: left;
    min-width: 250px;
}

/* Ensure Responsive Design */
@media (max-width: 1024px) {
    .result-container {
        flex-direction: column;
        align-items: center;
    }
    
/*Added Extra */
 .chart-summary-container {
        flex-direction: column; 
        align-items: center;
        gap: 15px;
        padding-right: 0; /* Remove right padding */
      /*  width: 100%;*/
    }
    /*    */
    .chart-container,
    .summary-container {
        width: 90%;
        max-width: 100%;
        text-align: center; /* Center-align for better mobile experience */
   
    }
}
@media (max-width: 768px) {
    .input-group {
        flex-direction: column;
        align-items: center;
    }

   /* #investmentOptions {
        margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap; 
    }*/


    #investmentOptions button {
        width: 80%; /* Make buttons more consistent on mobile */
        max-width: 200px; /* Limit width */
    }
}
/* Improve the "Calculate Returns" button */
.calculate-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 5px;
    font-size: 18px;
    transition: background-color 0.3s ease-in-out;
    cursor: pointer;
    margin-top: 10px;
}

.calculate-btn:hover {
    background-color: #218838;
}

.back-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s, transform 0.2s;
    margin-bottom: 15px;
}

.back-btn:hover {
    background-color: #c82333;
    transform: scale(1.05);
}

/* PPF Chart and Summary Layout */
#ppfCalculator .chart-summary-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

#ppfCalculator .chart-container {
    flex: 2;
}

#ppfCalculator .results {
    flex: 1;
    background-color: #e8f5e9;
    padding: 20px;
    border-radius: 10px;
    text-align: left;
    min-width: 250px;
}

/* View Output Buttons */
.output-selection {
    margin-top: 15px;
}

.view-btn {
    padding: 8px 15px;
    border: none;
    background: #f0f0f0;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
    transition: 0.3s;
}

.view-btn:hover {
    background: #ddd;
}

.view-btn.active {
    background: #007bff;
    color: white;
}

/* Table Styling */
#ppfTableContainer {
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
}

th {
    background-color: #007bff;
    color: white;
}
.investment-grid {
    display: flex;
    flex-direction: column;       /* Stack items vertically */
    align-items: center;          /* Center horizontally */
    gap: 20px;                    /* Space between cards */
    margin-top: 20px;
}

  
  
.investment-box {
    width: 300px; /* Fixed width for vertical stacking */
    max-width: 90%; /* Optional: makes it responsive on small screens */
    background: #fff;
    border: 2px solid red;
    padding: 20px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
    margin: 0 auto; /* Center it horizontally */
}


.investment-box:hover {
    transform: scale(1.03);
}

.investment-box img {
    width: 90px;   /* Increased from 60px */
    height: auto;
    margin-bottom: 4px;
}


.investment-box h4 {
    font-size: 20px;         /* 🔹 Bigger font */
    color: #007bff;          /* 🔹 Blue color or any other */
    font-weight: bold;
    margin-bottom: 8px;
    text-transform: capitalize;  /* Optional: capitalizes each word */
}


.tip-box {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: 15px;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 12px;
    padding: 15px;
    max-width: 700px;
    margin: 30px auto 10px;
    box-shadow: 0 2px 5px rgba(255, 215, 0, 0.1);
}

.tip-box img {
    flex-shrink: 0;
}
@media (max-width: 768px) {
    .investment-box {
        max-width: 90%;
    }
}

.tips-panel {
    display: flex;
    flex-direction: column;      /* ✅ stack icon and content vertically */
    align-items: center;         /* ✅ center horizontally */
    gap: 15px;
    background: #fffbe6;
    border: 2px solid #ffe58f;
    border-radius: 12px;
    padding: 20px;
    max-width: 900px;
    margin: 30px auto 50px;
    box-shadow: 0 2px 5px rgba(255, 215, 0, 0.15);
}

.tip-icon {
    width: 28px;
    vertical-align: middle;
    margin-right: 8px;
}


.tips-content h3 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #333;
}

.tips-content ul {
    list-style-type: disc;
    padding-left: 20px;
    margin: 0;
    text-align: left;
}

.tips-content li {
    margin-bottom: 8px;
    font-size: 16px;
    color: #333;
}
.investment-tips {
    background: linear-gradient(to bottom right, #fffbe6, #fff1b8);

    border: 2px solid #ffd700;
    border-radius: 12px;
    padding: 20px;
    margin: 40px auto;
    max-width: 800px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: center;  /* ✅ Center-align text */
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}
.investment-tips.visible {
    opacity: 1;
    transform: translateY(0);
}
.investment-tips h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}


.investment-tips ul {
    list-style: none;
    padding: 0;
}

.investment-tips li {
    padding: 8px 0;
    font-size: 16px;
    color: #555;
}
.calculator-header {
    background: linear-gradient(to right, #e0f7fa, #e8f5e9);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    text-align: center;
    margin-bottom: 30px;
}

.gold-info {
    margin-top: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  }
  
  .gold-info h3 {
    margin-top: 0;
    font-size: 1.5em;
    color: #333;
  }
  
  .gold-info details {
    margin-bottom: 1em;
  }
  
  .gold-info summary {
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 5px;
  }

  .gold-info ul {
    margin: 0 0 10px 20px;
  }
  
  .gold-info p {
    margin: 6px 0 0 1em;
    line-height: 1.4;
    color: #555;
  }
  .gold-history-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 30px auto;
    max-width: 900px;
    padding: 0 10px;
  }
  
  .gold-history-wrapper h3 {
    text-align: center;
    margin-bottom: 20px;
  }
  
  .gold-history-wrapper .chart-container {
    width: 100%;
    max-width: 800px;
    margin-bottom: 30px;
  }
  
  .gold-history-wrapper .gold-info {
    width: 100%;
    max-width: 800px;
    background: #fffbe6;
    border: 1px solid #ffe58f;
    border-radius: 8px;
    padding: 20px;
    text-align: left;
  }

  #stockCalculator .results {
    background: #e8f5e9;
    padding: 15px;
    border-radius: 8px;
    text-align: left;
    max-width: 400px;
    margin: 20px auto;
  }

  #stockCalculator .chart-container {
    background: #fff;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  }
  
  
  /* crypto panel tweaks */
#cryptoCalculator .input-group {
    margin: 15px 0;
    gap: 10px;
    flex-wrap: wrap;
  }
  
  #cryptoCalculator .calculate-btn {
    margin-top: 20px;
  }
  
  #cryptoCalculator .results {
    margin-top: 8px;    /* instead of 20px */
    margin-bottom: 0;   /* remove any bottom margin */
  }
  
  #cryptoCalculator .chart-container {
  /* override the inline 30px top/bottom margin */
  margin: 6px auto !important;
  }
  
  /* pull in the sections a bit */
section { margin: 0; padding: 0; }
hr {
  margin: 30px 0;    /* instead of 50–60px */
  border: none;
  border-top: 1px solid #ccc;
}
#cryptoResults {
    max-width: 400px;
    margin: 30px auto;      /* center horizontally */
    text-align: left;       /* keep text left‑aligned */
  }
  
  .ticker {
    white-space: nowrap;
    overflow: hidden;
    background: #222;
    color: #fff;
    padding: 5px 0;
    font-family: monospace;
  }
  .ticker span {
    display: inline-block;
    padding: 0 2rem;
    animation: scroll 20s linear infinite;
  }
  @keyframes scroll {
    from   { transform: translateX(100%); }
    to     { transform: translateX(-100%); }
  }
  
    /*──────────────────────────────────────────────
  Tighten spacing in the Crypto calculator
──────────────────────────────────────────────*/
/*──────────────────────────────────────────────
  Tighter spacing in the Crypto calculator
──────────────────────────────────────────────*/
#cryptoCalculator {
    padding: 8px 0;  /* shrink the container’s top/bottom padding */
  }
  
  /* collapse heading margins */
  #cryptoCalculator h2 {
    margin: 10px 0;
  }
  
  /* collapse form‐row gaps */
  #cryptoCalculator .input-group {
    margin: 4px 0 !important;
  }
  
  /* collapse button gaps */
  #cryptoCalculator .calculate-btn {
    margin: 4px 0 !important;
  }
  
  /* collapse chart & results panels */
  #cryptoCalculator .chart-container,
 
  
  /* collapse the DCA simulator hr (inline style overridden by !important) */
  #cryptoCalculator hr {
    margin: 10px 0 !important;
  }
  /* style.css */

/* Crypto section description */
#cryptoCalculator .section-info {
    font-size: 0.95rem;
    color: #555;
    max-width: 600px;
    margin: 6px auto 16px;
    line-height: 1.4;
    text-align: center;
  }
  
/* style.css */

/* Brief tip under Profit/Loss & Fee Estimator */
#cryptoCalculator .section-tip {
    font-size: 0.95rem;
    color: #555;
    max-width: 600px;
    margin: 6px auto 16px;
    line-height: 1.4;
    text-align: center;
  }
  .section-divider {
    border: none;
    border-top: 1px solid #eee;
    margin: 60px auto;
    max-width: 800px;
  }
  
  .help-wrapper {
    position: relative;
    display: inline-block;
    margin-left: 6px; /* Space between label text and icon */
  }
  
  
  .help-icon {
    display: inline-block;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    background: #007bff;
    color: #fff;
    font-size: 12px;
    cursor: pointer;
  }
  
  /* the little pop‑up box */
  .help-box {
    display: none;               /* hidden until toggled */
    position: absolute;
    top: 100%;                   /* right below the icon */
    left: 50%;                   /* center align under icon */
    transform: translateX(-50%);
    width: 220px;
    padding: 8px;
    margin-top: 6px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    font-size: 0.9rem;
    z-index: 10;
  }

  /* Center the Net P&L results in the Fee Estimator */
#feeCalculator .results {
    text-align: center;
  }
  

  .faq-section {
    text-align: left;
    max-width: 800px;
    margin: 0 auto 30px; /* auto‑center, with bottom margin */
  }
  
  /* style.css */
.page-title {
  color: blue;
}

.calc-nav {
  display: flex;
  justify-content: center;    /* ← CENTER all buttons horizontally */
  border-bottom: 1px solid #ddd;
  background: #180253;
  width: 100%;                /* ensure it spans the full width */
  padding: .5em 0;
  margin-bottom: 1em;
 
  
}

.calc-nav button {
  flex: 0 0 auto;
  padding: .75em 1em;
  border: none;
  background: none;
  display: flex;
  align-items: center;
  gap: .5em;
  cursor: pointer;
  color: #fff; 
}
.calc-nav button.active {
  border-bottom: 3px solid #007aff;
  font-weight: bold;
}
.calc-panels {
  padding: 2em;
}
.panel {
  display: none;
}
.panel.active {
  display: block;
}
.calc-nav button:hover {
  background: rgba(0,123,255,0.1);
}

/* Responsive: collapse nav into select on small screens */
@media (max-width: 600px) {
  .calc-nav {
    display: none;
  }
}
.left-margin-2rem {
  margin-left: 4rem;
  text-align: left;
}
.info-para {
  margin-left: 6rem;
  text-align: left;
}
.ad-container {
  max-width: 728px;    /* or 100% for fluid responsive */
  margin: 1.5rem auto; /* center and space vertically */
  text-align: center;
}
