/* ===== RESET & BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  background: #f4f7fc;
  color: #1e2b3c;
  line-height: 1.6;
  padding: 20px;
}

.container {
  max-width: 1300px;
  margin: 0 auto;
  background: white;
  border-radius: 32px;
  box-shadow: 0 20px 40px -10px rgba(0,20,40,0.15);
  overflow: hidden;
  padding: 2rem 2rem 1.5rem;
}

/* ===== TYPOGRAPHY ===== */
h1 {
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: linear-gradient(145deg, #0b2b44, #1b4a6b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.3rem;
  line-height: 1.2;
}

h2 {
  font-size: 2.2rem;
  color: #113855;
  margin: 2rem 0 1rem;
  border-bottom: 3px solid #b3d6f0;
  padding-bottom: 0.3rem;
}

h3 {
  font-size: 1.6rem;
  color: #1e4e76;
  margin-top: 1.8rem;
}

.subhead {
  color: #2c4c6e;
  font-size: 1.3rem;
  margin-bottom: 2rem;
  border-left: 5px solid #7ab7d0;
  padding-left: 1.2rem;
}

/* ===== NAVIGATION ===== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e2eef9;
}

.logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: #0b2b44;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.nav-links a {
  color: #1b5a8c;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: 0.2s;
}

.nav-links a:hover {
  border-bottom-color: #1b5a8c;
}

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background: white;
  min-width: 220px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
  border-radius: 12px;
  z-index: 1000;
  padding: 0.5rem 0;
  top: 100%;
  left: 0;
}

.dropdown:hover .dropdown-content {
  display: block;
}

.dropdown-content a {
  color: #1e2b3c;
  padding: 0.7rem 1rem;
  display: block;
  border-bottom: none;
}

.dropdown-content a:hover {
  background: #e3effa;
}

.breadcrumb {
  padding: 1rem 0;
  color: #4f6f8f;
  font-size: 0.95rem;
}

.breadcrumb a {
  color: #1b5a8c;
  text-decoration: none;
}

.breadcrumb a:hover {
  text-decoration: underline;
}

/* ===== CALCULATOR CARDS ===== */
.calculator-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem;
  margin: 2rem 0 1rem;
}

.card {
  background: #ffffff;
  border: 1px solid #dce9f2;
  border-radius: 28px;
  padding: 1.8rem 1.5rem;
  box-shadow: 0 8px 18px -6px rgba(0, 32, 64, 0.08);
  transition: 0.2s;
}

.card:hover {
  border-color: #99c6e9;
  box-shadow: 0 12px 24px -10px #2a5f8a33;
}

.card h2 {
  font-size: 1.7rem;
  border-bottom: none;
  margin: 0 0 1rem;
  color: #103a5c;
}

.time-input, .number-input, .select-input {
  width: 100%;
  padding: 0.9rem 1rem;
  font-size: 1.2rem;
  border: 2px solid #cbddee;
  border-radius: 60px;
  margin: 0.5rem 0 0.8rem;
  background: #f9fcff;
  transition: 0.2s;
  color: #0b3552;
  font-weight: 500;
}

.time-input:focus, .number-input:focus, .select-input:focus {
  border-color: #3b8fc2;
  outline: none;
  background: white;
  box-shadow: 0 0 0 4px #a3cef1;
}

.settings-icon {
  background: #e3effa;
  border-radius: 40px;
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  margin-top: 0.5rem;
  border: 1px solid #b3d6f0;
  width: fit-content;
}

.settings-panel {
  background: #f2f9ff;
  border-radius: 24px;
  padding: 1.2rem;
  margin: 1rem 0 0;
  border: 1px solid #b3d6f0;
  display: none;
}

.settings-panel.show {
  display: block;
}

.settings-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin: 0.8rem 0;
}

.settings-row label {
  font-weight: 600;
  color: #103a5c;
  min-width: 150px;
}

.settings-row input {
  width: 100px;
  padding: 0.5rem;
  border-radius: 30px;
  border: 2px solid #cbddee;
  text-align: center;
}

.result-list {
  list-style: none;
  background: #f2f9ff;
  border-radius: 24px;
  padding: 1.2rem 1.2rem 0.8rem 1.2rem;
  margin-top: 1rem;
}

.result-list li {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #c7dcf0;
  font-size: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.result-list li:last-child {
  border-bottom: none;
}

.result-list strong {
  font-size: 1.4rem;
  font-weight: 650;
  color: #0e4b7a;
  background: #e3f0fd;
  padding: 0.2rem 1rem;
  border-radius: 40px;
}

.note {
  font-size: 0.95rem;
  color: #3f5e7a;
  margin-top: 1rem;
  background: #e4f0fa;
  padding: 0.6rem 1rem;
  border-radius: 50px;
  display: inline-block;
}

.btn {
  background: #1b5a8c;
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  border-radius: 40px;
  font-size: 1.1rem;
  margin: 1rem 0;
  cursor: pointer;
  transition: 0.2s;
  font-weight: 500;
}

.btn:hover {
  background: #0e4b7a;
}

.btn-secondary {
  background: #e3effa;
  color: #0b3552;
}

.btn-secondary:hover {
  background: #cbe2f5;
}

/* ===== ADS ===== */
.ad {
  background: #eaf0f6;
  border: 2px dashed #9bb7d4;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2c4c6e;
  font-weight: 500;
  margin: 2rem 0;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-align: center;
  padding: 2rem;
}

.ad-leaderboard {
  width: 100%;
  min-height: 100px;
}

.ad-rectangle {
  width: 100%;
  max-width: 400px;
  min-height: 280px;
  margin: 2rem auto;
}

/* ===== TABLES ===== */
table {
  width: 100%;
  border-collapse: collapse;
  background: #f2f9ff;
  border-radius: 24px;
  overflow: hidden;
  margin: 1.5rem 0;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #c7dcf0;
}

th {
  background: #d4e6f7;
  color: #103a5c;
  font-weight: 600;
}

tr:last-child td {
  border-bottom: none;
}

/* ===== BLOG ===== */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.blog-card {
  background: #f9fcff;
  border: 1px solid #dce9f2;
  border-radius: 24px;
  padding: 1.5rem;
  transition: 0.2s;
}

.blog-card:hover {
  border-color: #99c6e9;
  box-shadow: 0 12px 24px -10px #2a5f8a33;
}

.blog-card h3 {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.blog-meta {
  color: #4f6f8f;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.blog-excerpt {
  color: #1d3a55;
  margin-bottom: 1.2rem;
}

.read-more {
  background: #e3effa;
  color: #0b3552;
  text-decoration: none;
  padding: 0.5rem 1.2rem;
  border-radius: 40px;
  font-weight: 500;
  display: inline-block;
  transition: 0.2s;
}

.read-more:hover {
  background: #cbe2f5;
}

/* ===== QUIZ ===== */
.quiz-container {
  background: #f2f9ff;
  border-radius: 32px;
  padding: 2rem;
  margin: 2rem 0;
}

.quiz-question {
  margin: 2rem 0;
}

.quiz-options {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1rem 0;
}

.quiz-option {
  background: white;
  border: 2px solid #cbddee;
  border-radius: 60px;
  padding: 1rem 1.5rem;
  cursor: pointer;
  transition: 0.2s;
}

.quiz-option:hover {
  border-color: #3b8fc2;
  background: #e3f0fd;
}

.quiz-option.selected {
  border-color: #1b5a8c;
  background: #d4e6f7;
  font-weight: 500;
}

/* ===== TESTIMONIALS ===== */
.testimonials {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.testimonial-card {
  background: #ebf5fd;
  border-radius: 20px;
  padding: 1.2rem;
  font-style: italic;
}

.testimonial-author {
  margin-top: 0.8rem;
  font-weight: 600;
  color: #0b2b44;
}

/* ===== RECENT CALCULATIONS ===== */
.recent-calculations {
  background: #f2f9ff;
  border-radius: 24px;
  padding: 1.2rem;
  margin: 2rem 0;
}

.recent-item {
  background: white;
  border-radius: 40px;
  padding: 0.4rem 1rem;
  margin: 0.3rem;
  display: inline-block;
  border: 1px solid #b3d6f0;
}

/* ===== FAQ ===== */
.faq-item {
  background: #f3faff;
  border-radius: 18px;
  padding: 1.2rem 1.8rem;
  margin: 1rem 0;
  border-left: 6px solid #4797cf;
}

.faq-question {
  font-weight: 700;
  font-size: 1.25rem;
  color: #003057;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
}

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

.faq-answer {
  margin-top: 1rem;
  display: none;
}

.faq-item.active .faq-answer {
  display: block;
}

/* ===== AGE SELECTOR ===== */
.age-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.age-tag {
  background: white;
  border: 2px solid #cbddee;
  border-radius: 40px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  transition: 0.2s;
}

.age-tag:hover, .age-tag.active {
  background: #1b5a8c;
  color: white;
  border-color: #1b5a8c;
}

/* ===== FOOTER ===== */
footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 2px solid #c6ddf5;
  text-align: center;
  color: #2f5579;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin: 1rem 0;
}

.footer-links a {
  color: #1b5a8c;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 700px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.8rem; }
  h3 { font-size: 1.4rem; }
  .container { padding: 1.5rem; }
  .navbar {
    flex-direction: column;
    gap: 1rem;
  }
  .nav-links {
    justify-content: center;
  }
  .dropdown-content {
    position: static;
    display: none;
    width: 100%;
  }
  .dropdown:hover .dropdown-content {
    display: none;
  }
  .dropdown.active .dropdown-content {
    display: block;
  }
}