/* iOS Sidebar Styles */

.ios-sidebar {
  width: 280px;
  min-width: 280px;
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-right: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
  overflow-x: hidden;
}

.ios-sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.ios-sidebar-logo img {
  max-width: 180px;
  height: auto;
}

.ios-sidebar-nav {
  flex: 1;
  padding: 16px 0;
  overflow-y: auto;
}

.ios-sidebar-nav-item {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  margin: 4px 12px;
  color: #1d1d1f;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.2s ease;
  font-size: 17px;
  font-weight: 500;
}

.ios-sidebar-nav-item:hover {
  background: rgba(0, 122, 255, 0.1);
  color: #007AFF;
  transform: translateX(4px);
}

.ios-sidebar-nav-item.active {
  background: rgba(0, 122, 255, 0.15);
  color: #007AFF;
}

/* Expandable menu items with mega menu */
.ios-sidebar-nav-item-has-children {
  position: relative;
  padding: 0;
  margin: 4px 12px;
}

.ios-sidebar-nav-item-link {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: #1d1d1f;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.2s ease;
  font-size: 17px;
  font-weight: 500;
  width: 100%;
}

.ios-sidebar-nav-item-arrow {
  margin-left: auto;
  display: flex;
  align-items: center;
  transition: transform 0.2s ease;
}

.ios-sidebar-nav-item-arrow svg {
  width: 16px;
  height: 16px;
}

.ios-sidebar-nav-item-has-children:hover .ios-sidebar-nav-item-link {
  background: rgba(0, 122, 255, 0.1);
  color: #007AFF;
}

.ios-sidebar-nav-item-has-children:hover .ios-sidebar-nav-item-arrow {
  transform: rotate(90deg);
}

/* iOS Mega Menu - Floating Independent */
.ios-mega-menu {
  position: fixed;
  left: 280px;
  top: 0;
  width: calc(100vw - 280px);
  height: 100vh;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  border-left: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
  z-index: 9999;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-30px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
  overflow-x: hidden;
  pointer-events: none;
}

.ios-mega-menu-parent:hover .ios-mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

/* Keep mega menu visible when hovering over it */
.ios-mega-menu:hover {
  opacity: 1;
  visibility: visible;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

.ios-mega-menu-content {
  padding: 40px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Mega Menu Tabs */
.ios-mega-menu-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 16px;
}

.ios-mega-menu-tab-item {
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 500;
  color: #6e6e73;
  background: transparent;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
}

.ios-mega-menu-tab-item:hover {
  background: rgba(0, 122, 255, 0.1);
  color: #007AFF;
}

.ios-mega-menu-tab-item.active {
  background: rgba(0, 122, 255, 0.15);
  color: #007AFF;
  font-weight: 600;
}

.ios-mega-menu-all-link {
  margin-left: auto;
  font-weight: 600;
}

/* Mega Menu Tab Contents */
.ios-mega-menu-tab-contents {
  position: relative;
}

.ios-mega-menu-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.ios-mega-menu-tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mega Menu Columns */
.ios-mega-menu-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 32px;
  align-items: start;
}

.ios-mega-menu-column {
  min-width: 0;
}

.ios-mega-menu-column-title {
  font-size: 17px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.ios-mega-menu-column-title a {
  color: #1d1d1f;
  text-decoration: none;
  transition: color 0.2s ease;
}

.ios-mega-menu-column-title a:hover {
  color: #007AFF;
}

.ios-mega-menu-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ios-mega-menu-list li {
  margin-bottom: 8px;
}

.ios-mega-menu-list a {
  display: block;
  padding: 8px 12px;
  color: #6e6e73;
  text-decoration: none;
  font-size: 15px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.ios-mega-menu-list a:hover {
  background: rgba(0, 122, 255, 0.1);
  color: #007AFF;
  transform: translateX(4px);
}

.ios-mega-menu-more {
  font-weight: 500;
  color: #007AFF !important;
}

/* Agency of the Month Column */
.ios-mega-menu-agency-of-month {
  grid-column: span 1;
}

.ios-mega-menu-agency-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ios-mega-menu-agency-card {
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 16px;
  padding: 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  display: block;
}

.ios-mega-menu-agency-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  background: rgba(255, 255, 255, 0.8);
}

.ios-mega-menu-agency-card img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin-bottom: 12px;
}

.ios-mega-menu-agency-name {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  text-align: center;
}

/* Resources Mega Menu Specific Styles */
.ios-resources-mega-menu .ios-mega-menu-columns {
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
}

.ios-mega-menu-tools-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

.ios-mega-menu-join-tools {
  background: rgba(0, 122, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
}

.ios-mega-menu-join-tools-title {
  font-size: 17px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 8px;
}

.ios-mega-menu-join-tools-description {
  font-size: 15px;
  color: #6e6e73;
  line-height: 1.5;
}

.ios-mega-menu-column-title-small {
  font-size: 15px;
  margin-bottom: 12px;
}

.ios-mega-menu-join-tools-button {
  margin-top: 16px;
  display: inline-block;
}

.ios-mega-menu-eguide-featured {
  margin-bottom: 24px;
}

.ios-mega-menu-eguide-card {
  position: relative;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
}

.ios-mega-menu-eguide-card img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.ios-mega-menu-eguide-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #007AFF;
  color: white;
  padding: 4px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.ios-mega-menu-eguide-title {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  margin-top: 12px;
  line-height: 1.4;
}

.ios-mega-menu-eguide-list-title {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 12px;
  margin-top: 24px;
}

.ios-mega-menu-eguide-cta {
  margin-top: 20px;
}

.ios-mega-menu-eguide-cta a {
  color: #007AFF;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.ios-mega-menu-eguide-cta a:hover {
  text-decoration: underline;
}

.ios-mega-menu-event-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ios-mega-menu-event-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 12px;
  transition: all 0.2s ease;
}

.ios-mega-menu-event-item:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: translateY(-2px);
}

.ios-mega-menu-event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  background: rgba(0, 122, 255, 0.1);
  border-radius: 8px;
  padding: 8px;
}

.ios-mega-menu-event-day {
  font-size: 20px;
  font-weight: 700;
  color: #007AFF;
  line-height: 1;
}

.ios-mega-menu-event-month {
  font-size: 12px;
  color: #6e6e73;
  text-transform: uppercase;
  margin-top: 4px;
}

.ios-mega-menu-event-info {
  flex: 1;
}

.ios-mega-menu-event-title {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  text-decoration: none;
  display: block;
  margin-bottom: 4px;
}

.ios-mega-menu-event-title:hover {
  color: #007AFF;
}

.ios-mega-menu-event-location {
  font-size: 13px;
  color: #6e6e73;
}

.ios-mega-menu-see-all-events {
  margin-top: 20px;
  text-align: center;
}

.ios-mega-menu-see-all-events a {
  color: #007AFF;
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}

.ios-mega-menu-see-all-events a:hover {
  text-decoration: underline;
}

/* Ensure mega menu stays on top */
.ios-mega-menu-parent {
  position: static;
}

/* Responsive Mega Menu */
@media (max-width: 1200px) {
  .ios-mega-menu {
    left: 0;
    width: 100vw;
  }
  
  .ios-mega-menu-columns {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
  }
  
  .ios-resources-mega-menu .ios-mega-menu-columns {
    grid-template-columns: 1fr;
  }
  
  .ios-mega-menu-tools-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .ios-mega-menu-content {
    padding: 24px 16px;
  }
  
  .ios-mega-menu-tabs {
    gap: 4px;
  }
  
  .ios-mega-menu-tab-item {
    padding: 8px 16px;
    font-size: 14px;
  }
  
  .ios-mega-menu-columns {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

.ios-sidebar-nav-item-icon {
  width: 24px;
  height: 24px;
  margin-right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ios-sidebar-nav-item-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.ios-sidebar-user {
  padding: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.5);
}

.ios-sidebar-user-profile {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.ios-sidebar-user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  margin-right: 12px;
}

.ios-sidebar-user-info {
  flex: 1;
}

.ios-sidebar-user-name {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  margin-bottom: 2px;
}

.ios-sidebar-user-email {
  font-size: 13px;
  color: #6e6e73;
}

.ios-sidebar-login-button {
  width: 100%;
  padding: 12px;
  background: #007AFF;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.ios-sidebar-login-button:hover {
  background: #0051D5;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 122, 255, 0.4);
}

/* Sidebar Sections */
.ios-sidebar-section {
  margin: 8px 0;
}

.ios-sidebar-section-title {
  padding: 8px 20px;
  font-size: 13px;
  font-weight: 600;
  color: #6e6e73;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Mobile Sidebar */
@media (max-width: 1024px) {
  .ios-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .ios-sidebar.open {
    transform: translateX(0);
  }
  
  .ios-sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  }
  
  @media (max-width: 1024px) {
    .ios-sidebar-toggle {
      display: flex;
    }
  }
  
  .ios-ipad-viewport {
    margin-left: 0;
  }
}

/* Scrollbar Styling */
.ios-sidebar::-webkit-scrollbar {
  width: 6px;
}

.ios-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.ios-sidebar::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.ios-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.3);
}

