
/* ---------------- GLOBAL ---------------- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  background-color: #f8f9fa;
  color: #2c3e50;
  line-height: 1.6;
  padding-bottom: 80px; /* hely a fix láblécnek */
}

/* ---------------- HEADER / MENÜ ---------------- */
.main-header {
  background: #1f2937;
  color: #fff;
  padding: 10px 30px;
  position: sticky;
  top: 0;
  z-index: 9999;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  flex-wrap: wrap;
}

.left-side {
  display: flex;
  align-items: center;
  gap: 25px;
  flex: 1;
  flex-wrap: wrap;
}

.logo a {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}

.main-nav ul {
  display: flex;
  gap: 20px;
  list-style: none;
  flex-wrap: wrap;
}

.main-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
}

.main-nav a:hover {
  color: #1abc9c;
}

.user-credits {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: bold;
  color: gold;
}

.coin-icon {
  width: 20px;
  height: 20px;
}

.right-side {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.welcome-text {
  font-size: 14px;
}

/* Profil menü */
.profile-dropdown {
  position: relative;
}

.profile-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid #1abc9c;
}

.profile-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 50px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 8px;
  list-style: none;
  padding: 10px 0;
  min-width: 200px;
  z-index: 200;
}

.profile-menu li {
  padding: 10px 20px;
}

.profile-menu li a {
  color: #333;
  text-decoration: none;
  display: block;
}

.profile-menu li:hover {
  background: #f4f6f8;
}

/* ---------------- MAIN ---------------- */
main {
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
}

/* ---------------- KÁRTYÁK ---------------- */
.card {
  background: #ffffff;
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.1);
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
  border-color: #1abc9c;
}

/* Prémium szolgáltatások kiemelése a főoldalon */
.premium-card {
  border: 2px solid #f1c40f;
  position: relative;
}
.premium-card:hover {
  border-color: #d4ac0d;
}

.premium-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background: #f1c40f;
  color: #fff;
  padding: 5px 8px;
  border-radius: 6px;
  font-size: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 10;
}

.save-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  font-size: 20px;
  color: #bdc3c7;
  cursor: pointer;
  z-index: 10;
}
.save-btn:hover {
  color: #e67e22;
}
.save-btn.saved {
  color: #e74c3c;
}

.founders-badge {
  position: absolute;
  top: 10px;
  left: 12px;
  background: linear-gradient(135deg, #facc15, #f97316);
  color: #1f2937;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(250, 204, 21, 0.35);
  z-index: 11;
}

.badge-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.badge-strip--tight {
  margin-top: 10px;
  margin-bottom: 0;
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1f2937;
  color: #fff;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.01em;
  position: relative;
  cursor: default;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.badge-pill svg {
  width: 18px;
  height: 18px;
  display: block;
}

.badge-pill:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.badge-pill::after {
  content: attr(data-badge-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100%  10px);
  transform: translate(-50%, 12px);
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 0.75rem;
  line-height: 1.3;
  width: max-content;
  max-width: 220px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
  z-index: 25;
}

.badge-pill:hover::after,
.badge-pill.active-tooltip::after,
.badge-pill:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.badge-pill:focus-visible {
  outline: 2px solid #1abc9c;
  outline-offset: 2px;
}

.badge-pill.badge-founders_100 {
  background: linear-gradient(135deg, #facc15, #f97316);
  color: #1f2937;
}

.badge-pill.badge-top_teacher {
  background: linear-gradient(135deg, #60a5fa, #2563eb);
}

.badge-pill.badge-top_student {
  background: linear-gradient(135deg, #fb923c, #f97316);
}

.badge-pill.badge-mentor {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
}

/* Kártya tartalmi elemek stílusa */
.card-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 5px;
  color: #2c3e50;
}
.card-price {
  font-size: 1.1rem;
  font-weight: 600;
  color: #16a085;
  margin-bottom: 5px;
}
.card-rating {
  font-size: 1rem;
  color: #f1c40f;
  margin-bottom: 5px;
}
.provider-rating {
  font-size: 0.9rem;
  color: #7f8c8d;
  margin-bottom: 5px;
}
.card-info {
  font-size: 0.85rem;
  color: #34495e;
  margin-bottom: 4px;
}
.card-provider {
  font-size: 0.85rem;
  margin-bottom: 8px;
}
.card-provider a {
  color: #1abc9c;
  text-decoration: none;
}
.card-provider a:hover {
  text-decoration: underline;
}
.card-actions {
  margin-top: 10px;
}

/* ---------------- FOOTER ---------------- */
footer {
  background: #34495e;
  color: white;
  text-align: center;
  padding: 30px 20px;
  margin-top: 60px;
}

footer a {
  color: #1abc9c;
  text-decoration: none;
  margin: 0 10px;
  font-weight: 500;
}

footer a:hover {
  text-decoration: underline;
}

/* ---------------- PROFIL OLDAL ---------------- */
.profile-container {
  max-width: 1200px;
  margin: 40px auto;
  padding: 20px;
}

.profile-box {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  align-items: flex-start;
  margin-bottom: 40px;
}

/* Bal oldal */
.profile-left {
  background-color: #f4f6f8;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Jobb oldal */
.profile-right {
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 30px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.profile-edit-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.profile-section {
  background: #f9fafb;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.profile-section label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.profile-section input,
.profile-section textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
}

/* ---------------- FOGALÁSOK ---------------- */
.orders-section {
  background: #f9fafb;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  margin-bottom: 40px;
}

.orders-section h3 {
  margin-bottom: 20px;
  font-size: 20px;
  font-weight: 600;
  color: #2c3e50;
  border-left: 4px solid #1abc9c;
  padding-left: 10px;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.order-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border: 1px solid #e0e0e0;
}

.order-card p {
  margin: 6px 0;
  font-size: 15px;
  color: #333;
}

.order-card button {
  background-color: #1abc9c;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  margin-top: 10px;
  transition: background 0.3s ease;
}

.order-card button:hover {
  background-color: #16a085;
}

/* ---------------- COIN ---------------- */
.coin {
  width: 20px;
  height: 20px;
  background: radial-gradient(circle at 30% 30%, #ffecb3, #fbc02d);
  border-radius: 50%;
  animation: spin 1.5s linear infinite;
  box-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
}

@keyframes spin {
  0% { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}

/* ---------------- ADS ---------------- */
.ads-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.ad-card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 1px solid #e0e0e0;
  max-width: 700px;
}

.ad-card  {
  margin-bottom: 10px;
}

.ad-actions {
  margin-top: 15px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  background: #1abc9c;
  color: white;
  padding: 10px 15px;
  border-radius: 8px;
  text-decoration: none;
}

.btn:hover {
  background: #16a085;
}

.btn-small {
  background: #3498db;
  color: white;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
}

.btn-small:hover {
  background: #2980b9;
}

.btn-danger {
  background: #e74c3c;
}

.btn-danger:hover {
  background: #c0392b;
}

.ad-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 500px;
  margin-top: 20px;
}

.ad-form input,
.ad-form textarea {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
}

.ad-form button {
  background: #1abc9c;
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 8px;
  cursor: pointer;
}

.ad-form button:hover {
  background: #16a085;
}

.btn-danger {
  background: #e74c3c;
}
.btn-danger:hover {
  background: #c0392b;
}


/* Profil szerkesztés gomb */
.btn-edit {
  min-width: 140px;
  text-align: center;
  font-weight: 600;
}

.btn-edit.editing {
  background: #3498db;
}

.btn-edit.editing:hover {
  background: #2980b9;
}

/* -------- Prémium gomb és modal -------- */
.btn-premium {
  background: linear-gradient(45deg, #f1c40f, #e8b40a);
  color: #2c3e50;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.btn-premium:hover {
  background: linear-gradient(45deg, #e8b40a, #d4ac0d);
}

/* Kredit vásárlás gomb (új) */
.btn-credits {
  background: linear-gradient(45deg, #3498db, #2980b9);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.btn-credits:hover {
  background: linear-gradient(45deg, #2980b9, #2471a3);
}

/* Premium modal overlay (új) */
.premium-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 20000;
}
.premium-modal {
  background: #ffffff;
  padding: 30px;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 24px rgba(0,0,0,0.2);
  text-align: center;
}
.premium-modal h3 {
  margin-bottom: 15px;
  color: #f1c40f;
}
.premium-modal ul {
  text-align: left;
  margin-bottom: 20px;
}
.premium-modal ul li {
  margin-bottom: 8px;
}
.premium-modal button {
  background: #f1c40f;
  color: #2c3e50;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
.premium-modal button:hover {
  background: #e8b40a;
}

/* -------- Értékelés modal és csillagok -------- */
.review-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.review-modal {
  background: #ffffff;
  padding: 25px 30px;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  width: 90%;
  max-width: 420px;
  text-align: center;
}

.review-modal h3 {
  margin-bottom: 15px;
}

.review-modal .stars {
  display: flex;
  justify-content: center;
  margin-bottom: 15px;
  gap: 4px;
}

.review-modal .star {
  font-size: 32px;
  color: #cccccc;
  cursor: pointer;
  transition: color 0.2s ease;
}

.review-modal .star.selected {
  color: #f1c40f;
}

.review-modal textarea {
  width: 100%;
  height: 80px;
  padding: 8px;
  margin-bottom: 15px;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  resize: vertical;
  font-family: inherit;
  font-size: 14px;
}

.review-modal button {
  background: #1abc9c;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s ease;
}

.review-modal button:hover {
  background: #16a085;
}

/* -------- CHAT DIZÁJN  -------- */
.chat-container {
  display: flex;
  gap: 20px;
  margin-top: 20px;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.chat-sidebar {
  width: 30%;
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  z-index: 1;
  min-width: 260px;
}

.chat-partner {
  background: #fff;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 1px solid #e0e0e0;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.chat-partner:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
  border-color: #1abc9c;
}

.chat-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 15px;
  position: relative;
  z-index: 1;
  min-width: 280px;
}

.messages-box {
  flex: 1;
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border: 1px solid #e0e0e0;
  overflow-y: auto;
  position: relative;
  z-index: 1;
}

.message {
  margin-bottom: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  max-width: 75%;
  font-size: 14px;
  line-height: 1.4;
}

.sent {
  background: #e8f8f5;
  color: #2c3e50;
  margin-left: auto;
  text-align: right;
}

.received {
  background: #f4f6f8;
  color: #2c3e50;
  margin-right: auto;
  text-align: left;
}

#chat-form {
  display: flex;
  gap: 10px;
}

#chat-form textarea {
  flex: 1;
  resize: none;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
}

#chat-form button {
  background: #1abc9c;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
}

#chat-form button:hover {
  background: #16a085;
}
.btn-message {
  background-color: #1abc9c;
  color: white;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s ease;
}
.btn-message:hover {
  background-color: #16a085;
}

/* -------- BADGE -------- */
.user-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: bold;
  padding: 3px 8px;
  border-radius: 12px;
  color: #fff;
  margin: 2px;
  text-transform: uppercase;
}

.user-badge i {
  font-size: 12px;
}

/* Színek */
.user-badge.premium { background: #f1c40f; color: #2c3e50; }
.user-badge.top-teacher { background: #3498db; }
.user-badge.top-student { background: #2ecc71; }
.user-badge.verified { background: #9b59b6; }
.user-badge.veteran { background: #e67e22; }

.profile-badges {
  margin-top: 10px;
}

.ad-badge-container .user-badge {
  font-size: 10px;
  padding: 2px 6px;
}

/* ---------------- RESPONSIVE ---------------- */

/* TABLET - max 992px */
@media (max-width: 992px) {
  .nav-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .left-side {
    flex-direction: column;
    gap: 15px;
    width: 100%;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 10px;
    width: 100%;
  }

  .right-side {
    width: 100%;
    justify-content: flex-start;
  }

  .profile-box {
    grid-template-columns: 1fr;
  }

  .chat-sidebar {
    width: 100%;
    order: 2;
  }

  .chat-main {
    width: 100%;
    order: 1;
  }
}

/* MOBIL - max 768px */
@media (max-width: 768px) {
  main {
    margin: 20px auto;
    padding: 10px;
  }

  .card {
    padding: 15px;
  }

  .card-title { font-size: 1rem; }
  .card-price { font-size: 1rem; }
  .card-rating, .provider-rating, .card-info, .card-provider { font-size: 0.8rem; }

  .profile-left,
  .profile-right {
    padding: 20px;
  }

  .order-card {
    padding: 15px;
  }

  footer {
    padding: 20px 10px;
  }
}

/* KIS MOBIL - max 576px */
@media (max-width: 576px) {
  .logo a { font-size: 18px; }
  .welcome-text { font-size: 12px; }

  .profile-icon {
    width: 32px;
    height: 32px;
  }

  .ad-card, .orders-section, .messages-box, .profile-section {
    padding: 15px;
  }

  .btn, .btn-small, .btn-premium, .btn-credits, .btn-edit {
    padding: 8px 12px;
    font-size: 14px;
  }

  #chat-form textarea {
    font-size: 13px;
  }
}

/* ---- PROFIL DROPDOWN FIX ---- */
.profile-dropdown {
  position: relative;
}

.profile-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 50px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 8px;
  list-style: none;
  padding: 10px 0;
  min-width: 200px;
  z-index: 200;
}

.profile-menu li {
  padding: 10px 20px;
}

.profile-menu li a {
  color: #333;
  text-decoration: none;
  display: block;
}

.profile-menu li:hover {
  background: #f4f6f8;
}

.profile-menu.active {
  display: block;
}


/* Csak mobilon látszik */
.mobile-header { display:none; }
@media (max-width:768px) {
  .main-header .nav-container { display:none; } /* desktop header eltűnik */
  .mobile-header { display:block; }
  .mobile-bar { display:flex; justify-content:space-between; align-items:center; padding:6px 12px; }
}

/* Mobil alsó sor széthúzás */
.mobile-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 8px 12px;
}
.mobile-bottom .left { justify-self: start; }
.mobile-bottom .center { justify-self: center; display:flex; gap:14px; }
.mobile-bottom .right { justify-self: end; }

.results-info {
  max-width: 1200px;
  margin: 0 auto 10px;
  text-align: right;
  color: #6b7280;
  font-size: 0.9rem;
}

.public-profile {
  max-width: 960px;
  margin: 40px auto;
  background: #ffffff;
  padding: 30px;
  border-radius: 18px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.12);
}

.public-profile__header {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.public-profile__avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.public-profile__intro h2 {
  font-size: 1.9rem;
  margin-bottom: 4px;
}

.public-profile__username {
  color: #6b7280;
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.public-profile__meta {
  color: #374151;
  font-weight: 500;
}

.public-profile__details {
  margin-top: 25px;
  color: #374151;
}

.public-profile__details p {
  margin-bottom: 10px;
}

.public-profile__list {
  margin-top: 20px;
}

.public-profile__list ul {
  margin-left: 20px;
  list-style: disc;
}

.public-profile__section {
  margin-top: 32px;
}

.public-profile__ad {
  background: #f9fafb;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.1);
  position: relative;
}

.public-profile__ad h4 {
  font-size: 1.1rem;
  margin-bottom: 10px;
}

.public-profile__longtext {
  margin-top: 12px;
  background: #ffffff;
  padding: 12px 14px;
  border-radius: 10px;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.review-card {
  background: #f4f6f8;
  padding: 16px;
  border-radius: 10px;
  margin-bottom: 12px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.06);
}

.review-card .stars {
  color: #fbbf24;
  font-size: 1.1rem;
  margin-bottom: 4px;
}
