/**
 * Mobile Menu Styles
 * Soldan açılan mobil menü tasarımı
 */

/* Mobile Menu Container */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  pointer-events: none;
}

.mobile-menu.is-open {
  display: block;
  pointer-events: auto;
}

/* Overlay */
.mobile-menu__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.mobile-menu.is-open .mobile-menu__overlay {
  opacity: 1;
}

/* Panel */
.mobile-menu__panel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 96%;
  min-height: 620px;
  max-height: 100vh;
  background: #ffffff;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  border-radius: 0 24px 24px 0;
  align-items: stretch;
}

.mobile-menu.is-open .mobile-menu__panel {
  transform: translateX(0);
}

/* Nested Menu Sayfaları - Sağdan açılır */
.mobile-menu__page {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 96%;
  min-height: 620px;
  max-height: 100vh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  z-index: 0;
}

.mobile-menu__page.is-active {
  transform: translateX(0);
  z-index: 1;
}

.mobile-menu__page--main {
  border-radius: 0 0 24px 0;
  max-width: 100%;
  width: 100%;
}

.mobile-menu__page--nested {
  border-top-right-radius: 24px;
  border-bottom-right-radius: 24px;
  box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 100%;
}

/* Header */
.mobile-menu__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 20px;
  padding-bottom: 30px;
  flex-shrink: 0;
}

.mobile-menu__logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  margin-bottom: -27px;
}

.mobile-menu__logo img {
  height: 49px;
  width: auto;
}

.mobile-menu__close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  border-radius: 8px;
  transition: background-color 0.2s ease;
}

.mobile-menu__close:hover {
  background: rgba(0, 0, 0, 0.05);
}

.mobile-menu__content {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
}

.mobile-menu__nav {
  padding: 0;
}

/* Menu List */
.mobile-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-menu__list li {
  padding: 0;
  border-bottom: 1px solid #f3f4f6;
  margin-left: 20px;
}

.mobile-menu__list > li:last-child {
  border-bottom: none;
}

/* Menu Item */
.mobile-menu__item {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #f3f4f6;
  padding: 16px 0;
  text-decoration: none;
  color: var(--color-gray-dark, #4d4c4d);
  font-size: 16px;
  font-weight: 400;
  transition: background-color 0.2s ease, color 0.2s ease;
  position: relative;
  gap: 12px;
  padding-right: 27px;
}

.mobile-menu__item:hover,
.mobile-menu__item:focus {
  background: #f9fafb;
  color: var(--color-green);
}

.mobile-menu__item.is-active {
  color: var(--color-green);
}

.mobile-menu__item.is-active .mobile-menu__item-text {
  font-weight: 700;
}

/* Menu Item Text Wrapper */
.mobile-menu__item-text-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-menu__item-text {
  flex: 1;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.4;
}

/* Menu Item Description */
.mobile-menu__item-description {
  font-size: 13px;
  font-weight: 400;
  color: #6b7280;
  line-height: 1.4;
}

.mobile-menu__item-arrow {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-menu__item-arrow svg {
  width: 32px;
  height: 32px;
  display: block;
  transition: transform 0.2s ease;
}

.mobile-menu__item-arrow img {
  transition: transform 0.2s ease;
}

.mobile-menu__item.is-active .mobile-menu__item-arrow svg path,
.mobile-menu__item:hover .mobile-menu__item-arrow svg path {
  fill: var(--color-green);
  transition: fill 0.2s ease;
}

.mobile-menu__footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-left: 20px;
  margin-top: auto;
  padding-bottom: 20px;
  padding-top: 20px;
}

.mobile-menu__lang {
  display: flex;
  align-items: center;
  flex-direction: row-reverse;
  justify-content: flex-end;
  padding: 13px 0;
  gap: 10px;
}

.mobile-menu__lang:hover {
  background: #f3f4f6;
}

.mobile-menu__lang-label {
  color: var(--color-gray-dark);
}

.mobile-menu__lang-flag {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-menu__lang-flag img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.mobile-menu__contact-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 20px;
  height: 40px;
  background: var(--color-green);
  color: #ffffff;
  text-decoration: none;
  border-radius: 32px;
  font-size: 16px;
  font-weight: 600;
  transition: background-color 0.2s ease;
  margin-right: 20px;
}

.mobile-menu__contact-btn:hover {
  background: #2fa53e;
}

.mobile-menu__contact-btn img {
  width: 32px;
  height: 32px;
  transform: rotate(90deg);
}

.mobile-menu__page--nested .mobile-menu__footer {
  border-top: 1px solid #e5e7eb;
}

.mobile-menu__page--nested .mobile-menu__lang {
  display: none;
}

/* Back Button */
.mobile-menu__back {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 24px;
  padding-left: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-green);
  font-size: 16px;
  font-weight: 500;
  transition: color 0.2s ease;
  border-bottom: 1px solid #f3f4f6;
}

.mobile-menu__back:hover {
  color: var(--color-green);
}

.mobile-menu__back:hover svg path {
  fill: var(--color-green);
}

.mobile-menu__back-icon {
  width: 20px;
  height: 20px;
  transform: rotate(180deg);
}

.mobile-menu__back svg {
  width: 32px;
  height: 32px;
  transform: rotate(180deg);
  display: block;
  flex-shrink: 0;
}

/* Back butonunda bayrak - sadece dil seçimi sayfasında */
.mobile-menu__back--with-flag {
  justify-content: space-between;
}

.mobile-menu__back-content {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mobile-menu__back--with-flag svg {
  width: 32px;
  height: 32px;
  transform: rotate(180deg);
  display: block;
  flex-shrink: 0;
  margin: 0;
}

.mobile-menu__back-flag {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-menu__back-flag img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Mega Menu Items in Mobile - Gizle */
.mobile-menu__list .mega-menu {
  display: none !important;
}

.mobile-menu__list .mega-menu__left,
.mobile-menu__list .mega-menu__right,
.mobile-menu__list .mega-menu__single {
  display: none !important;
}

/* Mobil menüde sub-menu'ları gizle (JavaScript ile açılacak) */
.mobile-menu__list .sub-menu {
  display: none !important;
}

/* Mobil menüde mega menu item'larını normal liste item'ına çevir */
.mobile-menu__list .mega-menu__item {
  background: transparent;
  border-radius: 0;
  padding: 0;
  border: none;
  margin: 0;
  list-style: none;
}

.mobile-menu__list .mega-menu__item a {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  text-decoration: none;
  color: var(--color-gray-dark);
  font-size: 16px;
  font-weight: 400;
}

.mobile-menu__list .mega-menu__link {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 16px 24px;
  text-decoration: none;
  color: var(--color-gray-dark);
  font-size: 16px;
  font-weight: 400;
}

.mobile-menu__list .mega-menu__title {
  font-size: 16px;
  font-weight: 400;
}

/* Mobil menü item görselleri */
.mobile-menu__item-image {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-menu__item-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Responsive - Sadece mobilde göster */
@media (min-width: 1024px) {
  .mobile-menu {
    display: none !important;
  }
}
