/* ===========================================
   Nyugdíjkalkulátor - Main Styles
   =========================================== */

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --primary: #007bff;
  --primary-dark: #0056b3;
  --text-dark: #212529;
  --text-body: #495057;
  --text-muted: #6c757d;
  --bg-light: #f8f9fa;
  --border: #dee2e6;
  --white: #ffffff;
  --success: #28a745;
  --warning: #dc3545;
  --info: #17a2b8;
  --warning-yellow: #ffc107;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  font-family: "Raleway", sans-serif;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-body);
  background-color: var(--white);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0 0 1rem 0;
  font-weight: 600;
  color: var(--text-dark);
}

h1 {
  font-size: 32px;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 20px;
}

p {
  margin: 0 0 1rem 0;
}

a {
  color: var(--primary-dark);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* --- Container --- */
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

/* --- Navbar --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--white);
  height: 60px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 20px;
  color: var(--text-dark);
  text-decoration: none;
}

.navbar-brand .material-icons {
  color: var(--primary);
  font-size: 28px;
}

.navbar-menu {
  display: flex;
  align-items: center;
  gap: 24px;
}

.navbar-menu a {
  color: var(--text-body);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.navbar-menu a:hover,
.navbar-menu a.active {
  color: var(--primary);
}

.navbar-about {
  font-size: 13px;
  color: var(--text-muted);
}

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.hamburger .material-icons {
  font-size: 28px;
  color: var(--text-dark);
}

/* --- Hero Compact --- */
.hero-compact {
  height: 80px;
  background: linear-gradient(180deg, #e7f3ff 0%, var(--white) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-compact h1 {
  margin: 0;
  font-size: 28px;
  color: var(--text-dark);
}

.hero-compact p {
  margin: 4px 0 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* --- Grid System --- */
.row {
  display: flex;
  flex-wrap: wrap;
  margin: 0 -15px;
}

.col {
  flex: 1;
  padding: 0 15px;
}

.col-12 {
  flex: 0 0 100%;
  max-width: 100%;
}
.col-11 {
  flex: 0 0 91.666667%;
  max-width: 91.666667%;
}
.col-10 {
  flex: 0 0 83.333333%;
  max-width: 83.333333%;
}
.col-9 {
  flex: 0 0 75%;
  max-width: 75%;
}
.col-8 {
  flex: 0 0 66.666667%;
  max-width: 66.666667%;
}
.col-7 {
  flex: 0 0 58.333333%;
  max-width: 58.333333%;
}
.col-6 {
  flex: 0 0 50%;
  max-width: 50%;
}
.col-5 {
  flex: 0 0 41.666667%;
  max-width: 41.666667%;
}
.col-4 {
  flex: 0 0 33.333333%;
  max-width: 33.333333%;
}
.col-3 {
  flex: 0 0 25%;
  max-width: 25%;
}
.col-2 {
  flex: 0 0 16.666667%;
  max-width: 16.666667%;
}
.col-1 {
  flex: 0 0 8.333333%;
  max-width: 8.333333%;
}

/* --- Cards --- */
.card {
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  padding: 32px;
  margin-bottom: 24px;
}

.card-light {
  background: var(--bg-light);
  box-shadow: none;
  border: 1px solid var(--border);
}

/* --- Calculator Form --- */
.calculator-section {
  padding: 32px 0;
}

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

.form-label-row {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.form-label {
  flex: 0 0 66.666667%;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-dark);
}

.form-label .help-icon {
  cursor: help;
  margin-left: 4px;
  font-size: 18px;
  color: var(--primary);
  position: relative;
}

.form-label .help-icon:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-dark);
  color: var(--white);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 400;
  white-space: nowrap;
  max-width: 280px;
  white-space: normal;
  width: max-content;
  z-index: 10;
}

.form-label .help-icon:hover::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--text-dark);
  margin-bottom: -1px;
}

.form-input-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.form-input {
  flex: 0 0 33.333333%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: "Raleway", sans-serif;
  font-size: 16px;
  text-align: right;
  transition: border-color 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
}

.form-input.error {
  border-color: var(--warning);
}

.form-error {
  color: var(--warning);
  font-size: 13px;
  margin-top: 4px;
  display: none;
}

.form-error.visible {
  display: block;
}

/* --- Range Sliders --- */
.range-slider {
  width: 100%;
  margin-top: 8px;
}

.range-slider input[type="range"] {
  width: 100%;
  height: 8px;
  -webkit-appearance: none;
  appearance: none;
  background: var(--border);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

.range-slider input[type="range"]::-webkit-slider-thumb:hover {
  background: var(--primary-dark);
}

.range-slider input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  background: var(--primary);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

.range-slider input[type="range"]::-moz-range-thumb:hover {
  background: var(--primary-dark);
}

/* --- Checkbox --- */
.form-checkbox-group {
  margin: 24px 0;
}

.checkbox-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.checkbox-wrapper input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.checkbox-wrapper label {
  flex: 1;
  font-size: 14px;
  color: var(--text-body);
  cursor: pointer;
  line-height: 1.4;
}

.employer-field {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-light);
  border-radius: 4px;
  display: none;
}

.employer-field.visible {
  display: block;
}

/* --- Submit Button --- */
.btn-submit {
  width: 100%;
  padding: 14px 24px;
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 4px;
  font-family: "Raleway", sans-serif;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-submit:hover {
  background: var(--primary-dark);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-submit .spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn-submit.loading .spinner {
  display: block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-disclaimer {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 12px;
}

/* --- Results Section --- */
.results-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 400px;
  color: var(--text-muted);
  font-size: 16px;
}

.results-content {
  display: none;
}

.results-content.visible {
  display: block;
}

/* --- Summary Card --- */
.summary-card {
  background: linear-gradient(135deg, var(--bg-light) 0%, #e9ecef 100%);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  text-align: center;
}

.summary-pension {
  font-size: 42px;
  font-weight: 600;
  color: var(--success);
  margin-bottom: 8px;
}

.summary-pension.low {
  color: var(--warning);
}

.summary-sub {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.summary-gap {
  font-size: 16px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.summary-gap.warning {
  color: var(--warning);
}

.summary-gap.good {
  color: var(--success);
}

/* --- Charts --- */
.chart-container {
  margin-bottom: 24px;
  padding: 16px;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.chart-container h3 {
  font-size: 16px;
  margin-bottom: 16px;
  text-align: center;
}

.chart-wrapper {
  position: relative;
  height: 250px;
}

/* --- Breakdown Table --- */
.breakdown-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 24px;
}

.breakdown-table th,
.breakdown-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.breakdown-table th {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
  background: var(--bg-light);
}

.breakdown-table td {
  font-size: 14px;
}

.breakdown-table .amount {
  text-align: right;
  font-weight: 600;
  color: var(--text-dark);
}

/* --- Actions Row --- */
.actions-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-bottom: 24px;
}

.btn-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: "Raleway", sans-serif;
  font-size: 14px;
  color: var(--text-body);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-action:hover {
  background: var(--bg-light);
  border-color: var(--primary);
  color: var(--primary);
}

.btn-action .material-icons {
  font-size: 18px;
}

/* --- Assumptions Block --- */
.assumptions-block {
  background: var(--bg-light);
  padding: 20px 24px;
  border-radius: 8px;
  margin: 32px 0;
}

.assumptions-block h3 {
  font-size: 16px;
  margin-bottom: 12px;
}

.assumptions-items {
  display: flex;
  gap: 24px;
  font-size: 14px;
  color: var(--text-body);
  flex-wrap: wrap;
}

.assumptions-link {
  margin-top: 12px;
  font-size: 14px;
}

.assumptions-link a {
  color: var(--primary);
}

/* --- Quick Info Section --- */
.quick-info {
  padding: 48px 0;
}

.info-card {
  padding: 24px;
  background: var(--white);
  border-radius: 8px;
  border: 1px solid var(--border);
  height: 100%;
}

.info-card .icon {
  font-size: 40px;
  color: var(--primary);
  margin-bottom: 16px;
}

.info-card h3 {
  font-size: 18px;
  margin-bottom: 12px;
}

.info-card p {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.6;
  margin-bottom: 12px;
}

.info-card a {
  font-size: 14px;
  color: var(--primary);
}

/* --- FAQ Accordion --- */
.faq-section {
  padding: 48px 0;
}

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

.accordion-item {
  border: 1px solid var(--border);
  border-radius: 4px;
  margin-bottom: 8px;
  overflow: hidden;
}

.accordion-header {
  padding: 16px 20px;
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.2s;
}

.accordion-header:hover {
  background: var(--bg-light);
}

.accordion-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 500;
}

.accordion-header .icon {
  font-size: 20px;
  color: var(--text-muted);
  transition: transform 0.3s;
}

.accordion-item.active .accordion-header .icon {
  transform: rotate(180deg);
}

.accordion-content {
  display: none;
  padding: 16px 20px;
  background: var(--bg-light);
  border-top: 1px solid var(--border);
}

.accordion-item.active .accordion-content {
  display: block;
}

.accordion-content p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* --- Footer --- */
.footer {
  background: var(--text-dark);
  color: var(--white);
  height: 60px;
  display: flex;
  align-items: center;
  margin-top: auto;
}

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

.footer-left {
  font-size: 13px;
}

.footer-center {
  display: flex;
  gap: 16px;
  font-size: 13px;
}

.footer-center a {
  color: var(--white);
  opacity: 0.8;
}

.footer-center a:hover {
  opacity: 1;
}

.footer-right {
  font-size: 13px;
  opacity: 0.8;
}

/* --- Content Pages --- */
.page-content {
  padding: 48px 0;
}

.page-content h1 {
  margin-bottom: 24px;
}

.page-content h2 {
  margin-top: 32px;
  margin-bottom: 16px;
}

.page-content p,
.page-content ul {
  max-width: 800px;
  font-size: 16px;
  line-height: 1.7;
}

.page-content ul {
  padding-left: 24px;
}

.page-content li {
  margin-bottom: 8px;
}

/* --- About Page --- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.team-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
}

.team-avatar {
  width: 80px;
  height: 80px;
  background: var(--bg-light);
  border-radius: 50%;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--primary);
}

.team-card h3 {
  font-size: 18px;
  margin-bottom: 4px;
}

.team-role {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 12px;
}

.team-bio {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-body);
}

/* --- How We Calculate Page --- */
.methodology-section {
  max-width: 800px;
}

.formula-box {
  background: var(--bg-light);
  padding: 20px;
  border-radius: 4px;
  font-family: monospace;
  margin: 16px 0;
  overflow-x: auto;
}

.assumptions-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

.assumptions-table th,
.assumptions-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.assumptions-table th {
  background: var(--bg-light);
  font-weight: 600;
}

/* --- Blog Page --- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 32px;
}

.blog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.blog-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.blog-card-content {
  padding: 20px;
}

.blog-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.blog-card .date {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.blog-card .excerpt {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-body);
  margin-bottom: 16px;
}

.blog-card .read-more {
  color: var(--primary);
  font-size: 14px;
  font-weight: 500;
}

/* --- Article Page --- */
.article {
  max-width: 800px;
}

.article-meta {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.article-content {
  font-size: 16px;
  line-height: 1.8;
}

.article-content h2 {
  margin-top: 32px;
}

.article-content p {
  margin-bottom: 16px;
}

.article-cta {
  margin-top: 32px;
  padding: 24px;
  background: linear-gradient(135deg, #e7f3ff 0%, #f8f9fa 100%);
  border-radius: 8px;
  text-align: center;
}

.article-cta h3 {
  margin-bottom: 8px;
}

/* --- Contact Page --- */
.contact-section {
  max-width: 600px;
  margin: 48px auto;
}

.contact-form .form-group {
  margin-bottom: 20px;
}

.contact-form label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  font-size: 14px;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: "Raleway", sans-serif;
  font-size: 16px;
}

.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}

.contact-info {
  margin-top: 32px;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.contact-info-item .material-icons {
  color: var(--primary);
}

/* --- Privacy Policy --- */
.privacy-content {
  max-width: 800px;
}

.privacy-content h2 {
  margin-top: 32px;
}

.privacy-content ul {
  padding-left: 24px;
}

.privacy-content li {
  margin-bottom: 8px;
}

/* --- Mobile Responsive --- */
@media (max-width: 992px) {
  .col-lg-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .col-lg-11 {
    flex: 0 0 91.666667%;
    max-width: 91.666667%;
  }
  .col-lg-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
  }
  .col-lg-9 {
    flex: 0 0 75%;
    max-width: 75%;
  }
  .col-lg-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }
  .col-lg-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
  }
  .col-lg-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .col-lg-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
  }
  .col-lg-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  .col-lg-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
  .col-lg-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
  }
  .col-lg-1 {
    flex: 0 0 8.333333%;
    max-width: 8.333333%;
  }
}

@media (max-width: 768px) {
  .navbar-menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 16px;
    gap: 12px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }

  .navbar-menu.active {
    display: flex;
  }

  .navbar-about {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .hero-compact h1 {
    font-size: 22px;
  }

  .hero-compact p {
    font-size: 13px;
  }

  .col-md-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .col-md-11 {
    flex: 0 0 91.666667%;
    max-width: 91.666667%;
  }
  .col-md-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
  }
  .col-md-9 {
    flex: 0 0 75%;
    max-width: 75%;
  }
  .col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }
  .col-md-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
  }
  .col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .col-md-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
  }
  .col-md-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  .col-md-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
  .col-md-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
  }
  .col-md-1 {
    flex: 0 0 8.333333%;
    max-width: 8.333333%;
  }

  .assumptions-items {
    flex-direction: column;
    gap: 8px;
  }

  .footer .container {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }

  .footer-center {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  h1 {
    font-size: 24px;
  }
  h2 {
    font-size: 20px;
  }

  .col-sm-12 {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .col-sm-11 {
    flex: 0 0 91.666667%;
    max-width: 91.666667%;
  }
  .col-sm-10 {
    flex: 0 0 83.333333%;
    max-width: 83.333333%;
  }
  .col-sm-9 {
    flex: 0 0 75%;
    max-width: 75%;
  }
  .col-sm-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
  }
  .col-sm-7 {
    flex: 0 0 58.333333%;
    max-width: 58.333333%;
  }
  .col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
  }
  .col-sm-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
  }
  .col-sm-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
  }
  .col-sm-3 {
    flex: 0 0 25%;
    max-width: 25%;
  }
  .col-sm-2 {
    flex: 0 0 16.666667%;
    max-width: 16.666667%;
  }
  .col-sm-1 {
    flex: 0 0 8.333333%;
    max-width: 8.333333%;
  }

  .card {
    padding: 20px;
  }

  .summary-pension {
    font-size: 32px;
  }

  .actions-row {
    flex-wrap: wrap;
  }

  .btn-action {
    flex: 1;
    justify-content: center;
  }

  .navbar-brand {
    font-size: 16px;
  }
}

/* --- Print Styles --- */
@media print {
  .navbar,
  .hero-compact,
  .calculator-form,
  .assumptions-block,
  .quick-info,
  .faq-section,
  .footer,
  .actions-row {
    display: none !important;
  }

  .results-content {
    display: block !important;
  }

  body {
    color: #000;
    background: #fff;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ccc;
  }

  .summary-pension {
    color: #000 !important;
  }

  .chart-container {
    page-break-inside: avoid;
  }
}
