/*
 * Hiteles Pénzügyes - Mega Menu Stylesheet
 * Version: 1.0.0
 */

/* Mega menu positioning fixes */
/* A dropdown osztályú elemeknek sztatikus pozicionálás kell, hogy a mega menü elhelyezkedését kontrollálhassuk */
.navbar-nav .nav-item.dropdown {
  position: static !important;
}

/* Break out of container - Kiugrik a konténerből a szélesség miatt */
.dropdown-menu.mega-menu {
    width: 100vw !important;
    max-width: 80vw !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    border-top: 3px solid var(--secondary) !important;
    position: absolute !important; 
    z-index: 999 !important; /* Alacsonyabb, mint a header z-index, hogy alatta legyen */
    top: 195% !important; /* Ez határozza meg a távolságot a fejléc és a mega menü között */
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.15) !important;
    animation: fadeInDown 0.3s ease;
    transform: translateX(-28%) !important; /* Középre igazítás finomhangolása */
    background-color: #fff; /* Biztos fehér háttér */
}

/* Full-width container for mega menu */
.mega-menu-wrapper {
  width: 100%;
  padding: 30px 0;
  background-color: #fff;
}

/* Menu transitions and animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mega menu item headers */
.mega-menu-title {
  color: var(--primary);
  font-family: 'Montserrat', sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--secondary);
  display: inline-block;
}

/* Individual menu items within mega menu */
.mega-menu-item {
  display: flex;
  margin-bottom: 20px;
  transition: all 0.3s ease;
}

.mega-menu-item:hover {
  transform: translateY(-3px);
}

/* Image container in menu items */
.mega-menu-img {
  flex: 0 0 100px;
  margin-right: 15px;
  border-radius: 4px;
  overflow: hidden;
}

.mega-menu-img img {
  width: 100%;
  height: 60px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.mega-menu-item:hover .mega-menu-img img {
  transform: scale(1.05);
}

/* Text content in menu items */
.mega-menu-content {
  flex: 1;
}

.mega-menu-content h6 {
  font-size: 0.95rem;
  margin-bottom: 5px;
}

.mega-menu-content h6 a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.mega-menu-content h6 a:hover {
  color: var(--secondary);
}

.mega-menu-content p {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 0;
  line-height: 1.4;
}

/* Featured section styling */
.mega-menu-feature {
  background-color: var(--light);
  border-radius: 5px;
  height: 100%;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.mega-menu-feature-content {
  padding: 20px;
  flex: 1;
}

.mega-menu-feature h4 {
  color: var(--primary);
  font-size: 1.2rem;
  margin-bottom: 10px;
}

.mega-menu-feature p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 15px;
}

.mega-menu-feature-img {
  height: 120px;
  overflow: hidden;
}

.mega-menu-feature-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.mega-menu-feature:hover .mega-menu-feature-img img {
  transform: scale(1.05);
}

/* Mobile adjustments */
@media (max-width: 992px) {
  .navbar-nav .dropdown-menu.mega-menu {
    width: 100%;
    position: relative;
    padding: 0;
    overflow-y: auto;
    max-height: 80vh;
  }
  
  .mega-menu-wrapper {
    padding: 15px;
  }
  
  .mega-menu-title {
    margin-top: 20px;
  }
  
  .mega-menu-item {
    flex-direction: column;
  }
  
  .mega-menu-img {
    margin-right: 0;
    margin-bottom: 10px;
    flex: 0 0 auto;
  }
  
  .mega-menu-feature {
    margin-top: 20px;
  }
}