/* Változók */
:root {
  --primary-color: #3498db;
  --secondary-color: #2ecc71;
  --dark-color: #2c3e50;
  --light-color: #ecf0f1;
  --text-color: #333;
  --link-color: #2980b9;
  --border-radius: 5px;
}

/* Reset és alapértelmezett stílusok */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Open Sans', Arial, sans-serif, 'Helvetica Neue', 'Helvetica';
  font-size: 16px;
  color: var(--text-color);
  background-color: var(--light-color);
  max-width: 100%;
  overflow-x: hidden;
}

ul {
  padding-left: 2.5rem;
}
ul li:not(:last-child),
ol li:not(:last-child) {
  margin-bottom: 1rem;
}

a {
  color: var(--link-color);
}

/* Konténer */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Fejléc */
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-area {
  display: flex;
  align-items: center;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text-color);
}

.logo-icon {
  margin-right: 0.8rem;
}

.logo-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

/* Főmenü */
.main-navigation {
  position: relative;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 24px;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-items {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.menu-items li {
  margin-left: 2rem;
}

.menu-items li a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 16px;
  padding: 0.5rem 0;
  position: relative;
  transition: color 0.3s ease;
  font-weight: 600;
}

.menu-items li a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--secondary-color);
  transition: width 0.3s ease;
}

.menu-items li a:hover,
.menu-items li a:focus {
  color: var(--secondary-color);
}

.menu-items li a:hover::after,
.menu-items li a:focus::after {
  width: 100%;
}

/* Sr-only class a kisegítő szövegek elrejtéséhez vizuálisan */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Fő tartalom */
main {
  padding-top: 2rem !important;
  padding-bottom: 2rem !important;
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--dark-color);
}

h2 {
  font-size: 22px;
  margin-bottom: 1.5rem;
  color: var(--dark-color);
}

p {
  margin-bottom: 1rem;
}

/* Gombok */
button {
  display: inline-block;
  padding: 1rem 2rem;
  border-radius: var(--border-radius);
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
}

.primary-button {
  background-color: var(--primary-color);
  color: white;
}

.primary-button:hover {
  background-color: darken(var(--primary-color), 10%);
}

/* Lábléc */
footer {
  background-color: var(--dark-color);
  color: white;
  padding: 1.5rem 1rem;
  margin-top: 4rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.footer-column {
  flex: 1;
  min-width: 250px;
  margin-bottom: 2rem;
}

.footer-column h4 {
  font-size: 18px;
  margin-bottom: 1.5rem;
}

.footer-column ul {
  padding-left: 0;
  list-style: none;
}

.footer-column a {
  color: #ddd;
  text-decoration: none;
  transition: color 0.3s;
}

.copyright {
  font-size: 14px;
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Cookie Popup */
.cookie-popup {
  position: fixed;
  bottom: 1.2rem;
  right: 1.2rem;
  left: auto;
  transform: none;
  background-color: white;
  padding: 1.2rem;
  border-radius: var(--border-radius);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  max-width: 400px;
  width: auto;
  display: none;
  border: 1px solid #ddd;
}

.cookie-popup.show {
  display: block;
  animation: slideIn 0.3s ease-out;
}

.cookie-popup p {
  font-size: 14px;
  margin-bottom: 1.2rem;
  line-height: 1.6;
  color: var(--text-color);
}

.cookie-popup .buttons {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
}

.cookie-popup .buttons button {
  font-size: 14px;
  padding: .6rem 1.2rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: background-color 0.3s;
}

.cookie-popup .accept-button {
  background-color: var(--primary-color);
  color: white;
  border: none;
}

.cookie-popup .accept-button:hover {
  background-color: var(--link-color);
}

.cookie-popup .reject-button {
  background-color: #f8f9fa;
  color: var(--text-color);
  border: 1px solid #ddd;
}

.cookie-popup .reject-button:hover {
  background-color: #e9ecef;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Árfolyam átváltó stílusok */
.converter-section {
  margin-bottom: 3rem;
}

.converter-section h1 {
  text-align: center;
  color: #333;
  margin-bottom: 2rem;
}

.converter-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #ddd;
  padding: 2rem;
  margin: 0 auto;
  max-width: 800px;
}

.converter-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.amount-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.amount-group label {
  font-weight: 600;
  color: #555;
}

.amount-group input {
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1.1rem;
  transition: border-color 0.3s;
}

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

.currency-group {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.from-currency,
.to-currency {
  flex: 1;
  min-width: 200px;
}

.currency-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #555;
}

.currency-group select {
  width: 100%;
  padding: 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 1rem;
  background-color: #fff;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.currency-group select option {
  font-size: 14px;
}

.currency-group select:focus {
  border-color: var(--primary-color);
  outline: none;
}

.swap-btn {
  background: #f5f5f5;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s;
  margin-top: 1.5rem;
}

.swap-btn:hover {
  background: #e0e0e0;
}

.swap-btn span {
  font-size: 1.5rem;
  color: #666;
}

.convert-btn {
  background: var(--primary-color);
  color: white;
  border: none;
  padding: 1rem;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s;
  text-decoration: none;
}

.convert-btn:hover {
  background: var(--link-color);
}

.result-container {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 2px solid #f0f0f0;
}

.result-amount {
  text-align: center;
  margin-bottom: 1rem;
}

#resultValue {
  font-size: 2.5rem;
  font-weight: 700;
  color: #333;
}

#resultCurrency {
  font-size: 1.5rem;
  color: #666;
  margin-left: 0.5rem;
}

.exchange-rate {
  text-align: center;
  color: #666;
  font-size: 0.9rem;
}

.update-time {
  display: block;
  margin-top: 0.5rem;
  color: #999;
}

.popular-conversions {
  margin-top: 3rem;
}

.popular-conversions h2 {
  text-align: center;
  color: #333;
  margin-bottom: 2rem;
}

.conversion-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 0 auto;
}

.conversion-item {
  background: #fff;
  padding: 1rem;
  border-radius: var(--border-radius);
  border: 1px solid #ddd;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.conversion-value {
  font-weight: 600;
  color: var(--primary-color);
}

/* Árfolyam információs oldal finomítások */
.info-section {
  margin-bottom: 2.5rem;
}

.info-section h2 {
  color: var(--dark-color);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #e0e0e0;
}

.info-section p {
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.info-section .conversion-item {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.info-section .conversion-item h3 {
  margin-bottom: 1rem;
  color: var(--dark-color);
}

.info-section .conversion-item p {
  flex-grow: 1;
  margin-bottom: 1rem;
}

.info-section .conversion-item ul {
  list-style: none;
  padding: 0;
}

.info-section .conversion-item ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.8rem;
  line-height: 1.4;
}

.info-section .conversion-item ul li::before {
  content: "•";
  color: var(--primary-color);
  position: absolute;
  left: 0;
}

.info-section .convert-btn {
  align-self: flex-start;
  padding: 0.5rem 1rem;
  margin: 0 auto;
}

/* Reszponzív dizájn */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }
  .main-navigation .menu-items {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    width: 200px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: .6rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius);
  }
  .main-navigation.is-open .menu-items {
    display: flex;
  }
  .menu-items li {
    margin-left: 0;
    width: 100%;
  }
  .menu-items li a {
    display: block;
    padding: .6rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
  }
  .menu-items li:last-child a {
    border-bottom: none;
  }
  .menu-items li a::after {
    display: none;
  }
  nav ul {
    flex-direction: column;
  }
  .footer-links {
    flex-direction: column;
  }
  .menu-toggle {
    display: block;
  }
  .menu-items {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: white;
    width: 200px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 1rem;
    border-radius: var(--border-radius);
  }
  .menu-items li {
    margin-left: 0;
    margin-bottom: 0.5rem !important;
  }  
  .menu-items li:last-child {
    margin-bottom: 0 !important;
  }
  .main-navigation.is-open .menu-items {
    display: flex;
  }
  .footer-links {
    grid-template-columns: 1fr;
  }
  .converter-card {
    padding: 1.4rem 1rem;
  }

  .currency-group {
    flex-direction: column;
  }

  .swap-btn {
    margin: 1rem auto;
  }

  .from-currency,
  .to-currency {
    width: 100%;
  }

  #resultValue {
    font-size: 2rem;
  }

  .conversion-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
  h1 {
    font-size: 28px;
  }
  .cookie-popup {
    bottom: 0;
    right: 0;
    left: 0;
    max-width: 100%;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    margin: 0;
  }
  @keyframes slideIn {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  .conversion-grid {
    grid-template-columns: 1fr;
  }
}

/* Valuta pár oldal stílusok */
.currency-pair-info {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 2rem;
  background: #f8f9fa;
  border-radius: var(--border-radius);
}

.amount-display,
.result-display {
  text-align: center;
}

.source-amount,
.target-amount {
  display: block;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.source-currency,
.target-currency {
  font-size: 1.2rem;
  color: #666;
}

.conversion-arrow {
  font-size: 2rem;
  color: var(--primary-color);
}

.exchange-rate-info {
  text-align: center;
  margin-bottom: 2rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: var(--border-radius);
}

.additional-info {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  color: #666;
}
.additional-info p {
  margin-bottom: 0;
}

.cta-section {
  text-align: center;
}

@media (max-width: 768px) {
  .currency-pair-info {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .source-amount,
  .target-amount {
    font-size: 2rem;
  }

  .conversion-arrow {
    transform: rotate(90deg);
  }
}

/* Kategória oldal stílusok */
.category-section {
  margin-bottom: 3rem;
}

.category-description {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f8f9fa;
  border-radius: var(--border-radius);
}

.currency-pairs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.currency-pair-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.currency-pair-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.currency-pair-card h3 {
  margin-bottom: 1rem;
  color: var(--dark-color);
  font-size: 1.2rem;
}

.popular-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.popular-amounts a {
  background: #f8f9fa;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  text-decoration: none;
  color: var(--text-color);
  font-size: 0.9rem;
  transition: background-color 0.3s;
}

.popular-amounts a:hover {
  background: var(--primary-color);
  color: white;
}

@media (max-width: 768px) {
  .currency-pairs-grid {
    grid-template-columns: 1fr;
  }
  
  .currency-pair-card {
    padding: 1rem;
  }
}

/* Egyszerűsített átváltó stílusok */
.simple-converter {
  max-width: 600px;
  margin: 2rem auto;
  padding: 2rem;
  background: white;
  border-radius: var(--border-radius);
  border: 1px solid #ddd;
}

.conversion-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
}

.currency-amount, .result {
  font-size: 2rem;
  font-weight: 600;
}

.currency-code {
  color: #666;
  font-size: 1.2rem;
  margin-left: 0.5rem;
}

.arrow {
  color: var(--primary-color);
  font-size: 2rem;
}

.rate-info {
  text-align: center;
  color: #666;
  padding: 1rem 0;
  border-top: 1px solid #eee;
}

.rate-info p {
  margin-bottom: 0.5rem;
}

.rate-info small,
.rate-info .info-link {
  font-size: 0.9rem;
  color: #999;
  display: flex;
    justify-content: center;
    gap: 0.2rem;
}
.rate-info .info-link {
  color: var(--link-color);
}

.simple-converter .convert-btn {
  margin: 0 auto;
  display: block;
  width: fit-content;
}

@media (max-width: 480px) {
  .simple-converter {
    padding: 1rem;
    margin: 1rem;
  }

  .conversion-display {
    flex-direction: column;
    gap: 1rem;
  }

  .arrow {
    transform: rotate(90deg);
  }

  .currency-amount, .result {
    font-size: 1.5rem;
  }
}