/* ===== RESET & BASE ===== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --blue: #1a365d;
  --blue-light: #2c5282;
  --blue-lighter: #ebf4ff;
  --orange: #e67e22;
  --orange-hover: #d35400;
  --green: #27ae60;
  --red: #e74c3c;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-500: #6b7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -2px rgba(0,0,0,.05);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--gray-900);
  line-height: 1.6;
  background: var(--gray-50);
}

a { color: var(--blue-light); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ===== LAYOUT ===== */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--blue);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
}
.logo span { color: var(--orange); }

/* Hamburger */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: .25rem;
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: .25rem;
}

.main-nav a {
  color: rgba(255,255,255,.85);
  padding: .5rem .75rem;
  border-radius: var(--radius);
  font-size: .9rem;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active {
  background: rgba(255,255,255,.15);
  color: #fff;
  text-decoration: none;
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--blue);
    border-top: 1px solid rgba(255,255,255,.1);
    padding: .5rem 0;
  }
  .main-nav.open { display: block; }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }
  .main-nav a {
    display: block;
    padding: .75rem 1.5rem;
    border-radius: 0;
  }
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%);
  color: #fff;
  padding: 3rem 1rem;
  text-align: center;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: .5rem;
  line-height: 1.2;
}

.hero p {
  font-size: 1.125rem;
  opacity: .9;
  max-width: 600px;
  margin: 0 auto;
}

@media (min-width: 768px) {
  .hero { padding: 4rem 1rem; }
  .hero h1 { font-size: 2.5rem; }
}

/* ===== SIMULATOR FORM ===== */
.simulator-section {
  padding: 2rem 0;
}

.simulator-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2rem;
  max-width: 700px;
  margin: -3rem auto 0;
  position: relative;
  z-index: 10;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: .375rem;
  color: var(--gray-700);
  font-size: .95rem;
}

.form-group select,
.form-group input {
  width: 100%;
  padding: .625rem .75rem;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  transition: border-color .2s;
}

.form-group select:focus,
.form-group input:focus {
  outline: none;
  border-color: var(--blue-light);
  box-shadow: 0 0 0 3px rgba(44,82,130,.15);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 500px) {
  .form-row { grid-template-columns: 1fr; }
}

.btn {
  display: inline-block;
  padding: .75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-align: center;
  transition: background .2s, transform .1s;
}

.btn:active { transform: scale(.98); }

.btn-primary {
  background: var(--orange);
  color: #fff;
  width: 100%;
}
.btn-primary:hover { background: var(--orange-hover); text-decoration: none; }

.btn-secondary {
  background: var(--blue);
  color: #fff;
}
.btn-secondary:hover { background: var(--blue-light); text-decoration: none; }

.btn-outline {
  background: transparent;
  color: var(--blue);
  border: 2px solid var(--blue);
}
.btn-outline:hover { background: var(--blue); color: #fff; text-decoration: none; }

/* ===== RESULT CARD ===== */
.result-card {
  display: none;
  margin-top: 1.5rem;
  padding: 1.5rem;
  background: var(--blue-lighter);
  border-radius: var(--radius);
  border: 1px solid rgba(44,82,130,.2);
}
.result-card.visible { display: block; }

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.result-item {
  text-align: center;
  padding: 1rem;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.result-item .label {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--gray-500);
  margin-bottom: .25rem;
}

.result-item .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--blue);
}

.result-item .value.danger { color: var(--red); }
.result-item .value.warning { color: var(--orange); }
.result-item .value.success { color: var(--green); }

.result-details {
  margin-top: 1rem;
  padding: 1rem;
  background: #fff;
  border-radius: var(--radius);
  font-size: .95rem;
}

.result-details p { margin-bottom: .5rem; }
.result-details p:last-child { margin-bottom: 0; }

.btn-pdf {
  margin-top: 1rem;
}

/* ===== TABLES ===== */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}

thead th {
  background: var(--blue);
  color: #fff;
  padding: .75rem 1rem;
  text-align: left;
  font-weight: 600;
  white-space: nowrap;
}

tbody td {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--gray-200);
}

tbody tr:nth-child(even) {
  background: var(--gray-100);
}

tbody tr:hover {
  background: var(--blue-lighter);
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
  padding: 3rem 0;
}

.content-section h2 {
  font-size: 1.5rem;
  color: var(--blue);
  margin-bottom: 1rem;
  padding-bottom: .5rem;
  border-bottom: 2px solid var(--orange);
}

.content-section h3 {
  font-size: 1.2rem;
  color: var(--blue);
  margin: 1.5rem 0 .75rem;
}

.content-section p {
  margin-bottom: 1rem;
  color: var(--gray-700);
}

.content-section ul, .content-section ol {
  margin: 0 0 1rem 1.5rem;
  color: var(--gray-700);
}

.content-section li {
  margin-bottom: .375rem;
}

/* ===== CARDS GRID ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow .2s, transform .2s;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card h3 {
  color: var(--blue);
  margin-bottom: .5rem;
  font-size: 1.1rem;
}

.card p {
  color: var(--gray-500);
  font-size: .9rem;
  margin-bottom: .75rem;
}

.card a.card-link {
  color: var(--orange);
  font-weight: 600;
  font-size: .9rem;
}
.card a.card-link:hover { text-decoration: underline; }

/* ===== FAQ ===== */
.faq-section { padding: 2rem 0 3rem; }

.faq-item {
  background: #fff;
  border-radius: var(--radius);
  margin-bottom: .75rem;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gray-900);
  font-family: inherit;
}

.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--blue-light);
  transition: transform .2s;
}

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

.faq-answer {
  display: none;
  padding: 0 1.25rem 1rem;
  color: var(--gray-700);
  font-size: .95rem;
  line-height: 1.6;
}

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

/* ===== STEPS ===== */
.steps {
  counter-reset: step;
  margin: 1.5rem 0;
}

.step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  background: var(--orange);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.step-content h3 {
  margin: 0 0 .25rem;
  font-size: 1.05rem;
}

.step-content p {
  margin: 0;
  font-size: .95rem;
}

/* ===== INFO BOX ===== */
.info-box {
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  font-size: .95rem;
}

.info-box.warning {
  background: #fef3cd;
  border-left: 4px solid var(--orange);
}

.info-box.info {
  background: var(--blue-lighter);
  border-left: 4px solid var(--blue-light);
}

.info-box.danger {
  background: #fde8e8;
  border-left: 4px solid var(--red);
}

.info-box strong {
  display: block;
  margin-bottom: .25rem;
}

/* ===== CTA BANNER ===== */
.cta-banner {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%);
  color: #fff;
  text-align: center;
  padding: 2.5rem 1rem;
  border-radius: var(--radius);
  margin: 2rem 0;
}

.cta-banner h2 {
  color: #fff;
  border: none;
  margin-bottom: .5rem;
}

.cta-banner p {
  color: rgba(255,255,255,.9);
  margin-bottom: 1.25rem;
}

.cta-banner .btn { display: inline-block; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--blue);
  color: rgba(255,255,255,.7);
  padding: 2.5rem 1rem;
  font-size: .875rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-col h4 {
  color: #fff;
  margin-bottom: .75rem;
  font-size: .95rem;
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: .375rem;
}

.footer-col a {
  color: rgba(255,255,255,.7);
  font-size: .85rem;
}
.footer-col a:hover { color: #fff; }

.footer-bottom {
  max-width: 1100px;
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.15);
  text-align: center;
  font-size: .8rem;
}

.footer-bottom p { margin-bottom: .25rem; }

/* ===== BREADCRUMB ===== */
.breadcrumb {
  padding: .75rem 0;
  font-size: .85rem;
  color: var(--gray-500);
}

.breadcrumb a { color: var(--blue-light); }
.breadcrumb span { margin: 0 .375rem; }

/* ===== STICKY CTA (subpages) ===== */
.sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--blue);
  padding: .75rem 1rem;
  text-align: center;
  z-index: 90;
  box-shadow: 0 -2px 10px rgba(0,0,0,.15);
  display: none;
}

.sticky-cta.visible { display: block; }

.sticky-cta .btn {
  padding: .625rem 2rem;
  font-size: .95rem;
}

/* Padding bottom for sticky CTA */
body.has-sticky-cta { padding-bottom: 60px; }

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.hidden { display: none; }

/* ===== PRINT ===== */
@media print {
  .site-header, .site-footer, .sticky-cta, .btn-pdf { display: none; }
}
