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

/* =========================
   DESIGN TOKENS (NON-BREAKING)
========================= */
:root {
  --primary: #2563eb;
  --dark: #111827;
  --text-main: #1f2937;
  --text-muted: #4b5563;
  --border: #e5e7eb;
  --bg-light: #f9fafb;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --shadow-sm: 0 6px 18px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.1);
}

/* =========================
   BASE
========================= */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--text-main);
  background: #ffffff;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: 1100px;
  margin: auto;
  padding: 0 20px;
}

/* =========================
   HEADER
========================= */
.header {
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
}

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

.logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

nav a {
  margin-left: 20px;
  font-size: 0.95rem;
  color: #374151;
}

nav a:hover {
  color: var(--primary);
}

/* =========================
   HERO
========================= */
.hero {
  padding: 80px 0;
  background: linear-gradient(to bottom, #f8fafc, #ffffff);
}

.hero-content {
  max-width: 720px;
}

.hero h1 {
  font-size: 2.8rem;
  line-height: 1.2;
  margin-bottom: 20px;
}

.subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 30px;
}

/* =========================
   BUTTONS
========================= */
.primary-btn,
.secondary-btn {
  border-radius: var(--radius-md);
  font-weight: 600;
  display: inline-block;
  transition: all 0.2s ease;
  cursor: pointer;
}

.primary-btn {
  background: var(--primary);
  color: #ffffff;
  padding: 14px 26px;
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.secondary-btn {
  background: var(--dark);
  color: #ffffff;
  padding: 14px 26px;
}

.secondary-btn:hover {
  opacity: 0.9;
}

/* =========================
   ADVANCED ACTION BUTTONS
========================= */
.btn-advanced {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.btn-advanced:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  opacity: 0.95;
}

.btn-advanced:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* =========================
   SECTIONS
========================= */
.section {
  padding: 60px 16px;
}

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

.section-title {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 50px;
}

/* =========================
   FEATURES
========================= */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.feature-card {
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-sm);
}

.feature-card h3 {
  margin-bottom: 10px;
}

/* =========================
   STEPS
========================= */
.steps {
  display: flex;
  justify-content: space-between;
  text-align: center;
  flex-wrap: wrap;
  gap: 20px;
}

.step span {
  display: inline-block;
  width: 40px;
  height: 40px;
  background: var(--primary);
  color: #ffffff;
  border-radius: 50%;
  line-height: 40px;
  font-weight: bold;
  margin-bottom: 10px;
}

/* =========================
   ADVANCED CTA
========================= */
.advanced-cta {
  margin-top: 40px;
  padding: 24px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  text-align: center;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.advanced-cta p {
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.advanced-cta .secondary-btn {
  background: transparent;
  color: var(--primary);
  padding: 10px 16px;
}

.advanced-cta .secondary-btn:hover {
  background: #eff6ff;
}

/* =========================
   FOOTER
========================= */
.footer {
  padding: 30px 0;
  border-top: 1px solid var(--border);
  background: #ffffff;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.footer-links a {
  margin-left: 15px;
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* =========================
   CALCULATOR
========================= */
.calculator {
  max-width: 520px;
  width: 100%; /* ensures full width up to max */
}

.calc-card {
  max-width: 520px; /* keeps calculator original width */
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

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

label {
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

input,
select {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: #ffffff;
}

input:focus,
select:focus {
  outline: none;
  border-color: var(--primary);
}

button {
  margin-top: 20px;
  width: 100%;
}

/* =========================
   RESULTS
========================= */
.result-box {
  margin-top: 30px;
  padding: 24px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.hidden {
  display: none;
}

/* =========================
   ADVANCED CALCULATOR UI
========================= */
.advanced-calculator .card {
  background: #ffffff;
  padding: 24px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

#expenseList li,
#peopleList li {
  padding: 10px 14px;
  background: #f3f4f6;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  font-size: 15px;
}

#splitBetween label {
  display: block;
  margin-bottom: 6px;
  cursor: pointer;
}

#results ul {
  list-style: none;
  padding-left: 0;
  margin-top: 12px;
}

#results li {
  padding: 12px 16px;
  margin-bottom: 8px;
  background: #f8fafc;
  border-radius: var(--radius-sm);
  font-size: 15px;
}

/* =========================
   MOBILE OPTIMIZATION
========================= */
@media (max-width: 600px) {
  .hero {
    padding: 60px 0;
  }

  .hero h1 {
    font-size: 2.1rem;
  }

  .section {
    padding: 50px 12px;
  }

  .advanced-calculator .card {
    padding: 18px;
  }

  h2,
  h3 {
    font-size: 1.3rem;
  }
}

/* =========================
   SEO CONTENT
========================= */
.seo-content {
  max-width: 720px;
  width: 100%; /* ensures full width up to max */
  margin-left: auto;
  margin-right: auto;
  background-color: #f7f9fc;
  padding: 30px 25px;
  border-radius: 12px;
  line-height: 1.7;
}

.seo-content h2,
.seo-content h3 {
  margin-top: 25px;
  margin-bottom: 15px;
  font-weight: 600;
}

.seo-content ul {
  padding-left: 20px;
}

.seo-content li {
  margin-bottom: 10px;
}

/* =========================
   FAQ SECTION
========================= */
.faq-section {
  max-width: 720px;
  margin: 50px auto;
  padding: 25px 20px;
  border-radius: var(--radius-lg);
  background: #f9fafb;
  box-shadow: var(--shadow-sm);
}

.faq-section h2 {
  text-align: center;
  margin-bottom: 30px;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
}

.faq-question {
  font-weight: 600;
  cursor: pointer;
  position: relative;
  padding-right: 25px;
}

.faq-question::after {
  content: '+';
  position: absolute;
  right: 0;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.faq-question.active::after {
  content: '−';
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
  padding-left: 5px;
  margin-top: 5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.faq-answer.open {
  max-height: 500px;
  margin-top: 10px;
  padding-left: 5px;
}

/* =========================
   FAQ POLISH SPACING
========================= */
.faq-item + .faq-item {
  margin-top: 15px;
}

.faq-answer p {
  margin-bottom: 8px;
}
/* Strong center alignment using Flexbox */
#tool .container,
.seo-content,
.faq-section {
  display: flex;
  flex-direction: column;
  align-items: center; /* center horizontally */
}

/* Optional: ensure content still respects max-width */
.seo-content,
.faq-section,
.calc-card {
  width: 100%;
  max-width: 720px;
}

/* =========================
   TRIP.HTML SPECIFIC CALCULATOR (NEW)
========================= */
#peopleNames .name-input,
#expensesList li,
#results ul {
  width: 100%;
}

#peopleNames input,
#expensesList input,
#results li {
  font-size: 15px;
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

#calculateBtn {
  margin-top: 20px;
  width: 100%;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
}

#calculateBtn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

/* Responsive for trip.html */
@media (max-width: 600px) {
  #peopleNames input,
  #expensesList input,
  #calculateBtn {
    font-size: 14px;
    padding: 10px;
  }
}

/* Add this to your style.css */
.dropdown {
  position: relative;
  display: inline-block;
}
.dropbtn {
  background: none;
  border: none;
  color: white;
  font-size: 1rem;
  cursor: pointer;
}
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #fff;
  min-width: 180px;
  box-shadow: 0px 4px 8px rgba(0,0,0,0.1);
  z-index: 1;
}
.dropdown-content a {
  color: #000;
  padding: 10px 15px;
  text-decoration: none;
  display: block;
}
.dropdown-content a:hover {
  background-color: #f1f1f1;
}
.dropdown:hover .dropdown-content {
  display: block;
}
.dropbtn:hover {
  color: #ffd700; /* Optional hover effect */
}
