:root {
  --primary: #2c3e50;
  --secondary: #34495e;
  --accent: #2ecc71;
  --accent-hover: #27ae60;
  --background: #f8f9fa;
  --surface: #ffffff;
  --text: #2c3e50;
  --text-light: #7f8c8d;
  --border: #dfe6e9;
  --radius: 12px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --font-family: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Outfit', system-ui, -apple-system, sans-serif;
}

h1,
h2,
h3,
.brand {
  font-family: var(--font-heading);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--background);
  color: var(--text);
  line-height: 1.6;
  padding-top: 60px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Header/Hero */
header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

header h1 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
  padding: 0 5px;
}

.marker-highlight {
  position: relative;
  z-index: 1;
  display: inline-block;
}

.marker-highlight::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 55%;
  bottom: 5px;
  left: -5px;
  right: -5px;
  background: rgba(255, 215, 0, 0.8);
  /* Darker yellow (Gold) */
  transform: scale(1.05) rotate(-1deg);
  border-radius: 20px 255px 20px 255px / 255px 20px 255px 20px;
}

.marker-highlight-light {
  position: relative;
  z-index: 1;
  display: inline-block;
}

.marker-highlight-light::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: 55%;
  bottom: 5px;
  left: -5px;
  right: -5px;
  background: rgba(255, 234, 167, 0.9);
  /* Lighter yellow */
  transform: scale(1.05) rotate(0.5deg);
  /* Slight opposite tilt for variety */
  border-radius: 255px 20px 255px 20px / 20px 255px 20px 255px;
  /* Inverted curve */
}

header p {
  color: #2c3e50;
  /* Darker for better visibility */
  font-size: 1.2rem;
  /* Slightly larger */
  font-weight: 700;
  /* Bold */
  max-width: 800px;
  margin: 0 auto;
}

/* Main Layout */
.calculator-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 2rem;
  align-items: start;
}

@media (max-width: 768px) {
  .calculator-grid {
    grid-template-columns: 1fr;
  }
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}


.card h2 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--secondary);
  border-bottom: 2px solid var(--background);
  padding-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background-color: var(--accent);
  color: white;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 700;
  flex-shrink: 0;
}

.disabled-card .step-number {
  background-color: #bdc3c7;
  /* Gray for disabled state */
}


/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--secondary);
}

input[type="number"],
input[type="text"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.1);
}

.help-text {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.25rem;
}

/* Option Cards (Radio replacement) */
.radio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 1rem;
}

.radio-option {
  position: relative;
}

.radio-option input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.radio-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background-color: var(--background);
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  height: 100%;
}

.radio-sublabel {
  text-align: center;
}

.radio-option input:checked+.radio-tile {
  background-color: #fff;
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(46, 204, 113, 0.15);
  color: var(--accent);
  transform: translateY(-2px);
}

.radio-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.radio-label {
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

/* Color Swatches */
.color-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.5rem;
}

@media (max-width: 768px) {
  .color-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.info-icon {
  width: 16px;
  height: 16px;
  fill: #3498db;
  /* Pale blue-ish */
  opacity: 0.8;
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px;
  margin-bottom: 2px;
}

.color-option input:checked+.color-tile {
  /* transform: scale(1.1); Removed to prevent overlap */
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent);
  z-index: 1;
  /* Ensure it stays on top if shadows touch */
}

.color-swatch {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Summary Panel */
.sticky-sidebar {
  position: sticky;
  top: 70px;
  /* 50px header + 20px gap */
}

.price-display {
  text-align: center;
  padding: 1.5rem;
  background: var(--primary);
  color: white;
  border-radius: var(--radius);
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

.price-label {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 0.5rem;
}

.price-amount {
  font-size: 2.5rem;
  font-weight: 800;
}

.price-unit {
  font-size: 1rem;
  font-weight: 400;
}

.summary-details {
  list-style: none;
  margin-bottom: 1.5rem;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.summary-item:last-child {
  border-bottom: none;
}

.total-row {
  font-weight: 700;
  color: var(--primary);
  font-size: 1.1rem;
  border-top: 2px solid var(--border);
  margin-top: 0.5rem;
  padding-top: 1rem;
}

/* Button */
/* Button Animation */
@keyframes pulse-attention {

  0%,
  10% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.7);
  }

  5% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
  }

  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
  }
}

.btn-primary {
  width: 100%;
  padding: 1rem;
  background-color: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  animation: pulse-attention 10s infinite ease-in-out;
}

.btn-primary:hover {
  background-color: var(--accent-hover);
  /* Pause animation on hover if desired, but user didn't request. */
}

/* Tooltip for disabled remotes */
.remotes-wrapper {
  position: relative;
  /* transition: opacity 0.3s; Removed to handle children instead */
}

.remotes-wrapper.disabled-tooltip>input,
.remotes-wrapper.disabled-tooltip>span {
  opacity: 0.5;
  transition: opacity 0.3s;
}

.remotes-wrapper.disabled-tooltip:hover::after {
  content: "Csak motoros működtetés esetén választható.";
  position: absolute;
  top: -40px;
  left: 0;
  background-color: #34495e;
  color: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  white-space: nowrap;
  z-index: 100;
  /* Increased z-index */
  pointer-events: none;

  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.remotes-wrapper.disabled-tooltip:hover::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 20px;
  border: 5px solid transparent;
  border-top-color: #34495e;
  z-index: 10;
}

.btn-disabled {
  background-color: #bdc3c7;
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.7;
  animation: none;
}

/* Contact Form hidden initially */
.contact-section {
  display: none;
  animation: fadeIn 0.5s ease-out;
}

.contact-section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error-msg {
  color: #856404;
  /* Dark yellow/brown for text */
  background-color: #fff3cd;
  /* Light yellow background */
  font-size: 0.9rem;
  margin-top: 15px;
  display: none;
  /* Controlled by JS keyframes/display/opacity */
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  padding: 10px;
  border-radius: 8px;
  text-align: center;
  border: 1px solid #ffeeba;
}

/* Disabled State */
.card.disabled-card {
  opacity: 0.5;
  pointer-events: none;
  filter: grayscale(0.8);
  transition: all 0.3s ease;
}

/* Fixed Top Bar */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px;
  background-color: var(--primary);
  color: white;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
}

.top-bar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0 1rem;
}

.top-bar .container {
  padding-top: 0;
  padding-bottom: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}


.top-bar .brand {
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: 0.5px;
}

.top-bar .contact-info {
  display: flex;
  gap: 1.5rem;
  font-size: 0.9rem;
  align-items: center;
}

.contact-link {
  color: white;
  text-decoration: none;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  gap: 5px;
}

.contact-link:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.phone-icon {
  width: 18px;
  height: 18px;
  fill: var(--accent);
  /* Force the green color */
  color: var(--accent);
  margin-right: 8px;
  display: inline-block;
  vertical-align: middle;
}

.top-bar .policy-link {
  color: #fff;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
  border-bottom: 1px dotted rgba(255, 255, 255, 0.5);
}

.top-bar .policy-link:hover {
  opacity: 1;
  border-bottom-style: solid;
}


@media (max-width: 600px) {
  .top-bar .contact-info .contact-link:not(:first-child) {
    display: none;
  }
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fadeIn 0.3s;
}

.modal-content {
  background-color: var(--surface);
  margin: 10% auto;
  padding: 2rem;
  border: 1px solid #888;
  width: 80%;
  max-width: 800px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  position: relative;
  animation: slideIn 0.3s;
}

.close-modal {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 20px;
}

.close-modal:hover,
.close-modal:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* FAQ Section */
.faq-section {
  margin-top: 3rem;
  padding: 2rem 3rem;
  /* Extra padding for better look */
}

.faq-title {
  text-align: center;
  margin-bottom: 2rem;
  color: var(--primary);
  font-size: 2rem;
}

.faq-category {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
  position: relative;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 1.5rem 0;
  background: none;
  border: none;
  text-align: left;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--secondary);
  cursor: pointer;
  font-family: inherit;
}

.faq-question:hover {
  color: var(--primary);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding-right: 2rem;
}

.faq-answer p {
  padding-bottom: 1.5rem;
  color: var(--text);
  line-height: 1.6;
}

.faq-icon {
  transition: transform 0.3s ease;
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--accent);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-item.active .faq-answer {
  max-height: 500px;
  /* Approximate max height */
}

/* Narrower Contact Modal */
#contact-modal .modal-content {
  max-width: 500px;
}

.required-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #3498db;
  /* Friendly blue */
  color: white;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.8rem;
  font-weight: bold;
  margin-right: 8px;
  cursor: help;
  vertical-align: middle;
}

.mandatory-icon {
  width: 18px;
  height: 18px;
  fill: #e74c3c;
  /* Red */
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px;
  margin-bottom: 2px;
}

.site-footer {
  background-color: #7f8c8d;
  color: #ecf0f1;
  text-align: center;
  padding: 20px 0;
  width: 100%;
}

.policy-footer-link {
  color: #ecf0f1;
  text-decoration: underline;
  font-size: 0.9rem;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.policy-footer-link:hover {
  opacity: 1;
}

/* Privacy Policy, Impressum & ASZF Modal Styling */
#policy-modal .modal-body h1,
#impressum-modal .modal-body h1,
#aszf-modal .modal-body h1 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 30px;
  color: var(--secondary);
  border-bottom: 2px solid var(--border);
  padding-bottom: 15px;
}

#policy-modal .modal-body h2,
#impressum-modal .modal-body h2,
#aszf-modal .modal-body h2 {
  font-size: 1.4rem;
  margin-top: 30px;
  margin-bottom: 15px;
  color: var(--secondary);
  background-color: #f8f9fa;
  padding: 10px;
  border-left: 5px solid var(--accent);
}

#policy-modal .modal-body li,
#impressum-modal .modal-body li,
#aszf-modal .modal-body li {
  margin-bottom: 8px;
}

#policy-modal .modal-body p,
#policy-modal .modal-body li,
#aszf-modal .modal-body p,
#aszf-modal .modal-body li {
  line-height: 1.6;
  color: #555;
  margin-bottom: 15px;
}

.warning-box {
  background-color: #ffeaa7;
  border-left: 5px solid #d63031;
  padding: 15px;
  margin: 20px 0;
  color: #d63031;
  font-weight: bold;
  text-align: center;
  border-radius: 4px;
}

#impressum-modal .data-block {
  background-color: #fcfcfc;
  border: 1px solid var(--border);
  padding: 15px;
  border-radius: 4px;
  margin-bottom: 20px;
}

#impressum-modal .data-block p {
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #eee;
}

#impressum-modal .data-block p:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

#policy-modal .modal-body h3 {
  font-size: 1.1rem;
  margin-top: 20px;
  margin-bottom: 10px;
  color: var(--text);
}

#policy-modal .modal-body p,
#policy-modal .modal-body li {
  line-height: 1.6;
  color: #555;
  margin-bottom: 15px;
}

#policy-modal .modal-body ul,
#impressum-modal .modal-body ul,
#aszf-modal .modal-body ul {
  padding-left: 40px;
  margin-bottom: 20px;
}

/* Cookie Banner Styling */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #2c3e50;
  /* Sötétkék háttér */
  color: #fff;
  padding: 20px;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  display: none;
  /* Alapból rejtve, JS hozza elő */
  z-index: 9999;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  box-sizing: border-box;
}

.cookie-content {
  flex: 1;
  min-width: 300px;
}

.cookie-content h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  color: #ecf0f1;
}

.cookie-content p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}

.cookie-content a {
  color: #3498db;
  text-decoration: underline;
}

.cookie-buttons {
  display: flex;
  gap: 10px;
}

.cookie-banner button {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.3s;
}

.btn-necessary {
  background-color: transparent;
  border: 1px solid #bdc3c7;
  color: #bdc3c7;
}

.btn-necessary:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.btn-accept {
  background-color: #27ae60;
  /* Zöld gomb */
  color: white;
}

.btn-accept:hover {
  background-color: #2ecc71;
}

@media (max-width: 768px) {
  .cookie-banner {
    flex-direction: column;
    text-align: center;
  }

  .cookie-buttons {
    width: 100%;
    justify-content: center;
  }
}

#policy-modal .modal-body li {
  margin-bottom: 8px;
}

/* Policy Table Styling */
#policy-modal .modal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.95rem;
}

#policy-modal .modal-body th,
#policy-modal .modal-body td {
  border: 1px solid var(--border);
  padding: 12px;
  text-align: left;
}

#policy-modal .modal-body th {
  background-color: #f1f2f6;
  font-weight: 600;
  color: var(--secondary);
}

#policy-modal .modal-body tr:nth-child(even) {
  background-color: #fcfcfc;
}

/* Responsive Table */
@media (max-width: 600px) {

  #policy-modal .modal-body table,
  #policy-modal .modal-body thead,
  #policy-modal .modal-body tbody,
  #policy-modal .modal-body th,
  #policy-modal .modal-body td,
  #policy-modal .modal-body tr {
    display: block;
  }

  #policy-modal .modal-body thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  #policy-modal .modal-body tr {
    border: 1px solid var(--border);
    margin-bottom: 15px;
  }

  #policy-modal .modal-body td {
    border: none;
    border-bottom: 1px solid var(--border);
    position: relative;
    padding-left: 50%;
  }

  #policy-modal .modal-body td:before {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    content: attr(data-label);
    font-weight: bold;
  }
}

/* Footer Date Styling */
#policy-modal .modal-body .footer-date {
  margin-top: 40px;
  text-align: right;
  font-style: italic;
  color: #7f8c8d;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.vat-suffix {
  font-size: 0.75em;
  color: var(--text-light);
  font-weight: normal;
  margin-left: 4px;
}